@@ -20,6 +20,7 @@ public bool ActivateOnLaunch
2020 {
2121 _activateOnLaunch = value ;
2222 appSettings [ nameof ( ActivateOnLaunch ) ] . Value = _activateOnLaunch . ToString ( ) ;
23+ configFile . Save ( ConfigurationSaveMode . Modified ) ;
2324 }
2425 }
2526
@@ -32,6 +33,7 @@ public bool AutomaticallyLaunchWithWindows
3233 {
3334 _automaticallyLaunchWithWindows = value ;
3435 appSettings [ nameof ( AutomaticallyLaunchWithWindows ) ] . Value = _automaticallyLaunchWithWindows . ToString ( ) ;
36+ configFile . Save ( ConfigurationSaveMode . Modified ) ;
3537 }
3638 }
3739
@@ -45,6 +47,7 @@ public bool ShowMessageOnLaunch
4547 {
4648 _showMessageOnLaunch = value ;
4749 appSettings [ nameof ( ShowMessageOnLaunch ) ] . Value = _showMessageOnLaunch . ToString ( ) ;
50+ configFile . Save ( ConfigurationSaveMode . Modified ) ;
4851 }
4952 }
5053
@@ -58,6 +61,7 @@ public int DefaultDuration
5861 {
5962 _defaultDuration = value ;
6063 appSettings [ nameof ( DefaultDuration ) ] . Value = _defaultDuration . ToString ( ) ;
64+ configFile . Save ( ConfigurationSaveMode . Modified ) ;
6165 }
6266 }
6367
@@ -71,6 +75,7 @@ public TrayIcon Icon
7175 {
7276 _icon = value ;
7377 appSettings [ nameof ( Icon ) ] . Value = _icon . ToString ( ) ;
78+ configFile . Save ( ConfigurationSaveMode . Modified ) ;
7479 }
7580 }
7681
@@ -84,6 +89,7 @@ public List<int> Durations
8489 {
8590 _durations = value ;
8691 appSettings [ nameof ( Durations ) ] . Value = string . Join ( ',' , Durations . ToArray ( ) ) ;
92+ configFile . Save ( ConfigurationSaveMode . Modified ) ;
8793 }
8894 }
8995
@@ -149,7 +155,7 @@ public AppSettings()
149155 case "Mug" :
150156 _icon = TrayIcon . Mug ;
151157 break ;
152- case "Eye-ZZZ " :
158+ case "EyeWithZzz " :
153159 _icon = TrayIcon . EyeWithZzz ;
154160 break ;
155161 default :
@@ -181,6 +187,8 @@ public AppSettings()
181187 AddUpdateAppSettings ( nameof ( Durations ) , string . Join ( ',' , _durations . ToArray ( ) ) ) ;
182188 Console . WriteLine ( $ "Error reading Durations app settings") ;
183189 }
190+
191+ configFile . Save ( ConfigurationSaveMode . Modified ) ;
184192 }
185193
186194 void AddUpdateAppSettings ( string key , string value )
0 commit comments