private void tvServices_AfterSelect(object sender, TreeViewEventArgs e)
        {
            controller.ShowPage(e.Node.Text);

            if (controller.View.CurrentControl is V1SettingsPageControl)
            {
                controller.Settings.Settings.PropertyChanged += OnPropertyChanged;
                controller.Settings.Settings.ProxySettings.PropertyChanged += OnPropertyChanged;
            }
            else if (controller.View.CurrentControl is WorkitemsPageControl)
            {
                var workitemWriter = controller.Settings.Services.OfType <WorkitemWriterEntity>().SingleOrDefault();
                if (workitemWriter != null)
                {
                    workitemWriter.PropertyChanged += OnPropertyChanged;
                }
            }
            else if (controller.View.CurrentControl is JiraPageControl)
            {
                var jiraService = controller.Settings.Services.OfType <JiraServiceEntity>().SingleOrDefault();
                if (jiraService != null)
                {
                    jiraService.PropertyChanged       += OnPropertyChanged;
                    jiraService.Timer.PropertyChanged += OnPropertyChanged;
                    jiraService.CreateDefectFilter.PropertyChanged     += OnPropertyChanged;
                    jiraService.CreateStoryFilter.PropertyChanged      += OnPropertyChanged;
                    jiraService.ProgressWorkflow.PropertyChanged       += OnPropertyChanged;
                    jiraService.ProgressWorkflowClosed.PropertyChanged += OnPropertyChanged;
                    jiraService.ProjectMappings.ToList().ForEach(pm =>
                    {
                        pm.JiraProject.PropertyChanged       += OnPropertyChanged;
                        pm.VersionOneProject.PropertyChanged += OnPropertyChanged;
                    });
                    jiraService.PriorityMappings.ToList().ForEach(pm =>
                    {
                        pm.JiraPriority.PropertyChanged       += OnPropertyChanged;
                        pm.VersionOnePriority.PropertyChanged += OnPropertyChanged;
                    });
                    jiraService.ProjectMappings.CollectionChanged  += OnCollectionChanged;
                    jiraService.PriorityMappings.CollectionChanged += OnCollectionChanged;
                }
            }
        }
Exemple #2
0
 private void tvServices_AfterSelect(object sender, TreeViewEventArgs e)
 {
     controller.ShowPage(e.Node.Text);
 }