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")); } }
protected virtual void OnPropertyChanged(string PropertyName) { this._agent = new FileSyncAgent(SyncJob); if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(PropertyName)); } }
public UISyncJobEntry(SyncJob job) { this._syncJob = job; this._agent = new FileSyncAgent(job); }