Exemplo n.º 1
0
 public void ReadFromFile(string text1)
 {
     XmlReader reader = null;
     this._objRuleList.Clear();
     reader = new XmlTextReader(text1);
     while (reader.Read())
     {
         if (((reader.NodeType != XmlNodeType.Element) || (reader.Name.ToUpper() != "LiveBettingRule".ToUpper())) || (reader.AttributeCount <= 0))
         {
             continue;
         }
         LiveBettingRule item = new LiveBettingRule();
         while (reader.MoveToNextAttribute())
         {
             string str3 = reader.Name.ToUpper();
             if (str3 == "MinuteFrom".ToUpper())
             {
                 item.set_MinuteFrom(Conversions.ToInteger(reader.Value));
             }
             else
             {
                 if (str3 == "MinuteTo".ToUpper())
                 {
                     item.set_MinuteTo(Conversions.ToInteger(reader.Value));
                     continue;
                 }
                 if (str3 == "BetChoose".ToUpper())
                 {
                     item.set_BetChoose((EnumCollection.eBetChoose) Conversions.ToInteger(reader.Value));
                     continue;
                 }
                 if (str3 == "OddDifferentFrom".ToUpper())
                 {
                     item.set_OddDifferentFrom(Conversions.ToDouble(reader.Value));
                     continue;
                 }
                 if (str3 == "OddDifferentTo".ToUpper())
                 {
                     item.set_OddDifferentTo(Conversions.ToDouble(reader.Value));
                     continue;
                 }
                 if (str3 == "BetAmount".ToUpper())
                 {
                     item.set_BetAmount(Conversions.ToInteger(reader.Value));
                 }
             }
         }
         this._objRuleList.Add(item);
     }
     reader.Close();
 }
Exemplo n.º 2
0
 public void InitializeList(int num1, int num3, EnumCollection.eBetChoose choose1, double num5, double num6, int num4)
 {
     int num = 0;
     this._objRuleList.Clear();
     int num2 = num3;
     for (num = num1; num <= num2; num++)
     {
         LiveBettingRule item = new LiveBettingRule();
         item.set_BetAmount(num4);
         item.set_BetChoose(choose1);
         item.set_MinuteFrom(num);
         item.set_MinuteTo(num);
         item.set_OddDifferentFrom(num5);
         item.set_OddDifferentTo(num6);
         this._objRuleList.Add(item);
     }
 }