Пример #1
0
        public ColorPalette( )
        {
            this.hsbColor     = new HuiruiSoft.Drawing.HSBCOLOR( );
            this.hsbColor.Hue = this.hsbColor.Saturation = this.hsbColor.Brightness = 1.0;
            this.labColor     = new HuiruiSoft.Drawing.CIELabColor( );
            this.labColor.L   = this.labColor.A = this.labColor.B = 0;

            this.cubeZAxes    = HuiruiSoft.Drawing.ColorCubeZAxes.Hue;
            this.currentColor = HuiruiSoft.Drawing.ColorTranslator.HSBToRGB(this.hsbColor);

            this.InitializeComponent( );

            base.TabStop = true;
            this.Cursor  = System.Windows.Forms.Cursors.Cross;

            base.SetStyle(
                ControlStyles.UserPaint |
                ControlStyles.UserMouse |
                ControlStyles.Selectable |
                ControlStyles.ResizeRedraw |
                ControlStyles.DoubleBuffer |
                ControlStyles.StandardClick |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.StandardDoubleClick, true);
        }
Пример #2
0
        public ColorSlider( )
        {
            this.cubeZaxes   = HuiruiSoft.Drawing.ColorCubeZAxes.Hue;
            this.orientation = Orientation.Vertical;

            this.hsbColor            = new HuiruiSoft.Drawing.HSBCOLOR( );
            this.hsbColor.Hue        = 360.0;
            this.hsbColor.Saturation = 1.0;
            this.hsbColor.Brightness = 1.0;
            this.cubeZaxes           = HuiruiSoft.Drawing.ColorCubeZAxes.Hue;
            this.cieLabColor         = new HuiruiSoft.Drawing.CIELabColor( );
            this.currentColor        = HuiruiSoft.Drawing.ColorTranslator.HSBToRGB(this.hsbColor);

            base.TabStop = true;

            base.SetStyle(
                ControlStyles.UserPaint |
                ControlStyles.UserMouse |
                ControlStyles.Selectable |
                ControlStyles.ResizeRedraw |
                ControlStyles.DoubleBuffer |
                ControlStyles.StandardClick |
                ControlStyles.StandardDoubleClick |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.SupportsTransparentBackColor, true);
        }