コード例 #1
0
        private void btnSelectFile_Click(object sender, EventArgs e)
        {
            var fullPath = CommonDialogs.SelectFileDialogBox("");

            if (!string.IsNullOrEmpty(fullPath))
            {
                this.txtName.Text = fullPath;
            }
        }
コード例 #2
0
        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);
            }
        }