Ejemplo n.º 1
0
        public void startRunning(Form parent = null)
        {
            settings = (BarcodeScannerSettings)XMLConfigHandler.ReadConfig(typeof(BarcodeScannerSettings));

            if (settings.prefix == 'A')
            {
                firstChar = ']';   //AIM code
            }
            else
            {
                firstChar = settings.prefix;
            }

            if (settings.suffix == 'E')
            {
                lastChar = '\r';
            }
            else
            {
                lastChar = settings.suffix;
            }

            if (parent != null && settings.readFrom.Equals("Keyboard"))
            {
                // Read input from the keyboard
                parent.KeyPreview = true;
                parent.KeyPress  += HandleKeyPress;
            }
            else
            {
                backgroundWorker1.RunWorkerAsync();
            }
        }
Ejemplo n.º 2
0
        public SAPSettingsCntrl()
        {
            InitializeComponent();

            var settings = (SAPSettings)XMLConfigHandler.ReadConfig(typeof(SAPSettings));

            if (settings != null)
            {
                UpdateComponents(settings);
            }
        }
Ejemplo n.º 3
0
        public static ScaleReader GetScaleReader()
        {
            var s = (ScaleSettings)XMLConfigHandler.ReadConfig(typeof(ScaleSettings));

            var scaleTypes = GetScaleTypes();
            var scaleInfo  = scaleTypes.Find(si => si.scaleType.Equals(s.scaleType));
            var sr         = (ScaleReader)Activator.CreateInstance(scaleInfo.objType);

            sr.settings = s;
            return(sr);
        }
Ejemplo n.º 4
0
        public static bool Initialise()
        {
            settings = (DBSettings)XMLConfigHandler.ReadConfig(typeof(DBSettings));
            if (settings == null)
            {
                MessageLogger.Add("Error ready DBSettings.XML", MessageLogger.MsgLevel.error);
                return(false);
            }

            return(true);
        }
Ejemplo n.º 5
0
        public LabelPrinterSettingsCntrl()
        {
            InitializeComponent();
            GetPrinterNames();

            var settings = (LabelPrinterSettings)XMLConfigHandler.ReadConfig(typeof(LabelPrinterSettings));

            if (settings != null)
            {
                UpdateComponents(settings);
            }
        }
Ejemplo n.º 6
0
        public DBSettingsCntrl()
        {
            InitializeComponent();

            DBSettings s = (DBSettings)XMLConfigHandler.ReadConfig(typeof(DBSettings));

            if (s != null)
            {
                txtDBHost.Text     = s.DBServer;
                txtDBUser.Text     = s.DBUser;
                txtDBPassword.Text = CryptoSystem.Decrypt(s.DBPassword);
            }
        }
        public BarcodeScannerSettingsCntrl()
        {
            InitializeComponent();

            GetStopBitsValues();
            GetParityValues();

            var settings = (BarcodeScannerSettings)XMLConfigHandler.ReadConfig(typeof(BarcodeScannerSettings));

            if (settings != null)
            {
                UpdateComponents(settings);
            }
        }
Ejemplo n.º 8
0
        public ScaleSettingsCntrl()
        {
            InitializeComponent();

            scaleTypes = ScaleReader.GetScaleTypes();
            GetScaleTypeValues();
            GetStopBitsValues();
            GetParityValues();

            ScaleSettings settings = (ScaleSettings)XMLConfigHandler.ReadConfig(typeof(ScaleSettings));

            if (settings != null)
            {
                UpdateComponents(settings);
            }
        }
Ejemplo n.º 9
0
 public LabelPrinter()
 {
     settings   = (LabelPrinterSettings)XMLConfigHandler.ReadConfig(typeof(LabelPrinterSettings));
     fileBuffer = new Dictionary <string, FileInfo>();
 }