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