Пример #1
0
 private void RemoveAgentEventHandler(FileSyncAgent agent)
 {
     if (agent == null) return;
     agent.ProgressChanged -= new SyncProgressChangedHandler(currAgent_ProgressChanged);
     agent.SyncFileChanged -= new SyncFileChangedHandler(currAgent_FileChanged);
     agent.StatusChanged -= new SyncStatusChangedHandler(syncAgent_SyncStatusChanged);
 }
Пример #2
0
 protected virtual void OnPropertyChanged(string PropertyName)
 {
     this._agent = new FileSyncAgent(SyncJob);
     if (PropertyChanged != null)
         PropertyChanged(this, new PropertyChangedEventArgs(PropertyName));
 }
Пример #3
0
 public UISyncJobEntry(SyncJob job)
 {
     this._syncJob = job;
     this._agent = new FileSyncAgent(job);
 }
Пример #4
0
        void previewWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            if (_job == null) return;

            FileSyncAgent agent = new FileSyncAgent(_job);

            try
            {
                _job.SyncPreviewResult = agent.GenerateSyncPreview(updateStatusMessage);
            }
            catch (DirectoryNotFoundException ex)
            {
                showErrorMsgInvoke(String.Format(m_ResourceManager.GetString("err_directoryNotFound"), ex.Message));
            }
            catch(UnauthorizedAccessException)
            {
                showErrorMsgInvoke(m_ResourceManager.GetString("err_directoryInaccessible"));
            }
            catch (Exception)
            {
                showErrorMsgInvoke(m_ResourceManager.GetString("err_cannotPreview"));
            }
        }