Compare commits

..

No commits in common. "aebf45892341a3f92d5e0253f374c5ea3a0a5a28" and "617ade0163df4bc5d026d39252166a3c7a9d72af" have entirely different histories.

2 changed files with 4 additions and 8 deletions

View File

@ -112,7 +112,7 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="Location on disk for the player journal. There is usually no need to change this setting." Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.08,0.496"/>
<TextBox x:Name="journallocation" IsReadOnly="true" Text="" Grid.Row="1" Grid.Column="0" Margin="5,0,5,10" TextWrapping="Wrap" />
<TextBox x:Name="journallocation" Text="" Grid.Row="1" Grid.Column="0" Margin="5,0,5,10" TextWrapping="Wrap" />
<Button x:Name="browsejournallocation" Content="Browse" Grid.Row="1" Grid.Column="1" Margin="0,0,0,0" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Left" Click="browsejournallocation_Click"/>
</Grid>
</GroupBox>

View File

@ -45,15 +45,11 @@ namespace EliteBGS.Util {
public void SaveGlobal() {
var serializer = JsonSerializer.CreateDefault();
using (FileStream filestream = File.OpenWrite(config_file)) {
filestream.SetLength(0);
filestream.Flush();
using (StreamWriter file = new StreamWriter(filestream, Encoding.UTF8)) {
using (var file = new StreamWriter(File.OpenWrite(config_file), Encoding.UTF8)) {
var stream = new JsonTextWriter(file);
serializer.Serialize(stream, global_config);
}
}
}
public void LoadGlobal() {
var serializer = JsonSerializer.CreateDefault();