/// <summary> /// Record the parameters from a Set Valve Printhead command. /// </summary> /// <param name="printheadName"></param> public void RecordSetValvePrinthead(string printheadName) { _activePrintheadType = PrintheadType.Valve; _activePrintheadModel = new RealTimeStatusValvePrintheadModel(printheadName); //Notify other classes. OnRecordSetValvePrintheadExecuted(printheadName); }
/// <summary> /// Set initial values for all data. /// </summary> private void InitializeRealTimeStatusDataModel() { _xRealTimeStatusAxisModel = new RealTimeStatusAxisModel("Unset", 0, 0, 0); _yRealTimeStatusAxisModel = new RealTimeStatusAxisModel("Unset", 0, 0, 0); _zRealTimeStatusAxisModel = new RealTimeStatusAxisModel("Unset", 0, 0, 0); _activePrintheadType = PrintheadType.Unset; _activePrintheadModel = new RealTimeStatusUnsetPrintheadModel("Unset"); }
/// <summary> /// Record the parameters from a Set Motorized Printhead command. /// </summary> /// <param name="printheadName"></param> /// <param name="maxSpeed"></param> /// <param name="acceleration"></param> public void RecordSetMotorizedPrinthead(string printheadName, double maxSpeed, double acceleration) { _activePrintheadType = PrintheadType.Motorized; MotorizedPrintheadTypeModel motorizedPrintheadTypeModel = (MotorizedPrintheadTypeModel)_printerModel.FindPrinthead(printheadName).PrintheadTypeModel; double mmPerStep = motorizedPrintheadTypeModel.MmPerStep; //Max speed is read as steps / s and acceleration is read as steps / s2. //These parameters are converted to this program's convention of mm / s and mm / s2. double convertedMaxSpeed = maxSpeed * mmPerStep; double convertedAcceleration = acceleration * mmPerStep; _activePrintheadModel = new RealTimeStatusMotorizedPrintheadModel(printheadName, convertedMaxSpeed, convertedAcceleration); //Notify other classes. OnRecordSetMotorizedPrintheadExecuted(printheadName); }
public RealTimeStatusPrintheadViewModel(RealTimeStatusPrintheadModel RealTimeStatusPrintheadModel) { _realTimeStatusPrintheadModel = RealTimeStatusPrintheadModel; OnPropertyChanged("Name"); }
public RealTimeStatusUnsetPrintheadViewModel(RealTimeStatusPrintheadModel RealTimeStatusPrintheadModel) : base(RealTimeStatusPrintheadModel) { _realTimeStatusPrintheadModel = RealTimeStatusPrintheadModel; }