private void UpdateAvailableSymbologies()
        {
            SymbologyGroup group = _groupsListBox.SelectedItem as SymbologyGroup;

            // Clear the extra symbologies box and add the new ones not found in the right pane
            _availableSymbologyListBox.BeginUpdate();

            _availableSymbologyListBox.Items.Clear();

            BarcodeSymbology[] groupSymbologies = group.ReadOptions.GetSupportedSymbologies();
            foreach (BarcodeSymbology groupSymbology in groupSymbologies)
            {
                bool found = false;

                foreach (BarcodeSymbology toReadSymbology in _toReadSymbologyListBox.Items)
                {
                    if (groupSymbology == toReadSymbology)
                    {
                        found = true;
                        break;
                    }
                }

                if (!found)
                {
                    _availableSymbologyListBox.Items.Add(groupSymbology);
                }
            }

            _availableSymbologyListBox.EndUpdate();

            UpdateUIState();
        }
        private void _groupOptionsResetToDefaultsButton_Click(object sender, EventArgs e)
        {
            SymbologyGroup group = _groupsListBox.SelectedItem as SymbologyGroup;

            group.ReadOptions = Activator.CreateInstance(group.ReadOptions.GetType()) as BarcodeReadOptions;
            _groupPropertyGrid.SelectedObject = group.ReadOptions;
        }
        private void _groupsListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            SymbologyGroup group = _groupsListBox.SelectedItem as SymbologyGroup;

            _groupPropertyGrid.SelectedObject = group.ReadOptions;

            UpdateAvailableSymbologies();
        }
示例#4
0
        private void UpdateAvailableSymbologies()
        {
            SymbologyGroup group = _groupsListBox.SelectedItem as SymbologyGroup;

            // Clear the extra symbologies box and add the new ones not found in the right pane
            _availableSymbologyListBox.BeginUpdate();

            _availableSymbologyListBox.Items.Clear();

            BarcodeSymbology[] groupSymbologies = group.WriteOptions.GetSupportedSymbologies();
            foreach (BarcodeSymbology groupSymbology in groupSymbologies)
            {
                _availableSymbologyListBox.Items.Add(groupSymbology);
            }

            _availableSymbologyListBox.EndUpdate();

            _availableSymbologyListBox.SelectedIndex = 0;

            UpdateUIState();
        }