Example #1
0
        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));
        }
Example #2
0
        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;
        }
Example #3
0
 private Boolean CanPrint(PrintSourceViewModel printSourceViewModel)
 {
     return(Arduino.IsConnected && printSourceViewModel != null);
 }
Example #4
0
 private Boolean CanPrintPreview(PrintSourceViewModel printSourceViewModel)
 {
     return(printSourceViewModel != null);
 }