示例#1
0
        public MainWindow()
        {
            InitializeComponent();

            Settings           = new SettingsWindow();
            DatabaseStatements = new DatabaseStatements();

            DatabaseStatements.CreateTable();

            BarcodeEngineManager.SetBarcodeEngine(Settings.Settings.BarcodeEngine);
        }
示例#2
0
        private void LoadBarcodeEngineCombobox()
        {
            // set current engine from settings file or set the first engine found if no engine is configured
            IEnumerable <string> engines = BarcodeEngineManager.GetAllBarcodeEngines().Select(x => x.Identifier);
            string currentEngine         = engines.SingleOrDefault(x => x == Settings.BarcodeEngine);

            BarcodeEngineComboBox.ItemsSource = engines;
            if (string.IsNullOrEmpty(currentEngine))
            {
                BarcodeEngineComboBox.SelectedItem = engines.First();
                Settings.BarcodeEngine             = engines.First();
                SaveButton_Click(this, new RoutedEventArgs());
            }
            else
            {
                BarcodeEngineComboBox.SelectedItem = currentEngine;
            }
        }