Exemple #1
0
 private void Calendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     if (e.AddedDate != this.DisplayDate)
     {
         SetCurrentValueInternal(DisplayDateProperty, (DateTime)e.AddedDate);
     }
 }
Exemple #2
0
 public void calender_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     var calendar = sender as Calendar;
     int diff = e.RemovedDate.Value.Year - calendar.DisplayDate.Year;
     if (diff == -10 || diff == 10)
         return;
     datePicker.SelectedDate = datePicker.DisplayDate;
     SelectedYearChanged(this, new EventArgs());
     calendar.Visibility = System.Windows.Visibility.Hidden;
 }
        /// <summary>
        /// Hide/Unhide the navigation month option
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MonthlyViewCalendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
        {
            //_log.Info("Inside MonthlyViewCalendar_DisplayDateChanged");
            MonthlyViewCalendar calendar = (MonthlyViewCalendar)sender;
            int monthDiff = Math.Abs((calendar.DisplayDate.Month - DateTime.Today.Month) + 12 * (calendar.DisplayDate.Year - DateTime.Today.Year));
            int maxMonthNavigationAllowed = 11;

            if (TimeSlotDataGrid != null)
            {
                TimeSlotDataGrid.Visibility = System.Windows.Visibility.Collapsed;
            }
            
            if (DataContext != null)
            {
                var monthlyViewSchedulerViewModel = (MonthlyViewSchedulerViewModel)DataContext;
                if (monthlyViewSchedulerViewModel != null)
                {
                    
                    if (calendar.DisplayDate != DateTime.MinValue)
                    {
                        if (calendar.DisplayDate.Month != monthlyViewSchedulerViewModel.CurrentDateSelected.Month)
                        {
                            //User has clicked on the Month Navigation button
                            //Reset the TimeSlot in TimeSlotComboBox to "All Slots"
                            monthlyViewSchedulerViewModel.CurrentTimeSlot = "All Slots";
                            TimeSlotComboBox.SelectedIndex = 0;
                            if (calendar.DisplayDate <= DateTime.Today)
                            {
                                monthlyViewSchedulerViewModel.CurrentDateSelected = DateTime.Today;
                            }
                            else
                            {
                                monthlyViewSchedulerViewModel.CurrentDateSelected = calendar.DisplayDate;
                            }
                        }
                        else if(isMonthChanging)
                        {
                            monthlyViewSchedulerViewModel.CurrentTimeSlot = "All Slots";
                            TimeSlotComboBox.SelectedIndex = 0;
                            isMonthChanging = false;
                        }
                    }
                }
            }
            
            if (monthDiff == 0)
            {
                calendar.hidePreviousButton(true);
                calendar.hideNextButton(false);
            }
            else if (monthDiff > maxMonthNavigationAllowed)
            {
                calendar.hidePreviousButton(false);
                calendar.hideNextButton(true);
            }
            else
            {
                calendar.hidePreviousButton(false);
                calendar.hideNextButton(false);
            }
        }
 /// <summary>
 /// Inherited code: Requires comment.
 /// </summary>
 /// <param name="sender">Inherited code: Requires comment 1.</param>
 /// <param name="e">Inherited code: Requires comment 2.</param>
 private void Calendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     if (e.AddedDate != this.DisplayDate)
     {
         SetValue(DisplayDateProperty, (DateTime) e.AddedDate);
     }
 }
 private void calendar1_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     setupCalendar();
     if (month != calendar1.DisplayDate.Month)
     {
         buttonStackpanel.Children.Clear();
     }
 }
 private void Calendar_OnDisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     objCalendar.DataContext = StamperViewModel.SelectedDate;
 }
 protected virtual new void OnDisplayDateChanged(CalendarDateChangedEventArgs e)
 {
 }
        private void calendar1_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
        {


            if (txtFechaReporte != null) //Because the calendar may render prior to the textbox
            {
                //year = calendarReportesPagoRubro.DisplayDate.Year.ToString();
                month = calendarReportesPagoRubro.DisplayDate.ToString("y");
                MesRubroProd = calendarReportesPagoRubro.DisplayDate;
                //CantidadTotalRubrosyProductos(MesRubroProd);
                ProductoFacade prodFac = new ProductoFacade();
                categoriaFacade catFac = new categoriaFacade();
                int p = prodFac.getTotalProductosbyMes(MesRubroProd);
                int r = catFac.getTotalCategoriabyMes(MesRubroProd);
                CantidadTotalRubrosyProductos(MesRubroProd);
                //MessageBox.Show(MesRubroProd.Month.ToString()+":rubro:"+r+"-producto:"+p);
                /*if (calendarReportesPagoRubro.DisplayDate.Month < 10)
                {
                    month = "0" + month;
                }*/
                txtFechaReporte.Text = month;
                //txtFechaReporte.Text = string.Format("{0}-{1}", year, month);
                //txtFechaReporte.Text = string.Format("{0}-{1}", year, month);
            }
        }
Exemple #9
0
 protected virtual void OnDisplayDateChanged(CalendarDateChangedEventArgs e)
 { 
     EventHandler<CalendarDateChangedEventArgs> handler = this.DisplayDateChanged;
     if (handler != null)
     {
         handler(this, e); 
     }
 } 
Exemple #10
0
 private void OnDisplayDate(CalendarDateChangedEventArgs e)
 {
     EventHandler<CalendarDateChangedEventArgs> handler = this.DisplayDateChanged;
     if (null != handler)
     {
         handler(this, e);
     }
 }
 private void ArcLogisticsBarriersCalendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     _UpdateCalendarView();
 }
        private void CalDate_DateChanged(object sender, CalendarDateChangedEventArgs e)
        {
            var selectedDate = (DateTime)e.AddedDate;
            LastSelectedTime = selectedDate;

            if (SummaryCanvas != null)
                SummaryCanvas.Visibility = Visibility.Hidden;

            LoadData();
        }
Exemple #13
0
 protected virtual new void OnDisplayDateChanged(CalendarDateChangedEventArgs e)
 {
 }
 void m_Calendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     UpdateDates();
     m_IsReadyToSelection = !m_Calendar.BlackoutDates.Contains(m_Calendar.DisplayDate);
     Raise_SelectedItemChanged(m_Calendar.DisplayDate);
 }
 void calendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     EventHandler handler = DisplayDateChanged;
     if (handler != null)
     {
         handler(this, EventArgs.Empty);
     }
 }
Exemple #16
0
 private void CalendarDisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     SetDropValue();
 }
Exemple #17
0
 void ca1_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     label2.Text = "Changed DisplayDate to " + e.AddedDate;
 }
Exemple #18
0
        private void calend_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
        {

        }
        private void calend_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
        {
            //Box.Text = e.AddedDate.Value.GetDateTimeFormats('Y', CultureInfo.CreateSpecificCulture("ru-ru"))[0];

        }
 private void OnDisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     if (sampleCalendar != null)
     {
         txtDisplayDate.Text = sampleCalendar.DisplayDate.ToShortDateString();
     }
 }
 /// <summary>
 /// Occurs when user select other month/year
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ArcLogisticsCalendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
 {
     WorkingStatusHelper.SetBusy(null);
     _UpdateCalendarView();
     WorkingStatusHelper.SetReleased();
 }