本文整理匯總了C#中System.TimeSpan.ToStringmmss方法的典型用法代碼示例。如果您正苦於以下問題:C# TimeSpan.ToStringmmss方法的具體用法?C# TimeSpan.ToStringmmss怎麽用?C# TimeSpan.ToStringmmss使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.TimeSpan
的用法示例。
在下文中一共展示了TimeSpan.ToStringmmss方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SetTriageUrgent
public void SetTriageUrgent(int calls,TimeSpan timeBehind) {
this.labelTriageRedCalls.Text=calls.ToString();
if(timeBehind==TimeSpan.Zero) { //format the string special for this case
this.labelTriageRedTimeSpan.Text="00:00";
}
else {
this.labelTriageRedTimeSpan.Text=timeBehind.ToStringmmss();
}
if(calls>1) { //we are behind
labelTriageRedCalls.SetAlertColors();
}
else { //we are ok
labelTriageRedCalls.SetNormalColors();
}
if(timeBehind>TimeSpan.FromMinutes(1)) { //we are behind
labelTriageRedTimeSpan.SetAlertColors();
}
else { //we are ok
labelTriageRedTimeSpan.SetNormalColors();
}
}
示例2: SetVoicemailRed
public void SetVoicemailRed(int calls,TimeSpan timeBehind) {
this.labelVoicemailCalls.Text=calls.ToString();
if(timeBehind==TimeSpan.Zero) { //format the string special for this case
this.labelVoicemailTimeSpan.Text="00:00";
}
else {
this.labelVoicemailTimeSpan.Text=timeBehind.ToStringmmss();
}
if(calls>5) { //we are behind
labelVoicemailCalls.SetAlertColors();
}
else { //we are ok
labelVoicemailCalls.SetNormalColors();
}
if(timeBehind>TimeSpan.FromMinutes(5)) { //we are behind
labelVoicemailTimeSpan.SetAlertColors();
}
else { //we are ok
labelVoicemailTimeSpan.SetNormalColors();
}
}
示例3: SetVoicemailRed
public void SetVoicemailRed(int calls,TimeSpan timeBehind) {
this.labelVoicemailCalls.Text=calls.ToString();
if(timeBehind==TimeSpan.Zero) { //format the string special for this case
this.labelVoicemailTimeSpan.Text="00:00";
}
else {
this.labelVoicemailTimeSpan.Text=timeBehind.ToStringmmss();
}
if(calls>5) { //we are behind
labelVoicemailCalls.InnerColor=Color.Red;
labelVoicemailCalls.ForeColor=Color.White;
}
else { //we are ok
labelVoicemailCalls.InnerColor=Color.White;
labelVoicemailCalls.ForeColor=Color.Black;
}
if(timeBehind>TimeSpan.FromMinutes(5)) { //we are behind
labelVoicemailTimeSpan.InnerColor=Color.Red;
labelVoicemailTimeSpan.ForeColor=Color.White;
}
else { //we are ok
labelVoicemailTimeSpan.InnerColor=Color.White;
labelVoicemailTimeSpan.ForeColor=Color.Black;
}
}