private void InitializeMainView() { using (new WaitCursor()) { if (this.repository != null && this.context != null && this.context.SelectedProject != null) { var controllers = this.repository.Controllers; var teamProjects = this.repository.AllTeamProjects; this.viewmodel = new BuildManagerViewModel(Window.GetWindow(this), this.repository, this, controllers, teamProjects, this.context); this.DataContext = this.viewmodel; this.RunningBuilds.DataContext = this.viewmodel; this.CompletedBuilds.DataContext = this.viewmodel; this.ProcessTemplateGrid.DataContext = this.viewmodel; this.SelectedTeamProject = this.context.SelectedProject; this.SelectedController = BuildManagerViewModel.AllItem; this.ControllerCombo.SelectionChanged += this.OnControllerChanged; this.TeamProjectCombo.SelectionChanged += this.OnTeamProjectChanged; this.viewmodel.Refresh += this.OnRefresh; this.viewmodel.PropertyChanged += this.OnPropertyChanged; this.viewmodel.SelectedBuildView = BuildView.BuildDefinitions; this.UpdateBuildDefinitions(); } } }
private void InitializeMainView() { using (new WaitCursor()) { if (this.repository != null && this.context != null && this.context.SelectedProject != null) { var controllers = this.repository.Controllers; var teamProjects = this.repository.AllTeamProjects; this.viewmodel = new BuildManagerViewModel(Window.GetWindow(this), this.repository, this, controllers, teamProjects, this.context); this.DataContext = this.viewmodel; this.RunningBuilds.DataContext = this.viewmodel; this.CompletedBuilds.DataContext = this.viewmodel; this.ProcessTemplateGrid.DataContext = this.viewmodel; this.SelectedTeamProject = this.context.SelectedProject; this.SelectedController = BuildManagerViewModel.AllItem; this.ControllerCombo.SelectionChanged += this.OnControllerChanged; this.TeamProjectCombo.SelectionChanged += this.OnTeamProjectChanged; this.viewmodel.Refresh += this.OnRefresh; this.viewmodel.PropertyChanged += this.OnPropertyChanged; this.viewmodel.SelectedBuildView = BuildView.BuildDefinitions; this.UpdateBuildDefinitions(); } } }