@@ -51,9 +51,9 @@ class NotificationManager
5151 private Exception Error ;
5252 private Dictionary < string , string > ParameterDictionary ;
5353
54- private MainForm MainForm ; // Needed so we can add controls to the NotificationPage
55- private UpdateManager UpdateManager ;
56- private UserSettings Settings ;
54+ private readonly MainForm MainForm ; // Needed so we can add controls to the NotificationPage
55+ private readonly UpdateManager UpdateManager ;
56+ private readonly UserSettings Settings ;
5757
5858 public NotificationManager ( MainForm mainForm , UpdateManager updateManager , UserSettings settings )
5959 {
@@ -88,7 +88,7 @@ public void CheckNotifications()
8888 }
8989
9090 static bool Log = false ;
91- static string LogFile = "notifications_trial_log.txt" ;
91+ const string LogFile = "notifications_trial_log.txt" ;
9292
9393 public Notifications GetNotifications ( )
9494 {
@@ -302,7 +302,7 @@ private void AddItemToPage(NotificationPage page, Item item)
302302 {
303303 new NTextControl ( page , item . Label , text . Color ) . Add ( ) ;
304304 }
305- else if ( item is Item item2 )
305+ else
306306 {
307307 new NTextControl ( page , item . Label ) . Add ( ) ;
308308 }
@@ -386,7 +386,7 @@ private string ReplaceParameter(string field)
386386 var parameterArray = field . Split ( '{' , '}' ) ; // 5 elements: prefix, "", target, "", suffix
387387 var target = parameterArray [ 2 ] ;
388388 var lowerCaseTarget = parameterArray [ 2 ] . ToLower ( ) ;
389- var replacement = parameterArray [ 2 ] ; // Default is original text
389+ string replacement ;
390390
391391 // If found in dictionary, then use that else extract it from program
392392 if ( ParameterDictionary . ContainsKey ( lowerCaseTarget ) )
0 commit comments