コード例 #1
0
 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;
 }
コード例 #2
0
        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);
        }