protected RawItemViewModel(RawEntity2D rawEntity2D, ProfileEditorViewModel.AxisSystem axisSystem, ProfileEditorViewModel parent) { RawEntity = rawEntity2D; switch (axisSystem) { case ProfileEditorViewModel.AxisSystem.Xy: { XLabel = "X"; YLabel = "Y"; DeltaXLabel = "Incre. X"; DeltaYLabel = "Incre. Y"; CenterXLabel = "Center X"; CenterYLabel = "Center Y"; } break; case ProfileEditorViewModel.AxisSystem.Xz: { XLabel = "Z"; YLabel = "X"; DeltaXLabel = "Incre. Z"; DeltaYLabel = "Incre. X"; CenterXLabel = "Center X"; CenterYLabel = "Center C"; } break; } this.Parent = parent; }
public RawLineViewModel(RawLine2D rawLine2D, ProfileEditorViewModel.AxisSystem axisSystem, ProfileEditorViewModel parent) : base(rawLine2D, axisSystem, parent) { _rawLine = rawLine2D; X = new RawInputViewModel(_rawLine.X, this); Angle = new RawInputViewModel(_rawLine.Angle, this); Y = new RawInputViewModel(_rawLine.Y, this); DeltaX = new RawInputViewModel(_rawLine.DeltaX, this); DeltaY = new RawInputViewModel(_rawLine.DeltaY, this); Chamfer = new RawInputViewModel(_rawLine.Chamfer, this); EndRadius = new RawInputViewModel(_rawLine.EndRadius, this); foreach (var rawInputViewModel in InputVmList) { rawInputViewModel.OnSourceUpdated += RawLine_SourceUpdated; } //Angle.OnSourceUpdated += RawLine_SourceUpdated; //X.OnSourceUpdated += RawLine_SourceUpdated; //Y.OnSourceUpdated += RawLine_SourceUpdated; //DeltaX.OnSourceUpdated += RawLine_SourceUpdated; //DeltaY.OnSourceUpdated += RawLine_SourceUpdated; //Chamfer.OnSourceUpdated += RawLine_SourceUpdated; //EndRadius.OnSourceUpdated += RawLine_SourceUpdated; }
public RawArcViewModel(RawArc2D rawLine2D, ProfileEditorViewModel.AxisSystem axisSystem, ProfileEditorViewModel parent) : base(rawLine2D, axisSystem, parent) { _rawArc = rawLine2D; X = new RawInputViewModel(_rawArc.X, this); Y = new RawInputViewModel(_rawArc.Y, this); CenterX = new RawInputViewModel(_rawArc.CenterX, this); CenterY = new RawInputViewModel(_rawArc.CenterY, this); DeltaX = new RawInputViewModel(_rawArc.DeltaX, this); DeltaY = new RawInputViewModel(_rawArc.DeltaY, this); Chamfer = new RawInputViewModel(_rawArc.Chamfer, this); Radius = new RawInputViewModel(_rawArc.Radius, this); EndRadius = new RawInputViewModel(_rawArc.EndRadius, this); foreach (var rawInputViewModel in InputVmList) { rawInputViewModel.OnSourceUpdated += RawLine_SourceUpdated; } //X.OnSourceUpdated += RawLine_SourceUpdated; //Y.OnSourceUpdated += RawLine_SourceUpdated; //DeltaX.OnSourceUpdated += RawLine_SourceUpdated; //DeltaY.OnSourceUpdated += RawLine_SourceUpdated; //Chamfer.OnSourceUpdated += RawLine_SourceUpdated; //Radius.OnSourceUpdated += RawLine_SourceUpdated; //EndRadius.OnSourceUpdated += RawLine_SourceUpdated; }
/* * la gestione del axisLabel può essere raggruppata in classe abstract */ public RawInitPointViewModel(RawInitPoint2D rawPoint2D, ProfileEditorViewModel.AxisSystem axisSystem, ProfileEditorViewModel parent) : base(rawPoint2D, axisSystem, parent) { _rawPoint2D = rawPoint2D; X = new RawInputViewModel(_rawPoint2D.X); Y = new RawInputViewModel(_rawPoint2D.Y); X.OnSourceUpdated += RawLine_SourceUpdated; Y.OnSourceUpdated += RawLine_SourceUpdated; }