Beispiel #1
0
        /// <summary>
        /// Used to remove all the sync jobs and unset sync callbacks.
        /// </summary>
        public void RemoveAll()
        {
            IEnumerable <KeyValuePair <int, TAS.SyncJobData> > syncJobs = TAS.SyncClient.GetAllSyncJobs();

            foreach (KeyValuePair <int, TAS.SyncJobData> item in syncJobs)
            {
                TAS.SyncClient.RemoveSyncJob(item.Key);
            }

            adapter = new TAS.SyncAdapter();
            adapter.UnsetSyncEventCallbacks();
        }
Beispiel #2
0
        /// <summary>
        /// Used to set sync callbacks.
        /// </summary>
        public void SetCallbacks()
        {
            Periodic = Calendar = Contact = Image = Music = Sound = Video = 0;

            try
            {
                adapter = new TAS.SyncAdapter();
                adapter.SetSyncEventCallbacks(StartSyncCallback, CancelSyncCallback);
            }
            catch (Exception e)
            {
                Console.WriteLine("[SampleSync] Err message : " + e.ToString());
            }
        }