public UploadRequestSession(UploadRequest objUploadRequest, JobTicket objJobTicket) : base() { UploadRequest = objUploadRequest; JobTicket = objJobTicket; UploadStats = new UploadStats(objUploadRequest, objJobTicket.StartTime); }
private void objUploadJob_TaskBegin(ITask objTask, int intTaskIndex, int intTaskTotal) { _intTaskIndex = intTaskIndex + 1; UploadRequest objUploadRequest = (UploadRequest)objTask; this.ThreadSafe(new MethodInvoker(delegate() { labelOverall.Text = String.Format(labelOverall.Tag.ToString(), objUploadRequest.SourceFileName, _intTaskIndex.ToString(), _intTaskCount.ToString()); ListViewItem objListViewItem = listViewStatus.Items[_intTaskIndex - 1]; if (objListViewItem != null) { _blnUpdatePercentages = true; objListViewItem.SubItems[1].Text = "Uploading"; listViewStatus.EnsureVisible(objListViewItem.Index); } UpdateCurrentProgress(0, 0); pathLabelSource.Text = objUploadRequest.Source; pathLabelTarget.Text = objUploadRequest.Destination; timerUpdateProgress.Enabled = true; })); }
public UploadResultList UploadWithoutDialog(UploadRequest objUploadRequest) { if (objUploadRequest == null) { throw new ArgumentNullException("objUploadRequest", "A valid non-null UploadRequest is expected"); } UploadRequestList objUploadRequests = new UploadRequestList(); objUploadRequests.Add(objUploadRequest); return(UploadWithoutDialog(objUploadRequests)); }
public override void ReadData(SerializedObject objSerializedObject) { base.ReadData(objSerializedObject); _lngSize = objSerializedObject.Values.GetValue <long>("Size", 0); _lngBytesSent = objSerializedObject.Values.GetValue <long>("BytesSent", 0); _lngBytesRemaining = objSerializedObject.Values.GetValue <long>("BytesRemaining", 0); _objStartTime = objSerializedObject.Values.GetValue <DateTime>("StartTime", DateTime.MinValue); _objEndTime = objSerializedObject.Values.GetValue <DateTime>("EndTime", DateTime.MinValue); _objUploadRequest = objSerializedObject.Objects.GetObject <UploadRequest>("UploadRequest", null); if (_objUploadRequest == null) { _objUploadRequest = UploadRequest.Empty; } }
public UploadStats(UploadRequest objUploadRequest, DateTime dtStartTime) : base() { if (objUploadRequest == null) { throw new ArgumentNullException("objUploadRequest", "A valid non-null UploadRequest instance is expected."); } _objUploadRequest = objUploadRequest; _objStartTime = dtStartTime; _objEndTime = DateTime.MaxValue; _lngSize = 0; _lngBytesSent = 0; _lngBytesRemaining = 0; _dblTransferRate = 0; }
public override void ReadData(SerializedObject objSerializedObject) { base.ReadData(objSerializedObject); _enuResultType = objSerializedObject.Values.GetValue <TaskResultType>("ResultType", TaskResultType.Unknown); _strDetails = objSerializedObject.Values.GetValue <string>("Details", string.Empty); _objUploadRequest = objSerializedObject.Objects.GetObject <UploadRequest>("UploadRequest", null); if (_objUploadRequest == null) { _objUploadRequest = UploadRequest.Empty; } _objUploadStats = objSerializedObject.Objects.GetObject <IUploadStats>("UploadStats", null); if (_objUploadStats == null) { _objUploadStats = ReLi.Framework.Library.Net.UploadStats.Empty; } }
public UploadResult(UploadRequest objUploadRequest, TaskResultType enuResultType, IUploadStats objUploadStats, string strDetails) : base() { if (objUploadRequest == null) { throw new ArgumentNullException("objUploadRequest", "A valid non-null UploadRequest is expected"); } if (objUploadStats == null) { throw new ArgumentNullException("objUploadStats", "A valid non-null IUploadStats is expected"); } if (strDetails == null) { throw new ArgumentNullException("strDetails", "A valid non-null string is expected"); } _objUploadRequest = objUploadRequest; _objUploadStats = objUploadStats; _enuResultType = enuResultType; _strDetails = strDetails; }
public UploadResult(UploadRequest objUploadRequest, TaskResultType enuResultType, IUploadStats objUploadStats) : this(objUploadRequest, enuResultType, objUploadStats, string.Empty) { }
public UploadResultList UploadWithDialog(UploadRequest objUploadRequest) { return(UploadWithDialog(objUploadRequest, new UploadDialogSettings())); }
public UploadStats(UploadRequest objUploadRequest) : this(objUploadRequest, DateTime.Now) { }