Ejemplo n.º 1
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (context == null || provider == null)
     {
         return base.EditValue(context, provider, value);
     }
     using (FolderSelectDialog dlg = new FolderSelectDialog())
     {
         dlg.Title = Resources.DirectoryNameEditor_EditValue_Browse_for_a_folder___;
         if (dlg.ShowDialog())
         {
             value = dlg.FileName;
         }
     }
     return value;
 }
Ejemplo n.º 2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (context == null || provider == null)
            {
                return(base.EditValue(context, provider, value));
            }

            using (FolderSelectDialog dlg = new FolderSelectDialog())
            {
                dlg.Title = Resources.DirectoryNameEditor_EditValue_Browse_for_a_folder___;

                if (dlg.ShowDialog())
                {
                    value = Helpers.GetVariableFolderPath(dlg.FileName, true);
                }
            }

            return(value);
        }