Skip to content

Commit

Permalink
About window
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeeynamo committed Oct 8, 2017
1 parent 39ddd36 commit 36bd07e
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 6 deletions.
27 changes: 27 additions & 0 deletions AnimationEditor/AboutWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Window x:Class="AnimationEditor.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:AnimationEditor"
mc:Ignorable="d"
Title="About" Height="128" Width="288" WindowStyle="ToolWindow">
<StackPanel Orientation="Horizontal" Margin="10">
<Image Width="48" Source="MainIcon.ico" VerticalAlignment="Top" Margin="0 0 10 0">

</Image>
<StackPanel Orientation="Vertical">
<TextBlock Text="RSDK Animation Editor"/>
<TextBlock>
<Run Text="Version "/>
<Run Text="{Binding AppVersion, Mode=OneTime}"/>
</TextBlock>
<TextBlock Text="Developed by Xeeynamo"/>
<TextBlock>
<Hyperlink NavigateUri="https://github.com/xeeynamo/rsdk">
https://github.com/xeeynamo/rsdk
</Hyperlink>
</TextBlock>
</StackPanel>
</StackPanel>
</Window>
37 changes: 37 additions & 0 deletions AnimationEditor/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace AnimationEditor
{
/// <summary>
/// Interaction logic for AboutWindow.xaml
/// </summary>
public partial class AboutWindow : Window
{
public string AppVersion
{
get
{
var version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
return $"{version.Major}.{version.Minor}";
}
}

public AboutWindow()
{
InitializeComponent();
DataContext = this;
}
}
}
7 changes: 7 additions & 0 deletions AnimationEditor/AnimationEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Hitbox3Window.xaml.cs">
<DependentUpon>Hitbox3Window.xaml</DependentUpon>
</Compile>
Expand All @@ -74,6 +77,10 @@
<Compile Include="ViewModels\HitboxV5EditorViewModel.cs" />
<Compile Include="ViewModels\TextureViewModel.cs" />
<Compile Include="ViewModels\TextureWindowViewModel.cs" />
<Page Include="AboutWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Hitbox3Window.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
3 changes: 3 additions & 0 deletions AnimationEditor/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<MenuItem x:Name="MenuViewHitbox" Header="_Hitbox manager" Click="MenuViewHitbox_Click"/>
<MenuItem x:Name="MenuViewTexture" Header="_Texture manager" Click="MenuViewTexture_Click" Visibility="Collapsed"/>
</MenuItem>
<MenuItem Header="_Info">
<MenuItem x:Name="MenuInfoAbout" Header="_About" Click="MenuInfoAbout_Click"/>
</MenuItem>
</Menu>
<Grid Margin="5" IsEnabled="{Binding IsAnimationDataLoaded}">
<Grid.ColumnDefinitions>
Expand Down
5 changes: 5 additions & 0 deletions AnimationEditor/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,10 @@ private void MenuViewHitbox_Click(object sender, RoutedEventArgs e)
else if (ViewModel.IsHitboxV5)
new Hitbox5Window(ViewModel).Show();
}

private void MenuInfoAbout_Click(object sender, RoutedEventArgs e)
{
new AboutWindow().Show();
}
}
}
12 changes: 6 additions & 6 deletions AnimationEditor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AnimationEditor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("RSDK Animation Editor")]
[assembly: AssemblyDescription("RSDK Animation Editor")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AnimationEditor")]
[assembly: AssemblyCompany("Xeeynamo")]
[assembly: AssemblyProduct("RSDK Animation Editor")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
Expand Down Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

0 comments on commit 36bd07e

Please sign in to comment.