Пример #1
0
        private int DisplayRotatePrintTransaction(RotatePrintCollection collection)
        {
            int      chars    = 0;
            Rotation rotation = collection.Rotation;

            Window.DisplayText("[Begin " + rotation.ToString() + " rotation]\r\n");

            foreach (PrintOperation operation in collection)
            {
                string s = "";

                if (operation is PrintNormalOperation)
                {
                    s = ((PrintNormalOperation)operation).Data;
                }
                else if (operation is PrintBitmapOperation)
                {
                    s = "Bitmap: " + ((PrintBitmapOperation)operation).FileName + "\r\n";
                }
                else if (operation is PrintBarCodeOperation)
                {
                    s = "BarCode: " + ((PrintBarCodeOperation)operation).Data + "\r\n";
                }
                else
                {
                    s = "Unexpected operation type.\r\n";
                }

                Window.DisplayText(s);
                chars += s.Length;
            }
            Window.DisplayText("[End " + rotation.ToString() + " rotation]\r\n");

            return(chars);
        }
Пример #2
0
        protected override PrintResults                 RotatePrintImpl(RotatePrintCollection collection)
        {
            int chars = DisplayRotatePrintTransaction(collection);

            Thread.Sleep(printDelay);
            return(GetPrintStats(collection.Station, chars));
        }
Пример #3
0
		private void ValidationPrintRotation(RotatePrintCollection rpc)
		{
			if (rpc != null && rpc.Count > 10)
			{
				// Assume we can print a max of 10 lines in a sideways rotation
				throw new PosControlException("Rotation print operation exceeds the page size.", ErrorCode.Illegal);
			}
		}
Пример #4
0
		private int DisplayRotatePrintTransaction(RotatePrintCollection collection)
		{
			int chars = 0;
			Rotation rotation = collection.Rotation;
			Window.DisplayText("[Begin " + rotation.ToString() + " rotation]\r\n");
			
			foreach (PrintOperation operation in collection)
			{
				string s = "";

				if (operation is PrintNormalOperation)
					s = ((PrintNormalOperation) operation).Data;
				else if (operation is PrintBitmapOperation)
					s = "Bitmap: " + ((PrintBitmapOperation) operation).FileName + "\r\n";
				else if (operation is PrintBarCodeOperation)
					s = "BarCode: " + ((PrintBarCodeOperation) operation).Data + "\r\n";
				else
					s = "Unexpected operation type.\r\n";

				Window.DisplayText(s);
				chars += s.Length;
			}
			Window.DisplayText("[End " + rotation.ToString() + " rotation]\r\n");
			
			return chars;
		}
Пример #5
0
		protected override PrintResults			RotatePrintImpl(RotatePrintCollection collection)
		{
			int chars = DisplayRotatePrintTransaction(collection);

			Thread.Sleep(printDelay);
			return GetPrintStats(collection.Station, chars);
		}