Skip to content

Commit

Permalink
remember "refresh selected server" setting
Browse files Browse the repository at this point in the history
  • Loading branch information
PredatH0r committed Jul 1, 2015
1 parent eae2a02 commit 397f97d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
12 changes: 12 additions & 0 deletions ServerBrowser/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ServerBrowser/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@
<Setting Name="ShowOptions" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="RefreshSelected" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
4 changes: 3 additions & 1 deletion ServerBrowser/ServerBrowserForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ protected override void OnLoad(EventArgs e)
}
#endregion

#region OnClosed()
#region OnFormClosing()
protected override void OnFormClosing(FormClosingEventArgs e)
{
Properties.Settings.Default.InitialGameID = (int) this.SteamAppID;
Properties.Settings.Default.MasterServer = this.comboMasterServer.Text;
Properties.Settings.Default.ShowDetailColumns = this.cbShowPlayerCountDetailColumns.Checked;
Properties.Settings.Default.RefreshInterval = Convert.ToInt32(this.spinRefreshInterval.EditValue);
Properties.Settings.Default.RefreshSelected = this.cbRefreshSelectedServer.Checked;
Properties.Settings.Default.ShowOptions = this.cbAdvancedOptions.Checked;
Properties.Settings.Default.Save();

Expand Down Expand Up @@ -265,6 +266,7 @@ private void InitAppSettings()
this.cbShowPlayerCountDetailColumns.Checked = Properties.Settings.Default.ShowDetailColumns;
this.spinRefreshInterval.EditValue = (decimal)Properties.Settings.Default.RefreshInterval;
this.cbAdvancedOptions.Checked = Properties.Settings.Default.ShowOptions;
this.cbRefreshSelectedServer.Checked = Properties.Settings.Default.RefreshSelected;
}
#endregion

Expand Down
3 changes: 3 additions & 0 deletions ServerBrowser/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<setting name="ShowOptions" serializeAs="String">
<value>False</value>
</setting>
<setting name="RefreshSelected" serializeAs="String">
<value>True</value>
</setting>
</ServerBrowser.Properties.Settings>
</userSettings>
<runtime>
Expand Down

0 comments on commit 397f97d

Please sign in to comment.