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); } }); }
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); } }); }
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); } }); }