Пример #1
0
 private void ButtonAddCounter_Click(object sender, EventArgs e)
 {
     try
     {
         CounterType selectedCounterType = ((KeyValuePair <CounterType, string>)ComboBoxCounterType.SelectedItem).Key;
         ICounter    counter             = counterManager.AddNewCounter(selectedCounterType, TextBoxIterations.Text, TextBoxDelay.Text);
         ListBoxCounters.Items.Add(new CounterViewItem(counter, false));
     }
     catch (Exception ex)
     {
         ShowError(ex.Message);
     }
 }