Beispiel #1
0
        private void terminatorComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Terminator selectedItem = (Terminator)Enum.Parse(typeof(Terminator), terminatorComboBox.Text);

            if (selectedItem.Equals(Terminator.CUSTOM))
            {
                terminatorTextBox.Enabled = true;
            }
            else
            {
                terminatorTextBox.Text    = string.Empty;
                terminatorTextBox.Enabled = false;
            }
        }
Beispiel #2
0
        private string GetCurrentTerminatorAsString()
        {
            string     termStr;
            Terminator terminator = ((Terminator)Enum.Parse(typeof(Terminator), terminatorComboBox.Text));

            if (!terminator.Equals(Terminator.CUSTOM))
            {
                termStr = GetStringFromTerminator(terminator);
            }
            else
            {
                termStr = terminatorTextBox.Text;
            }
            return(termStr);
        }