Exemplo n.º 1
0
 public void OnActiveDocumentChanged(ActiveDocumentChangedEventArgs e)
 {
     if (ActiveDocumentChanged != null)
     {
         ActiveDocumentChanged(this, e);
     }
 }
Exemplo n.º 2
0
        private void OnActiveDocumentFocused(object sender, ActiveDocumentChangedEventArgs e)
        {
            if (e.ActiveTextDocument == null)
            {
                return;
            }

            var detectedLanguages = sonarLanguageRecognizer.Detect(e.ActiveTextDocument.FilePath, e.ActiveTextDocument.TextBuffer.ContentType);

            if (!detectedLanguages.Any() || !cFamilyAnalyzer.IsAnalysisSupported(detectedLanguages))
            {
                return;
            }

            var cFamilyAnalyzerOptions = new CFamilyAnalyzerOptions
            {
                CreatePreCompiledHeaders = true
            };

            scheduler.Schedule(PchJobId, token =>
            {
                cFamilyAnalyzer.ExecuteAnalysis(e.ActiveTextDocument.FilePath,
                                                detectedLanguages,
                                                null,
                                                cFamilyAnalyzerOptions,
                                                null,
                                                token);
            }, pchJobTimeoutInMilliseconds);
        }
Exemplo n.º 3
0
 private static void VM_ActiveDocumentChanged(object sender, ActiveDocumentChangedEventArgs e)
 {
     if (e.Document is GlobalViewModel)
     {
         VM.SelectRibbonTabById("Global");
     }
     else if (e.Document is ConfigurationViewModel)
     {
         VM.SelectRibbonTabById("Configuration");
     }
     else if (e.Document is DatabaseViewModel)
     {
         VM.SelectRibbonTabById("Database");
     }
     else if (e.Document is HttpServerViewModel)
     {
         VM.SelectRibbonTabById("HttpServer");
     }
     else if (e.Document is TcpServerViewModel)
     {
         VM.SelectRibbonTabById("TcpServer");
     }
     else if (e.Document is ReportingViewModel)
     {
         VM.SelectRibbonTabById("Reporting");
     }
 }
 void OnActiveDocumentChanged(object sender, ActiveDocumentChangedEventArgs e)
 {
     if (e.NewDocument == null)
     {
         ActiveModule = null;
     }
     else
     {
         documentChanging = true;
         ActiveModule     = Modules.FirstOrDefault(m => m.DocumentType == (string)e.NewDocument.Id);
         documentChanging = false;
     }
 }
        /// <summary>
        /// Called when the active document changes
        /// </summary>
        /// <param name="sender">sender of the event</param>
        /// <param name="args">event data</param>
        private void HandleActiveDocumentChanged(object sender, ActiveDocumentChangedEventArgs args)
        {
            if (args.ActiveDocument == null)
            {
                FilePath = "No Selection";
                //_documentTypeControl.Text = "No Selection";
                return;
            }
            var name = args.ActiveDocument.DocumentName;
            var type = args.ActiveDocument.Envoy.ModelDefinitionType.ToString();

            FilePath = name;
            //_documentTypeControl.Text = type;
        }
        private void OnActiveDocumentChanged(object sender, ActiveDocumentChangedEventArgs e)
        {
            if (e.PreviousDoc is IPWEDoc previousPweDoc)
            {
                previousPweDoc.TextChanging -= this.PweDoc_TextChanging;
            }

            if (e.ActiveDoc is IPWEDoc activePweDoc)
            {
                activePweDoc.TextChanging += this.PweDoc_TextChanging;
            }
            //aggancio e sgancio da eventi documento attivo in continuo
            //con stesso codice sopra
        }
Exemplo n.º 7
0
 /// <summary>
 /// Called when the active document changes
 /// </summary>
 /// <param name="sender">sender of the event</param>
 /// <param name="args">event data</param>
 private void HandleActiveDocumentChanged(object sender, ActiveDocumentChangedEventArgs args)
 {
     UpdateDocumentName(args.ActiveDocument);
 }
 public void OnActiveDocumentChanged(ActiveDocumentChangedEventArgs e) {
     if(ActiveDocumentChanged != null) {
         ActiveDocumentChanged(this, e);
     }
 }
Exemplo n.º 9
0
 void OnActiveDocumentChanged(object sender, ActiveDocumentChangedEventArgs e)
 {
     GetServiceInfo();
 }
Exemplo n.º 10
0
 void OnActiveDocumentChanged(object sender, ActiveDocumentChangedEventArgs e)
 {
     ActiveModule = e.NewDocument == null ? null : e.NewDocument.Id as TModule;
 }