2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 08:23:42 -04:00

New feature: Monitor on start (#42)

* Implement monitor on start

* finish implementation of monitor on start
This commit is contained in:
Xjph
2021-12-18 12:21:07 -03:30
committed by GitHub
parent d3315c5c65
commit 889825275d
5 changed files with 39 additions and 3 deletions

View File

@ -655,7 +655,24 @@ namespace Observatory.UI.Views
Properties.Core.Default.Save();
};
#endregion
#region Monitor On Launch
TextBlock startMonitorLabel = new() { Text = "Start monitor on Observatory launch" };
CheckBox startMonitorCheckbox = new() { IsChecked = Properties.Core.Default.StartMonitor, Content = startMonitorLabel };
startMonitorCheckbox.Checked += (object sender, RoutedEventArgs e) =>
{
Properties.Core.Default.StartMonitor = true;
Properties.Core.Default.Save();
};
startMonitorCheckbox.Unchecked += (object sender, RoutedEventArgs e) =>
{
Properties.Core.Default.StartMonitor = false;
Properties.Core.Default.Save();
};
#endregion
@ -726,6 +743,7 @@ namespace Observatory.UI.Views
#endregion
gridManager.AddSetting(primeSystemContexCheckbox);
gridManager.AddSetting(startMonitorCheckbox);
gridManager.AddSettingWithLabel(journalPathLabel, journalPath);
gridManager.AddSetting(journalBrowse);