/// <summary> /// Constructeur principal /// </summary> public LayersPanel() { InitializeComponent(); _Service = new LayersPanelService(); _NewLayer = new NewLayer(); _NewLayer.FormClosing += new FormClosingEventHandler(_NewLayer_FormClosing); _ColorManager = new ImageColorManager(); _ColorManager.ColorTransformationChanged += new EventHandler(_ColorManager_ColorTransformationChanged); }
public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value) { IWindowsFormsEditorService svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; VO_ColorTransformation ct = value as VO_ColorTransformation; if (svc != null && ct != null) { using (ImageColorManager form = new ImageColorManager()) { form.OriginalColorTransformations = ct; if (svc.ShowDialog(form) == DialogResult.OK) { ct = form.OriginalColorTransformations; // update object } } } return(value); // can also replace the wrapper object here }