Exemplo n.º 1
0
        /// <summary>
        /// Initialize (in the GUI and syncing mechanism) an existing CmisSync synchronized folder.
        /// </summary>
        /// <param name="repositoryInfo">Synchronized folder path</param>
        private void AddRepository(RepoInfo repositoryInfo)
        {
            RepoBase repo = null;

            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);
            this.repositories.Add(repo);
            repo.Initialize();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialize (in the UI and syncing mechanism) an existing CmisSync synchronized folder.
        /// </summary>
        /// <param name="repositoryInfo">Synchronized folder path</param>
        /// <param name="perpetual">Whether to perpetually sync again and again at regular intervals. False means syncing just once then stopping.</param>
        private void AddRepository(RepoInfo repositoryInfo, bool perpetual)
        {
            RepoBase repo = null;

            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator, true, perpetual);
            this.repositories.Add(repo);
            repo.SyncAtStartupIfConfiguredToDoSo();
        }
Exemplo n.º 3
0
        private void AddRepository(string folder_path)
        {
            RepoBase repo        = null;
            string   folder_name = Path.GetFileName(folder_path);

            RepoInfo repositoryInfo = ConfigManager.CurrentConfig.GetRepoInfo(folder_name);

            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);

            repo.ChangesDetected += delegate
            {
                UpdateState();
            };

            repo.SyncStatusChanged += delegate(SyncStatus status)
            {
                if (status == SyncStatus.Idle)
                {
                    ProgressPercentage = 0.0;
                    ProgressSpeed      = "";
                }

                UpdateState();
            };

            repo.ProgressChanged += delegate(double percentage, string speed)
            {
                ProgressPercentage = percentage;
                ProgressSpeed      = speed;

                UpdateState();
            };

            repo.NewChangeSet += delegate(ChangeSet change_set)
            {
                if (NotificationsEnabled)
                {
                    NotificationRaised(change_set);
                }
            };

            repo.ConflictResolved += delegate
            {
                if (NotificationsEnabled)
                {
                    AlertNotificationRaised("Conflict detected",
                                            "Don't worry, CmisSync made a copy of each conflicting file.");
                }
            };

            this.repositories.Add(repo);
            repo.Initialize();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initialize (in the GUI and syncing mechanism) an existing CmisSync synchronized folder.
        /// </summary>
        /// <param name="repositoryInfo">Synchronized folder path</param>
        private void AddRepository(RepoInfo repositoryInfo)
        {
            RepoBase repo = null;

            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);

            repo.EventManager.AddEventHandler(
                new GenericSyncEventHandler <FileTransmissionEvent>(50, delegate(ISyncEvent e){
                this.activitiesManager.AddTransmission(e as FileTransmissionEvent);
                return(false);
            }));
            this.repositories.Add(repo);
            repo.Initialize();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initialize (in the UI and syncing mechanism) an existing CmisSync synchronized folder.
        /// </summary>
        /// <param name="folderPath">Synchronized folder path</param>
        private void AddRepository(string folderPath)
        {
            RepoBase repo        = null;
            string   folder_name = Path.GetFileName(folderPath);

            RepoInfo repositoryInfo = ConfigManager.CurrentConfig.GetRepoInfo(folder_name);

            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);

            repo.ChangesDetected += delegate
            {
                UpdateState();
            };

            repo.SyncStatusChanged += delegate(SyncStatus status)
            {
                UpdateState();
            };

            this.repositories.Add(repo);
            repo.Initialize();
        }
Exemplo n.º 6
0
 /// <summary>
 /// Initialize (in the GUI and syncing mechanism) an existing CmisSync synchronized folder.
 /// </summary>
 /// <param name="repositoryInfo">Synchronized folder path</param>
 private void AddRepository(RepoInfo repositoryInfo)
 {
     RepoBase repo = null;
     repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);
     this.repositories.Add(repo);
     repo.Initialize();
 }
Exemplo n.º 7
0
        /// <summary>
        /// Initialize (in the UI and syncing mechanism) an existing CmisSync synchronized folder.
        /// </summary>
        /// <param name="repositoryInfo">Synchronized folder path</param>
        private void AddRepository(RepoInfo repositoryInfo)
        {
            RepoBase repo = null;
            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);

            repo.EventManager.AddEventHandler(
                new GenericSyncEventHandler<FileTransmissionEvent>( 50, delegate(ISyncEvent e){
                this.activitiesManager.AddTransmission(e as FileTransmissionEvent);
                return false;
            }));
            this.repositories.Add(repo);
            repo.Initialize();
        }
Exemplo n.º 8
0
        /// <summary>
        /// Initialize (in the UI and syncing mechanism) an existing CmisSync synchronized folder.
        /// </summary>
        /// <param name="folderPath">Synchronized folder path</param>
        private void AddRepository(string folderPath)
        {
            RepoBase repo = null;
            string folder_name = Path.GetFileName(folderPath);

            RepoInfo repositoryInfo = ConfigManager.CurrentConfig.GetRepoInfo(folder_name);
            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);

            repo.ChangesDetected += delegate
            {
                UpdateState();
            };

            repo.SyncStatusChanged += delegate(SyncStatus status)
            {
                UpdateState();
            };

            this.repositories.Add(repo);
            repo.Initialize();
        }
Exemplo n.º 9
0
        /// <summary>
        /// Initialize (in the UI and syncing mechanism) an existing CmisSync synchronized folder.
        /// </summary>
        /// <param name="folderPath">Synchronized folder path</param>
        private void AddRepository(RepoInfo repositoryInfo)
        {
            RepoBase repo = null;
            repo = new CmisSync.Lib.Sync.CmisRepo(repositoryInfo, activityListenerAggregator);

            repo.ChangesDetected += delegate
            {
                UpdateState();
            };

            repo.SyncStatusChanged += delegate(SyncStatus status)
            {
                UpdateState();
            };

            this.repositories.Add(repo);
            repo.Initialize();
        }