Example #1
0
 private void Slider(object sender, EventArgs e)
 {
     if (EnableSliders && SelectedColor >= 0 && SelectedColor < ColorPairs.Count)
     {
         if (InputSelected)
         {
             ColorPairs [SelectedColor] = new ColorPair(ColorFromSliders(),
                                                        ColorPairs [SelectedColor].OutputColor,
                                                        ColorPairs [SelectedColor].Index);
         }
         else
         {
             ColorPairs [SelectedColor] = new ColorPair(ColorPairs[SelectedColor].InputColor,
                                                        ColorFromSliders(),
                                                        ColorPairs [SelectedColor].Index);
         }
     }
 }
Example #2
0
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            ColorPair pair = new ColorPair(ColorPairs.Count);

            ColorPairs.Add(pair);
        }