/// <summary>Gets the color to use when displaying the specified type of results.</summary> /// <returns></returns> internal static Color GetDisplayColor(this MChessResultType resultType) { switch (resultType) { case MChessResultType.Notification: return(Color.DarkGreen); case MChessResultType.Warning: return(Color.DarkBlue); case MChessResultType.Error: return(Color.Red); case MChessResultType.Race: return(Color.FromArgb(192, 0, 0)); default: throw new NotImplementedException("The mchess result label is not recognized: " + resultType); } }
/// <summary> /// Gets the label used for this type of result. /// </summary> /// <param name="resultType"></param> /// <returns></returns> public static string ToLabel(this MChessResultType resultType) { switch (resultType) { case MChessResultType.Notification: return("N"); case MChessResultType.Warning: return("W"); case MChessResultType.Error: return("E"); case MChessResultType.Race: return("R"); default: throw new NotImplementedException("The mchess result label is not recognized: " + resultType); } }