Skip to content

Commit e267870

Browse files
committed
After tidying
1 parent 6cf5272 commit e267870

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Source/Menu/Notifications/NotificationManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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))

Source/Menu/Notifications/Notifications.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Text : Item
4848
}
4949
class Heading : Item
5050
{
51-
new public string Color { get; set; } = "blue";
51+
public new string Color { get; set; } = "blue";
5252
}
5353
class Link : Item
5454
{

0 commit comments

Comments
 (0)