private static void OnSaturationChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            FrmColorPicker frmColorPicker = o as FrmColorPicker;

            if (frmColorPicker != null)
            {
                frmColorPicker.OnSaturationChanged((double)e.OldValue, (double)e.NewValue);
            }
        }
Example #2
0
 private static void SetLightFrame(Light light, FrmColorPicker colorPicker, int frameIndex)
 {
     if (light == null)
     {
         return;
     }
     while (frameIndex >= light.SequenceData.Count)
     {
         light.SequenceData.Add(new LightSequenceData());
     }
     light.SequenceData[frameIndex].Hue        = (int)colorPicker.Hue;
     light.SequenceData[frameIndex].Saturation = (int)colorPicker.Saturation;
     light.SequenceData[frameIndex].Lightness  = (int)colorPicker.Lightness;
 }
Example #3
0
 private void SetColorPicker(LightSequenceData lightSequenceData, FrmColorPicker colorPicker)
 {
     settingColorInternally = true;
     try
     {
         colorPicker.Hue        = (int)lightSequenceData.Hue;
         colorPicker.Saturation = (int)lightSequenceData.Saturation;
         colorPicker.Lightness  = (int)lightSequenceData.Lightness;
     }
     finally
     {
         settingColorInternally = false;
     }
 }
Example #4
0
 private void SetLightFrame(Light light, FrmColorPicker colorPicker)
 {
     SetLightFrame(light, colorPicker, FrameIndex);
 }