public EgbCsglPair(EGBMatch egbm, CSGLMatch csglm) { this.egbm = egbm; this.csglm = csglm; oddsAdiff = egbm.coefB / (egbm.coefA + egbm.coefB) - csglm.oddsA; oddsBdiff = egbm.coefA / (egbm.coefA + egbm.coefB) - csglm.oddsB; }
private static bool ClosedMatch(CSGLMatch M) { return M.winner == "c"; }
private void getCSGLbtn_Click(object sender, EventArgs e) { // mid = Match ID int mid_from = Convert.ToInt32(csgl_mid_fromBox.Text); int mid_to = Convert.ToInt32(csgl_mid_toBox.Text); MatchesCSGL = new List<CSGLMatch>(); for (int mid = mid_from; mid <= mid_to; mid++) { this.Invalidate(true); if (F.ActiveForm != null) F.ActiveForm.Text = "Matches checked: " + mid.ToString() + "; Matches recorded:" + MatchesCSGL.Count.ToString(); try { CSGLMatch current = new CSGLMatch(); if (current.GetMatch(mid)) MatchesCSGL.Add(current); } catch { } } MatchesCSGL.RemoveAll(ClosedMatch); // remove closed matches; winner = c ActivateCSGL(); }