Compare commits
2 Commits
617ade0163
...
aebf458923
Author | SHA1 | Date | |
---|---|---|---|
aebf458923 | |||
47436f42b0 |
@ -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" Text="" Grid.Row="1" Grid.Column="0" Margin="5,0,5,10" TextWrapping="Wrap" />
|
||||
<TextBox x:Name="journallocation" IsReadOnly="true" 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>
|
||||
|
@ -45,11 +45,15 @@ namespace EliteBGS.Util {
|
||||
|
||||
public void SaveGlobal() {
|
||||
var serializer = JsonSerializer.CreateDefault();
|
||||
using (var file = new StreamWriter(File.OpenWrite(config_file), Encoding.UTF8)) {
|
||||
using (FileStream filestream = File.OpenWrite(config_file)) {
|
||||
filestream.SetLength(0);
|
||||
filestream.Flush();
|
||||
using (StreamWriter file = new StreamWriter(filestream, Encoding.UTF8)) {
|
||||
var stream = new JsonTextWriter(file);
|
||||
serializer.Serialize(stream, global_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadGlobal() {
|
||||
var serializer = JsonSerializer.CreateDefault();
|
||||
|
Loading…
x
Reference in New Issue
Block a user