private static void DisplayPrinterCounterValues(PrinterCounterStatus vals) { Console.WriteLine("Counts:"); Console.WriteLine(" CardsPickedSinceCleaningCard: " + vals._cardsPickedSinceCleaningCard); Console.WriteLine(" CleaningCardsRun: " + vals._cleaningCardsRun); Console.WriteLine(" CurrentCompleted: " + vals._currentCompleted); Console.WriteLine(" CurrentLost: " + vals._currentLost); Console.WriteLine(" CurrentPicked: " + vals._currentPicked); Console.WriteLine(" CurrentPickedExceptionSlot: " + vals._currentPickedExceptionSlot); Console.WriteLine(" CurrentPickedInputHopper1: " + vals._currentPickedInputHopper1); Console.WriteLine(" CurrentPickedInputHopper2: " + vals._currentPickedInputHopper2); Console.WriteLine(" CurrentPickedInputHopper3: " + vals._currentPickedInputHopper3); Console.WriteLine(" CurrentPickedInputHopper4: " + vals._currentPickedInputHopper4); Console.WriteLine(" CurrentPickedInputHopper5: " + vals._currentPickedInputHopper5); Console.WriteLine(" CurrentPickedInputHopper6: " + vals._currentPickedInputHopper6); Console.WriteLine(" CurrentRejected: " + vals._currentRejected); Console.WriteLine(" PrinterStatus: " + vals._printerStatus); Console.WriteLine(" TotalCompleted: " + vals._totalCompleted); Console.WriteLine(" TotalLost: " + vals._totalLost); Console.WriteLine(" TotalPicked: " + vals._totalPicked); Console.WriteLine(" TotalPickedExceptionSlot: " + vals._totalPickedExceptionSlot); Console.WriteLine(" TotalPickedInputHopper1: " + vals._totalPickedInputHopper1); Console.WriteLine(" TotalPickedInputHopper2: " + vals._totalPickedInputHopper2); Console.WriteLine(" TotalPickedInputHopper3: " + vals._totalPickedInputHopper3); Console.WriteLine(" TotalPickedInputHopper4: " + vals._totalPickedInputHopper4); Console.WriteLine(" TotalPickedInputHopper5: " + vals._totalPickedInputHopper5); Console.WriteLine(" TotalPickedInputHopper6: " + vals._totalPickedInputHopper6); Console.WriteLine(" TotalRejected: " + vals._totalRejected); Console.WriteLine(); }
private void getStatus() { string[] args = new string[] { "-n", datacard.getName() }; CommandLineOptions commandLineOptions = new CommandLineOptions(); CommandLine.Utility.Arguments arguments = new CommandLine.Utility.Arguments(args); if (string.IsNullOrEmpty(arguments["n"])) { Console.WriteLine("Some information"); } bool boolVal = false; if (Boolean.TryParse(arguments["n"], out boolVal)) { Console.WriteLine("Some information"); } commandLineOptions.printerName = arguments["n"]; if (!string.IsNullOrEmpty(arguments["j"])) { commandLineOptions.jobStatus = true; } BidiSplWrap bidiSpl = null; try { bidiSpl = new BidiSplWrap(); bidiSpl.BindDevice(commandLineOptions.printerName); string driverVersionXml = bidiSpl.GetPrinterData(strings.SDK_VERSION); //Console.WriteLine(Environment.NewLine + "driver version: " + Util.ParseDriverVersionXML(driverVersionXml) + Environment.NewLine); string printerOptionsXML = bidiSpl.GetPrinterData(strings.PRINTER_OPTIONS2); PrinterOptionsValues printerOptionsValues = Util.ParsePrinterOptionsXML(printerOptionsXML); DisplayPrinterOptionsValues(printerOptionsValues); string printerCardCountXML = bidiSpl.GetPrinterData(strings.COUNTER_STATUS2); PrinterCounterStatus printerCounterStatusValues = Util.ParsePrinterCounterStatusXML(printerCardCountXML); DisplayPrinterCounterValues(printerCounterStatusValues); string suppliesXML = bidiSpl.GetPrinterData(strings.SUPPLIES_STATUS3); SuppliesValues suppliesValues = Util.ParseSuppliesXML(suppliesXML); DisplaySuppliesValues(suppliesValues); //string printerStatusXML = bidiSpl.GetPrinterData(strings.PRINTER_MESSAGES); //PrinterStatusValues printerStatusValues = Util.ParsePrinterStatusXML(printerStatusXML); //DisplayPrinterStatusValues(printerStatusValues); } catch (Exception e) { Console.WriteLine(e.Message); } finally { bidiSpl.UnbindDevice(); } }
private void DisplayPrinterCounterValues(PrinterCounterStatus vals) { datacard.setBilling(vals._currentPicked); //Console.WriteLine("Counts:"); //Console.WriteLine(" CurrentPicked: " + vals._currentPicked); //Console.WriteLine(); }