public override int GetHashCode() { unchecked { var hashCode = Id; hashCode = (hashCode * 397) ^ (SportType != null ? SportType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ EventTime.GetHashCode(); hashCode = (hashCode * 397) ^ (HomePlayer != null ? HomePlayer.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AwayPlayer != null ? AwayPlayer.GetHashCode() : 0); return(hashCode); } }
private void buttonMetod2_Click(object sender, EventArgs e) {//Deplasman oyuncu butonları if (btn2PlayerChanged.BackColor == Color.Yellow) { foreach (Control item in flowLayoutPanel4.Controls) { if (item is Button) { item.BackColor = Color.White; } } Button btn2 = (Button)sender; if (btn2.BackColor == Color.White) { btn2.BackColor = Color.Red; } SelectPlayerAway = AwayPlayer.PlayerListAway.Where(x => x.No == btn2.Text).First(); AwayPlayerShortInfo(); } else if (btn2PlayerChanged.BackColor == Color.Red) { Button btn2 = (Button)sender; if (flowLayoutPanel2.Controls.Contains(btn2)) { if (flowLayoutPanel4.Controls.Count <= 5) { flowLayoutPanel4.Controls.Add(btn2); flowLayoutPanel2.Controls.Remove(btn2); SelectPlayerAway = AwayPlayer.PlayerListAway.Where(x => x.No == btn2.Text).First(); SelectPlayerAway.SahadaMi = true; } } else if (flowLayoutPanel4.Controls.Contains(btn2)) { flowLayoutPanel2.Controls.Add(btn2); flowLayoutPanel4.Controls.Remove(btn2); SelectPlayerAway = AwayPlayer.PlayerListAway.Where(x => x.No == btn2.Text).First(); SelectPlayerAway.SahadaMi = false; } } }