/// <summary> /// Creates a PrinterViewModel with one X Axis ViewModel, one Y Axis ViewModel, one Z Axis ViewModel, and one PrintheadViewModel. /// </summary> /// <param name="PrinterModel"></param> public PrinterViewModel(PrinterModel PrinterModel, SerialCommunicationCommandSetsModel SerialCommunicationCommandSetsModel) { _printerModel = PrinterModel; _serialCommunicationCommandSetsModel = SerialCommunicationCommandSetsModel; _gPIOPinListsViewModel = new GPIOPinListsViewModel(); _microcontrollerViewModel = new MicrocontrollerViewModel(_printerModel.MicroControllerModel, _gPIOPinListsViewModel); //Populates the Axis ViewModel lists with their Axis Model counterparts. foreach (AxisModel axisModel in _printerModel.AxisModelList) { AxisViewModel newAxisViewModel = new AxisViewModel(axisModel, _gPIOPinListsViewModel); _axisViewModelList.Add(newAxisViewModel); if (newAxisViewModel.Name.Contains('Z')) { _zAxisViewModelList.Add(newAxisViewModel); } } //Populates the Printhead ViewModel lists with their Printhead Model counterparts. foreach (PrintheadModel printheadModel in _printerModel.PrintheadModelList) { _printheadViewModelList.Add(new PrintheadViewModel(printheadModel, _gPIOPinListsViewModel)); } //Populates the empty PrintheadViewModel list with an empty Printhead. _emptyPrintheadViewModelList.Add(new PrintheadViewModel(new PrintheadModel(""), _gPIOPinListsViewModel)); //Subscribe to events. SerialCommunicationCommandSetsModel.RealTimeStatusDataModel.RecordLimitExecuted += new RecordLimitExecutedEventHandler(UpdateMinMaxPositions); SerialCommunicationCommandSetsModel.CommandSetMinMaxPositionChanged += new CommandSetMinMaxPositionChangedEventHandler(UpdateMinMaxPositions); }
public PrinterXMLDeserializerModel(GPIOPinListsViewModel GPIOPinListsViewModel, PrinterViewModel PrinterViewModel, ErrorListViewModel ErrorListViewModel) : base(ErrorListViewModel) { _gPIOPinListsViewModel = GPIOPinListsViewModel; _printerViewModel = PrinterViewModel; _axisXMLDeserializerModel = new AxisXMLDeserializerModel(_printerViewModel, base._errorListViewModel); _printheadXMLDeserializerModel = new PrintheadXMLDeserializerModel(_printerViewModel, base._errorListViewModel); }
public ModiPrintXMLDeserializerModel(GCodeManagerViewModel GCodeManagerViewModel, PrinterViewModel PrinterViewModel, GPIOPinListsViewModel GPIOPinListsViewModel, PrintViewModel PrintViewModel, ErrorListViewModel ErrorListViewModel) : base(ErrorListViewModel) { //ModiPrint parts. _gCodeManagerViewModel = GCodeManagerViewModel; _printerViewModel = PrinterViewModel; _gPIOPinListsViewModel = GPIOPinListsViewModel; _printViewModel = PrintViewModel; //XML Serializers. _gCodeManagerXMLDeserializerModel = new GCodeManagerXMLDeserializerModel(_errorListViewModel); _printerXMLDeserializerModel = new PrinterXMLDeserializerModel(_gPIOPinListsViewModel, _printerViewModel, _errorListViewModel); _printXMLDeserializerModel = new PrintXMLDeserializerModel(_printerViewModel, _errorListViewModel); }
public AxisViewModel(AxisModel AxisModel, GPIOPinListsViewModel GPIOPinListsViewModel) { _axisModel = AxisModel; _gPIOPinListsViewModel = GPIOPinListsViewModel; }
public PrintheadViewModel(PrintheadModel PrintheadModel, GPIOPinListsViewModel GPIOPinListsViewModel) { _printheadModel = PrintheadModel; _gPIOPinListsViewModel = GPIOPinListsViewModel; }
public ValvePrintheadTypeViewModel(ValvePrintheadTypeModel ValvePrintheadTypeModel, GPIOPinListsViewModel GPIOPinListsViewModel) : base(ValvePrintheadTypeModel, GPIOPinListsViewModel) { _valvePrintheadTypeModel = ValvePrintheadTypeModel; }
public CustomPrintheadTypeViewModel(CustomPrintheadTypeModel CustomPrintheadTypeModel, GPIOPinListsViewModel GPIOPinListsViewModel) : base(CustomPrintheadTypeModel, GPIOPinListsViewModel) { _customPrintheadTypeModel = CustomPrintheadTypeModel; }
public MotorizedPrintheadTypeViewModel(MotorizedPrintheadTypeModel MotorizedPrintheadTypeModel, GPIOPinListsViewModel GPIOPinListsViewModel) : base(MotorizedPrintheadTypeModel, GPIOPinListsViewModel) { _motorizedPrintheadTypeModel = MotorizedPrintheadTypeModel; }