-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
128 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
<Window x:Class="HUDMerger.AboutWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 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:local="clr-namespace:HUDMerger" mc:Ignorable="d" Title="About HUD Merger" SizeToContent="WidthAndHeight" Icon="Resources\favicon.ico" WindowStartupLocation="CenterScreen"> | ||
<Grid> | ||
<StackPanel Margin="50,10"> | ||
<StackPanel.Resources> | ||
<Style TargetType="Label"> | ||
<Setter Property="HorizontalAlignment" Value="Center" /> | ||
</Style> | ||
</StackPanel.Resources> | ||
<Image Source="Resources\favicon.ico" Width="64" Height="64" Margin="0,0,0,10" /> | ||
<Label FontSize="28">HUD Merger</Label> | ||
<Label FontSize="15">Version 1.2.6</Label> | ||
<Label FontSize="15">Revan</Label> | ||
<WrapPanel HorizontalAlignment="Center" Margin="0,5,0,5" RenderOptions.BitmapScalingMode="Fant"> | ||
<Image Source="Resources/Images/github.png" Width="42" Margin="5" Cursor="Hand" MouseLeftButtonUp="Open_Github" /> | ||
<Image Source="Resources/Images/teamfortresstv.png" Width="42" Margin="5" Cursor="Hand" MouseLeftButtonUp="Open_TeamFortressTV" /> | ||
</WrapPanel> | ||
</StackPanel> | ||
</Grid> | ||
<Window x:Class="HUDMerger.AboutWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
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:local="clr-namespace:HUDMerger" | ||
xmlns:views="clr-namespace:HUDMerger.Views" | ||
mc:Ignorable="d" | ||
Title="About HUD Merger" | ||
SizeToContent="WidthAndHeight" | ||
Icon="Resources\favicon.ico" | ||
WindowStartupLocation="CenterScreen"> | ||
<Grid> | ||
<views:AboutWindowView /> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using System.Windows.Input; | ||
using Microsoft.Toolkit.Mvvm.Input; | ||
|
||
namespace HUDMerger.ViewModels; | ||
|
||
public class AboutWindowViewModel : ViewModelBase | ||
{ | ||
public ICommand OpenGithubCommand { get; } | ||
public ICommand OpenTeamFortressTVCommand { get; } | ||
|
||
public AboutWindowViewModel() | ||
{ | ||
OpenGithubCommand = new RelayCommand(OpenGithub); | ||
OpenTeamFortressTVCommand = new RelayCommand(OpenTeamFortressTV); | ||
} | ||
|
||
private void OpenGithub() | ||
{ | ||
Process.Start("explorer", "https://github.com/cooolbros/hud-merger"); | ||
} | ||
|
||
private void OpenTeamFortressTV() | ||
{ | ||
Process.Start("explorer", "https://www.teamfortress.tv/60220/hud-merger"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<UserControl x:Class="HUDMerger.Views.AboutWindowView" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
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:local="clr-namespace:HUDMerger.Views" | ||
xmlns:viewmodels="clr-namespace:HUDMerger.ViewModels" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type={x:Type viewmodels:AboutWindowViewModel}}"> | ||
<Grid> | ||
<StackPanel Margin="50,10"> | ||
<StackPanel.Resources> | ||
<Style TargetType="Label"> | ||
<Setter Property="HorizontalAlignment" Value="Center" /> | ||
</Style> | ||
<Style x:Key="ImageButton" TargetType="{x:Type Button}"> | ||
<Setter Property="Margin" Value="5" /> | ||
<Setter Property="Cursor" Value="Hand" /> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type Button}"> | ||
<Border x:Name="buttonBorder" Background="Transparent" BorderThickness="0" BorderBrush="Transparent" SnapsToDevicePixels="True"> | ||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> | ||
</Border> | ||
<ControlTemplate.Triggers> | ||
<!-- MouseOver --> | ||
<Trigger Property="IsMouseOver" Value="True"> | ||
<Setter TargetName="buttonBorder" Property="Background" Value="Transparent" /> | ||
</Trigger> | ||
<!-- Pressed --> | ||
<Trigger Property="IsPressed" Value="True"> | ||
<Setter TargetName="buttonBorder" Property="Background" Value="Transparent" /> | ||
</Trigger> | ||
<!-- Disabled --> | ||
<Trigger Property="IsEnabled" Value="False"> | ||
<Setter TargetName="buttonBorder" Property="Background" Value="Transparent" /> | ||
</Trigger> | ||
</ControlTemplate.Triggers> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</StackPanel.Resources> | ||
<Image Source="/Resources/favicon.ico" Width="64" Height="64" Margin="0,0,0,10" /> | ||
<Label FontSize="28">HUD Merger</Label> | ||
<Label FontSize="15">Version 1.2.6</Label> | ||
<Label FontSize="15">Revan</Label> | ||
<WrapPanel HorizontalAlignment="Center" Margin="0,5,0,5" RenderOptions.BitmapScalingMode="Fant"> | ||
<Button Style="{StaticResource ImageButton}" Command="{Binding OpenGithubCommand}"> | ||
<Image Source="/Resources/Images/github.png" Width="42" Height="42" /> | ||
</Button> | ||
<Button Style="{StaticResource ImageButton}" Command="{Binding OpenTeamFortressTVCommand}"> | ||
<Image Source="/Resources/Images/teamfortresstv.png" Width="42" Height="42" /> | ||
</Button> | ||
</WrapPanel> | ||
</StackPanel> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Windows.Controls; | ||
|
||
namespace HUDMerger.Views; | ||
|
||
/// <summary> | ||
/// Interaction logic for AboutWindowView.xaml | ||
/// </summary> | ||
public partial class AboutWindowView : UserControl | ||
{ | ||
public AboutWindowView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |