Ejemplo n.º 1
0
        /// <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());
            }
        }
Ejemplo n.º 2
0
 public void UpdatePhase(PhaseType pt)
 {
     this.Text = "Sharpening horrible very bad no good \"UI\" :" + pt.ToString();
 }