Exemplo n.º 1
0
        private void FolderSyncStateChanged(SyncStateChangedEventArgs e)
        {
            if (!this.folders.TryGetValue(e.FolderId, out var folder))
            {
                return; // We don't know about this folder
            }
            var syncState = FolderStateTransformer.SyncStateFromString(e.SyncState);

            folder.SyncState = syncState;

            if (syncState == FolderSyncState.Syncing)
            {
                folder.ClearFolderErrors();
                this.OnFolderErrorsChanged(folder, new List <FolderError>());
            }

            this.OnSyncStateChanged(folder, FolderStateTransformer.SyncStateFromString(e.PrevSyncState), syncState);
        }
Exemplo n.º 2
0
        void FSyncManager_SyncStateChanged(object sender, SyncStateChangedEventArgs e)
        {
            SyncStateFlag Sync = e.SyncState.StateFlag;

            switch (Sync)
            {
            case SyncStateFlag.Unsynchronized:
                FSyncStateOut[0] = SyncStateFlag.Unsynchronized.ToString();
                break;

            case SyncStateFlag.Stabilizing:
                FSyncStateOut[0] = SyncStateFlag.Stabilizing.ToString();
                break;

            case SyncStateFlag.Synchronized:
                FSyncStateOut[0] = SyncStateFlag.Synchronized.ToString();
                break;

            default:
                throw new Exception("Invalid value for SyncStateFlag");
            }
        }
Exemplo n.º 3
0
 // sync state changed
 private void HandleSyncStateChanged(object sender, SyncStateChangedEventArgs e)
 {
     OnSyncStateChanged(sender, e);
 }