Esempio n. 1
0
        public void HoldPosition(ref PointF pt)
        {
            int idx = (int)(pt.Y * _width + pt.X);

            if (idx >= _count || idx < 0)
            {
                return;
            }
            _statusRecorder.SetStatus(idx, true);
        }
Esempio n. 2
0
        private void button10_Click(object sender, EventArgs e)
        {
            int       n  = 100000000;
            Stopwatch sw = new Stopwatch();

            sw.Start();
            bool isOK = false;

            status.SetStatus(100, true);
            while (n-- >= 0)
            {
                //status.SetStatus(100, true);
                isOK = status.IsTrue(100);
            }
            sw.Stop();
            MessageBox.Show(sw.ElapsedMilliseconds.ToString());
            Text = status.IsTrue(100).ToString();
        }