protected void Init() { SuspendLayout(); this.DoubleBuffered = true; this.clientWidth = ClientRectangle.Width; this.clientHeight = ClientRectangle.Height; this.selectedColor = Color.Red; this.drawStyle = DrawStyles.HSBHue; bmp = new Bitmap(clientWidth, clientHeight, PixelFormat.Format32bppArgb); mouseMoveTimer = new Timer(); mouseMoveTimer.Interval = 10; mouseMoveTimer.Tick += new EventHandler(MouseMoveTimer_Tick); ClientSizeChanged += new EventHandler(ClientSizeChanged_Event); MouseDown += new MouseEventHandler(MouseDown_Event); MouseEnter += new EventHandler(MouseEnter_Event); MouseUp += new MouseEventHandler(MouseUp_Event); Paint += new PaintEventHandler(Paint_Event); ResumeLayout(false); }
private void InitializeComponent() { this.colorBox = new nsColorPicker.ColorPickerBox(); this.colorSlider = new nsColorPicker.ColorPickerSlider(); this.SuspendLayout(); // // colorBox // this.colorBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.colorBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.colorBox.CrosshairVisible = false; this.colorBox.DrawStyle = nsColorPicker.DrawStyles.HSBHue; this.colorBox.Location = new System.Drawing.Point(0, 0); this.colorBox.Name = "colorBox"; this.colorBox.Size = new System.Drawing.Size(258, 258); this.colorBox.TabIndex = 0; // // colorSlider // this.colorSlider.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.colorSlider.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.colorSlider.CrosshairVisible = false; this.colorSlider.DrawStyle = nsColorPicker.DrawStyles.HSBHue; this.colorSlider.Location = new System.Drawing.Point(257, 0); this.colorSlider.Name = "colorSlider"; this.colorSlider.Size = new System.Drawing.Size(32, 258); this.colorSlider.TabIndex = 1; // // ColorPicker // this.AutoSize = true; this.Controls.Add(this.colorBox); this.Controls.Add(this.colorSlider); this.Name = "ColorPicker"; this.Size = new System.Drawing.Size(292, 261); this.ResumeLayout(false); }
public ColorEventArgs(_Color color, _Color absoluteColor, DrawStyles drawStyle) { Color = color; AbsoluteColor = absoluteColor; DrawStyle = drawStyle; }
public ColorEventArgs(COLOR color, DrawStyles drawStyle) { Color = color; DrawStyle = drawStyle; }