private void automaticToolStripMenuItem_Click(object sender, EventArgs e) { Engine32Teams.ShowAndFixPosition(); pot1Button.Visible = true; pot2Button.Visible = true; pot3Button.Visible = true; pot4Button.Visible = true; }
private void manualToolStripMenuItem_Click(object sender, EventArgs e) { Engine32Teams.Hide(); pot1Button.Visible = false; pot2Button.Visible = false; pot3Button.Visible = false; pot4Button.Visible = false; }
private void flag_mouseUp(object sender, MouseEventArgs e) { var a = (PictureBox)sender; this._whereLeftPoint = a.Location; a.Location = _initialPoint; Engine32Teams.ProcessMovement(this, _whereLeftPoint); a.BringToFront(); //TODO on release freeze team in position }
public Form1() { InitializeComponent(); /** * Ways to improve UI : * -make background color red, black or something != white * -change to all red spaces in group area * -remove background from pieces * -change pictureBox to Pot1... */ buttonValidate.Enabled = false; GlobalEngine.engine32 = new Engine32Teams(_form2, buttonValidate); this.Size = new Size((int)(Engine32Teams.MENUBOX.Width * 1.25) + 200, (int)(Engine32Teams.MENUBOX.Height * 1.18) ); StartPosition = FormStartPosition.CenterScreen; this.Controls.Add(Engine32Teams.MENUBOX); foreach (var picture in GlobalEngine.engine32.GetPotPictureBoxes(Engine32Teams.POTNUMBERS[0])) { this.Controls.Add(picture); } foreach (var picture in GlobalEngine.engine32.GetPotPictureBoxes(Engine32Teams.POTNUMBERS[1])) { this.Controls.Add(picture); } foreach (var picture in GlobalEngine.engine32.GetPotPictureBoxes(Engine32Teams.POTNUMBERS[2])) { this.Controls.Add(picture); } foreach (var picture in GlobalEngine.engine32.GetPotPictureBoxes(Engine32Teams.POTNUMBERS[3])) { this.Controls.Add(picture); } Engine32Teams.RussiaToA(); this.pictureBox1.SendToBack(); manualToolStripMenuItem_Click(null, null); }
private void ValidateClick(object sender, EventArgs e) { ValidationButton.Enabled = false; List <BasicTeam> finalTeams = new List <BasicTeam>(capacity: 4); foreach (var match in _matchesList) { match.MakeFieldsReadOnly(); match.SetResultToTeam(); } BasicTeam t1 = new BasicTeam(null, _matchesList[0].Team1.Name, _matchesList[0].Team1.Continent, null); BasicTeam t2 = new BasicTeam(null, _matchesList[0].Team2.Name, _matchesList[0].Team2.Continent, null); BasicTeam t3 = new BasicTeam(null, _matchesList[1].Team2.Name, _matchesList[1].Team2.Continent, null); BasicTeam t4 = new BasicTeam(null, _matchesList[2].Team2.Name, _matchesList[2].Team2.Continent, null); for (int i = 0; i < 3; i++) { CalculateTotalForTeam(t1, i, true); } CalculateTotalForTeam(t2, 0, false); CalculateTotalForTeam(t2, 3, true); CalculateTotalForTeam(t2, 4, true); CalculateTotalForTeam(t3, 1, false); CalculateTotalForTeam(t3, 3, false); CalculateTotalForTeam(t3, 5, true); CalculateTotalForTeam(t4, 2, false); CalculateTotalForTeam(t4, 4, false); CalculateTotalForTeam(t4, 5, false); finalTeams.Add(t1); finalTeams.Add(t2); finalTeams.Add(t3); finalTeams.Add(t4); Engine32Teams.UpdateMatchResults(_matchesList); Engine32Teams.UpdateTeamsStats(finalTeams); }
private void pot1Button_Click(object sender, EventArgs e) { Engine32Teams.RandomizePot1(); pot1Button.Enabled = false; }
private void buttonValidate_Click(object sender, EventArgs e) { Engine32Teams.ValidateClicked(); //pop the new form2 with groupA as main one then fix the other stuff of visibility and clicking }
private void passToTreeToolStripMenuItem_Click(object sender, EventArgs e) { Engine32Teams.FinalizeEngineToTree(); }
private void groupHToolStripMenuItem_Click(object sender, EventArgs e) { GlobalEngine.engine32.ShowScheduleForGroup(Engine32Teams.CharToGroup('h')); }