本文整理汇总了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;
}
}