# HG changeset patch # User Brad Greco # Date 1555370695 14400 # Node ID d92176c5398a40967b4c530abedadfa5092c267c # Parent 75ca86e0862c106730095e070a6908f072debe53 Better display of schedule name. diff -r 75ca86e0862c -r d92176c5398a ServerMonitor/Forms/CheckForm.cs --- a/ServerMonitor/Forms/CheckForm.cs Mon Apr 15 19:24:25 2019 -0400 +++ b/ServerMonitor/Forms/CheckForm.cs Mon Apr 15 19:24:55 2019 -0400 @@ -291,7 +291,7 @@ private void FrequencyUnitsComboBox_Format(object sender, ListControlConvertEventArgs e) { - e.Value = e.Value.ToString().ToLower() + 's'; + e.Value = e.Value.ToString().ToLower() + "s"; } private void NameTextBox_TextChanged(object sender, EventArgs e) diff -r 75ca86e0862c -r d92176c5398a ServerMonitor/Objects/Schedule.cs --- a/ServerMonitor/Objects/Schedule.cs Mon Apr 15 19:24:25 2019 -0400 +++ b/ServerMonitor/Objects/Schedule.cs Mon Apr 15 19:24:55 2019 -0400 @@ -64,6 +64,11 @@ } return nextTime; } + + public override string ToString() + { + return string.Format("Every {0} {1}", Frequency, Units.ToString().ToLower() + (Frequency == 1 ? "" : "s")); + } } public enum FrequencyUnits { Second, Minute, Hour, Day }