Esempio n. 1
0
 public void Setup()
 {
     _factory            = new BarCodeFactory();
     _accountStorage     = new SqLiteAccountStorage(new RegularAccountFactory());
     _categoryStorage    = new SqLiteCategoryStorage(new RegularCategoryFactory());
     _transactionStorage =
         new SqLiteTransactionStorage(new RegularTransactionFactory(), _accountStorage, _categoryStorage);
     _storage = new SqLiteBarCodeStorage(
         new BarCodeFactory(), _transactionStorage);
     _storage.DeleteAllData();
 }
        private void BarcodeReader()
        {
            var bcrCode = BarCodeFactory.MonitoringBarcodeReader(port).Trim();

            // get the user input for every iteration, allowing to exit at will
            lblDcrCode.Content = bcrCode;
            BarCodeFactory.ClearBarcodeReaderBuffer(port);
            if (!string.IsNullOrWhiteSpace(bcrCode))
            {
                PostBcrCodeToApi(new RequestContent {
                    BcrCode = bcrCode, TerminalGuid = tGuid, TerminalName = tName, RelPartnerId = 11
                });                                                                                                                        //Test partner id, need to identify artikel by partner and Barcode
            }
        }
Esempio n. 3
0
        private IBarCode CreateBarCode(string code, bool isWeight = false, int numberOfDigits = 0)
        {
            var factory = new BarCodeFactory();

            return(factory.CreateBarCode(code, isWeight, numberOfDigits));
        }