1
0
mirror of synced 2024-11-23 16:23:50 +00:00
MassiveKnob/Windows/MassiveKnob.Plugin.RunProgram/RunProgram/RunProgramSettingsView.xaml.cs

28 lines
788 B
C#
Raw Normal View History

using System.Windows;
namespace MassiveKnob.Plugin.RunProgram.RunProgram
{
/// <summary>
/// Interaction logic for RunProgramSettingsView.xaml
/// </summary>
public partial class RunProgramSettingsView
{
public RunProgramSettingsView(RunProgramSettingsViewModel viewModel)
{
DataContext = viewModel;
InitializeComponent();
}
private void ButtonBrowseClick(object sender, RoutedEventArgs e)
{
var dialog = new Microsoft.Win32.OpenFileDialog
{
Filter = Strings.FilenameDialogFilter
};
if (dialog.ShowDialog().GetValueOrDefault())
((RunProgramSettingsViewModel) DataContext).Filename = dialog.FileName;
}
}
}