mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-04-20 01:33:49 -04:00
New feature: Monitor on start (#42)
* Implement monitor on start * finish implementation of monitor on start
This commit is contained in:
parent
d3315c5c65
commit
889825275d
@ -4,8 +4,6 @@ using Observatory.Framework.Files;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Observatory.Framework.Files.Journal;
|
using Observatory.Framework.Files.Journal;
|
||||||
|
|
||||||
namespace Observatory.PluginManagement
|
namespace Observatory.PluginManagement
|
||||||
|
12
ObservatoryCore/Properties/Core.Designer.cs
generated
12
ObservatoryCore/Properties/Core.Designer.cs
generated
@ -238,5 +238,17 @@ namespace Observatory.Properties {
|
|||||||
this["NativeNotifyTimeout"] = value;
|
this["NativeNotifyTimeout"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||||
|
public bool StartMonitor {
|
||||||
|
get {
|
||||||
|
return ((bool)(this["StartMonitor"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["StartMonitor"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,5 +56,8 @@
|
|||||||
<Setting Name="NativeNotifyTimeout" Type="System.Int32" Scope="User">
|
<Setting Name="NativeNotifyTimeout" Type="System.Int32" Scope="User">
|
||||||
<Value Profile="(Default)">8000</Value>
|
<Value Profile="(Default)">8000</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="StartMonitor" Type="System.Boolean" Scope="User">
|
||||||
|
<Value Profile="(Default)">False</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
@ -56,6 +56,11 @@ namespace Observatory.UI.ViewModels
|
|||||||
|
|
||||||
tabs.Add(new CoreModel() { Name = "Core", UI = new BasicUIViewModel(new ObservableCollection<object>()) { UIType = Framework.PluginUI.UIType.Core } });
|
tabs.Add(new CoreModel() { Name = "Core", UI = new BasicUIViewModel(new ObservableCollection<object>()) { UIType = Framework.PluginUI.UIType.Core } });
|
||||||
|
|
||||||
|
if (Properties.Core.Default.StartMonitor)
|
||||||
|
{
|
||||||
|
ToggleMonitor();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReadAll()
|
public void ReadAll()
|
||||||
|
@ -655,7 +655,24 @@ namespace Observatory.UI.Views
|
|||||||
Properties.Core.Default.Save();
|
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
|
#endregion
|
||||||
|
|
||||||
@ -726,6 +743,7 @@ namespace Observatory.UI.Views
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
gridManager.AddSetting(primeSystemContexCheckbox);
|
gridManager.AddSetting(primeSystemContexCheckbox);
|
||||||
|
gridManager.AddSetting(startMonitorCheckbox);
|
||||||
gridManager.AddSettingWithLabel(journalPathLabel, journalPath);
|
gridManager.AddSettingWithLabel(journalPathLabel, journalPath);
|
||||||
gridManager.AddSetting(journalBrowse);
|
gridManager.AddSetting(journalBrowse);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user