Пример #1
0
        public bool TryReadDolazakNaTrening(int comPort, bool obrisiPrePrikazivanja)
        {
            AdminForm af          = Form1.Instance.AdminForm;
            bool      measureTime = af != null;

            Stopwatch watch = null;

            if (measureTime)
            {
                watch = Stopwatch.StartNew();
            }

            int  broj;
            bool result = tryReadCard(comPort, out broj);

            if (measureTime)
            {
                watch.Stop();
                af.newOcitavanje(watch.ElapsedMilliseconds);
            }

            return(result && handleOcitavanjeKarticeTrening(broj, DateTime.Now, obrisiPrePrikazivanja));
        }