Exemplo n.º 1
0
            public void PerformClick(EventArgs e)
            {
                if (((MouseEventArgs)e).Button != MouseButtons.Left)
                {
                    return;
                }

                if (mDrawDisabled || !CustomButton.EnabledNow(Core))
                {
                    return;
                }

                if (cb.ButtonType == CustomButton.ButtonTypes.Button)
                {
                    Core.ExecuteCustombutton(cb.GCode);
                }

                if (cb.ButtonType == CustomButton.ButtonTypes.TwoStateButton)
                {
                    on = !on;
                    Core.ExecuteCustombutton(on ? cb.GCode : cb.GCode2);
                    BackColor = on ? Color.Orange : Parent.BackColor;
                }

                base.OnClick(e);
            }