コード例 #1
0
        static void WorkProcess()
        {
            Console.Write("Enter name project: ");
            string      nameOfProject = Console.ReadLine();
            Project     project       = new Project(nameOfProject);
            TaskManager tManager      = new TaskManager();

            project.AllTasksInStart = tManager.GenerateAllTasks();

            Process process = new Process(project, 3, 7);

            InfoProject.WriteInfoProject(project, 0);
            Continue();

            process.IterationGeneration();

            BugGenerating bugGenerating = new BugGenerating(project);

            while (project.AllTasksInStart.Count != 0 || project.ToDoTasks.Count != 0 || project.InProgress.Count != 0)
            {
                process.StartDay();

                if (project.Done.Count != 0)
                {
                    bugGenerating.GeneratBug();
                }

                Continue();
            }

            Console.WriteLine("End project!");
            Console.ReadLine();
        }
コード例 #2
0
ファイル: Process.cs プロジェクト: Valentinchik/TaskTreking
        public void StartDay()
        {
            CurrentProject.DayIteration++;
            if (CurrentProject.DayIteration > LengthIteration && CurrentProject.AllTasksInStart.Count > 0)
            {
                CurrentProject.DayIteration = 1;
                IterationGeneration();
            }
            else if (CurrentProject.DayIteration > LengthIteration)
            {
                CurrentProject.DayIteration = 1;
            }

            while (GetWorkTasks(CurrentProject.InProgress) < CountTeam && CurrentProject.ToDoTasks.Count > 0)
            {
                ITask tempTask = FindMaxPriority(CurrentProject.ToDoTasks);
                CurrentProject.InProgress.Add(tempTask);
                CurrentProject.ToDoTasks.Remove(tempTask);
            }

            TaskProcess();

            InfoProject.WriteInfoProject(CurrentProject, day);
        }