public DateCorrectForm(ref Form tTopForm, int DayEventType)
        {
            InitializeComponent();

            TopForm = tTopForm;

            if (DayEventType == dBreakDay)
            {
                label2.Text = "Пойти на перерыв";
                BreakButton.BringToFront();
                BreakButtonChanged.BringToFront();

                if (LightWorkDay.IsDayOverdued(Security.CurrentUserID, ref OverduedDateTime))
                {
                    xtraTabPage1.PageEnabled  = false;
                    OverduedDateLabel.Visible = true;
                    OverduedDateLabel.Text    = OverduedDateTime.ToString("dd.MM.yyyy");
                    IsOverdued = true;
                }
            }
            if (DayEventType == dContinueDay)
            {
                label2.Text = "Продолжить рабочий день";
                ContinueButton.BringToFront();
                ContinueButtonChanged.BringToFront();

                if (LightWorkDay.IsDayOverdued(Security.CurrentUserID, ref OverduedDateTime))
                {
                    xtraTabPage1.PageEnabled  = false;
                    OverduedDateLabel.Visible = true;
                    OverduedDateLabel.Text    = OverduedDateTime.ToString("dd.MM.yyyy");
                    IsOverdued = true;
                }
            }
            if (DayEventType == dStartDay)
            {
                label2.Text = "Начать рабочий день";
                StartButton.BringToFront();
                StartButtonChanged.BringToFront();
            }
            if (DayEventType == dEndDay)
            {
                label2.Text = "Завершить рабочий день";
                StopButton.BringToFront();
                StopButtonChanged.BringToFront();

                if (LightWorkDay.IsDayOverdued(Security.CurrentUserID, ref OverduedDateTime))
                {
                    xtraTabPage1.PageEnabled  = false;
                    OverduedDateLabel.Visible = true;
                    OverduedDateLabel.Text    = OverduedDateTime.ToString("dd.MM.yyyy");
                    IsOverdued = true;
                }
            }

            label1.Text         = Security.GetCurrentDate().ToString("HH:mm");
            timeEdit1.EditValue = Security.GetCurrentDate();
        }