コード例 #1
0
        public void Update(string msg)
        {
            string[] words = msg.Split(new char[] { ' ' });
            int      i     = Convert.ToInt16(words[1]);

            if (words[0].Equals("Красные"))
            {
                B.Invoke(new Action(() => B.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.DarkRed));
                B.Invoke(new Action(() => B.Show()));
                System.Threading.Thread.Sleep(1000);
            }
            else
            {
                A.Invoke(new Action(() => A.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.DarkRed));
                A.Invoke(new Action(() => A.Show()));
                System.Threading.Thread.Sleep(1000);
            }
        }