private void label_Click(object sender, EventArgs e) { if (bFlag && !bShowModel) { Button btn = (Button)sender; //btn.BackColor = System.Drawing.SystemColors.InactiveCaption; //btn.BackgroundImage = null; SetBtnColor(btn, backColor); t.AddEmptyPos(btn.Name); } if (bRemoveFlag && !bShowModel) { Button btn = (Button)sender; //btn.BackgroundImage = Properties.Resources.ball_blue_b; SetBtnColor(btn, Color.Blue); t.RemoveEmptyPos(btn.Name); } }
private void label_Click(object sender, EventArgs e) { var btn = (uButton)sender; var str = btn.Name.Split('_'); var locate = new Coordinate(); locate.Row = int.Parse(str[0]); locate.Column = int.Parse(str[1]); Locate = locate; if (bFlag && !bShowModel) { SetBtnColor(btn, backColor); t.AddEmptyPos(btn.Name); } if (bRemoveFlag && !bShowModel) { SetBtnColor(btn, Color.Blue); t.RemoveEmptyPos(btn.Name); } }