Add manual help menu item

This commit is contained in:
Daniel Dugger 2019-08-25 21:44:07 -04:00
parent f8f1615b95
commit 84dfa48729
2 changed files with 20 additions and 6 deletions

View File

@ -25,8 +25,9 @@
<MenuItem Name="NavigateUtilityAdapterSelfTest" Header="_Adapter Self Test" IsCheckable="True" Click="Navigate_MenuItem_Click" />
</MenuItem>
<MenuItem Header="_Help">
<MenuItem Header="_About" Click="About_MenuItem_Click" />
<MenuItem Header="_Manual" Click="Manual_MenuItem_Click" />
<MenuItem Header="_Website" Click="Website_MenuItem_Click" />
<MenuItem Header="_About" Click="About_MenuItem_Click" />
</MenuItem>
</Menu>
<StatusBar DockPanel.Dock="Bottom">

View File

@ -3,6 +3,7 @@ using KFDtool.P25.TransferConstructs;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -245,6 +246,23 @@ namespace KFDtool.Gui
Application.Current.Shutdown();
}
private void Manual_MenuItem_Click(object sender, RoutedEventArgs e)
{
try
{
Process.Start("KFDtool_Manual.pdf");
}
catch (Exception ex)
{
MessageBox.Show(string.Format("Error -- {0}", ex.Message), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
private void Website_MenuItem_Click(object sender, RoutedEventArgs e)
{
Process.Start("https://www.kfdtool.com");
}
private void About_MenuItem_Click(object sender, RoutedEventArgs e)
{
#if DEBUG
@ -253,10 +271,5 @@ namespace KFDtool.Gui
MessageBox.Show(string.Format("KFDtool Control Application{0}{0}Copyright 2019 Daniel Dugger{0}{0}Version: {1}", Environment.NewLine, Settings.AssemblyInformationalVersion), "About", MessageBoxButton.OK);
#endif
}
private void Website_MenuItem_Click(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start("https://www.kfdtool.com");
}
}
}