public static List <CCProject> GetSelectedProjects()
        {
            var server   = GetServer();
            var projects = server.GetProjects().Where(p => SelectedProjects.Contains(p.Name)).ToList();
            var failing  = projects.Where(p => p.LastBuildStatus == CCBuildStatus.Failure);

            FailingProjects = PassingProjects.Where(p => failing.Any(f => f.Name == p)).ToList();
            PassingProjects = projects.Where(p => p.LastBuildStatus == CCBuildStatus.Success).Select(p => p.Name).ToList();
            return(projects);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds a new change
        /// </summary>
        /// <param name="CDVM"></param>
        public void AddChange(ChangeDescriptionViewModel CDVM, bool Notify)
        {
            Changes.Add(CDVM);
            ChangeController.UserName    = CDVM.User;
            ChangeController.ProjectName = CDVM.Project;
            CDVM.PropertyChanged        += new PropertyChangedEventHandler(CDVM_PropertyChanged);
            if (Notify)
            {
                RaisePropertyChanged("NewChange");
            }

            if (!SelectedProjects.Contains(CDVM.Project))
            {
                SelectedProjects.Add(CDVM.Project);
            }
            if (!SelectedUsers.Contains(CDVM.User))
            {
                SelectedUsers.Add(CDVM.User);
            }

            RaisePropertyChanged("SelectedChanges");
        }