private void button1_Click(object sender, EventArgs e) { var ami = game.Markers.Where(o => o.Compare(18, 5)).ToList <Marker>(); var tag = Convert.ToInt32(((Button)sender).Tag); var half = game.HalfList.FirstOrDefault(o => o.Index == tag); if (half == null) { return; } //Если первая установка, то вывести if (ami.Count == 0 && half.Index == 4) { var form = new OvertimeForm(MaxPlayersNum, OvertimeLength); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { OvertimeLength = form.Length; MaxPlayersNum = form.Count; } } Half = half; Close(); }
private void button16_Click(object sender, EventArgs e) { if (game.Markers.Exists(o => o.Compare(18, 5) && o.Half.Index == 4)) { var mkh = game.Markers.First(o => o.Compare(18, 5) && o.Half.Index == 4); var maxplayers = mkh.Num % 10000; var length = mkh.Num / 10000; var form = new OvertimeForm(maxplayers, length); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { OvertimeLength = form.Length; MaxPlayersNum = form.Count; Close(); } } }