public GenericAddonSetup(GenericAddon addon = null) { InitializeComponent(); if (addon != null) { PathEntry.Text = addon.Path; CommandLineTextBox.Text = addon.CommandLine; AdminCheckBox.IsChecked = addon.RunAsAdmin; } }
public GenericAddonSetupWindow(GenericAddon addon = null) { InitializeComponent(); DataContext = new GenericAddonSetupWindowViewModel(); if (addon != null) { PathEntry.Text = addon.Path; CommandLineTextBox.Text = addon.CommandLine; AdminCheckBox.IsChecked = addon.RunAsAdmin; KillCheckBox.IsChecked = addon.KillAfterClose; } }
private void NextButton_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrWhiteSpace(PathEntry.Text)) { Close(); } Result = new GenericAddon() { Path = PathEntry.Text, CommandLine = CommandLineTextBox.Text, RunAsAdmin = AdminCheckBox.IsChecked == true }; Close(); }