예제 #1
0
 private void StartFullSync(object direction)
 {
     if (Monitor.TryEnter(ContactSync.SynchRoot))
     {
         try
         {
             Config.Direction dir = (Config.Direction)direction;
             ContactSync      cs  = new ContactSync(Config.Username, Config.Password, Convert.ToInt32(Config.Interval * 60000));
             cs.GoogleSynched  += GoogleSynched;
             cs.OutlookSynched += OutlookSynched;
             cs.StartSynching  += StartSynching;
             cs.EndSynching    += EndSynching;
             cs.Error          += SynchError;
             cs.FullSync(dir);
         }
         finally
         {
             Monitor.Exit(ContactSync.SynchRoot);
         }
     }
     else
     {
         MessageBox.Show("Sync in progress... cannot run full sync");
     }
 }
예제 #2
0
        private void StartThread()
        {
            ContactSync cs = new ContactSync(Config.Username, Config.Password, Convert.ToInt32(Config.Interval * 60000));

            cs.GoogleSynched  += GoogleSynched;
            cs.OutlookSynched += OutlookSynched;
            cs.StartSynching  += StartSynching;
            cs.EndSynching    += EndSynching;
            cs.Error          += SynchError;
            cs.SyncFromGoogle();
        }
예제 #3
0
 private void StartThread()
 {
     ContactSync cs = new ContactSync(Config.Username, Config.Password,Convert.ToInt32(Config.Interval*60000));
     cs.GoogleSynched += GoogleSynched;
     cs.OutlookSynched += OutlookSynched;
     cs.StartSynching += StartSynching;
     cs.EndSynching += EndSynching;
     cs.Error += SynchError;
     cs.SyncFromGoogle();
 }
예제 #4
0
 private void StartFullSync(object direction)
 {
     if (Monitor.TryEnter(ContactSync.SynchRoot))
     {
         try
         {
             Config.Direction dir = (Config.Direction)direction;
             ContactSync cs = new ContactSync(Config.Username, Config.Password, Convert.ToInt32(Config.Interval * 60000));
             cs.GoogleSynched += GoogleSynched;
             cs.OutlookSynched += OutlookSynched;
             cs.StartSynching += StartSynching;
             cs.EndSynching += EndSynching;
             cs.Error += SynchError;
             cs.FullSync(dir);
         }
         finally
         {
             Monitor.Exit(ContactSync.SynchRoot);
         }
     }
     else
         MessageBox.Show("Sync in progress... cannot run full sync");
 }