public static ColorStatusSelectorValue FromEventImportance(EventImportance?importance)
        {
            var value = new ColorStatusSelectorValue();

            if (importance == null)
            {
                return(value);
            }
            if (importance.Value == EventImportance.Alarm)
            {
                value.RedChecked = true;
                return(value);
            }
            if (importance.Value == EventImportance.Warning)
            {
                value.YellowChecked = true;
                return(value);
            }
            if (importance.Value == EventImportance.Success)
            {
                value.GreenChecked = true;
                return(value);
            }
            if (importance.Value == EventImportance.Unknown)
            {
                value.GrayChecked = true;
                return(value);
            }
            return(value);
        }
        public static ColorStatusSelectorValue FromColor(ObjectColor?color)
        {
            var value = new ColorStatusSelectorValue();

            if (color == null)
            {
                return(value);
            }
            if (color.Value == ObjectColor.Red)
            {
                value.RedChecked = true;
                return(value);
            }
            if (color.Value == ObjectColor.Yellow)
            {
                value.YellowChecked = true;
                return(value);
            }
            if (color.Value == ObjectColor.Green)
            {
                value.GreenChecked = true;
                return(value);
            }
            if (color.Value == ObjectColor.Gray)
            {
                value.GrayChecked = true;
                return(value);
            }
            return(value);
        }
        public static ColorStatusSelectorValue FromUnitTestResultStatus(UnitTestResult?status)
        {
            var value = new ColorStatusSelectorValue();

            if (status == null)
            {
                return(value);
            }
            if (status.Value == UnitTestResult.Alarm)
            {
                value.RedChecked = true;
                return(value);
            }
            if (status.Value == UnitTestResult.Warning)
            {
                value.YellowChecked = true;
                return(value);
            }
            if (status.Value == UnitTestResult.Success)
            {
                value.GreenChecked = true;
                return(value);
            }
            if (status.Value == UnitTestResult.Unknown)
            {
                value.GrayChecked = true;
                return(value);
            }
            return(value);
        }