コード例 #1
0
        public void ChooseColour(string tag)
        {
            StopCounter();
            DrawableField chosenField  = map.FirstOrDefault(field => field.Tag == tag);
            int           chosenColour = DecodeColur(chosenField.Colour);

            try
            {
                gameServer.ChooseColour(chosenColour);
            }
            catch (Exception)
            {
                MessageBox.Show("Connection lost.", "Hanksite", MessageBoxButton.OK);
                Application.Current.Shutdown();
                return;
            }
        }