public AddEditCounterForm(Counter counter, Action action)
        {
            InitializeComponent();

            _counter = counter;
            _action = action;
        }
Пример #2
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     var counter = new Counter();
     var form = new AddEditCounterForm(counter, AddEditCounterForm.Action.Add);
     var result = form.ShowDialog(this);
     if (result == DialogResult.OK)
     {
         Settings.Instance.Counters.Add(counter);
     }
 }