diff --git a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml
index 013d1ee..73260ad 100644
--- a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml
+++ b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml
@@ -43,9 +43,9 @@
-
+
+
-
diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml
index e19a729..03cb28b 100644
--- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml
+++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml
@@ -12,13 +12,30 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs
index 68e76ec..3d4c3ba 100644
--- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs
+++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs
@@ -3,6 +3,8 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
+using Wpf.Ui.Mvvm.Contracts;
+
using Bloxstrap.UI.Elements.Dialogs;
namespace Bloxstrap.UI.Elements.Menu.Pages
@@ -67,6 +69,12 @@ namespace Bloxstrap.UI.Elements.Menu.Pages
}
}
+ private void BackButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (Window.GetWindow(this) is INavigationWindow window)
+ window.Navigate(typeof(FastFlagsPage));
+ }
+
private void AddButton_Click(object sender, RoutedEventArgs e)
{
var dialog = new AddFastFlagDialog();
diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml
index b7c2491..e6940ef 100644
--- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml
+++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml
@@ -15,36 +15,14 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs
index ee3c53e..d6c8f5b 100644
--- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs
+++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs
@@ -14,7 +14,7 @@ namespace Bloxstrap.UI.Elements.Menu.Pages
public FastFlagsPage()
{
- DataContext = new FastFlagsViewModel();
+ DataContext = new FastFlagsViewModel(this);
InitializeComponent();
}
@@ -28,7 +28,7 @@ namespace Bloxstrap.UI.Elements.Menu.Pages
return;
}
- DataContext = new FastFlagsViewModel();
+ DataContext = new FastFlagsViewModel(this);
}
private void ValidateInt32(object sender, TextCompositionEventArgs e) => e.Handled = !Int32.TryParse(e.Text, out int _);
diff --git a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs
index ca32a4f..3412a30 100644
--- a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs
@@ -1,15 +1,31 @@
using System.Windows;
+using System.Windows.Controls;
using System.Windows.Input;
+using Wpf.Ui.Mvvm.Contracts;
+
using CommunityToolkit.Mvvm.Input;
+using Bloxstrap.UI.Elements.Menu.Pages;
+
namespace Bloxstrap.UI.ViewModels.Menu
{
public class FastFlagsViewModel : NotifyPropertyChangedViewModel
{
- public ICommand OpenClientSettingsCommand => new RelayCommand(OpenClientSettings);
+ private readonly Page _page;
- private void OpenClientSettings() => Utilities.ShellExecute(Path.Combine(Directories.Modifications, "ClientSettings\\ClientAppSettings.json"));
+ public FastFlagsViewModel(Page page)
+ {
+ _page = page;
+ }
+
+ private void OpenFastFlagEditor()
+ {
+ if (Window.GetWindow(_page) is INavigationWindow window)
+ window.Navigate(typeof(FastFlagEditorPage));
+ }
+
+ public ICommand OpenFastFlagEditorCommand => new RelayCommand(OpenFastFlagEditor);
public Visibility ShowDebugFlags => App.Settings.Prop.OhHeyYouFoundMe ? Visibility.Visible : Visibility.Collapsed;