예제 #1
0
 // If the R, G, or B values change, use this
 // code to update the HSV values and invalidate
 // the color wheel (so it updates the pointers).
 // Check the isInUpdate flag to avoid recursive events
 // when you update the NumericUpdownControls.
 private void HandleRGBScroll(object sender, ScrollEventArgs e)
 {
     _changeType = ChangeStyle.RGB;
     RGB         = new DRColor.RGB(hsbRed.Value, hsbGreen.Value, hsbBlue.Value);
     SetHSV(new DRColor.HSV(RGB));
     SetRGBLabels(RGB);
     this.Invalidate();
     RainbowUtils.fillBoth(RGB);
 }
예제 #2
0
 private void SetRGB(DRColor.RGB RGB)
 {
     if (RGB == null)
     {
         return;
     }
     // Update the RGB values on the form.
     RefreshValue(hsbRed, RGB.Red);
     RefreshValue(hsbBlue, RGB.Blue);
     RefreshValue(hsbGreen, RGB.Green);
     SetRGBLabels(RGB);
 }
예제 #3
0
 private void SetRGBLabels(DRColor.RGB RGB)
 {
     RefreshText(lblRed, RGB.Red);
     RefreshText(lblBlue, RGB.Blue);
     RefreshText(lblGreen, RGB.Green);
 }