예제 #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
파일: UISyncJob.cs 프로젝트: nydehi/onesync
 protected virtual void OnPropertyChanged(string PropertyName)
 {
     this._agent = new FileSyncAgent(SyncJob);
     if (PropertyChanged != null)
         PropertyChanged(this, new PropertyChangedEventArgs(PropertyName));
 }
예제 #3
0
파일: UISyncJob.cs 프로젝트: nydehi/onesync
 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"));
            }
        }