public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context == null || context.Instance == null || provider == null) return base.EditValue(context, provider, value); IWindowsFormsEditorService formsEditorService = provider.GetService(typeof (IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (formsEditorService != null) { SessionDataForm sessionDataForm = new SessionDataForm(); sessionDataForm.Init(SessionDataTypeEditor.instruments, SessionDataTypeEditor.markets); int num = (int) formsEditorService.ShowDialog((Form) sessionDataForm); } return value; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context == null || context.Instance == null || provider == null) { return(base.EditValue(context, provider, value)); } IWindowsFormsEditorService formsEditorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (formsEditorService != null) { SessionDataForm sessionDataForm = new SessionDataForm(); sessionDataForm.Init(SessionDataTypeEditor.instruments, SessionDataTypeEditor.markets); int num = (int)formsEditorService.ShowDialog((Form)sessionDataForm); } return(value); }