private void OnDocumentUpdated(object rawEventArgs) { DocumentUpdatedEventArgs e = rawEventArgs as DocumentUpdatedEventArgs; if (e != null && DocumentUpdated != null) { DocumentUpdated(this, e); } }
/// <summary> /// The proxy on document updated. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="documentUpdatedEventArgs"> /// The document updated event args. /// </param> private void ProxyOnDocumentUpdated(object sender, [NotNull] DocumentUpdatedEventArgs documentUpdatedEventArgs) { if (this.documents.TryGetValue(documentUpdatedEventArgs.Document.Filename, out var doc)) { doc.UpdateClassification(documentUpdatedEventArgs.Document); if (documentUpdatedEventArgs.Document.Messages != null) { this.UpdateErrorList(doc); } } }
private void UpdateWindowTitle(DocumentUpdatedEventArgs args) { var flag = args.DocumentState == DocumentState.Unsaved ? '*' : ' '; string documentTitle = args.DocumentTitle; if (documentTitle.Contains('.')) { documentTitle = documentTitle.Substring(0, documentTitle.IndexOf('.')); } Title = string.Format(Constants.WindowTitleTemplate, flag + documentTitle); }
private void OnEditorDocumentStateChanged(object sender, DocumentUpdatedEventArgs e) => UpdateWindowTitle(e);