protected override PrintResults CutPaperImpl(int percentage) { Window.DisplayText("Paper cut: " + percentage.ToString(CultureInfo.CurrentCulture) + "%\r\n"); Thread.Sleep(printDelay); PrintResults pr = new PrintResults(); pr.PaperCutCount = 1; return(pr); }
static void Main(string[] args) { string input = @"Text:file.txt(6B);Some string content Image:img.bmp(19MB);1920x1080 Text:data.txt(12B);Another string Text:data1.txt(7B);Yet another string Movie:logan.2017.mkv(19GB);2540x1032;2h12m"; Parser parser = new Parser(); var parsedFiles = parser.ParseInputData(input); PrintResults.PrintParsedFiles(parsedFiles); }
static async Task Main(string[] args) { var dbManager = new SqliteDbManager(); var statService = new ConcreteStatService(); List <Tuple <string, int> > serviceResults = await statService.GetCountryPopulationsAsync(); List <Tuple <string, int> > dbResults = await dbManager.GetCountryPopulationsAsync(); List <Tuple <string, int> > results = AccumulateResults.Aggregate(dbResults, serviceResults); PrintResults.Print(results); }
private PrintResults GetPrintStats(PrinterStation station, int chars) { PrintResults pr = new PrintResults(); if (station == PrinterStation.Journal) { pr.JournalLinePrintedCount = 1; pr.JournalCharacterPrintedCount = chars; } else if (station == PrinterStation.Receipt) { pr.ReceiptLinePrintedCount = 1; pr.ReceiptCharacterPrintedCount = chars; } else if (station == PrinterStation.Slip) { pr.SlipLinePrintedCount = 1; pr.SlipCharacterPrintedCount = chars; } return(pr); }
private PrintResults GetPrintStats(PrinterStation station, int chars) { PrintResults pr = new PrintResults(); if (station == PrinterStation.Journal) { pr.JournalLinePrintedCount = 1; pr.JournalCharacterPrintedCount = chars; } else if (station == PrinterStation.Receipt) { pr.ReceiptLinePrintedCount = 1; pr.ReceiptCharacterPrintedCount = chars; } else if (station == PrinterStation.Slip) { pr.SlipLinePrintedCount = 1; pr.SlipCharacterPrintedCount = chars; } return pr; }
protected override PrintResults CutPaperImpl(int percentage) { Window.DisplayText("Paper cut: " + percentage.ToString(CultureInfo.CurrentCulture) + "%\r\n" ); Thread.Sleep(printDelay); PrintResults pr = new PrintResults(); pr.PaperCutCount = 1; return pr; }
protected override PrintResults DrawRuledLineImpl(DrawRuledLineOperation drlo) { PrintResults pr = new PrintResults(); return(pr); }