Esempio n. 1
0
        public void Recalculate()
        {
            bool   settingsChanged = false;
            string s = appDayDateTime.EncodedString;

            if (!s.Equals(Properties.Settings.Default.AppDayDateTime))
            {
                Properties.Settings.Default.AppDayDateTime = s;
                settingsChanged = true;
            }
            s = appDayLocation.EncodedString;
            if (!s.Equals(Properties.Settings.Default.AppDayLocation))
            {
                Properties.Settings.Default.AppDayLocation = s;
                settingsChanged = true;
            }
            if (settingsChanged)
            {
                Properties.Settings.Default.Save();
            }

            LocationText(appDayLocation.Title);
            StartDateText(appDayDateTime.ToString());
            StartTimeText(appDayDateTime.ShortTimeString());

            if (p_mode == 0 || p_mode == 1)
            {
                m_appday = new TResultApp();
                m_appday.calculateAppDay(appDayLocation, appDayDateTime);
                DisplayCalendarResult();
            }
        }
Esempio n. 2
0
 private void onDateRangeCallback(object sender, EventArgs e)
 {
     if (sender is GregorianDateTime)
     {
         GregorianDateTime gdt = sender as GregorianDateTime;
         appDayDateTime = gdt;
         StartDateText(gdt.ToString());
         StartTimeText(gdt.ShortTimeString());
         Recalculate();
     }
 }