示例#1
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            if (leftHover)
            {
                this.Date = this.date.AddDays(-1);
                return;
            }
            if (rightHover)
            {
                this.Date = this.date.AddDays(1);
                return;
            }


            foreach (var item in this.dateRects)
            {
                if (item != null && item.Hover)
                {
                    this.Date = item.DateTime;
                    DateChanged.Invoke(this, e);
                    return;
                }
            }
        }
示例#2
0
        private void ApplyNewTime()
        {
            try
            {
                ScratchTime = new DateTime(Convert.ToInt32(year.Text), Convert.ToInt32(month.Text), Convert.ToInt32(day.Text), Convert.ToInt32(hours.Text), Convert.ToInt32(min.Text), Convert.ToInt32(sec.Text));
                if (masterClock)
                {
                    if (Properties.Settings.Default.ShowUTCTime)
                    {
                        SpaceTimeController.Now = ScratchTime;
                    }
                    else
                    {
                        SpaceTimeController.Now = ScratchTime.ToUniversalTime();
                    }
                }
            }
            catch
            {
            }

            UpdateTimeFields();

            if (DateChanged != null)
            {
                DateChanged.Invoke(this, new EventArgs());
            }
        }
示例#3
0
 private void DtpDate_ValueChanged(object sender, EventArgs e)
 {
     DateChanged?.Invoke(sender, e);
 }
示例#4
0
        private void OnDateChanged()
        {
            DateChangedEventArgs eventArgs = new DateChangedEventArgs(currentDate);

            DateChanged?.Invoke(this, eventArgs);
        }
 private void OnSearchParametersChange()
 {
     DateChanged?.Invoke();
 }
示例#6
0
 protected void OnDateChanged()
 {
     DateChanged?.Invoke(this, EventArgs.Empty);
 }
 private void DatePicker_DateChanged(object sender, NullableDateChangedEventArgs e)
 {
     Date = datePicker.NullableDate;
     DateChangeCommand?.Execute(datePicker.NullableDate);
     DateChanged?.Invoke(this, e);
 }
示例#8
0
 protected void InternalDateHandler(UIChangeEventArgs e)
 {
     Date = Utils.Parsers.TryParseDate(e?.Value?.ToString());
     DateChanged?.Invoke(Date);
 }