Improve readability of some specific segments

This commit is contained in:
JustArchi
2016-11-24 07:46:37 +01:00
parent df218074ad
commit 137a53ef89
12 changed files with 173 additions and 32 deletions

View File

@@ -47,7 +47,10 @@ namespace ArchiSteamFarm {
}
}
MessageBoxTarget messageBoxTarget = new MessageBoxTarget { Name = "MessageBox", Layout = GeneralLayout };
MessageBoxTarget messageBoxTarget = new MessageBoxTarget {
Name = "MessageBox",
Layout = GeneralLayout
};
LogManager.Configuration.AddTarget(messageBoxTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Fatal, messageBoxTarget));
@@ -59,7 +62,11 @@ namespace ArchiSteamFarm {
return;
}
FileTarget fileTarget = new FileTarget("File") { DeleteOldFileOnStartup = true, FileName = SharedInfo.LogFile, Layout = GeneralLayout };
FileTarget fileTarget = new FileTarget("File") {
DeleteOldFileOnStartup = true,
FileName = SharedInfo.LogFile,
Layout = GeneralLayout
};
LogManager.Configuration.AddTarget(fileTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, fileTarget));
@@ -68,7 +75,14 @@ namespace ArchiSteamFarm {
}
internal static void InitFormLogger() {
RichTextBoxTarget formControlTarget = new RichTextBoxTarget { AutoScroll = true, ControlName = "LogTextBox", FormName = "MainForm", Layout = GeneralLayout, MaxLines = byte.MaxValue, Name = "RichTextBox" };
RichTextBoxTarget formControlTarget = new RichTextBoxTarget {
AutoScroll = true,
ControlName = "LogTextBox",
FormName = "MainForm",
Layout = GeneralLayout,
MaxLines = byte.MaxValue,
Name = "RichTextBox"
};
formControlTarget.RowColoringRules.Add(new RichTextBoxRowColoringRule("level >= LogLevel.Error", "Red", "Black"));
formControlTarget.RowColoringRules.Add(new RichTextBoxRowColoringRule("level >= LogLevel.Warn", "Yellow", "Black"));

View File

@@ -100,7 +100,10 @@ namespace GUI {
botStatusForm.TopLevel = false;
BotStatusPanel.Controls.Add(botStatusForm);
ListViewItem botListViewItem = new ListViewItem { ImageIndex = BotIndexes[botName], Text = botName };
ListViewItem botListViewItem = new ListViewItem {
ImageIndex = BotIndexes[botName],
Text = botName
};
BotListView.Items.Add(botListViewItem);
}