Beispiel #1
0
 public static string HandleChooseFolderComboBox(ComboBoxEdit comboBox, ButtonPressedEventArgs args,
                                                 bool showNewFolderBtn, string description,
                                                 IWin32Window owner)
 {
     if ((ButtonPredefines)args.Button.Kind == ButtonPredefines.Ellipsis)
     {
         string startFolderPath = null;
         if (!string.IsNullOrEmpty(comboBox.Text))
         {
             if (Directory.Exists(comboBox.Text))
             {
                 startFolderPath = comboBox.Text;
             }
         }
         string folderPath =
             AppUtils.ChooseFolder(startFolderPath, showNewFolderBtn, description, owner);
         if (folderPath != null)
         {
             comboBox.Text = folderPath;
             return(folderPath);
         }
     }
     return(null);
 }