Ejemplo n.º 1
0
        /// <summary>
        /// Handles the RowEnter event of AiListDataGridView object.
        /// </summary>
        private void aiListDataGridView_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (aiListDataGridView.Rows[e.RowIndex].Cells[0].Value != null)
            {
#if !REMOVE_BARCODE_SDK
                aiNumberComboBox.SelectedIndex = GS1ApplicationIdentifiers.IndexOfApplicationIdentifier((string)aiListDataGridView.Rows[e.RowIndex].Cells[0].Value);
                aiValueTextBox.Text            = (string)aiListDataGridView.Rows[e.RowIndex].Cells[2].Value;
#endif
            }
        }
Ejemplo n.º 2
0
        private void AddAI(string number, string value)
        {
#if !REMOVE_BARCODE_SDK
            GS1ApplicationIdentifierValue ai = null;
            try
            {
                ai = new GS1ApplicationIdentifierValue(GS1ApplicationIdentifiers.FindApplicationIdentifier(number), value);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            _identifierValuesList.Add(ai);
            ShowPrintableValue();
            AddAIToTable(ai);
#endif
        }