private void btnSelectFile_Click(object sender, EventArgs e) { var fullPath = CommonDialogs.SelectFileDialogBox(""); if (!string.IsNullOrEmpty(fullPath)) { this.txtName.Text = fullPath; } }
private void SelectConfigurationFileToOpen <T>(AppData <T> appData, ListView listViewToPopulate) where T : INamed, new() { var folderToOpen = appData.Status[ApplicationStatusBackup.StatusItem.ConfigurationFileLocation]; var fullPath = CommonDialogs.SelectFileDialogBox("", folderToOpen); if (!string.IsNullOrEmpty(fullPath)) { OpenConfigurationFile(appData, listViewToPopulate, fullPath); } }