CodeImp.Gluon.AgendaItemDisplayPanel.ShowValidation C# (CSharp) Метод

ShowValidation() приватный Метод

private ShowValidation ( ) : void
Результат void
        private void ShowValidation()
        {
            DateTime dt;

            // Start date
            if(DateFromInput(startday.Text, startmonth.Text, startyear.Text, out dt))
            {
                startdaylabel.Text = dt.DayOfWeek.ToString();
                startdaylabel.ColorText = ColorIndex.ControlNormal;
                startdaylabel.SetupColors(General.Colors);
            }
            else
            {
                startdaylabel.Text = "Invalid";
                startdaylabel.ColorText = ColorIndex.WarningLight;
                startdaylabel.SetupColors(General.Colors);
            }

            // End date
            if(DateFromInput(endday.Text, endmonth.Text, endyear.Text, out dt))
            {
                enddaylabel.Text = dt.DayOfWeek.ToString();
                enddaylabel.ColorText = ColorIndex.ControlNormal;
                enddaylabel.SetupColors(General.Colors);
            }
            else
            {
                enddaylabel.Text = "Invalid";
                enddaylabel.ColorText = ColorIndex.WarningLight;
                enddaylabel.SetupColors(General.Colors);
            }
        }