新增启动菜单
This commit is contained in:
35
StartupSelectionWindow.xaml.cs
Normal file
35
StartupSelectionWindow.xaml.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
|
||||
namespace DrillTools
|
||||
{
|
||||
public enum StartupAction
|
||||
{
|
||||
None,
|
||||
AdjustToolOrder,
|
||||
ExportHoleCount
|
||||
}
|
||||
|
||||
public partial class StartupSelectionWindow : Window
|
||||
{
|
||||
public StartupAction SelectedAction { get; private set; } = StartupAction.None;
|
||||
|
||||
public StartupSelectionWindow(string filePath)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new { FileName = Path.GetFileName(filePath) };
|
||||
}
|
||||
|
||||
private void AdjustToolOrder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SelectedAction = StartupAction.AdjustToolOrder;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void ExportHoleCount_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SelectedAction = StartupAction.ExportHoleCount;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user