private async Task PrintPreview(PrintSourceViewModel printSourceViewModel) { IEnumerable <IPrintInstruction> printSource = printSourceViewModel.GetPrintSource(); var geometryPrinter = new GeometryPrinter(); await geometryPrinter.Print(printSource); Preview = geometryPrinter.Geometry; RaisePropertyChanged(nameof(Preview)); }
private async Task Print(PrintSourceViewModel printSourceViewModel) { IEnumerable <IPrintInstruction> printSource = printSourceViewModel.GetPrintSource(); var arduinoPrinter = new ArduinoPrinter(Arduino.Driver); arduinoPrinter.ChangeColorRequested += ArduinoPrinterOnChangeColorRequested; await arduinoPrinter.Print(printSource); arduinoPrinter.ChangeColorRequested -= ArduinoPrinterOnChangeColorRequested; }
private Boolean CanPrint(PrintSourceViewModel printSourceViewModel) { return(Arduino.IsConnected && printSourceViewModel != null); }
private Boolean CanPrintPreview(PrintSourceViewModel printSourceViewModel) { return(printSourceViewModel != null); }