private void ParseLogFile(string filename) { parser = new BackgroundLogParser(filename); LoadLogFileDialog loadDlg = new Dialogs.LoadLogFileDialog( parser, (s, ea) => { this.Enabled = false; }, (s, ea) => { this.Enabled = true; this.Focus(); }, filename ); loadDlg.ShowDialog(); Globals.GPUs = parser.gpus.Values.ToList(); gpuDetail.SetObjects(Globals.GPUs); gpuPanel.SetObjects(Globals.GPUs); DocumentChanged?.Invoke(this, null); }
private static void OnDocumentChanged(object sender, DocumentChangedEventArgs args) { if (isCommitting) { return; } var document = args.GetDocument(); if (!document.Equals(ActiveDBDocument)) { return; } CancelReadActions(); DocumentChanged?.Invoke(sender, args); }
void MimeTypeChanged(object sender, EventArgs e) { Document oldDoc = Document; if (activeDocument?.Editor?.MimeType == mimeType) { Document = activeDocument; } else { Document = null; } if (oldDoc != Document) { DocumentChanged?.Invoke(this, new DocumentChangedEventArgs(Document, oldDoc)); } }
async void HandleDocumentSaved(object sender, EventArgs e) { SyntaxTree syntaxTree = null; SemanticModel semanticModel = null; if (boundDoc.FileName.Extension == ".cs" && boundDoc.AnalysisDocument != null) { syntaxTree = await boundDoc.AnalysisDocument.GetSyntaxTreeAsync(); semanticModel = await boundDoc.AnalysisDocument.GetSemanticModelAsync(); } Log.Information($"Document changed {boundDoc.Name}"); DocumentChanged?.Invoke(this, new DocumentChangedEventArgs(boundDoc.FileName, boundDoc.Editor.Text, syntaxTree, semanticModel)); }
public void Replace(int offset, int length, string text) { if (!ReadOnly) { DocumentAboutToBeChanged?.Invoke(this, new DocumentEventArgs() { Document = this, Offset = offset, Length = length, Text = text }); UndoStack.Push(new UndoableReplace(this, offset, GetText(offset, length), text)); TextBuffer.Replace(offset, length, text); LineManager.Replace(offset, length, text); DocumentChanged?.Invoke(this, new DocumentEventArgs() { Document = this, Offset = offset, Length = length, Text = text }); } }
public void Remove(int offset, int length) { if (!ReadOnly) { DocumentAboutToBeChanged?.Invoke(this, new DocumentEventArgs() { Document = this, Offset = offset, Length = length }); UndoStack.Push(new UndoableDelete(this, offset, GetText(offset, length))); TextBuffer.Remove(offset, length); LineManager.Remove(offset, length); DocumentChanged?.Invoke(this, new DocumentEventArgs() { Document = this, Offset = offset, Length = length }); } }
public void Insert(int offset, string text) { if (!ReadOnly) { DocumentAboutToBeChanged?.Invoke(this, new DocumentEventArgs() { Document = this, Offset = offset, Length = -1, Text = text }); TextBuffer.Insert(offset, text); LineManager.Insert(offset, text); UndoStack.Push(new UndoableInsert(this, offset, text)); DocumentChanged?.Invoke(this, new DocumentEventArgs() { Document = this, Offset = offset, Length = -1, Text = text }); } }
/// <summary> /// Raises the <see cref="DocumentChanged"/> event. /// </summary> protected virtual void OnDocumentChanged(EventArgs e) { DocumentChanged?.Invoke(this, e); }
protected virtual void OnDocumentChanged() { DocumentChanged?.Invoke(this, EventArgs.Empty); // Update the AST, btw. //DocumentLinter.RequestAnalyze(); }
protected void OnDocumentOpened(IDocument d) { Trace("document {0} opened", d.Path); DocumentChanged?.Invoke(d); }
protected void OnDocumentRenamed(IDocument d) { Trace("document {0} renamed", d.Path); DocumentChanged?.Invoke(d); }
protected virtual void OnDocumentChanged() { DocumentChanged?.Invoke(this, EventArgs.Empty); }
private void UpdaterDocumentOnTick(object sender, EventArgs eventArgs) { updaterDocument.Stop(); DocumentChanged?.Invoke(this, EventArgs.Empty); }
void OnDocumentChanged(DocumentEventArgs e) { DocumentChanged?.Invoke(this, e); }
private void OnDocumentChanged() { RefreshModifiedStatus(); DocumentChanged?.Invoke(); Application.InvalidateWindows(); }
protected void OnDocumentChanged(EventArgs e) { IsModified = true; DocumentChanged?.Invoke(this, e); }