Пример #1
0
 private void InitializeDaySelectionChangedCommand()
 {
     DaySelectionChangedCommand = new RelayCommand <ComboBox>(
         sender => { return(true); }, sender =>
     {
         days = (int)sender.SelectedItem;
         if (IsAddChoose)
         {
             ResultCalculationText = DateService.AddDates(fromDate, years, months, days);
         }
         else
         {
             ResultCalculationText = DateService.SubtractDates(fromDate, years, months, days);
         }
     });
 }
Пример #2
0
 private void InitializeRadioChooseCommand()
 {
     RadioChooseCommand = new RelayCommand <RadioButton>(
         sender => { return(true); }, sender =>
     {
         if (sender.Name.Equals("addRadio"))
         {
             IsAddChoose           = true;
             ResultCalculationText = DateService.AddDates(fromDate, years, months, days);
         }
         else
         {
             IsAddChoose           = false;
             ResultCalculationText = DateService.SubtractDates(fromDate, years, months, days);
         }
     });
 }
Пример #3
0
 private void InitializeFromDateSelectedDateChangedCommand()
 {
     FromDateSelectedDateChangedCommand = new RelayCommand <DatePicker>(
         sender => { return(true); }, sender =>
     {
         fromDate = sender.SelectedDate ?? fromDate;
         if (DiffirenceVisibilityStack == Visibility.Visible)
         {
             HanddlerSubtractDate(fromDate, toDate);
         }
         else if (IsAddChoose)
         {
             ResultCalculationText = DateService.AddDates(fromDate, years, months, days);
         }
         else
         {
             ResultCalculationText = DateService.SubtractDates(fromDate, years, months, days);
         }
     });
 }