コード例 #1
0
ファイル: UPOSAdapter.cs プロジェクト: cstrobbe/C4A-TVM
        public static TVMSettings listenForUser(String flowManager, Boolean emulateScanner)
        {
            String userToken = "logout";

            if (emulateScanner)
            {
                //userToken = "sammy";
                userToken = UPOSAdapter.generateRandomTestToken();
                Console.WriteLine("UPOSAdapter.generateRandomTestToken(" + userToken + ");");
            }
            else
            {
                if (UPOSAdapter.checkForScanner())
                {
                    Console.Write("scanner detected  ");
                    IDScanner scanner = new IDScanner();
                    userToken = scanner.scan();
                    Console.WriteLine("scanned userToken " + userToken);
                    log.Info("scanned userToken" + userToken);
                    
                }
                else
                {
                    // do nothing, but better tell user/log there is no scanner
                    Console.WriteLine("NO SCANNER detected");
                }
            }
            
            TVMSettings tvmSettings = GPIIAdapter.getPreferences(userToken, flowManager);

            return tvmSettings;
        }
コード例 #2
0
ファイル: UPOSAdapter.cs プロジェクト: cstrobbe/C4A-TVM
        public static TVMSettings listenForUsers(String flowManager)
        {
            String userToken = "logout";

            IDScanner scanner = new IDScanner();
            userToken = scanner.scan();
            TVMSettings tvmSettings = GPIIAdapter.getPreferences(userToken, flowManager);

            return tvmSettings;
        } 
コード例 #3
0
ファイル: Home.aspx.cs プロジェクト: cstrobbe/C4A-TVM
    protected void ButtonScan_Click(object sender, EventArgs e)
    {
        //Diese beiden Zeilen scannen einen Barcode ein und speichern die eingescannten Daten in Data
        IDScanner scanner = new IDScanner();
        string Data = scanner.scan();

        
        //Diese Zeilen erstellen ein Ticket mit den eingegebenen Parametern und drucken dieses aus
        Bitmap ticket = Printer.generateTicket("Single Ticket", "Duri", "Jatinegara","10.000 Rp.");
        Printer printer = new Printer();
        printer.printTicket(ticket);


    }