private void BtnBrowseProjectPath_Click(object sender, EventArgs e) { try { DataVerification dataVerification = new DataVerification(this); DialogResult result = FolderBrowserDialogPath.ShowDialog(); // The second condition checks whether the selected path meets the essential circumstances or not. if (result == DialogResult.OK && dataVerification.ProjectPathVerification(FolderBrowserDialogPath.SelectedPath)) { TxtBxProjectPath.Text = FolderBrowserDialogPath.SelectedPath; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BtnBrowsePublishPath_Click(object sender, EventArgs e) { try { DataVerification dataVerification = new DataVerification(this); DialogResult result = FolderBrowserDialogPath.ShowDialog(); if (result == DialogResult.OK) { // The following invoked method checks if the address meets the circumstances // then puts it in the publish path text box. if (dataVerification.PublishPathVerification(FolderBrowserDialogPath.SelectedPath)) { TxtBxPublishPath.Text = FolderBrowserDialogPath.SelectedPath; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }