diff --git a/Bloxstrap/ViewModels/Commands.cs b/Bloxstrap/ViewModels/GlobalViewModel.cs similarity index 83% rename from Bloxstrap/ViewModels/Commands.cs rename to Bloxstrap/ViewModels/GlobalViewModel.cs index 9d3ceba..4d50b82 100644 --- a/Bloxstrap/ViewModels/Commands.cs +++ b/Bloxstrap/ViewModels/GlobalViewModel.cs @@ -9,10 +9,12 @@ using System.Windows.Input; namespace Bloxstrap.ViewModels { - public static class Commands + public static class GlobalViewModel { public static ICommand OpenWebpageCommand => new RelayCommand(OpenWebpage); + public static bool IsNotFirstRun => !App.IsFirstRun; + private static void OpenWebpage(string? location) { if (location is null) diff --git a/Bloxstrap/ViewModels/InstallationViewModel.cs b/Bloxstrap/ViewModels/InstallationViewModel.cs index d999f25..5813cd7 100644 --- a/Bloxstrap/ViewModels/InstallationViewModel.cs +++ b/Bloxstrap/ViewModels/InstallationViewModel.cs @@ -11,6 +11,7 @@ using Wpf.Ui.Mvvm.Interfaces; using System.ComponentModel; using Bloxstrap.Helpers; using Bloxstrap.Models; +using System.Diagnostics; namespace Bloxstrap.ViewModels { @@ -23,6 +24,8 @@ namespace Bloxstrap.ViewModels private bool _showAllChannels = !DeployManager.ChannelsAbstracted.Contains(App.Settings.Prop.Channel); public ICommand BrowseInstallLocationCommand => new RelayCommand(BrowseInstallLocation); + public ICommand OpenFolderCommand => new RelayCommand(OpenFolder); + public DeployInfo? ChannelDeployInfo { get; private set; } = null; //new DeployInfo(){ Version = "hi", VersionGuid = "hi", Timestamp = "January 25 2023 at 6:03:48 PM" }; @@ -54,6 +57,11 @@ namespace Bloxstrap.ViewModels } } + private void OpenFolder() + { + Process.Start("explorer.exe", Directories.Base); + } + public string InstallLocation { get => App.BaseDirectory; diff --git a/Bloxstrap/ViewModels/IntegrationsViewModel.cs b/Bloxstrap/ViewModels/IntegrationsViewModel.cs index ac58aed..cb4d06e 100644 --- a/Bloxstrap/ViewModels/IntegrationsViewModel.cs +++ b/Bloxstrap/ViewModels/IntegrationsViewModel.cs @@ -104,6 +104,6 @@ namespace Bloxstrap.ViewModels set => App.Settings.Prop.CustomIntegrations = value; } - public CustomIntegration SelectedCustomIntegration { get; set; } + public CustomIntegration SelectedCustomIntegration { get; set; } = new(); } } diff --git a/Bloxstrap/ViewModels/ModsViewModel.cs b/Bloxstrap/ViewModels/ModsViewModel.cs index ee2c2b5..83eee29 100644 --- a/Bloxstrap/ViewModels/ModsViewModel.cs +++ b/Bloxstrap/ViewModels/ModsViewModel.cs @@ -9,8 +9,6 @@ namespace Bloxstrap.ViewModels { public ICommand OpenModsFolderCommand => new RelayCommand(OpenModsFolder); - public bool CanOpenModsFolder => !App.IsFirstRun; - private void OpenModsFolder() { Process.Start("explorer.exe", Directories.Modifications); diff --git a/Bloxstrap/Views/Pages/AboutPage.xaml b/Bloxstrap/Views/Pages/AboutPage.xaml index fa6d7d7..3413b24 100644 --- a/Bloxstrap/Views/Pages/AboutPage.xaml +++ b/Bloxstrap/Views/Pages/AboutPage.xaml @@ -56,19 +56,19 @@ - Multako + Multako - bluepilledgreat + bluepilledgreat - 1011025m + 1011025m - sitiom + sitiom - taskmanager + taskmanager @@ -89,31 +89,31 @@ - + - + - + - + - + @@ -121,19 +121,19 @@ - + - + - + diff --git a/Bloxstrap/Views/Pages/InstallationPage.xaml b/Bloxstrap/Views/Pages/InstallationPage.xaml index 1c5372b..bd23f35 100644 --- a/Bloxstrap/Views/Pages/InstallationPage.xaml +++ b/Bloxstrap/Views/Pages/InstallationPage.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:models="clr-namespace:Bloxstrap.ViewModels" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" @@ -12,7 +13,7 @@ - + @@ -29,6 +30,24 @@ + + + + + + + + + + + + diff --git a/Bloxstrap/Views/Pages/IntegrationsPage.xaml b/Bloxstrap/Views/Pages/IntegrationsPage.xaml index 01dba22..71a2eee 100644 --- a/Bloxstrap/Views/Pages/IntegrationsPage.xaml +++ b/Bloxstrap/Views/Pages/IntegrationsPage.xaml @@ -85,7 +85,7 @@ - + @@ -129,9 +129,9 @@ - + - + diff --git a/Bloxstrap/Views/Pages/ModsPage.xaml b/Bloxstrap/Views/Pages/ModsPage.xaml index d21c73b..4e552bf 100644 --- a/Bloxstrap/Views/Pages/ModsPage.xaml +++ b/Bloxstrap/Views/Pages/ModsPage.xaml @@ -17,14 +17,14 @@ - + @@ -45,7 +45,7 @@ - +