CmisSync.SetupController.CheckRepoPathExists C# (CSharp) Method

CheckRepoPathExists() public method

public CheckRepoPathExists ( string localpath ) : void
localpath string
return void
        public void CheckRepoPathExists(string localpath)
        {
            if (Directory.Exists(localpath))
                throw new ArgumentException(String.Format(Properties_Resources.LocalDirectoryExist));
        }

Usage Example

Esempio n. 1
0
        private void CheckCustomizeInput(TextBox localfolder_box, TextBox localrepopath_box, TextBlock localfolder_error_label)
        {
            string error = Controller.CheckRepoPathAndName(localrepopath_box.Text, localfolder_box.Text);

            if (!String.IsNullOrEmpty(error))
            {
                localfolder_error_label.Text       = error;
                localfolder_error_label.Visibility = Visibility.Visible;
                localfolder_error_label.Foreground = Brushes.Red;
            }
            else
            {
                try
                {
                    Controller.CheckRepoPathExists(localrepopath_box.Text);
                    localfolder_error_label.Visibility = Visibility.Hidden;
                }
                catch (ArgumentException e)
                {
                    localfolder_error_label.Visibility = Visibility.Visible;
                    localfolder_error_label.Foreground = Brushes.Orange;
                    localfolder_error_label.Text       = e.Message;
                }
            }
        }
All Usage Examples Of CmisSync.SetupController::CheckRepoPathExists