GetFolder() публичный Метод

Get folder based on name.
public GetFolder ( string name ) : SyncConfig.Folder
name string
Результат SyncConfig.Folder
Пример #1
0
        /// <summary>
        /// Stop syncing momentarily.
        /// </summary>
        public void Disable()
        {
            Enabled = false;
            RepoInfo.IsSuspended = true;

            //Get configuration
            Config config = ConfigManager.CurrentConfig;

            CmisSync.Lib.Config.SyncConfig.Folder syncConfig = config.GetFolder(this.Name);
            syncConfig.IsSuspended = true;
            config.Save();
        }
Пример #2
0
        /// <summary>
        /// Restart syncing.
        /// </summary>
        public virtual void Resume()
        {
            Status = SyncStatus.Idle;
            RepoInfo.IsSuspended = false;

            //Get configuration
            Config config = ConfigManager.CurrentConfig;

            CmisSync.Lib.Config.SyncConfig.Folder syncConfig = config.GetFolder(this.Name);
            syncConfig.IsSuspended = false;
            config.Save();
        }
Пример #3
0
        /// <summary>
        /// Stop syncing momentarily.
        /// </summary>
        public void Suspend()
        {
            Status = SyncStatus.Suspend;
            RepoInfo.IsSuspended = true;

            //Get configuration
            Config config = ConfigManager.CurrentConfig;

            CmisSync.Lib.Config.SyncConfig.Folder syncConfig = config.GetFolder(this.Name);
            syncConfig.IsSuspended = true;
            config.Save();
        }
Пример #4
0
        /// <summary>
        /// Update repository settings.
        /// </summary>
        public virtual void UpdateSettings(string password, int pollInterval, bool syncAtStartup)
        {
            //Get configuration
            Config config = ConfigManager.CurrentConfig;

            CmisSync.Lib.Config.SyncConfig.Folder syncConfig = config.GetFolder(this.Name);

            //Pause sync
            this.remote_timer.Stop();
            if (Enabled)
            {
                Disable();
            }

            //Update password...
            if (!String.IsNullOrEmpty(password))
            {
                this.RepoInfo.Password        = new Password(password.TrimEnd());
                syncConfig.ObfuscatedPassword = RepoInfo.Password.ObfuscatedPassword;
                Logger.Debug("Updated \"" + this.Name + "\" password");
            }

            // Sync at startup
            syncConfig.SyncAtStartup = syncAtStartup;

            //Update poll interval
            this.RepoInfo.PollInterval = pollInterval;
            this.remote_timer.Interval = pollInterval;
            syncConfig.PollInterval    = pollInterval;
            Logger.Debug("Updated \"" + this.Name + "\" poll interval: " + pollInterval);

            //Save configuration
            config.Save();

            //Always resume sync...
            Enable();
            this.remote_timer.Start();
        }