コード例 #1
0
        public void ClearGame()
        {
            spiel         = null;
            spiel         = new Spiel(this);
            EventBox.Text = "";
            foreach (Canvas canvas in SchussFeld.spielbaresSpielfeld.Children)
            {
                canvas.MouseDown += Canvas_MouseDown;
                canvas.Children.Clear();
            }
            foreach (Canvas canvas in TestPLayerSpielfeld.spielbaresSpielfeld.Children)
            {
                canvas.Background = Brushes.Blue;
                canvas.MouseDown += Canvas_MouseDown;
            }
            foreach (Canvas canvas in SchiffFeld.spielbaresSpielfeld.Children)
            {
                canvas.Children.Clear();
                canvas.Background = Brushes.Blue;
            }
            FinishPlacement.IsEnabled = false;
            Brush brush = Brushes.Gray;

            ACControl.SetColor(brush);
            BSControl.SetColor(brush);
            CControl.SetColor(brush);
            DControl.SetColor(brush);
            SControl.SetColor(brush);
        }