/// <summary> /// constructor for en match imellem klub1 og klub2 i stævnet /// </summary> /// <param name="staevne"></param> /// <param name="k1"></param> /// <param name="k2"></param> public Match(int id, Staevne staevne, Klub k1, Klub k2) { Id = id; _staevne = staevne; Klub1 = k1; Klub2 = k2; }
private void _MakeMatches() { List <Klub> klubber = new List <Klub>(); for (int k = 0; k < checkedListClubs.Items.Count; k++) { klubber.Add(checkedListClubs.Items[k] as Klub); } IList <Match> matcher = Staevne.GetMatcher(null, klubber); StringBuilder sb = new StringBuilder(); int j = 1; foreach (Match m in matcher) { sb.AppendLine(j.ToString().PadLeft(2) + " : " + m.Klub1.Navn.ToString().PadRight(25) + " - " + m.Klub2.Navn.ToString().PadRight(25)); j++; } txtMatcher.Text = sb.ToString(); }
public static void MyClassInitialize(TestContext testContext) { teststaevne = new Staevne("unittest6-OS2010"); }
public static void MyClassInitialize(TestContext testContext) { teststaevne = new Staevne("unittest5-EResults"); }
public static string SerializeDivisionsResultat(DivisionsResultat.DivisionsResultat gemDivisionsResultat, Staevne staevne) { XmlAttributeOverrides xOver = new XmlAttributeOverrides(); XmlAttributes attrs = new XmlAttributes(); /* Setting XmlIgnore to false overrides the XmlIgnoreAttribute applied to the Comment field. Thus it will be serialized.*/ attrs.XmlIgnore = false; xOver.Add(typeof(DivisionsResultat.DivisionsResultat), "DivisionsStilling", attrs); return(Util.SerializeObject(gemDivisionsResultat.TotalDivisionsResultat(staevne), xOver)); }
private void frmVisDivisionsResultat_FormClosing(object sender, FormClosingEventArgs e) { Staevne = null; }