Add button interactions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -11,7 +12,7 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace ExeLauncher.GUI
|
||||
{
|
||||
@@ -59,12 +60,20 @@ namespace ExeLauncher.GUI
|
||||
|
||||
private void Button_Path(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dialog = new OpenFileDialog()
|
||||
{
|
||||
AddExtension = true,
|
||||
DefaultExt = ".exe",
|
||||
FileName = "Run.exe",
|
||||
Filter = "Executable|*.exe"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
private void Button_WorkingDirectory(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (dialog.ShowDialog() == true)
|
||||
{
|
||||
ApplicationPath = dialog.FileName;
|
||||
|
||||
ApplicationWorkingDirectory = Path.GetDirectoryName(ApplicationPath) ?? "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user