private void ProcessButton_Click(object sender, RoutedEventArgs e) { try { using (new WaitCursor()) { string prettyOutput = "Debug.html"; //TODO: в конфиг! if (File.Exists(prettyOutput)) { File.Delete(prettyOutput); } if (String.IsNullOrEmpty(CurrentContext.TextData) && !String.IsNullOrEmpty(CurrentContext.URL.ToLower().Replace("http:\\\\", ""))) { CurrentContext.OpenUrl(); } CurrentContext.ProcessText(); if (File.Exists(prettyOutput)) { WebBr.NavigateToString(File.ReadAllText(prettyOutput)); } else { WebBr.Navigate("about:blank"); } SemanticElementsWindow sem = new SemanticElementsWindow(CurrentContext) { Owner = this }; sem.Show(); } } catch (Exception ex) { App.ShowError(ex); } }
private void ProcessButton_Click(object sender, RoutedEventArgs e) { try { using (new WaitCursor()) { string prettyOutput = "Debug.html"; //TODO: в конфиг! if (File.Exists(prettyOutput)) File.Delete(prettyOutput); if (String.IsNullOrEmpty(CurrentContext.TextData) && !String.IsNullOrEmpty(CurrentContext.URL.ToLower().Replace("http:\\\\", ""))) CurrentContext.OpenUrl(); CurrentContext.ProcessText(); if (File.Exists(prettyOutput)) WebBr.NavigateToString(File.ReadAllText(prettyOutput)); else WebBr.Navigate("about:blank"); SemanticElementsWindow sem = new SemanticElementsWindow(CurrentContext) { Owner = this }; sem.Show(); } } catch (Exception ex) { App.ShowError(ex); } }