public ColorDialog(Color c) { // // Required for Windows Form Designer support // InitializeComponent(); cdSlider.ColorChanged += new winmaped2.ColorDlgSlider.CEvent(cdSlider_ColorChanged); cdPicker.ColorChanged += new winmaped2.ColorDlgPicker.CEvent(cdPicker_ColorChanged); colorInfo = new ColorInfo(); // colorInfo.ColorChanged += new winmaped2.ColorInfo.CEvent(colorInfo_ColorChanged); colorDisplay.SetController(colorInfo); cdPicker.SetDisplayTarget(colorDisplay); cdPicker.SetDlg(this); SelectedColor = c; }
public void SetController(ColorInfo ci) { controller = ci; ci.ColorChanged += new ColorInfo.CEvent(ColorChanged); }