Add version label
This commit is contained in:
parent
736035ff32
commit
32454bd123
5 changed files with 12 additions and 7 deletions
|
|
@ -16,7 +16,7 @@
|
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
|
|
@ -24,15 +24,17 @@
|
|||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Humanizer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
|
||||
|
|
|
|||
|
|
@ -1,18 +1,16 @@
|
|||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// 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("AuroraRecordGenerator")]
|
||||
[assembly: AssemblyTitle("Aurora Record Generator")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AuroraRecordGenerator")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
|
@ -51,5 +49,5 @@ using System.Windows;
|
|||
// 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: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
|
|||
|
|
@ -378,6 +378,7 @@
|
|||
Width="75" d:LayoutOverrides="Height" Click="SaveContentAs" />
|
||||
<Button Content="Generate" HorizontalAlignment="Right" Margin="0,10.3,10,9.66"
|
||||
Width="75" d:LayoutOverrides="Height" Click="GenerateRecord" />
|
||||
<Label x:Name="VersionLabel" Content="Version" HorizontalAlignment="Left" Margin="250,9,0,0" VerticalAlignment="Top" Foreground="Gray"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</controls:MetroWindow>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ namespace AuroraRecordGenerator
|
|||
ProtoBuf.Serializer.PrepareSerializer<Record>();
|
||||
InitializeComponent();
|
||||
SubSpeciesCombo.ItemsSource = GetSpeciesOptions();
|
||||
VersionLabel.Content = $"v{Utility.GetVersion()}";
|
||||
}
|
||||
|
||||
private Record Data { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace AuroraRecordGenerator
|
||||
|
|
@ -67,6 +68,8 @@ namespace AuroraRecordGenerator
|
|||
where attr != null && attr.NiceName == nicename
|
||||
select item).FirstOrDefault();
|
||||
}
|
||||
|
||||
public static Version GetVersion() => Assembly.GetExecutingAssembly().GetName().Version;
|
||||
}
|
||||
|
||||
// From https://stackoverflow.com/questions/1799370/getting-attributes-of-enums-value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue