Files
osrs-toolbox/osrs-toolbox/Views/HomePageView.xaml

123 lines
11 KiB
XML

<Window x:Class="osrs_toolbox.HomePageView"
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:osrs_toolbox"
mc:Ignorable="d"
Title="OSRS Toolbox" Height="670" Width="500" Closed="Window_Closed" WindowStyle="None" Background="Transparent" AllowsTransparency="True">
<Window.DataContext>
<local:HomePageViewModel/>
</Window.DataContext>
<Window.Resources>
<ControlTemplate x:Key="NoMouseOverButtonTemplate"
TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Background"
Value="{x:Static SystemColors.ControlLightBrush}" />
<Setter Property="Foreground"
Value="{x:Static SystemColors.GrayTextBrush}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Source="/Resources/Panel/panel-background.png" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="Fill" Margin="-3"/>
<Image Source="/Resources/Panel/panel-left.png" Grid.Row="2" Grid.Column="0" Margin="0,-8,0,-8" Width="40" StretchDirection="Both" HorizontalAlignment="Stretch" VerticalAlignment="Top" Stretch="Fill"/>
<Image Source="/Resources/Panel/panel-bottom.png" Grid.Row="3" Margin="-8,0,-8,0" Grid.Column="1" Height="40" StretchDirection="Both" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Fill"/>
<Image Source="/Resources/Panel/panel-right.png" Grid.Row="2" Grid.Column="2" Margin="0,-8,0,-8" Width="40" StretchDirection="Both" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Fill"/>
<Image Source="/Resources/Panel/panel-top.png" Grid.Row="1" Margin="-8,0,-8,0" Grid.Column="1" Height="40" StretchDirection="Both" HorizontalAlignment="Left" VerticalAlignment="Bottom" Stretch="Fill" MouseDown="Move_Window"/>
<Image Source="/Resources/Panel/panel-top-left.png" Grid.Row="1" Grid.Column="0" Width="40" StretchDirection="Both" HorizontalAlignment="Right" VerticalAlignment="Bottom" MouseDown="Move_Window"/>
<Image Source="/Resources/Panel/panel-bottom-left.png" Grid.Row="3" Grid.Column="0" Height="40" StretchDirection="Both" HorizontalAlignment="Right" VerticalAlignment="Top"/>
<Image Source="/Resources/Panel/panel-bottom-right.png" Grid.Row="3" Grid.Column="2" Width="40" StretchDirection="Both" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Image Source="/Resources/Panel/panel-top-right.png" Grid.Row="1" Grid.Column="2" Width="40" StretchDirection="Both" HorizontalAlignment="Left" VerticalAlignment="Bottom" MouseDown="Move_Window"/>
<Image Source="/Resources/main-banner.png" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Width="360" Margin="0,0,0,-30" StretchDirection="Both" HorizontalAlignment="Center" VerticalAlignment="Bottom" Stretch="Uniform" MouseDown="Move_Window"/>
<Rectangle Grid.Row="1" Grid.Column="2" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="25" Height="22" Fill="White" Margin="8,0,0,10" MouseDown="Close_App" MouseEnter="Exit_Hovered" MouseLeave="Exit_Unhovered"/>
<Image Source="/Resources/close-button.png" Grid.Row="1" Grid.Column="2" StretchDirection="Both" Width="30" Margin="5,0,0,5" Stretch="Uniform" VerticalAlignment="Bottom" HorizontalAlignment="Left" IsHitTestVisible="False"/>
<Border Grid.Row="2" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<StackPanel Orientation="Vertical">
<Button Command="{Binding OpenCompetitionOverlaySettings, UpdateSourceTrigger=PropertyChanged}" Template="{StaticResource NoMouseOverButtonTemplate}" Width="350" Height="90" Margin="3" Padding="3" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Image Source="/Resources/wood-button.png" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StretchDirection="Both" Stretch="Fill" MouseEnter="Button_Hovered" MouseLeave="Button_Unhovered"/>
<local:OutlinedTextBlock Text="Open Competition Overlay Settings" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="Black" Fill="Yellow" FontSize="30" StrokeThickness="1.2" IsHitTestVisible="False" TextWrapping="Wrap" TextAlignment="Center"/>
</Grid>
</Button>
<Button Command="{Binding OpenDropChanceCalculator, UpdateSourceTrigger=PropertyChanged}" Template="{StaticResource NoMouseOverButtonTemplate}" Width="350" Height="90" Margin="3" Padding="3" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Image Source="/Resources/wood-button.png" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StretchDirection="Both" Stretch="Fill" MouseEnter="Button_Hovered" MouseLeave="Button_Unhovered"/>
<local:OutlinedTextBlock Text="Open Drop Chance Calculator" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="Black" Fill="Yellow" FontSize="30" StrokeThickness="1.2" IsHitTestVisible="False" TextWrapping="Wrap" TextAlignment="Center"/>
</Grid>
</Button>
<Button Command="{Binding OpenCombatLevelCalculator, UpdateSourceTrigger=PropertyChanged}" Template="{StaticResource NoMouseOverButtonTemplate}" Width="350" Height="90" Margin="3" Padding="3" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Image Source="/Resources/wood-button.png" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StretchDirection="Both" Stretch="Fill" MouseEnter="Button_Hovered" MouseLeave="Button_Unhovered"/>
<local:OutlinedTextBlock Text="Open Combat Level Calculator" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="Black" Fill="Yellow" FontSize="30" StrokeThickness="1.2" IsHitTestVisible="False" TextWrapping="Wrap" TextAlignment="Center"/>
</Grid>
</Button>
<Button Command="{Binding OpenShopBuyoutCalculator, UpdateSourceTrigger=PropertyChanged}" Template="{StaticResource NoMouseOverButtonTemplate}" Width="350" Height="90" Margin="3" Padding="3" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Image Source="/Resources/wood-button.png" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StretchDirection="Both" Stretch="Fill" MouseEnter="Button_Hovered" MouseLeave="Button_Unhovered"/>
<local:OutlinedTextBlock Text="Open Shop Buyout Calculator" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="Black" Fill="Yellow" FontSize="30" StrokeThickness="1.2" IsHitTestVisible="False" TextWrapping="Wrap" TextAlignment="Center"/>
</Grid>
</Button>
<Button Command="{Binding OpenDiceRoller, UpdateSourceTrigger=PropertyChanged}" Template="{StaticResource NoMouseOverButtonTemplate}" Width="350" Height="90" Margin="3" Padding="3" VerticalAlignment="Center" HorizontalAlignment="Center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Image Source="/Resources/wood-button.png" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" StretchDirection="Both" Stretch="Fill" MouseEnter="Button_Hovered" MouseLeave="Button_Unhovered"/>
<local:OutlinedTextBlock Text="Open Dice Roller" VerticalAlignment="Center" HorizontalAlignment="Center" Stroke="Black" Fill="Yellow" FontSize="30" StrokeThickness="1.2" IsHitTestVisible="False" TextWrapping="Wrap" TextAlignment="Center"/>
</Grid>
</Button>
</StackPanel>
</Border>
</Grid>
</Window>