private static string TranslateStatus(EItemUpdateStatus s) { switch (s) { case EItemUpdateStatus.k_EItemUpdateStatusInvalid: return("..."); case EItemUpdateStatus.k_EItemUpdateStatusCommittingChanges: return("Committing changes..."); case EItemUpdateStatus.k_EItemUpdateStatusPreparingConfig: return("Preparing config..."); case EItemUpdateStatus.k_EItemUpdateStatusPreparingContent: return("Preparing content..."); case EItemUpdateStatus.k_EItemUpdateStatusUploadingContent: return("Uploading content..."); case EItemUpdateStatus.k_EItemUpdateStatusUploadingPreviewFile: return("Uploading preview file..."); default: return(s.ToString()); } }
private void GetItemUpdateProgress() { EItemUpdateStatus updateStatus = SteamUGC.GetItemUpdateProgress(updateHandle, out ulong punBytesProcessed, out ulong punBytesTotal); Debug.WriteLine("Progress: " + punBytesProcessed + "/" + punBytesTotal + ", " + updateStatus.ToString().Substring(19)); string progressPerc = ""; if (updateStatus == EItemUpdateStatus.k_EItemUpdateStatusInvalid) { return; } if (punBytesTotal > 0) { float progress = (float)punBytesProcessed / (float)punBytesTotal; progressPerc = " " + (int)(progress * 100) + "%"; this.btnSendContentButton.BackgroundImage = Progressbar(((float)updateStatus + progress) / 5.0f); } else { this.btnSendContentButton.BackgroundImage = Progressbar((float)updateStatus / 5.0f); } this.btnSendContentButton.Text = AddSpacesToSentence(updateStatus.ToString().Substring(19)) + progressPerc; }
public static string GetLabel(this EItemUpdateStatus status) { return(("EItemUpdateStatus_" + status.ToString()).Translate()); }