//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); }
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; } }