Esempio n. 1
0
        public ColorPickers(ControlBase parent) : base(parent)
        {
            ColorPicker rgbPicker = new ColorPicker(this);

            rgbPicker.SetPosition(10, 10);

            rgbPicker.ColorChanged += ColorChanged;

            HSVColorPicker hsvPicker = new HSVColorPicker(this);

            hsvPicker.SetPosition(300, 10);
            hsvPicker.ColorChanged += ColorChanged;
        }
Esempio n. 2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            ColorPicker rgbPicker = new ColorPicker(this, Color.White);

            rgbPicker.SetPosition(10, 10);

            rgbPicker.ColorChanged += ColorChanged;

            HSVColorPicker hsvPicker = new HSVColorPicker(this);

            hsvPicker.SetPosition(300, 10);
            hsvPicker.ColorChanged += ColorChanged;
        }
Esempio n. 3
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();
                };
            }
        }