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

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #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;
            }
        }