Example #1
0
        /// <summary>Handles the event that is thrown when the reader class read a card completely</summary>
        private void _reader_CardRead(object sender, SportidentDataEventArgs e)
        {
            //handle this event to further process a read out card
            //you will find the card data in the e.Card array that may contain several cards
            //wod here please
            int[]          distance = { 0, 0, 0, 0 };
            SportidentCard c        = e.Cards[0];

            kiolvasott = c;

            //pályafelismerés
            for (int p = 0; p < 4; ++p)
            {
                int p_y = 0;
                for (int x = 0; x < c.ControlPunchList.Count; ++x)
                {
                    if (p_y < palyak[p].Length && palyak[p][p_y] == c.ControlPunchList[x].CodeNumber)
                    {
                        ++p_y;
                    }
                    else
                    {
                        ++distance[p];
                    }
                }

                if (p_y != palyak[p].Length)
                {
                    distance[p] += 100;
                }
            }

            int min = 0;

            for (int i = 1; i < 4; ++i)
            {
                if (distance[i] < distance[min])
                {
                    min = i;
                }
            }

            palya = min;
            siker = distance[min] < 100;

            //nyomtatás
            printFont = new Font("Open Sans Semibold", 12);
            //printFont = new Font("Times New Roman", 10);
            PrintDocument pd = new PrintDocument();

            pd.PrinterSettings.PrinterName = "EPSON TM-T20 Receipt";
            pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
            pd.Print();
        }
Example #2
0
 /// <summary>Handles the event that is raised when a card has been completely read via radio readout</summary>
 private void _reader_RadioReadoutCardCompleted(object sender, SportidentDataEventArgs e)
 {
 }
Example #3
0
 /// <summary>Handles the event that is thrown when the reader class read an online stamp completely</summary>
 private void _reader_OnlineStampRead(object sender, SportidentDataEventArgs e)
 {
     //handle this event to further process a read card punch or online record
     //you will find the card data in the e.PunchData array hat may contain several records
 }