Example #1
0
        protected virtual void OnBitClicked(BitClickedEventArgs e)
        {
            EventHandler <BitClickedEventArgs> handler = BitClicked;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Example #2
0
        private void bitClicker1_BitClicked(object sender, BitClickedEventArgs e)
        {
            var message = string.Format("Число:{0,5}\nБит:{1,5}\nЗначение бита:{2,5}", e.Number, e.Bit, e.BitValue);

            switch (e.MouseEventArgs.Button)
            {
            case MouseButtons.Left:
                bitClicker1.CurrentBitValue = 1;
                break;

            case MouseButtons.Right:
                bitClicker1.CurrentBitValue = 0;
                break;
            }
        }