public static void Test()
 {
     using (dlgCommandNameEditor dlg = new dlgCommandNameEditor())
     {
         dlg._CommandDescriptors = WriterCommandNameDlgEditor.GetCommandDescriptors(dlg.GetType().Assembly.GetTypes());
         dlg.ShowDialog();
     }
 }
Beispiel #2
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     using (dlgCommandNameEditor dlg = new dlgCommandNameEditor())
     {
         dlg.InputCommandName   = Convert.ToString(value);
         dlg.CommandDescriptors = GetCommandDescriptors(context);
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             OnValueChanged(context, provider, dlg.InputCommandName);
             return(dlg.InputCommandName);
         }
     }
     return(value);
 }