Esempio n. 1
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int selectedValue = 0;

            if (comboBox1.SelectedItem == null && Int32.TryParse(comboBox1.SelectedItem.ToString(), out selectedValue))
            {
                return;
            }

            CounterSelectionArgs args = new CounterSelectionArgs(Int32.Parse(comboBox1.SelectedItem.ToString()));

            OnCounterSelectionChangedEvent?.Invoke(this, args);
        }
Esempio n. 2
0
        private void onCounterChanged(object sender, CounterSelectionArgs e)
        {
            myNextActionCounter = e.Counter;
            myNextActionControl = (PencilColumn)sender;

            flowLayoutPanel1.Controls.OfType <Control>().ToList().ForEach((item) =>
            {
                if (item is PencilColumn)
                {
                    ((PencilColumn)item).IsEnabled = false;
                }
            });
        }