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"); } }
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(); }
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(); }
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"); }