public void FileOpenClick() { if (CheckForConfigurationChanges()) { var openFileDialogView = _viewFactory.GetOpenFileDialogView(); openFileDialogView.DefaultExt = _settingsManager.FileExtension; openFileDialogView.Filter = _settingsManager.FileTypeFilters; openFileDialogView.FileName = _settingsManager.FileName; openFileDialogView.RestoreDirectory = true; if (openFileDialogView.ShowDialog() == DialogResult.OK) { ClearConfiguration(); LoadConfigFile(openFileDialogView.FileName, openFileDialogView.FilterIndex); } _viewFactory.Release(openFileDialogView); } }