Always select default log in log viewer

This commit is contained in:
N00MKRAD
2021-05-08 12:07:24 +02:00
parent 6dcb3a9367
commit a82f600479
2 changed files with 9 additions and 3 deletions

View File

@@ -22,6 +22,15 @@ namespace Flowframes.UI
foreach (FileInfo file in logFiles)
dd.Items.Add(file.Name);
if (dd.Items.Count > 0)
dd.SelectedIndex = 0;
for(int i = 0; i < dd.Items.Count; i++)
{
if (((string)dd.Items[i]).Split('.').FirstOrDefault() == Logger.defaultLogName)
dd.SelectedIndex = i;
}
}
public static void RefreshLogBox(TextBox logBox, string logFilename)