Ejemplo n.º 1
0
        private void SetEvent()
        {
            yyText.SetMouseEvent(BackColor, BackColor.Lighting(15), BackColor.Lighting(-10));
            mmText.SetMouseEvent(BackColor, BackColor.Lighting(15), BackColor.Lighting(-10));
            ddText.SetMouseEvent(BackColor, BackColor.Lighting(15), BackColor.Lighting(-10));
            hhText.SetMouseEvent(BackColor, BackColor.Lighting(15), BackColor.Lighting(-10));
            PMBtn.SetMouseEvent(BackColor, BackColor.Lighting(15), BackColor.Lighting(-10));
            applyBtn.SetMouseEvent(applyBtn.BackColor, applyBtn.BackColor.Lighting(20), applyBtn.BackColor.Lighting(-10));
            cancelBtn.SetMouseEvent(cancelBtn.BackColor, cancelBtn.BackColor.Lighting(20), cancelBtn.BackColor.Lighting(-10));

            yyText.MouseDown += OnMouseDown;
            mmText.MouseDown += OnMouseDown;
            ddText.MouseDown += OnMouseDown;
            hhText.MouseDown += OnMouseDown;
            yyText.MouseDown += OnYearDown;
            mmText.MouseDown += OnMonthDown;
            ddText.MouseDown += OnDayDown;
            hhText.MouseDown += OnHourDown;
            yyText.MouseMove += OnMouseMove;
            mmText.MouseMove += OnMouseMove;
            ddText.MouseMove += OnMouseMove;
            hhText.MouseMove += OnMouseMove;
            yyText.MouseUp   += OnMouseUp;
            mmText.MouseUp   += OnMouseUp;
            ddText.MouseUp   += OnMouseUp;
            hhText.MouseUp   += OnMouseUp;
            PMBtn.Click      += OnPMClick;
            applyBtn.Click   += OnApplyClick;
            cancelBtn.Click  += OnCancelClick;
        }