예제 #1
0
파일: UnitsUI.cs 프로젝트: Steell/Dynamo
        protected override bool UpdateValueCore(string name, string value, UndoRedoRecorder recorder)
        {
            if (name == "Value")
            {
                var converter = new MeasureConverter();
                this.Value = ((double)converter.ConvertBack(value, typeof(double), Measure, null));
                return(true); // UpdateValueCore handled.
            }

            return(base.UpdateValueCore(name, value, recorder));
        }
예제 #2
0
        protected override bool UpdateValueCore(UpdateValueParams updateValueParams)
        {
            string name  = updateValueParams.PropertyName;
            string value = updateValueParams.PropertyValue;

            if (name == "Value")
            {
                var converter = new MeasureConverter();
                this.Value = ((double)converter.ConvertBack(value, typeof(double), Measure, null));
                return(true); // UpdateValueCore handled.
            }

            return(base.UpdateValueCore(updateValueParams));
        }