public ZPushSync(ZPushWatcher watcher, IAddIn addIn) { // Get the settings Enabled = GlobalOptions.INSTANCE.ZPushSync; Period = GlobalOptions.INSTANCE.ZPushSync_Period; if (Period.Ticks == 0) { Period = Constants.ZPUSH_SYNC_DEFAULT_PERIOD; } PeriodThrottle = GlobalOptions.INSTANCE.ZPushSync_PeriodThrottle; if (PeriodThrottle.Ticks == 0) { PeriodThrottle = Constants.ZPUSH_SYNC_DEFAULT_PERIOD_THROTTLE; } // Set up a timer and events if enabled if (Enabled) { _watcher = watcher; _timer = new System.Windows.Forms.Timer(); _timer.Interval = (int)Period.TotalMilliseconds; _timer.Tick += _timer_Tick; _timer.Start(); // Need to keep a reference to keep receiving events _syncObject = addIn.GetSyncObject(); _syncObject.SyncEnd += SyncObject_SyncPeriodics; _syncObject.SyncEnd += SyncObject_SyncOneOffTasks; watcher.AccountDiscovered += Watcher_AccountDiscovered; } }
public ZPushChannel(ZPushWatcher watcher, ZPushAccount account, Feature feature, string name) { this._watcher = watcher; this._account = account; this._feature = feature; this._name = name; }
private ZPushFolder(ZPushWatcher watcher, ZPushFolder parent, IFolder folder) { Logger.Instance.Trace(this, "Watching folder: {0}", folder.LogKey); this._parent = parent; this._watcher = watcher; this._folder = folder; // We need to keep links to these objects to keep getting events. this._items = folder.Items.GetEvents(); this._subFolders = folder.SubFolders.GetEvents(); folder.ZPush = this; }
internal ZPushFolder(ZPushWatcher watcher, IFolder folder) : this(watcher, null, folder) { Initialise(); }
public ZPushAccounts(ZPushWatcher watcher, IAddIn addIn) { this._watcher = watcher; this._addIn = addIn; this._stores = addIn.Stores; }
public ZPushChannels(ZPushWatcher watcher) { this._watcher = watcher; }