From 7bf2b028c3e010749c147f7a6038d2511c1c42ed Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Sat, 25 Feb 2023 18:12:33 +0100 Subject: [PATCH] add link to homepage & source code to window --- EliteBGS/MainWindow.xaml | 10 +++++++--- EliteBGS/MainWindow.xaml.cs | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/EliteBGS/MainWindow.xaml b/EliteBGS/MainWindow.xaml index 0cb7c41..dbc0e9c 100644 --- a/EliteBGS/MainWindow.xaml +++ b/EliteBGS/MainWindow.xaml @@ -4,8 +4,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:abc="http://wpfcontrols.com/" - xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:local="clr-namespace:EliteBGS" xmlns:Util="clr-namespace:EliteBGS.Util" d:DataContext="{d:DesignInstance Type=Util:AppConfig}" x:Name="window" x:Class="EliteBGS.MainWindow" mc:Ignorable="d" @@ -17,7 +15,13 @@ - + + + Hompage + + + Source + diff --git a/EliteBGS/MainWindow.xaml.cs b/EliteBGS/MainWindow.xaml.cs index f5a5c22..4db3a9d 100644 --- a/EliteBGS/MainWindow.xaml.cs +++ b/EliteBGS/MainWindow.xaml.cs @@ -16,6 +16,7 @@ using System.Windows.Controls.Primitives; using MahApps.Metro.Controls; using ControlzEx.Theming; using System.Windows.Media; +using System.Diagnostics; namespace EliteBGS; @@ -511,4 +512,12 @@ public partial class MainWindow : MahApps.Metro.Controls.MetroWindow { Config.Global.Colour = Colour.SelectedItem.ToString(); UpdateTheme(); } + + private void URL_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { + ProcessStartInfo info = new ProcessStartInfo(); + info.UseShellExecute = true; + info.FileName = e.Uri.AbsoluteUri; + Process.Start(info); + e.Handled = true; + } }