Ejemplo n.º 1
0
        void dropPanel_ColorPicked(object sender, EventArgs e)
        {
            currentColor = dropPanel.CurrentColor;

            //if (currentColor is SolidColor)
            //{
            //	dropPanel.Visible = false;
            //}

            Invalidate();

            if (ColorPicked != null)
            {
                ColorPicked.Invoke(this, new EventArgs());
            }
        }
Ejemplo n.º 2
0
        public ColorPickerPanel()
            : base()
        {
            this.TabStop  = false;
            this.Margin   = this.Padding = new Padding(1);
            this.AutoSize = false;

            panel          = new Panel();
            panel.TabStop  = false;
            panel.AutoSize = false;
            panel.Location = new Point(0, 0);
            panel.Dock     = DockStyle.Fill;

            tab         = new FlatTabControl();
            tab.TabStop = false;
            tab.Tabs    = new string[] { unvell.ReoGrid.Editor.LangRes.LangResource.SolidColor };
            tab.Size    = new Size(ClientRectangle.Width, 20);
            tab.Dock    = DockStyle.Top;
            tab.SelectedIndexChanged += (s, e) => panels[tab.SelectedIndex].BringToFront();

            Controls.Add(tab);
            Controls.Add(panel);

            solidPanel.Dock         = DockStyle.Fill;
            solidPanel.ColorPicked += (s, e) =>
            {
                currentColor = null;                // new SolidColor(colorPickerPanel.CurrentColor);
                if (ColorPicked != null)
                {
                    ColorPicked(this, e);
                }
            };
            solidPanel.BringToFront();

            panel.Controls.Add(solidPanel);

            panels.Add(solidPanel);


            this.Size = new Size(172, 220);
            panel.BringToFront();
        }
        void dropPanel_ColorPicked(object sender, EventArgs e)
        {
            currentColor = dropPanel.CurrentColor;

            if(CloseOnClick && currentColor is SolidColor)
            {
                dropPanel.Close(ToolStripDropDownCloseReason.ItemClicked);
            }

            Invalidate();

            if (currentColor is SolidColor)
            {
                SolidColorPickerPanel.AddRecentColor(((SolidColor)currentColor).Color);
            }

            if (ColorPicked != null)
            {
                ColorPicked.Invoke(this, new EventArgs());
            }
        }
Ejemplo n.º 4
0
        public ColorPickerPanel()
            : base()
        {
            this.TabStop = false;
            this.Margin = this.Padding = new Padding(1);
            this.AutoSize = false;

            panel = new Panel();
            panel.TabStop = false;
            panel.AutoSize = false;
            panel.Location = new Point(0, 0);
            panel.Dock = DockStyle.Fill;

            tab = new FlatTabControl();
            tab.TabStop = false;
            tab.Tabs = new string[] {
                System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName.Equals("ja",
                    StringComparison.CurrentCultureIgnoreCase)?"ソリッド":"Solid" };
            tab.Size = new Size(ClientRectangle.Width, 20);
            tab.Dock = DockStyle.Top;
            tab.SelectedIndexChanged += (s, e) => panels[tab.SelectedIndex].BringToFront();

            Controls.Add(tab);
            Controls.Add(panel);

            solidPanel.Dock = DockStyle.Fill;
            solidPanel.ColorPicked += (s, e) =>
            {
                currentColor = null;// new SolidColor(colorPickerPanel.CurrentColor);
                if (ColorPicked != null) ColorPicked(this, e);
            };
            solidPanel.BringToFront();

            panel.Controls.Add(solidPanel);

            panels.Add(solidPanel);

            this.Size = new Size(172, 220);
            panel.BringToFront();
        }
Ejemplo n.º 5
0
        void dropPanel_ColorPicked(object sender, EventArgs e)
        {
            currentColor = dropPanel.CurrentColor;

            //if (currentColor is SolidColor)
            //{
            //	dropPanel.Visible = false;
            //}

            Invalidate();

            if (ColorPicked != null)
                ColorPicked.Invoke(this, new EventArgs());
        }