public ApplyValueResult TrySetValueOnUi(object value)
        {
            ApplyValueResult toReturn = ApplyValueResult.NotSupported;

            if (value is float)
            {
                if (TypeToPushToInstance == AngleType.Radians)
                {
                    this.Angle = 180 * (float)((float)value / Math.PI);
                }
                else
                {
                    this.Angle = (float)value;
                }
                toReturn = ApplyValueResult.Success;
            }
            return(toReturn);
        }
        private static void GetIfValuesCanBeSetOnInstance(IDataUi dataUi, out ApplyValueResult result, out bool hasErrorOccurred)
        {
            result           = ApplyValueResult.UnknownError;
            hasErrorOccurred = false;

            if (dataUi.HasEnoughInformationToWork() == false)
            {
                result           = ApplyValueResult.NotEnoughInformation;
                hasErrorOccurred = true;
            }
            if (dataUi.InstanceMember.IsReadOnly)
            {
                result           = ApplyValueResult.NotSupported;
                hasErrorOccurred = true;
            }
            if (dataUi.SuppressSettingProperty)
            {
                result           = ApplyValueResult.NotEnabled;
                hasErrorOccurred = true;
            }
        }
        private static void GetIfValuesCanBeSetOnInstance(IDataUi dataUi, out ApplyValueResult result, out bool hasErrorOccurred)
        {
            result = ApplyValueResult.UnknownError;
            hasErrorOccurred = false;

            if (dataUi.HasEnoughInformationToWork() == false)
            {
                result = ApplyValueResult.NotEnoughInformation;
                hasErrorOccurred = true;
            }
            if (dataUi.InstanceMember.IsReadOnly)
            {
                result = ApplyValueResult.NotSupported;
                hasErrorOccurred = true;
            }
            if (dataUi.SuppressSettingProperty)
            {
                result = ApplyValueResult.NotEnabled;
                hasErrorOccurred = true;
            }
        }