Esempio n. 1
0
        /// <summary>
        /// store user setting
        /// </summary>
        /// <param name="pastSyncInterval"></param>
        /// <param name="isFutureSpecified"></param>
        /// <param name="futureSyncInterval"></param>
        public void SetSetting(int pastSyncInterval, bool isFutureSpecified, int futureSyncInterval)
        {
            NewUser.PastSyncInterval   = pastSyncInterval;
            NewUser.IsFutureSpecified  = isFutureSpecified;
            NewUser.FutureSyncInterval = futureSyncInterval;

            // if user want to create new calendar
            if (Form.NewCalendarBox.Text != "")
            {
                NewUser.googleCalendarId = GUtil.CreateNewCalendar(NewUser, Form.NewCalendarBox.Text);
                WaSSetSetting            = true;
            }
            else
            {
                // if user select his calendar
                if (Form.CalendarsBox.SelectedItem != null)
                {
                    NewUser.googleCalendarId = ((GoogleCalendarInfo)(Form.CalendarsBox.SelectedItem)).ID;
                    WaSSetSetting            = true;
                }
                else
                {
                    WaSSetSetting = false;
                }
            }
        }