private int[] ProcessTimeline(ProjectTimeline projectTimeLine)
        {
            if (!dtImplDate.IsDateEmpty())
            {
                dtComplDate.SelectedDate = projectTimeLine.CompletionDate;
            }
            var months = projectTimeLine.Months;

            if (months.Length == 12)
            {
                lblmnth1.Text  = months[0].ToString();
                lblmnth2.Text  = months[1].ToString();
                lblmnth3.Text  = months[2].ToString();
                lblmnth4.Text  = months[3].ToString();
                lblmnth5.Text  = months[4].ToString();
                lblmnth6.Text  = months[5].ToString();
                lblmnth7.Text  = months[6].ToString();
                lblmnth8.Text  = months[7].ToString();
                lblmnth9.Text  = months[8].ToString();
                lblmnth10.Text = months[9].ToString();
                lblmnth11.Text = months[10].ToString();
                lblmnth12.Text = months[11].ToString();
            }
            this.DisableCells(projectTimeLine.MonthDates, this.MonthLabels);
            this.ProcessColor(projectTimeLine, this.IsProjectApprovedByCI, this.IsChildControlStateCleared);
            if (ddlPeriod.SelectedValue == "0")
            {
                ddlPeriod.SelectedValue = projectTimeLine.ClosestPeriod.ToString();
            }
            return(months);
        }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ProjectTimeline pt = (ProjectTimeline)value;

            if ((string)parameter == "full")
            {
                return(PathGeometryHelper.CreateRectangle(pt.RootStartedAt, pt.RootCompletedAt, pt.StartedAt, pt.CompletedAt));
            }

            return(PathGeometryHelper.CreateRectangles(pt.RootStartedAt, pt.RootCompletedAt, pt.RealWork));
        }
        private int[] ProcessTimeline(DateTime implementationDate)
        {
            var validationResult = ProjectTimeline.ValidateImplementationDate(implementationDate);

            if (validationResult)
            {
                var projectTimeLine = new ProjectTimeline(implementationDate);
                return(this.ProcessTimeline(projectTimeLine));
            }
            return(new int[0]);
        }
示例#4
0
        private void StepInto()
        {
            ProjectTimeline pt = this.ProjectTimelineListBox.SelectedItem as ProjectTimeline;

            if (pt == null)
            {
                return;
            }

            this.StepIntoRequested?.Invoke(this, new StepIntoRequestedEventArgs(pt.ProjectBuild));
        }
        private void ProcessColor(ProjectTimeline projectTimeLine, bool isProjectApprovedByCI, bool isChangedToBlueChecked)
        {
            var color = this.ProcessColor(projectTimeLine.MonthDates, this.MonthLabels, isProjectApprovedByCI, isChangedToBlueChecked);

            switch (color)
            {
            case StatusColor.Yellow:
                this.ProcessColor(txtProjStatus, "YELLOW", Color.Yellow, Color.Black);
                this.ProcessColor(lblprojstatusvalue, "YELLOW", Color.Yellow, Color.Black);
                break;

            case StatusColor.Green:
                this.ProcessColor(txtProjStatus, "GREEN", Color.Green, Color.White);
                this.ProcessColor(lblprojstatusvalue, "GREEN", Color.Green, Color.White);
                break;

            case StatusColor.Red:
                this.ProcessColor(txtProjStatus, "RED", Color.Red, Color.White);
                this.ProcessColor(lblprojstatusvalue, "RED", Color.Red, Color.White);
                break;

            case StatusColor.Black:
                this.ProcessColor(txtProjStatus, "BLACK", Color.Black, Color.White);
                this.ProcessColor(lblprojstatusvalue, "BLACK", Color.Black, Color.White);
                break;

            case StatusColor.Gray:
                this.ProcessColor(txtProjStatus, "DRAFT", Color.Gray, Color.White);
                this.ProcessColor(lblprojstatusvalue, "DRAFT", Color.Gray, Color.White);
                break;

            case StatusColor.Blue:
                this.ProcessColor(txtProjStatus, "BLUE", Color.Blue, Color.White);
                this.ProcessColor(lblprojstatusvalue, "BLUE", Color.Blue, Color.White);
                break;
            }
        }