private void NotifyIcon_Click(object sender, EventArgs e)
        {
            // Remove the notify icon
            DestroyIcon();

            // Show AddInManager window on click
            using (AddInManagerView view = AddInManagerView.Create())
            {
                var viewModel = view.ViewModel;
                if (viewModel != null)
                {
                    // Activate update view explicitly
                    viewModel.UpdatedAddInsViewModel.IsExpandedInView = true;
                    var firstRepositoryWithUpdates =
                        viewModel.UpdatedAddInsViewModel.PackageRepositories.FirstOrDefault(pr => pr.SourceUrl == _firstRepositoryWithUpdates.SourceUrl);
                    if (firstRepositoryWithUpdates != null)
                    {
                        // Directly go to first repository containing an update
                        viewModel.UpdatedAddInsViewModel.SelectedPackageSource = firstRepositoryWithUpdates;
                    }
                }
                _firstRepositoryWithUpdates = null;
                view.ShowDialog();
            }
        }
Beispiel #2
0
 public override void Execute(object parameter)
 {
     // Open AddInManager2 main dialog
     using (AddInManagerView view = AddInManagerView.Create())
     {
         view.ShowDialog();
     }
 }