Esempio n. 1
0
        private void ActionComboBoxSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs eventArgs)
        {
            var comboBox = (ComboBox)sender;

            if (comboBox.SelectedItem == this.AlternateActionItem)
            {
                // Do nothing
            }
            else if (comboBox.SelectedItem == this.SkipFileItem)
            {
                this.result = NewItemWindowResult.SkipFile;
                this.Close();
            }
            else if (comboBox.SelectedItem == this.SkipFolderItem)
            {
                this.result = NewItemWindowResult.SkipFolder;
                this.Close();
            }
            else if (comboBox.SelectedItem == this.SkipAllItem)
            {
                this.result = NewItemWindowResult.SkipAll;
                this.Close();
            }
            else
            {
                throw new ApplicationException("Invalid ComboBox Item");
            }
        }
Esempio n. 2
0
 private void AddButtonClicked(object sender, RoutedEventArgs eventArgs)
 {
     if (this.itemViewModel.Item.PresetName.Length == 0)
     {
         return;
     }
     this.result = NewItemWindowResult.Ok;
     this.Close();
 }