Esempio n. 1
0
        void puzzle_FieldStarStateChanged(object sender, FieldStarStateChangedEventArgs e)
        {
            if (e.OldStarState == e.NewStarState)
            {
                return;
            }

            Button button = this.FindButtonForCoords(e.Coord);
            bool   isStar = this.puzzle.GetStar(e.Coord);

            if (!isStar)
            {
                this.RemoveStarFromButton(button);
            }
            else
            {
                this.AddStarToButton(button);
            }
        }
        void puzzle_FieldStarStateChanged(object sender, FieldStarStateChangedEventArgs e)
        {
            if (e.OldStarState == e.NewStarState)
                return;

            Button button = this.FindButtonForCoords(e.Coord);
            bool isStar = this.puzzle.GetStar(e.Coord);

            if (!isStar)
                this.RemoveStarFromButton(button);
            else
                this.AddStarToButton(button);
        }