diff --git a/Bloxstrap/ViewModels/BootstrapperViewModel.cs b/Bloxstrap/ViewModels/AppearanceViewModel.cs similarity index 76% rename from Bloxstrap/ViewModels/BootstrapperViewModel.cs rename to Bloxstrap/ViewModels/AppearanceViewModel.cs index 2bdabfa..278f928 100644 --- a/Bloxstrap/ViewModels/BootstrapperViewModel.cs +++ b/Bloxstrap/ViewModels/AppearanceViewModel.cs @@ -1,24 +1,20 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; +using CommunityToolkit.Mvvm.Input; + using Bloxstrap.Dialogs; using Bloxstrap.Enums; using Bloxstrap.Helpers.Extensions; using Bloxstrap.Views; -using CommunityToolkit.Mvvm.Input; -using Wpf.Ui.Mvvm.Services; -using Wpf.Ui.Mvvm.Contracts; namespace Bloxstrap.ViewModels { - public class BootstrapperViewModel : INotifyPropertyChanged + public class AppearanceViewModel : INotifyPropertyChanged { public event PropertyChangedEventHandler? PropertyChanged; public void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); @@ -35,36 +31,11 @@ namespace Bloxstrap.ViewModels dialog.ShowBootstrapper(); } - - public BootstrapperViewModel(Page page) + public AppearanceViewModel(Page page) { _page = page; } - public bool CreateDesktopIcon - { - get => App.Settings.Prop.CreateDesktopIcon; - set => App.Settings.Prop.CreateDesktopIcon = value; - } - - public bool UpdateCheckingEnabled - { - get => App.Settings.Prop.CheckForUpdates; - set => App.Settings.Prop.CheckForUpdates = value; - } - - public bool ChannelChangePromptingEnabled - { - get => App.Settings.Prop.PromptChannelChange; - set => App.Settings.Prop.PromptChannelChange = value; - } - - public bool MultiInstanceLaunchingEnabled - { - get => App.Settings.Prop.MultiInstanceLaunching; - set => App.Settings.Prop.MultiInstanceLaunching = value; - } - public IReadOnlyDictionary Themes { get; set; } = new Dictionary() { { "System Default", Enums.Theme.Default }, diff --git a/Bloxstrap/ViewModels/BehaviourViewModel.cs b/Bloxstrap/ViewModels/BehaviourViewModel.cs new file mode 100644 index 0000000..9060d27 --- /dev/null +++ b/Bloxstrap/ViewModels/BehaviourViewModel.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using Bloxstrap.Dialogs; +using Bloxstrap.Enums; +using Bloxstrap.Helpers.Extensions; +using Bloxstrap.Views; +using CommunityToolkit.Mvvm.Input; +using Wpf.Ui.Mvvm.Services; +using Wpf.Ui.Mvvm.Contracts; + +namespace Bloxstrap.ViewModels +{ + public class BehaviourViewModel + { + public bool CreateDesktopIcon + { + get => App.Settings.Prop.CreateDesktopIcon; + set => App.Settings.Prop.CreateDesktopIcon = value; + } + + public bool UpdateCheckingEnabled + { + get => App.Settings.Prop.CheckForUpdates; + set => App.Settings.Prop.CheckForUpdates = value; + } + + public bool ChannelChangePromptingEnabled + { + get => App.Settings.Prop.PromptChannelChange; + set => App.Settings.Prop.PromptChannelChange = value; + } + + public bool MultiInstanceLaunchingEnabled + { + get => App.Settings.Prop.MultiInstanceLaunching; + set => App.Settings.Prop.MultiInstanceLaunching = value; + } + } +} diff --git a/Bloxstrap/Views/MainWindow.xaml b/Bloxstrap/Views/MainWindow.xaml index 4531f8c..b498818 100644 --- a/Bloxstrap/Views/MainWindow.xaml +++ b/Bloxstrap/Views/MainWindow.xaml @@ -43,7 +43,8 @@ - + + diff --git a/Bloxstrap/Views/Pages/AppearancePage.xaml b/Bloxstrap/Views/Pages/AppearancePage.xaml new file mode 100644 index 0000000..bfa9651 --- /dev/null +++ b/Bloxstrap/Views/Pages/AppearancePage.xaml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Bloxstrap/Views/Pages/AppearancePage.xaml.cs b/Bloxstrap/Views/Pages/AppearancePage.xaml.cs new file mode 100644 index 0000000..42760cd --- /dev/null +++ b/Bloxstrap/Views/Pages/AppearancePage.xaml.cs @@ -0,0 +1,30 @@ +using Bloxstrap.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Bloxstrap.Views.Pages +{ + /// + /// Interaction logic for AppearancePage.xaml + /// + public partial class AppearancePage + { + public AppearancePage() + { + DataContext = new AppearanceViewModel(this); + InitializeComponent(); + } + } +} diff --git a/Bloxstrap/Views/Pages/BehaviourPage.xaml b/Bloxstrap/Views/Pages/BehaviourPage.xaml new file mode 100644 index 0000000..5e6ba9c --- /dev/null +++ b/Bloxstrap/Views/Pages/BehaviourPage.xaml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Bloxstrap/Views/Pages/BehaviourPage.xaml.cs b/Bloxstrap/Views/Pages/BehaviourPage.xaml.cs new file mode 100644 index 0000000..9dbf4bd --- /dev/null +++ b/Bloxstrap/Views/Pages/BehaviourPage.xaml.cs @@ -0,0 +1,16 @@ +using Bloxstrap.ViewModels; + +namespace Bloxstrap.Views.Pages +{ + /// + /// Interaction logic for BehaviourPage.xaml + /// + public partial class BehaviourPage + { + public BehaviourPage() + { + DataContext = new BehaviourViewModel(); + InitializeComponent(); + } + } +} diff --git a/Bloxstrap/Views/Pages/BootstrapperPage.xaml b/Bloxstrap/Views/Pages/BootstrapperPage.xaml deleted file mode 100644 index 1b9221f..0000000 --- a/Bloxstrap/Views/Pages/BootstrapperPage.xaml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Bloxstrap/Views/Pages/BootstrapperPage.xaml.cs b/Bloxstrap/Views/Pages/BootstrapperPage.xaml.cs deleted file mode 100644 index de46bac..0000000 --- a/Bloxstrap/Views/Pages/BootstrapperPage.xaml.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Bloxstrap.ViewModels; - -namespace Bloxstrap.Views.Pages -{ - /// - /// Interaction logic for BootstrapperPage.xaml - /// - public partial class BootstrapperPage - { - public BootstrapperPage() - { - DataContext = new BootstrapperViewModel(this); - InitializeComponent(); - } - } -} diff --git a/Bloxstrap/Views/Pages/IntegrationsPage.xaml b/Bloxstrap/Views/Pages/IntegrationsPage.xaml index 4c30a8b..815d412 100644 --- a/Bloxstrap/Views/Pages/IntegrationsPage.xaml +++ b/Bloxstrap/Views/Pages/IntegrationsPage.xaml @@ -116,7 +116,7 @@ - + diff --git a/Bloxstrap/Views/Pages/ModsPage.xaml b/Bloxstrap/Views/Pages/ModsPage.xaml index d77ed57..16a7074 100644 --- a/Bloxstrap/Views/Pages/ModsPage.xaml +++ b/Bloxstrap/Views/Pages/ModsPage.xaml @@ -34,7 +34,7 @@