Example #1
0
        public string DS_OpenOutputFolderDialogForm(string description = "Chose folder", string folderPath = "")
        {
            {
                FolderBrowserDialog fbd;

                if (folderPath != "")
                {
                    fbd = new FolderBrowserDialog
                    {
                        Description  = description,
                        SelectedPath = folderPath
                    };
                }
                else
                {
                    fbd = new FolderBrowserDialog
                    {
                        Description = description
                    };
                }


                if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    string sfp = fbd.SelectedPath;

                    DS_Tools dS_Tools = new DS_Tools();
                    if (dS_Tools.DS_HasWritePermissionOnDir(sfp) == true)
                    {
                        return(sfp);
                    }
                    else
                    {
                        MessageBox.Show("Error access to path!");
                        return("");
                    }
                }

                return("");
            }
        }