コード例 #1
0
 private void OnSolutionBindingChanged(object sender, ActiveSolutionBindingEventArgs binding)
 {
     if (binding.IsBound)
     {
         VisualStudioStatusBarHelper.AddStatusBarIcon(notificationIcon);
         notifications.StartAsync(binding.ProjectKey, notificationData);
     }
     else
     {
         notifications.Stop();
         VisualStudioStatusBarHelper.RemoveStatusBarIcon(notificationIcon);
     }
 }
 private void OnSolutionBindingChanged(object sender, ActiveSolutionBindingEventArgs binding)
 {
     if (binding.Configuration.Mode != NewConnectedMode.SonarLintMode.Standalone)
     {
         VisualStudioStatusBarHelper.AddStatusBarIcon(notificationIcon);
         notifications.StartAsync(binding.Configuration.Project.ProjectKey, notificationData);
     }
     else
     {
         notifications.Stop();
         VisualStudioStatusBarHelper.RemoveStatusBarIcon(notificationIcon);
     }
 }
コード例 #3
0
        private void Refresh(BindingConfiguration bindingConfiguration)
        {
            Debug.Assert(ThreadHelper.CheckAccess());

            if (bindingConfiguration.Mode != SonarLintMode.Standalone)
            {
                logger.WriteLine(Resources.Strings.Notifications_Connected);
                VisualStudioStatusBarHelper.AddStatusBarIcon(notificationIcon);
                notifications.StartAsync(bindingConfiguration.Project.ProjectKey, notificationData);
            }
            else
            {
                logger.WriteLine(Resources.Strings.Notifications_NotConnected);
                notifications.Stop();
                VisualStudioStatusBarHelper.RemoveStatusBarIcon(notificationIcon);
            }
        }
コード例 #4
0
        private void OnSolutionBindingChanged(object sender, ActiveSolutionBindingEventArgs binding)
        {
            if (notificationIcon == null)
            {
                notificationIcon             = new NotificationIndicator();
                notificationIcon.DataContext = notifications.Model;
                VisualStudioStatusBarHelper.AddStatusBarIcon(notificationIcon);
            }

            if (binding.IsBound)
            {
                notifications.StartAsync(binding.ProjectKey, notificationData);
            }
            else
            {
                notifications.Stop();
            }
        }