示例#1
0
        private void OnDocumentUpdated(object rawEventArgs)
        {
            DocumentUpdatedEventArgs e = rawEventArgs as DocumentUpdatedEventArgs;

            if (e != null && DocumentUpdated != null)
            {
                DocumentUpdated(this, e);
            }
        }
示例#2
0
        /// <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);
                }
            }
        }
示例#3
0
        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);
        }
示例#4
0
 private void OnEditorDocumentStateChanged(object sender, DocumentUpdatedEventArgs e) =>
 UpdateWindowTitle(e);