Esempio n. 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            CashCode cc = new CashCode();

            cc.NumberOfComPort = ushort.Parse(txb.Text);
            cc.OpenComPort();

            cc.DelegatePollingBill    = PollingBill;
            cc.DelegateProcessMessage = ProcessMessage;
            cc.Reset();

            string name = string.Empty, id = string.Empty;

            cc.Identification(ref name, ref id);

            l_id.Content = name + " " + id;

            cc.Reset();
            var rubs  = Enum.GetValues(typeof(CashCode.RUB));
            var lrubs = rubs.OfType <CashCode.RUB>().ToList();

            cc.EnableBillTypes(new List <CashCode.RUB> {
                CashCode.RUB.B100
            });

            var res = cc.PollingLoop(100, 20);

            cc.Reset();

            cc.CloseComPort();
        }
Esempio n. 2
0
 public CashCodeWrapper()
 {
     if (!PrintBoxApp.instance.runOptions.testMode)
     {
         log.Debug("Initializing cashcode");
         cashCode = new CashCode(PrintBoxApp.instance.config.CashCodePort);
         cashCode.BillStacked += new BillStackedEventHandler(cashCode_BillStacked);
         cashCode.Reset();
     }
 }