Beispiel #1
0
        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;
            }
        }
Beispiel #3
0
        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();
        }