Пример #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();
            }
        }
Пример #2
0
        public SAPSettingsCntrl()
        {
            InitializeComponent();

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

            if (settings != null)
            {
                UpdateComponents(settings);
            }
        }
Пример #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);
        }
Пример #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);
        }
        public LabelPrinterSettingsCntrl()
        {
            InitializeComponent();
            GetPrinterNames();

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

            if (settings != null)
            {
                UpdateComponents(settings);
            }
        }
Пример #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);
            }
        }
Пример #8
0
        public ScaleSettingsCntrl()
        {
            InitializeComponent();

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

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

            if (settings != null)
            {
                UpdateComponents(settings);
            }
        }
Пример #9
0
 public LabelPrinter()
 {
     settings   = (LabelPrinterSettings)XMLConfigHandler.ReadConfig(typeof(LabelPrinterSettings));
     fileBuffer = new Dictionary <string, FileInfo>();
 }