Beispiel #1
0
 public MagellanScale(Magellan9300S pMagellan, Action <double, bool> pOnScalesData) : base(null, eModelEquipment.MagellanScale)
 {
     Magellan = pMagellan;
     if (Magellan != null)
     {
         Magellan.OnWeightChanged += (Weight) => { pOnScalesData(Weight, true); }
     }
     ;
 }
Beispiel #2
0
/*        public MagellanScaner(string pSerialPortName, int pBaudRate, Action<string, string> pLogger, Action<string, string> pOnBarCode) : base(pSerialPortName, pBaudRate, pLogger, pOnBarCode)
 *      {
 *          var AppConfiguration = new ConfigurationBuilder()
 *             .SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
 *             .AddJsonFile("appsettings.json").Build();
 *
 *          Magellan9300 = new Magellan9300S(AppConfiguration, null);
 *
 *          Magellan9300.Init();
 *
 *          if (pOnBarCode != null)
 *              Magellan9300.OnBarcodeScannerChange += (BarCode) =>
 *          {
 *              pOnBarCode(BarCode, null);
 *          };
 *      }*/


        public MagellanScaner(IConfiguration pConfiguration, Action <string, string> pLogger, Action <string, string> pOnBarCode) : base(pConfiguration, eModelEquipment.MagellanScaner, pLogger, pOnBarCode)
        {
            Magellan9300 = new Magellan9300S(pConfiguration, null);
            Magellan9300.Init();
            if (pOnBarCode != null)
            {
                Magellan9300.OnBarcodeScannerChange += (BarCode) =>
                {
                    pOnBarCode(BarCode, null);
                }
            }
            ;
        }
    }