@@ -7,6 +7,9 @@ namespace SuperGrate.Controls
77{
88 public partial class Settings : Form
99 {
10+ /// <summary>
11+ /// This method is the entrypoint for the settings class.
12+ /// </summary>
1013 public Settings ( )
1114 {
1215 InitializeComponent ( ) ;
@@ -15,11 +18,17 @@ public Settings()
1518 btnRevert . SetSystemIcon ( Properties . Resources . reload ) ;
1619 btnApply . SetSystemIcon ( Properties . Resources . x ) ;
1720 }
21+ /// <summary>
22+ /// This event fires when the settings form loads. The method calls RefreshSettings.
23+ /// </summary>
1824 private void Settings_Load ( object sender , EventArgs e )
1925 {
2026 RefreshSettings ( ) ;
2127 btnSave . Enabled = Config . CanSaveConfig ( ) ;
2228 }
29+ /// <summary>
30+ /// This method loads the Config.Settings dictionary into the settingsList.
31+ /// </summary>
2332 private void RefreshSettings ( )
2433 {
2534 settingsList . Items . Clear ( ) ;
@@ -41,6 +50,9 @@ private void RefreshSettings()
4150 }
4251 settingsList . AutoResizeColumns ( ColumnHeaderAutoResizeStyle . ColumnContent ) ;
4352 }
53+ /// <summary>
54+ /// This event fires when the btnRevert button is clicked. The method re-loads the configuration on disk back into the settingsList control.
55+ /// </summary>
4456 private async void btnRevert_Click ( object sender , EventArgs e )
4557 {
4658 btnRevert . Enabled = false ;
@@ -54,6 +66,9 @@ private async void btnRevert_Click(object sender, EventArgs e)
5466 btnRevert . Text = text ;
5567 btnRevert . Enabled = true ;
5668 }
69+ /// <summary>
70+ /// This event fires when the settingsList list is double clicked. The method opens the selected setting for editing.
71+ /// </summary>
5772 private void SettingsList_DoubleClick ( object sender , EventArgs e )
5873 {
5974 if ( settingsList . SelectedItems . Count != 0 )
@@ -69,6 +84,9 @@ private void SettingsList_DoubleClick(object sender, EventArgs e)
6984 btnApply . Focus ( ) ;
7085 }
7186 }
87+ /// <summary>
88+ /// This event fires when the btnSave button is clicked. The method will attempt to save the configuration to disk.
89+ /// </summary>
7290 private async void BtnSave_Click ( object sender , EventArgs e )
7391 {
7492 Config . SaveConfig ( ) ;
0 commit comments