Esempio n. 1
0
        private void synchronize(int year, int month, int day)
        {
            int outYear, outMonth, outDay;

            PDateHelper.HijriToGregorian(year, month, day, out outYear, out outMonth, out outDay);
            SelectedDate = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}", outYear, outMonth, outDay);
        }
Esempio n. 2
0
 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value != null)
     {
         return(PDateHelper.HijriToGregorian(((string)value)));
     }
     return(null);
 }
Esempio n. 3
0
        private void setTodayData(int year, int month, int day)
        {
            resetGui();

            var pDate = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}", year, month, day);

            CalendarGUIData.SelectedPersianDate = pDate;

            int outYear, outMonth, outDay;

            PDateHelper.HijriToGregorian(year, month, day, out outYear, out outMonth, out outDay);
            var gDate = new DateTime(outYear, outMonth, outDay);

            CalendarGUIData.SelectedDate = gDate;
            raisePropertyChanged("CalendarGUIData");
        }