Esempio n. 1
0
 private void datePickerTo_CalendarClosed(object sender,EventArgs e)
 {
     if(!_isVertical) {
         datePickerFrom.HideCalendar();
     }
     CalendarClosed?.Invoke(this,new EventArgs());
 }
Esempio n. 2
0
 protected void ToggleCalendarTo()
 {
     if (calendarTo.Visible)
     {
         HideCalendarTo();
         CalendarClosed?.Invoke(this, new EventArgs());
         if (_isParentChange)                 //Parent was not an ODForm, set back to original location and parent.
         {
             calendarTo.Location = _locationOrigCalendarTo;
             calendarTo.Parent   = this;
         }
     }
     else
     {
         ShowCalendarTo();
     }
 }
Esempio n. 3
0
        private async void ProCalendar_SelectionChanged(object sender, RoutedEventArgs e)
        {
            var selectedItem = sender as RTDCalendarViewToggleButton;

            if (selectedItem != null)
            {
                _dateText.Text = $"{selectedItem.DateTime.Day}/{selectedItem.DateTime.Month}/{selectedItem.DateTime.Year}";
                SelectedDate   = selectedItem.DateTime;
            }

            await Task.Run(async() =>
            {
                await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    _rootFlyout.Hide();
                    CalendarClosed?.Invoke(this, EventArgs.Empty);
                });
            });
        }
Esempio n. 4
0
 private void ODDateRangePicker_Leave(object sender, EventArgs e)
 {
     if (calendarFrom.Focused || calendarTo.Focused) //Still using the calendar.
     {
         this.Focus();                               //Spoof that we never left
         return;
     }
     if (calendarFrom.Visible || calendarTo.Visible)
     {
         HideCalendars();
         if (_isParentChange)                 //Parent was not an ODForm, set back to original locaiton and parent.
         {
             calendarTo.Location   = _locationOrigCalendarTo;
             calendarFrom.Location = _locationOrigCalendarFrom;
             calendarTo.Parent     = this;
             calendarFrom.Parent   = this;
         }
         CalendarClosed?.Invoke(this, new EventArgs());
     }
     Leave?.Invoke(sender, e);
 }
Esempio n. 5
0
 private void OnCalendarClosed(EventArgs e)
 {
     CalendarClosed?.Invoke(this, e);
 }