Esempio n. 1
0
        private void CreateInterface()
        {
            Size btnSize = new Size(70, 25);

            this.interBtnUp1 = new uiButton(this);
            this.interBtnUp1.SetSize(btnSize);
            this.interBtnUp1.Text           = "up";
            this.interBtnUp1.MouseLeftDown += new EventHandler(this.interBtnUp1_MouseLeftDown);

            this.interBtnDown1 = new uiButton(this);
            this.interBtnDown1.SetSize(btnSize);
            this.interBtnDown1.Text           = "down";
            this.interBtnDown1.MouseLeftDown += new EventHandler(this.interBtnDown1_MouseLeftDown);

            this.interBtnUp10 = new uiButton(this);
            this.interBtnUp10.SetSize(btnSize);
            this.interBtnUp10.Text           = "up 10";
            this.interBtnUp10.MouseLeftDown += new EventHandler(this.interBtnUp10_MouseLeftDown);

            this.interBtnDown10 = new uiButton(this);
            this.interBtnDown10.SetSize(btnSize);
            this.interBtnDown10.Text           = "down 10";
            this.interBtnDown10.MouseLeftDown += new EventHandler(this.interBtnDown10_MouseLeftDown);

            this.ResizeInterface();
        }
Esempio n. 2
0
        private void Button_Click(object sender, EventArgs e)
        {
            uiButton uiButton = (uiButton)sender;


            if (uiButton.ButtonColor == Color.Red)
            {
                uiButton.ButtonColor        = Color.Lime;
                uiButton.OnHoverButtonColor = Color.ForestGreen;
            }
            else
            {
                uiButton.ButtonColor        = Color.Red;
                uiButton.OnHoverButtonColor = Color.DarkRed;
            }
        }