Example #1
0
        /// <summary>
        /// khoi tao chuong trinh
        /// </summary>
        public Bowling()
        {
            InitializeComponent();
            try
            {
                serial = new SerialPlay("COM2");
            }
            catch (Exception e)
            {
                MessageBox.Show("khong the choi qua cong com");
            }


            systemState = PLAY;
            speed       = 4;
            for (int i = 1; i <= 7; i++)
            {
                diemlan[i] = 0;
            }

            Console.WriteLine("diem lan 1:" + diemlan[1]);
            CreatGraphics();

            serialProcess = new Thread(SerialProc);
            serialProcess.Start();
        }
Example #2
0
        public TestMoving()
        {
            InitializeComponent();
            try
            {
                serial = new SerialPlay("COM2");
            }
            catch (Exception e)
            {
                MessageBox.Show("khong the choi qua cong com");
            }

            CreatComponent();

            //serialProcess = new Thread(SerialProc);
            //serialProcess.Start();

            //serialPort1.Open();
        }