void OpenFile(string fileName, int line, int column)
 {
     if (fileName != textEditorFileName)
     {
         textEditor.Load(fileName);
     }
     textEditor.ScrollToEnd();
     textEditor.TextArea.Caret.Location = new ICSharpCode.AvalonEdit.Document.TextLocation(line, column);
     textEditor.ScrollToLine(line);
     CodeCoverageService.ShowCodeCoverage(new AvalonEditTextEditorAdapter(textEditor), fileName);
 }
 void OpenFile(string fileName, int line, int column)
 {
     if (fileName != textEditorControl.FileName)
     {
         textEditorControl.LoadFile(fileName, true, true);
     }
     textEditorControl.ActiveTextAreaControl.ScrollTo(int.MaxValue);
     textEditorControl.ActiveTextAreaControl.Caret.Line = line - 1;
     textEditorControl.ActiveTextAreaControl.ScrollToCaret();
     CodeCoverageService.ShowCodeCoverage(textEditorControl, fileName);
 }
 void OpenFile(string fileName, int line, int column)
 {
     if (fileName != textEditorFileName)
     {
         textEditor.Load(fileName);
         textEditor.SyntaxHighlighting = GetSyntaxHighlighting(fileName);
     }
     textEditor.ScrollToEnd();
     textEditor.TextArea.Caret.Location = new TextLocation(line, column);
     textEditor.ScrollToLine(line);
     CodeCoverageService.ShowCodeCoverage(new AvalonEditTextEditorAdapter(textEditor), fileName);
 }
Exemple #4
0
        public override bool SaveOptions()
        {
            bool codeCoverageColorsChanged = false;

            foreach (CodeCoverageDisplayItem item in displayItemsListBox.Items)
            {
                if (item.HasChanged)
                {
                    CodeCoverageOptions.Properties.Set <System.Drawing.Color>(item.ForeColorPropertyName, item.ForeColor);
                    CodeCoverageOptions.Properties.Set <System.Drawing.Color>(item.BackColorPropertyName, item.BackColor);
                    codeCoverageColorsChanged = true;
                }
            }

            if (codeCoverageColorsChanged)
            {
                CodeCoverageService.RefreshCodeCoverageHighlights();
            }
            return(base.SaveOptions());
        }
        public override bool StorePanelContents()
        {
            bool codeCoverageColorsChanged = false;

            foreach (CodeCoverageDisplayItem item in displayItemsListBox.Items)
            {
                CodeCoverageOptions.Properties.Set <Color>(item.ForeColorPropertyName, item.ForeColor);
                CodeCoverageOptions.Properties.Set <Color>(item.BackColorPropertyName, item.BackColor);
                if (item.HasChanged)
                {
                    codeCoverageColorsChanged = true;
                }
            }

            if (codeCoverageColorsChanged)
            {
                CodeCoverageService.RefreshCodeCoverageHighlights();
            }

            return(true);
        }
 void ClearCodeCoverageResults()
 {
     SD.MainThread.InvokeIfRequired(() => CodeCoverageService.ClearResults());
 }
 void DisplayCodeCoverageResults(CodeCoverageResults results)
 {
     SD.MainThread.InvokeIfRequired(() => CodeCoverageService.ShowResults(results));
 }