示例#1
0
 public void CMYvalueChanged2()
 {
     rgb           = cmy.To <Rgb>();
     BOX.BackColor = Color.FromArgb(alpha, (int)rgb.R, (int)rgb.G, (int)rgb.B);
     cl.Text       = string.Format("C({0:F2})", cmy.C);
     ml.Text       = string.Format("M({0:F2})", cmy.M);
     yl.Text       = string.Format("Y({0:F2})", cmy.Y);
     CS.Value      = (int)(cmy.C * CS.Maximum);
     MS.Value      = (int)(cmy.M * MS.Maximum);
     YS.Value      = (int)(cmy.Y * YS.Maximum);
 }
示例#2
0
        public void CMYvalueChanged()
        {
            double multiplier = SS.Maximum;

            cmy = new Cmy {
                C = CS.Value / multiplier, M = MS.Value / multiplier, Y = YS.Value / multiplier
            };
            rgb           = cmy.To <Rgb>();
            BOX.BackColor = Color.FromArgb(alpha, (int)rgb.R, (int)rgb.G, (int)rgb.B);
            cl.Text       = string.Format("C({0:F2})", cmy.C);
            ml.Text       = string.Format("M({0:F2})", cmy.M);
            yl.Text       = string.Format("Y({0:F2})", cmy.Y);
            CS.Value      = (int)(cmy.C * CS.Maximum);
            MS.Value      = (int)(cmy.M * MS.Maximum);
            YS.Value      = (int)(cmy.Y * YS.Maximum);
        }