Пример #1
0
        //Grabbing a tile
        //Drag and Drop Functionallity Begin
        private void Button_MouseDown(object sender, MouseEventArgs e)
        {
            LetterTile letterTile = sender as LetterTile;

            currentTile       = letterTile;
            currentTileLetter = letterTile.Text;
            //MessageBox.Show(currentTileLetter);
            currentTileValue = Game.getLetterValue(currentTileLetter);
            letterTile.DoDragDrop(letterTile.Text, DragDropEffects.Copy);
        }
Пример #2
0
        private void Button_MouseDownExchange(object sender, MouseEventArgs me)
        {
            LetterTile btn = (LetterTile)sender;

            if (btn.Exchange == false)
            {
                btn.Exchange  = true;
                btn.BackColor = System.Drawing.Color.LightSteelBlue;
            }
            else
            {
                btn.Exchange  = false;
                btn.BackColor = System.Drawing.SystemColors.Control;
            }
        }