/// <summary> /// Call this function to load the properties while constructing this object. /// </summary> private void LoadFromRow() { _divisions = new UndoableProperty <int>(this, DivisionsPropertyName, this._context, this.Row.Field <int>(DivisionsPropertyName)); _gaugeColor = new UndoableProperty <Color>(this, GaugeColorPropertyName, this._context, this.Row.Field <Color>(GaugeColorPropertyName)); _gaugeHeight = new UndoableProperty <double>(this, GaugeHeightPropertyName, this._context, this.Row.Field <double>(GaugeHeightPropertyName)); _gaugeLeft = new UndoableProperty <double>(this, GaugeLeftPropertyName, this._context, this.Row.Field <double>(GaugeLeftPropertyName)); _gaugeOutlineVisibility = new UndoableProperty <Windows.UI.Xaml.Visibility>(this, GaugeOutlineVisibilityPropertyName, this._context, this.Row.Field <Windows.UI.Xaml.Visibility>(GaugeOutlineVisibilityPropertyName)); _gaugeTop = new UndoableProperty <double>(this, GaugeTopPropertyName, this._context, this.Row.Field <double>(GaugeTopPropertyName)); _gaugeType = new UndoableProperty <GaugeTypeEnum>(this, GaugeTypePropertyName, this._context, this.Row.Field <GaugeTypeEnum>(GaugeTypePropertyName)); _gaugeWidth = new UndoableProperty <double>(this, GaugeWidthPropertyName, this._context, this.Row.Field <double>(GaugeWidthPropertyName)); _innerCircleDelta = new UndoableProperty <int>(this, InnerCircleDeltaPropertyName, this._context, this.Row.Field <int>(InnerCircleDeltaPropertyName)); _labelsFontSize = new UndoableProperty <double>(this, LabelsFontSizePropertyName, this._context, this.Row.Field <double>(LabelsFontSizePropertyName)); _majorTicLength = new UndoableProperty <double>(this, MajorTicLengthPropertyName, this._context, this.Row.Field <double>(MajorTicLengthPropertyName)); _middleCircleDelta = new UndoableProperty <int>(this, MiddleCircleDeltaPropertyName, this._context, this.Row.Field <int>(MiddleCircleDeltaPropertyName)); _mediumTicLength = new UndoableProperty <double>(this, MediumTicLengthPropertyName, this._context, this.Row.Field <double>(MediumTicLengthPropertyName)); _mediumTicsPerMajorTic = new UndoableProperty <int>(this, MediumTicsPerMajorTicPropertyName, this._context, this.Row.Field <int>(MediumTicsPerMajorTicPropertyName)); _minorTicLength = new UndoableProperty <double>(this, MinorTicLengthPropertyName, this._context, this.Row.Field <double>(MinorTicLengthPropertyName)); _minorTicsPerMajorTic = new UndoableProperty <int>(this, MinorTicsPerMajorTicPropertyName, this._context, this.Row.Field <int>(MinorTicsPerMajorTicPropertyName)); _pageId = new UndoableProperty <Int64>(this, PageIdPropertyName, this._context, this.Row.Field <Int64>(PageIdPropertyName)); _resolution = new UndoableProperty <int>(this, ResolutionPropertyName, this._context, this.Row.Field <int>(ResolutionPropertyName)); _sensorId = new UndoableProperty <Int64>(this, SensorIdPropertyName, this._context, this.Row.Field <Int64>(SensorIdPropertyName)); _text = new UndoableProperty <string>(this, TextPropertyName, this._context, this.Row.Field <string>(TextPropertyName)); _textAngle = new UndoableProperty <double>(this, TextAnglePropertyName, this._context, this.Row.Field <double>(TextAnglePropertyName)); _textFontColor = new UndoableProperty <Color>(this, TextFontColorPropertyName, this._context, this.Row.Field <Color>(TextFontColorPropertyName)); _textFontSize = new UndoableProperty <double>(this, TextFontSizePropertyName, this._context, this.Row.Field <double>(TextFontSizePropertyName)); _textHorizontalAlignment = new UndoableProperty <CanvasHorizontalAlignment>(this, TextHorizontalAlignmentPropertyName, this._context, this.Row.Field <CanvasHorizontalAlignment>(TextHorizontalAlignmentPropertyName)); _textVerticalAlignment = new UndoableProperty <CanvasVerticalAlignment>(this, TextVerticalAlignmentPropertyName, this._context, this.Row.Field <CanvasVerticalAlignment>(TextVerticalAlignmentPropertyName)); _units = new UndoableProperty <Units>(this, UnitsPropertyName, this._context, this.Row.Field <Units>(UnitsPropertyName)); _unitsFontSize = new UndoableProperty <double>(this, UnitsFontSizePropertyName, this._context, this.Row.Field <double>(UnitsFontSizePropertyName)); _valueFontSize = new UndoableProperty <double>(this, ValueFontSizePropertyName, this._context, this.Row.Field <double>(ValueFontSizePropertyName)); }
public NodeViewModel(Point position) { position_ = new UndoableProperty <Point>(this, "Position", position); Args = new ObservableCollection <NodeConnectorViewModel>(); Outputs = new ObservableCollection <NodeConnectorViewModel>(); }