private void OnAddExecute() { SlopeCalculate(); var wrapper = new SlopeWrapper(new Slope()); wrapper.SlopeType = Slope.SlopeType; wrapper.SlopeSquare = Slope.SlopeSquare; wrapper.ModuleCost = Slope.ModuleCost; wrapper.ModuleQuantity = Slope.ModuleQuantity; wrapper.Summ = Slope.Summ; wrapper.PropertyChanged += Wrapper_PropertyChanged; Slopes.Add(wrapper); CurrentRoof.RoofSquare += Slope.SlopeSquare; CurrentRoof.TotalQuantity += Slope.ModuleQuantity; CurrentRoof.TotalSum += Slope.Summ; }
private void InitializeSlope(Slope slope) { Slope = new SlopeWrapper(slope); }
public RectangularSlopeViewModel(SlopeWrapper slope) { SlopeWrapper = slope; }
public ParallelogramSlopeViewModel(SlopeWrapper slope) { SlopeWrapper = slope; }
public TrapezoidalSlopeViewModel(SlopeWrapper slope) { SlopeWrapper = slope; }