コード例 #1
0
 /// <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;
 }
コード例 #2
0
        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();
        }
コード例 #3
0
 public static void MyClassInitialize(TestContext testContext)
 {
     teststaevne = new Staevne("unittest6-OS2010");
 }
コード例 #4
0
 public static void MyClassInitialize(TestContext testContext)
 {
     teststaevne = new Staevne("unittest5-EResults");
 }
コード例 #5
0
        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;
 }