Esempio n. 1
0
        public int OnAfterSave(uint docCookie)
        {
            var info = _runningDocumentTable.GetDocumentInfo(docCookie);
            var path = info.Moniker;

            DocumentSaved?.Invoke(this, path);
            return(VSConstants.S_OK);
        }
Esempio n. 2
0
        private async void HandleDocumentSaved(object sender, EventArgs e)
        {
            var analysedDocument = await GetAnalysisDocument();

            if (analysedDocument != null)
            {
                DocumentSaved?.Invoke(this, new DocumentSavedEventArgs {
                    Document = analysedDocument
                });
            }
        }
        private void DocumentEvents_DocumentSaved(Document document)
        {
            var analysedDocument = GetAnalysisDocument(document);

            if (analysedDocument != null)
            {
                DocumentSaved?.Invoke(this, new DocumentSavedEventArgs {
                    Document = analysedDocument
                });
            }
        }
        private void SaveDocument()
        {
            ChangeStatus(ServiceActivity.Saving);

            try
            {
                var sequence        = Interlocked.Exchange(ref _sequenceFileNames, new ConcurrentBag <string>());
                var destinationPath = _pdfService.SaveDocument(sequence.Reverse(), GenerateUniqueFileName());

                if (destinationPath != null)
                {
                    DocumentSaved?.Invoke(this, new DocumentEventArgs(destinationPath));
                }
            }
            catch (Exception ex)
            {
                _logger.Error(ex.Message);
                throw;
            }

            ChangeStatus(ServiceActivity.Waiting);
        }
Esempio n. 5
0
 /// <summary>
 /// Invokes handlers of the <see cref="DocumentSaved"/> event.
 /// </summary>
 /// <param name="document">The saved document.</param>
 protected void NotifyDocumentSaved(IDocument document)
 {
     DocumentSaved?.Invoke(this, new DocumentWindowEventArgs(document));
 }
Esempio n. 6
0
 public static void RaiseDocumentSaved(Document document)
 {
     DocumentSaved?.Invoke(document);
 }
Esempio n. 7
0
 private void OnCurrentDocumentSaved(object sender, EventArgs e)
 {
     DocumentSaved?.Invoke(sender, e);
 }
Esempio n. 8
0
 protected virtual void OnDocumentSaved(DevEnviromentDocument e)
 {
     DocumentSaved?.Invoke(this, e);
 }
Esempio n. 9
0
 public int OnAfterSave(uint docCookie)
 {
     DocumentSaved?.Invoke(docCookie);
     return(VSConstants.S_OK);
 }
Esempio n. 10
0
 public void FakeNotification()
 {
     DocumentSaved.Invoke(new Document());
 }