public static TimeControlTexts TranslateSubtext(TimeInformation information, TimeControl control) { if (control.IsViolating()) { return(new TimeControlTexts(Localizer.TimeControl_TimeExceeded, null)); } switch (information.Style) { case TimeControlStyle.None: return(TranslateNoneSubtext()); case TimeControlStyle.Japanese: return(TranslateJapaneseSubtext(information as JapaneseTimeInformation, control as JapaneseTimeControl)); case TimeControlStyle.Canadian: return(TranslateCanadianSubtext(information as CanadianTimeInformation, control as CanadianTimeControl)); case TimeControlStyle.Absolute: return(TranslateAbsoluteSubtext(information as AbsoluteTimeInformation)); } throw new Exception("Unknown time control."); }