/// <summary> /// Converts a phase type to a string description /// </summary> public static string ConvertPhaseTypeToDescription(PhaseType device_type) { FieldInfo fi = device_type.GetType().GetField(device_type.ToString()); DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes( typeof(DescriptionAttribute), false); if (attributes != null && attributes.Length > 0) { return(attributes[0].Description); } else { return(device_type.ToString()); } }
public void UpdatePhase(PhaseType pt) { this.Text = "Sharpening horrible very bad no good \"UI\" :" + pt.ToString(); }