예제 #1
0
 public static void UpdateSyncInterval(SyncIntervalSetting interval)
 {
     SyncInterval = interval;
     SaveSettings(cc);
 }
예제 #2
0
        public static SyncIntervalSettingDescriptor GetSyncIntervalSettingDescriptor(Context c, SyncIntervalSetting interval)
        {
            switch (interval)
            {
            case SyncIntervalSetting.THREE_HOURS:
                return(new SyncIntervalSettingDescriptor(c.GetString(Resource.String.settings_sync_time_op0),
                                                         3 * 60 * 60 * 1000));

            case SyncIntervalSetting.TWO_A_DAY:
                return(new SyncIntervalSettingDescriptor(c.GetString(Resource.String.settings_sync_time_op1),
                                                         12 * 60 * 60 * 1000));

            case SyncIntervalSetting.ONE_A_DAY:
                return(new SyncIntervalSettingDescriptor(c.GetString(Resource.String.settings_sync_time_op2),
                                                         24 * 60 * 60 * 1000));

            case SyncIntervalSetting.ONE_IN_THREE_DAYS:
                return(new SyncIntervalSettingDescriptor(c.GetString(Resource.String.settings_sync_time_op3),
                                                         72 * 60 * 60 * 1000));

            default:
                return(new SyncIntervalSettingDescriptor(c.GetString(Resource.String.settings_sync_time_op2),
                                                         24 * 60 * 60 * 1000));
            }
        }