Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
		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;
		}
Ejemplo n.º 6
0
		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;
		}
Ejemplo n.º 7
0
        protected override PrintResults DrawRuledLineImpl(DrawRuledLineOperation drlo)
        {
            PrintResults pr = new PrintResults();

            return(pr);
        }