diff --git a/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml b/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml index 92d769e6..e1848fea 100644 --- a/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml +++ b/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml @@ -621,16 +621,12 @@ - - + + Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}" /> @@ -880,13 +876,13 @@ + TextWrapping="Wrap" + Text="查看地图(开发者)" /> + TextWrapping="Wrap" + Text="查看当前识别到的位置" /> --> + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml.cs b/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml.cs index ad257771..a7c20e30 100644 --- a/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml.cs +++ b/BetterGenshinImpact/View/Pages/CommonSettingsPage.xaml.cs @@ -1,5 +1,7 @@ using BetterGenshinImpact.ViewModel.Pages; using System.Windows.Controls; +using System.Windows.Input; +using BetterGenshinImpact.View.Windows; namespace BetterGenshinImpact.View.Pages; @@ -12,4 +14,23 @@ public partial class CommonSettingsPage : Page DataContext = ViewModel = viewModel; InitializeComponent(); } + + private ICommand _openAboutWindowCommand; + public ICommand OpenAboutWindowCommand + { + get + { + if (_openAboutWindowCommand == null) + { + _openAboutWindowCommand = new RelayCommand(OpenAboutWindow); + } + return _openAboutWindowCommand; + } + } + + private void OpenAboutWindow() + { + var aboutWindow = new AboutWindow(); + aboutWindow.ShowDialog(); + } } diff --git a/BetterGenshinImpact/View/Windows/AboutWindow.xaml b/BetterGenshinImpact/View/Windows/AboutWindow.xaml new file mode 100644 index 00000000..6799ef0b --- /dev/null +++ b/BetterGenshinImpact/View/Windows/AboutWindow.xaml @@ -0,0 +1,38 @@ + + + + + + + https://github.com/babalae/better-genshin-impact + + + + + + + https://github.com/babalae/better-genshin-impact#捐赠 + + + + + + + + + + diff --git a/BetterGenshinImpact/View/Windows/AboutWindow.xaml.cs b/BetterGenshinImpact/View/Windows/AboutWindow.xaml.cs new file mode 100644 index 00000000..d082fd97 --- /dev/null +++ b/BetterGenshinImpact/View/Windows/AboutWindow.xaml.cs @@ -0,0 +1,25 @@ +using System.Diagnostics; +using System.Windows; +using System.Windows.Navigation; + +namespace BetterGenshinImpact.View.Windows +{ + public partial class AboutWindow : Window + { + public AboutWindow() + { + InitializeComponent(); + } + + private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) + { + Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true }); + e.Handled = true; + } + + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + Close(); + } + } +}