Example #1
0
        public override void OnCreated()
        {
            confirmButton = new ButtonObject()
            {
                Text        = "\u2714",
                ButtonColor = Color.ForestGreen,
                Rectangle   = new Rectangle(new Point(), buttonSize),
                Visible     = true
            };
            confirmButton.MouseDown  += ConfirmButton_MousePressed;
            confirmButton.MouseEnter += () => Manager.Form.Cursor = Cursors.Hand;
            confirmButton.MouseLeave += () => Manager.Form.SetDefaultCursor();
            Manager.DrawableObjects.Add(confirmButton);

            cancelButton = new ButtonObject()
            {
                Text        = "\u2716",
                ButtonColor = Color.FromArgb(227, 45, 45),
                Rectangle   = new Rectangle(new Point(), buttonSize),
                Visible     = true
            };
            cancelButton.MouseDown  += CancelButton_MousePressed;
            cancelButton.MouseEnter += () => Manager.Form.Cursor = Cursors.Hand;
            cancelButton.MouseLeave += () => Manager.Form.SetDefaultCursor();
            Manager.DrawableObjects.Add(cancelButton);
        }
Example #2
0
        public override void OnCreated()
        {
            confirmButton = new ButtonObject()
            {
                Text        = "\u2714",
                ButtonColor = Color.ForestGreen,
                Rectangle   = new Rectangle(new Point(), buttonSize),
                Visible     = true
            };
            confirmButton.MousePressed += ConfirmButton_MousePressed;
            Manager.DrawableObjects.Add(confirmButton);

            cancelButton = new ButtonObject()
            {
                Text        = "\u2716",
                ButtonColor = Color.FromArgb(227, 45, 45),
                Rectangle   = new Rectangle(new Point(), buttonSize),
                Visible     = true
            };
            cancelButton.MousePressed += CancelButton_MousePressed;
            Manager.DrawableObjects.Add(cancelButton);
        }