Beispiel #1
0
        private void loadButton_Click(object sender, EventArgs e)
        {
            rfid.Structures.SelectCriteria retrievedCriteria = new rfid.Structures.SelectCriteria( );
            Result result = LakeChabotReader.MANAGED_ACCESS.API_l8K6CGetSelectCriteria(ref retrievedCriteria);

            if (Result.OK == result)
            {
                // Copy over incoming criteria...

                this.selectCriteria.countCriteria = retrievedCriteria.countCriteria;

                // Ref copy since safe creation in managed lib now...

                for (int index = 0; index < retrievedCriteria.countCriteria; ++index)
                {
                    this.selectCriteria.pCriteria[index] = retrievedCriteria.pCriteria[index];
                }

                // Fill in ( or zero out if call > 1 ) remaining criteria

                for (uint index = this.selectCriteria.countCriteria; index < CRITERIA_MAXIM; ++index)
                {
                    this.selectCriteria.pCriteria[index] =
                        new rfid.Structures.SelectCriterion( );
                }

                this.activeCriteria.Value = this.selectCriteria.countCriteria;

                this.displayValues( );
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("Select Criteria load error");
            }
        }
        private void loadButton_Click( object sender, EventArgs e )
        {
            rfid.Structures.SelectCriteria retrievedCriteria = new rfid.Structures.SelectCriteria( );
            Result result = LakeChabotReader.MANAGED_ACCESS.API_l8K6CGetSelectCriteria(ref retrievedCriteria);
            if ( Result.OK == result )
            {
                // Copy over incoming criteria...

                this.selectCriteria.countCriteria = retrievedCriteria.countCriteria;

                // Ref copy since safe creation in managed lib now...

                for ( int index = 0; index < retrievedCriteria.countCriteria; ++index )
                {
                    this.selectCriteria.pCriteria[ index ] = retrievedCriteria.pCriteria[ index ];
                }

                // Fill in ( or zero out if call > 1 ) remaining criteria

                for ( uint index = this.selectCriteria.countCriteria; index < CRITERIA_MAXIM; ++index )
                {
                    this.selectCriteria.pCriteria[ index ] =
                        new rfid.Structures.SelectCriterion( );
                }

                this.activeCriteria.Value = this.selectCriteria.countCriteria;

                this.displayValues( );
            }
            else
            {
                System.Windows.Forms.MessageBox.Show( "Select Criteria load error" );
            }
        }