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); } } }
private void Add_Click(object sender, RoutedEventArgs e) { ColorPair pair = new ColorPair(ColorPairs.Count); ColorPairs.Add(pair); }