public override ActionBase GetAction() { if (SpecialIdentifierStringBuilder.IsValidSpecialIdentifier(this.SpecialIdentifierNameTextBox.Text) && !string.IsNullOrEmpty(this.SpecialIdentifierReplacementTextBox.Text)) { return(new SpecialIdentifierAction(this.SpecialIdentifierNameTextBox.Text, this.SpecialIdentifierReplacementTextBox.Text, this.MakeGloballyUsableCheckBox.IsChecked.GetValueOrDefault(), this.SpecialIdentifierShouldProcessMathCheckBox.IsChecked.GetValueOrDefault())); } return(null); }
public override ActionBase GetAction() { if (SpecialIdentifierStringBuilder.IsValidSpecialIdentifier(this.CounterNameTextBox.Text)) { if (this.CounterActionTypeComboBox.SelectedIndex == 0) { return(new CounterAction(this.CounterNameTextBox.Text, this.CounterAmountTextBox.Text, this.SaveToFileToggleButton.IsChecked.GetValueOrDefault(), this.ResetOnLoadToggleButton.IsChecked.GetValueOrDefault())); } else if (this.CounterActionTypeComboBox.SelectedIndex == 1) { return(new CounterAction(this.CounterNameTextBox.Text, this.SaveToFileToggleButton.IsChecked.GetValueOrDefault(), this.ResetOnLoadToggleButton.IsChecked.GetValueOrDefault())); } } return(null); }