2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-04-05 17:39:39 -04:00

Added checkbox to control native notifications.

This commit is contained in:
Xjph 2021-07-04 12:14:53 -02:30
parent 93d691a1f6
commit 8386586cdd

View File

@ -123,7 +123,7 @@ namespace Observatory.UI.Views
private Grid GenerateCoreUI()
{
Grid corePanel = new();
ColumnDefinitions columns = new()
@ -136,12 +136,33 @@ namespace Observatory.UI.Views
RowDefinitions rows = new()
{
new RowDefinition() { Height = new GridLength(0, GridUnitType.Auto) },
new RowDefinition() { Height = new GridLength(0, GridUnitType.Auto) },
new RowDefinition() { Height = new GridLength(0, GridUnitType.Auto) }
};
corePanel.RowDefinitions = rows;
var pluginManager = PluginManagement.PluginManager.GetInstance;
#region Native Settings
TextBlock nativeNotifyLabel = new() { Text = "Basic Notification" }; ;
CheckBox nativeNotifyCheckbox = new() { IsChecked = Properties.Core.Default.NativeNotify, Content = nativeNotifyLabel };
nativeNotifyCheckbox.Checked += (object sender, RoutedEventArgs e) =>
{
Properties.Core.Default.NativeNotify = true;
Properties.Core.Default.Save();
};
nativeNotifyCheckbox.Unchecked += (object sender, RoutedEventArgs e) =>
{
Properties.Core.Default.NativeNotify = false;
Properties.Core.Default.Save();
};
corePanel.AddControl(nativeNotifyCheckbox, 1, 0, 2);
#endregion
#region Journal Location
TextBlock journalPathLabel = new()
@ -186,12 +207,14 @@ namespace Observatory.UI.Views
};
corePanel.AddControl(journalPathLabel, 1, 0);
corePanel.AddControl(journalPath, 1, 1);
corePanel.AddControl(journalBrowse, 1, 2);
corePanel.AddControl(journalPathLabel, 2, 0);
corePanel.AddControl(journalPath, 2, 1);
corePanel.AddControl(journalBrowse, 2, 2);
#endregion
var pluginManager = PluginManagement.PluginManager.GetInstance;
#region Plugin List
DataGrid pluginList = new() { Margin = new Thickness(0, 20) };