Skip to content

Commit

Permalink
Add NewVersion bar for 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyelton committed Aug 7, 2019
1 parent 2fab06c commit 3a471b9
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 14 deletions.
25 changes: 25 additions & 0 deletions octgnFX/Octgn/Controls/NewVersion.xaml
@@ -0,0 +1,25 @@
<UserControl x:Class="Octgn.Controls.NewVersionBar"
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"
mc:Ignorable="d"
Height="30" d:DesignWidth="600"
x:Name="self">
<Border Background="Khaki" BorderBrush="Olive" BorderThickness="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="100*"/>
</Grid.ColumnDefinitions>
<Image Source="../Resources/Icons/Reset.png"/>
<StackPanel Orientation="Horizontal" Grid.Column="2">
<TextBlock VerticalAlignment="Center" Text="OCTGN v3.4 is now available. Please visit"/>
<TextBlock VerticalAlignment="Center" Text=" https://www.octgn.net" Foreground="SteelBlue" Cursor="Hand" MouseLeftButtonUp="TextBlock_MouseLeftButtonUp"/>
<TextBlock VerticalAlignment="Center" Text=" to install it."/>
</StackPanel>
</Grid>
</Border>
</UserControl>
15 changes: 15 additions & 0 deletions octgnFX/Octgn/Controls/NewVersion.xaml.cs
@@ -0,0 +1,15 @@
using System;

namespace Octgn.Controls
{
public partial class NewVersionBar
{
public NewVersionBar() {
InitializeComponent();
}

private void TextBlock_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e) {
Program.LaunchUrl(AppConfig.WebsitePath);
}
}
}
7 changes: 7 additions & 0 deletions octgnFX/Octgn/Octgn.csproj
Expand Up @@ -300,6 +300,9 @@
<DependentUpon>ConnectOfflineGame.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\ControlTemplates\UserListItem.cs" />
<Compile Include="Controls\NewVersion.xaml.cs">
<DependentUpon>NewVersion.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\WindowDecorator.cs" />
<Compile Include="Controls\MissedMessagesBreak.xaml.cs">
<DependentUpon>MissedMessagesBreak.xaml</DependentUpon>
Expand Down Expand Up @@ -899,6 +902,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\NewVersion.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\UpdateBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
29 changes: 15 additions & 14 deletions octgnFX/Octgn/Windows/Main.xaml
Expand Up @@ -25,15 +25,15 @@
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="0" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="100*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="30"/>
<RowDefinition Height="5"/>
</Grid.RowDefinitions>
<Menu Grid.ColumnSpan="4" Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="100*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="30"/>
<RowDefinition Height="5"/>
</Grid.RowDefinitions>
<Menu Grid.ColumnSpan="4" Grid.Row="0">
<MenuItem Header="_File">
<!--<MenuItem x:Name="menuLogOff" Header="_Log Off" HorizontalAlignment="Left" MinWidth="137" Click="MenuLogOffClick"/>-->
<MenuItem x:Name="menuExit" Header="E_xit" HorizontalAlignment="Left" MinWidth="137" Click="MenuExitClick"/>
Expand All @@ -47,9 +47,9 @@
<MenuItem x:Name="menuAbout" Header="_About" HorizontalAlignment="Left" MinWidth="137" Click="MenuAboutClick"/>
</MenuItem>
<MenuItem Header="Open _Source">
<MenuItem.Icon>
<Image Source="../Resources/github.png" Width="16"/>
</MenuItem.Icon>
<MenuItem.Icon>
<Image Source="../Resources/github.png" Width="16"/>
</MenuItem.Icon>
<MenuItem Header="And We Accept _Pull Requests" Click="MenuPullRequestClick"></MenuItem>
<MenuItem Header="_Source Code" Click="MenuSourceCodeClick"></MenuItem>
</MenuItem>
Expand All @@ -59,8 +59,9 @@
<Border Grid.Column="2">
</Border>
<StackPanel Grid.Row="1" Grid.ColumnSpan="3">
<Controls:UpdateBar/>
</StackPanel>
<Controls:UpdateBar/>
<Controls:NewVersionBar/>
</StackPanel>
<GridSplitter Visibility="Collapsed" Width="5" Grid.Row="1" Grid.Column="1" ResizeBehavior="CurrentAndNext" Background="Black" Margin="0,25,0,0"/>
<TabControl x:Name="TabControlMain" Grid.Row="2" Style="{StaticResource MainTab}">
<TabItem x:Name="TabMain" Header="OCTGN" Background="Transparent" Style="{StaticResource MainTabItem}">
Expand Down

0 comments on commit 3a471b9

Please sign in to comment.