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)
   {
     PasswordChangingForm passwordChangingForm = new PasswordChangingForm(PasswordChangingTypeEditor.selectedDll);
     int num = (int) formsEditorService.ShowDialog((Form) passwordChangingForm);
     if (passwordChangingForm.password != "")
       value = (object) passwordChangingForm.password;
   }
   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)
            {
                PasswordChangingForm passwordChangingForm = new PasswordChangingForm(PasswordChangingTypeEditor.selectedDll);
                int num = (int)formsEditorService.ShowDialog((Form)passwordChangingForm);
                if (passwordChangingForm.password != "")
                {
                    value = (object)passwordChangingForm.password;
                }
            }
            return(value);
        }