Skip to content

Commit

Permalink
added version indicator to about tab
Browse files Browse the repository at this point in the history
  • Loading branch information
martin2250 committed Mar 21, 2017
1 parent 5de7c67 commit 05f9dac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OpenCNCPilot/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
AllowDrop="True"
Drop="Window_Drop"
DragEnter="Window_DragEnter"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
Title="OpenCNCPilot by martin2250" Height="500" Width="900" Closing="Window_Closing">
<Window.Resources>
<ResourceDictionary Source="MainWindow.Resources.xaml"/>
Expand Down Expand Up @@ -167,7 +168,7 @@
<Expander Header="About">
<StackPanel>
<TextBlock TextAlignment="Center" FontSize="14" Padding="5">
<Span FontWeight="Bold" FontSize="15">OpenCNCPilot by martin2250</Span><LineBreak/>
<Span FontWeight="Bold" FontSize="15">OpenCNCPilot <Run Text="{Binding Version,Mode=OneWay}"/> by martin2250</Span><LineBreak/>
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://github.com/martin2250/OpenCNCPilot">Project Page</Hyperlink>
<Hyperlink RequestNavigate="Hyperlink_RequestNavigate" NavigateUri="https://github.com/martin2250/OpenCNCPilot/issues">Help</Hyperlink>
</TextBlock>
Expand Down
9 changes: 9 additions & 0 deletions OpenCNCPilot/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.
System.Diagnostics.Process.Start(e.Uri.AbsoluteUri);
}

public string Version
{
get
{
var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
return $"{version}";
}
}

private void Window_Drop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
Expand Down

0 comments on commit 05f9dac

Please sign in to comment.