public ImportGherkinFeatureFilePage() { InitializeComponent(); FetaureFileName.FileExtensions.Add(".feature"); FileContentViewer.Visibility = System.Windows.Visibility.Collapsed; FileContentViewer.SetContentEditorTitleLabel("Selected Gherkin Feature File Preview"); FileContentViewer.ToolBarRow.Height = new GridLength(0); FileContentViewer.ToolBarTray.Visibility = Visibility.Collapsed; FileContentViewer.lblTitle.Content = "Text"; FileContentViewer.toolbar.Visibility = Visibility.Collapsed; }
private void FilePathTextBox_TextChanged(object sender, TextChangedEventArgs e) { if (string.IsNullOrEmpty(FetaureFileName.FilePathTextBox.Text)) { return; } if (Path.GetExtension(FetaureFileName.FilePathTextBox.Text).ToUpper() != ".FEATURE") { Reporter.ToUser(eUserMsgKeys.GherkinFeatureFileImportOnlyFeatureFileAllowedErrorMessage); FetaureFileName.FilePathTextBox.Text = string.Empty; return; } else { FileContentViewer.Visibility = System.Windows.Visibility.Visible; FileContentViewer.Init(FetaureFileName.FilePathTextBox.Text, new GherkinDcoumentEditor(), false); } }