void IWorkspaceWindow.RefreshCheckinProgress( CheckinStatus checkinStatus, BuildProgressSpeedAndRemainingTime.ProgressData progressData) { mDeveloperProgressOperationHandler. RefreshCheckinProgress(checkinStatus, progressData); }
void Apply(CheckinCreated e) { Id = e.Id.ToString(); StartDate = e.StartDate; Duration = e.Duration; Status = CheckinStatus.Pending; }
public void Start() { if (_startDate != DateTime.Now) { throw new Exception("not valid date to start"); } if (_status == CheckinStatus.Expired) { throw new Exception("Expired"); } if (_status != CheckinStatus.New) { throw new Exception("Already started"); } var staffs = _employeeServices.FindStaffWithValidEffectiveDate(_startDate, _endDate); _status = CheckinStatus.Started; foreach (var staff in staffs) { _checkinEvaluates.Add(new CheckinEvaluate() { Status = CheckinCommentStatus.Pending, EmployeeId = staff.EmployeeId, EvaluatorId = staff.EvaluatorId }); } //can build email to send //or just email domain subscribe CheckinStarted to remind ApplyChange(new CheckinStarted(int.Parse(Id), staffs)); }
public Checkin(int id, DateTime startDate, DateTime endDate) { Id = id.ToString(); _startDate = startDate; _endDate = endDate; _status = CheckinStatus.New; ApplyChange(new CheckinCreated(int.Parse(Id), startDate < endDate, _status)); }
public void Expired() { if (_status != CheckinStatus.Started) { throw new Exception("Not started"); } _status = CheckinStatus.Expired; List <EmployeeInfo> staffs = _employeeServices.FindStaffWithValidEffectiveDate(_startDate, _endDate); ApplyChange(new CheckinExpired(int.Parse(Id), staffs)); }
internal void Refresh( CheckinStatus checkinStatus, BuildProgressSpeedAndRemainingTime.ProgressData progressData) { if (checkinStatus == null) { return; } var progress = mGuiClient.Progress; progress.ProgressHeader = checkinStatus.StatusString; if (checkinStatus.Status >= EnumCheckinStatus.eciConfirming) { progress.CanCancelProgress = false; } if (checkinStatus.Status == EnumCheckinStatus.eciCancelling) { return; } int nowTicks = Environment.TickCount; progress.TotalProgressMessage = mProgressRender.GetUploadSize( checkinStatus.TransferredSize, checkinStatus.TotalSize, progressData); progress.TotalProgressPercent = GetProgressBarPercent.ForTransfer( checkinStatus.TransferredSize, checkinStatus.TotalSize) / 100f; progress.ShowCurrentBlock = mProgressRender. NeedShowCurrentBlockForCheckinStatus(checkinStatus, nowTicks); string currentFileInfo = mProgressRender.GetCurrentFileInfo( checkinStatus.CurrentCheckinBlock, mWkInfo.ClientPath); progress.ProgressHeader = currentFileInfo; float fileProgressBarValue = GetProgressBarPercent.ForTransfer( checkinStatus.CurrentCheckinBlock.UploadedSize, checkinStatus.CurrentCheckinBlock.BlockSize) / 100f; progress.CurrentBlockProgressPercent = fileProgressBarValue; progress.CurrentBlockProgressMessage = mProgressRender.GetCurrentBlockUploadSize( checkinStatus.CurrentCheckinBlock, nowTicks); }
public static string ToResource(this CheckinStatus s, bool toLower = false) { string result = ""; switch (s) { case CheckinStatus.CheckinPending: result = AppResource.ECheckinStatusCheckinPending; break; case CheckinStatus.Checkin: result = AppResource.ECheckinStatusCheckin; break; case CheckinStatus.RequestedCheckout: result = AppResource.ECheckinStatusRequestedCheckout; break; case CheckinStatus.Checkout: result = AppResource.ECheckinStatusCheckout; break; case CheckinStatus.RequestedCheckin: result = AppResource.ECheckinStatusRequestedCheckin; break; case CheckinStatus.Denied: result = AppResource.ECheckinStatusDenied; break; default: break; } if (toLower) { result = result.ToLower(); } return(result); }
void IWorkspaceWindow.RefreshCheckinProgress(CheckinStatus checkinStatus) { mDeveloperProgressOperationHandler.RefreshCheckinProgress(checkinStatus); }
internal void RefreshCheckinProgress( CheckinStatus checkinStatus, BuildProgressSpeedAndRemainingTime.ProgressData progressData) { mCheckinProgress.Refresh(checkinStatus, progressData); }
public CheckinCreated(int checkinId, bool b, CheckinStatus status) { throw new NotImplementedException(); }
internal void RefreshCheckinProgress(CheckinStatus checkinStatus) { mCheckinProgress.Refresh(checkinStatus); }
/// <summary> /// these kind of function will call when build up from list events to this Domain object /// check funtion LoadFromHistory in class AggregateRoot /// </summary> /// <param name="e"></param> void Apply(CheckinCompleted e) { Status = CheckinStatus.Completed; }