public void SetEthioValues(bool toEthio)
        {
            try
            {
                _toEthio = toEthio;
                DateTime gregorDayFrom = SelectedDate;
                string   ethioDayFrom  = CalendarUtil.GetEthCalendar(gregorDayFrom, false);
                int      dayf          = Convert.ToInt32(ethioDayFrom.Substring(0, 2)),
                         monthf        = Convert.ToInt32(ethioDayFrom.Substring(2, 2)),
                         yearf = Convert.ToInt32(ethioDayFrom.Substring(4, 4));
                SelectedEthioDay   = EthioDays[dayf - 1];
                SelectedEthioMonth = EthioMonths[monthf - 1];
                SelectedEthioYear  = EthioYears[yearf - 1900];

                SelectedDateMonth = SelectedDate.ToString("MMMM").ToUpper() + " (" + SelectedDate.Month + ")";
                SelectedDateDay   = SelectedDate.Day.ToString();
                SelectedDateYear  = SelectedDate.Year.ToString();

                _toEthio = false;
            }
            catch
            {
                //MessageBox.Show("Can't convert, may be out side of the scope!");
            }
        }
Example #2
0
        private void TxtSelectedDateMonth_OnSelectionChanged(object sender, RoutedEventArgs e)
        {
            var calDate = (RadCalendar)sender;

            if (calDate.SelectedDate != null)
            {
                TxtSelectedDateMonth.Text = CalendarUtil.GetEthCalendar((DateTime)calDate.SelectedDate, true);
            }
        }
Example #3
0
 public Calendar(DateTime calDate)
 {
     //StyleManager.SetTheme(DtSelectedDate, new TransparentTheme());
     InitializeComponent();
     //Messenger.Default.Send<DateTime>(calDate);
     //Messenger.Reset();
     DtSelectedDate.SelectedDate = calDate;
     TxtSelectedDateMonth.Text   = CalendarUtil.GetEthCalendar(calDate, true);
 }