Esempio n. 1
0
        public ColorPickers(Base parent)
            : base(parent)
        {
            /* RGB Picker */
            {
                ColorPicker rgbPicker = new ColorPicker(this);
                rgbPicker.SetPosition(10, 10);
                rgbPicker.ColorChanged += ColorChanged;
            }

            /* HSVColorPicker */
            {
                HSVColorPicker hsvPicker = new HSVColorPicker(this);
                hsvPicker.SetPosition(300, 10);
                hsvPicker.ColorChanged += ColorChanged;
            }

            /* HSVColorPicker in Window */
            {
                Control.WindowControl Window = new WindowControl(this);
                Window.SetSize(300, 300);
                Window.Hide();

                HSVColorPicker hsvPicker = new HSVColorPicker(Window);
                hsvPicker.SetPosition(10, 10);
                hsvPicker.ColorChanged += ColorChanged;

                Control.Button OpenWindow = new Control.Button(this);
                OpenWindow.SetPosition(10, 200);
                OpenWindow.SetSize(200, 20);
                OpenWindow.Text = "Open Window";
                OpenWindow.Clicked += delegate(Base sender, ClickedEventArgs args) { Window.Show(); };
            }
        }
Esempio n. 2
0
        public Button(Base parent)
            : base(parent)
        {
            buttonA = new Control.Button(this);
            buttonA.Text = "Event tester";
            buttonA.SetBounds(200, 30, 300, 200);
            buttonA.Pressed += onButtonAp;
            buttonA.Clicked += onButtonAc;
            buttonA.Released += onButtonAr;

            buttonB = new Control.Button(this);
            buttonB.Text = "\u0417\u0430\u043C\u0435\u0436\u043D\u0430\u044F \u043C\u043E\u0432\u0430";
            buttonB.SetPosition(0, 20);

            buttonC = new Control.Button(this);
            buttonC.Text = "Image button";
            buttonC.SetImage("test16.png");
            Align.PlaceDownLeft(buttonC, buttonB, 10);

            buttonD = new Control.Button(this);
            buttonD.SetImage("test16.png");
            buttonD.SetSize(20, 20);
            Align.PlaceDownLeft(buttonD, buttonC, 10);

            buttonE = new Control.Button(this);
            buttonE.Text = "Toggle me";
            buttonE.IsToggle = true;
            buttonE.Toggled += onToggle;
            buttonE.ToggledOn += onToggleOn;
            buttonE.ToggledOff += onToggleOff;
            Align.PlaceDownLeft(buttonE, buttonD, 10);

            buttonF = new Control.Button(this);
            buttonF.Text = "Disabled :D";
            buttonF.IsDisabled = true;
            Align.PlaceDownLeft(buttonF, buttonE, 10);

            buttonG = new Control.Button(this);
            buttonG.Text = "With Tooltip";
            buttonG.SetToolTipText("This is tooltip");
            Align.PlaceDownLeft(buttonG, buttonF, 10);

            buttonH = new Control.Button(this);
            buttonH.Text = "I'm autosized";
            buttonH.SizeToContents();
            Align.PlaceDownLeft(buttonH, buttonG, 10);
        }
Esempio n. 3
0
        public Button(ControlBase parent)
            : base(parent)
        {
            buttonA      = new Control.Button(this);
            buttonA.Text = "Event tester";
            buttonA.SetBounds(200, 30, 300, 200);
            buttonA.Pressed  += onButtonAp;
            buttonA.Clicked  += onButtonAc;
            buttonA.Released += onButtonAr;

            buttonB      = new Control.Button(this);
            buttonB.Text = "\u0417\u0430\u043C\u0435\u0436\u043D\u0430\u044F \u043C\u043E\u0432\u0430";
            buttonB.SetPosition(0, 20);

            buttonC      = new Control.Button(this);
            buttonC.Text = "Image button";
            buttonC.SetImage("test16.png");
            Align.PlaceDownLeft(buttonC, buttonB, 10);

            buttonD = new Control.Button(this);
            buttonD.SetImage("test16.png");
            buttonD.SetSize(20, 20);
            Align.PlaceDownLeft(buttonD, buttonC, 10);

            buttonE             = new Control.Button(this);
            buttonE.Text        = "Toggle me";
            buttonE.IsToggle    = true;
            buttonE.Toggled    += onToggle;
            buttonE.ToggledOn  += onToggleOn;
            buttonE.ToggledOff += onToggleOff;
            Align.PlaceDownLeft(buttonE, buttonD, 10);

            buttonF            = new Control.Button(this);
            buttonF.Text       = "Disabled :D";
            buttonF.IsDisabled = true;
            Align.PlaceDownLeft(buttonF, buttonE, 10);

            buttonG      = new Control.Button(this);
            buttonG.Text = "With Tooltip";
            buttonG.SetToolTipText("This is tooltip");
            Align.PlaceDownLeft(buttonG, buttonF, 10);

            buttonH      = new Control.Button(this);
            buttonH.Text = "I'm autosized";
            buttonH.SizeToContents();
            Align.PlaceDownLeft(buttonH, buttonG, 10);
        }
Esempio n. 4
0
        public ColorPickers(Base parent)
            : base(parent)
        {
            /* RGB Picker */
            {
                ColorPicker rgbPicker = new ColorPicker(this);
                rgbPicker.SetPosition(10, 10);
                rgbPicker.ColorChanged += ColorChanged;
            }

            /* HSVColorPicker */
            {
                HSVColorPicker hsvPicker = new HSVColorPicker(this);
                hsvPicker.SetPosition(300, 10);
                hsvPicker.ColorChanged += ColorChanged;
            }

            /* HSVColorPicker in Window */
            {
                Control.WindowControl Window = new WindowControl(this);
                Window.SetSize(300, 300);
                Window.Hide();

                HSVColorPicker hsvPicker = new HSVColorPicker(Window);
                hsvPicker.SetPosition(10, 10);
                hsvPicker.ColorChanged += ColorChanged;

                Control.Button OpenWindow = new Control.Button(this);
                OpenWindow.SetPosition(10, 200);
                OpenWindow.SetSize(200, 20);
                OpenWindow.Text     = "Open Window";
                OpenWindow.Clicked += delegate(Base sender, ClickedEventArgs args)
                {
                    Window.Show();
                };
            }
        }