add link to homepage & source code to window
This commit is contained in:
		
							parent
							
								
									d2300fa088
								
							
						
					
					
						commit
						7bf2b028c3
					
				| @ -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 @@ | ||||
|         <local:MinusFortyFiveConverter x:Key="MinusFortyFiveConverter" /> | ||||
|     </Window.Resources> | ||||
|     <mah:MetroWindow.RightWindowCommands> | ||||
|         <mah:WindowCommands> | ||||
|         <mah:WindowCommands ShowSeparators="False"> | ||||
|             <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0,5,0"> | ||||
|                 <Hyperlink x:Name="URL" NavigateUri="https://bgs.n0la.org/" RequestNavigate="URL_RequestNavigate">Hompage</Hyperlink> | ||||
|             </TextBlock> | ||||
|             <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,0,15,0"> | ||||
|                 <Hyperlink x:Name="SRC" NavigateUri="https://codeberg.org/nola/EDBGS" RequestNavigate="URL_RequestNavigate">Source</Hyperlink> | ||||
|             </TextBlock> | ||||
|             <mah:ToggleSwitch Content="Dark Theme" x:Name="SwitchTheme" IsOn="True" Toggled="SwitchTheme_Toggled"/> | ||||
|         </mah:WindowCommands> | ||||
|     </mah:MetroWindow.RightWindowCommands> | ||||
|  | ||||
| @ -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; | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user