Esempio n. 1
0
 public void FromProtobuf(com.kodgames.corgi.protocol.ActivityData activityData)
 {
     if (activityData != null)
     {
         this.activityType = activityData.activityType;
         this.activityId   = activityData.activityId;
         this.activityInfos.Clear();
         if ((activityData.activityData != null) && (activityData.activityData.Count > 0))
         {
             foreach (com.kodgames.corgi.protocol.ActivityInfo info in activityData.activityData)
             {
                 WeihuaGames.ClientClass.ActivityInfo item = new WeihuaGames.ClientClass.ActivityInfo();
                 item.FromBuffer(info);
                 this.activityInfos.Add(item);
             }
         }
     }
 }
Esempio n. 2
0
 public bool IsEqual(object obj)
 {
     if (!(obj is WeihuaGames.ClientClass.ActivityInfo))
     {
         return(false);
     }
     WeihuaGames.ClientClass.ActivityInfo info = obj as WeihuaGames.ClientClass.ActivityInfo;
     if (((this.openTime != info.OpenTime) || (this.closeTime != info.CloseTime)) || (this.times.Count != info.times.Count))
     {
         return(false);
     }
     for (int i = 0; i < this.times.Count; i++)
     {
         if (!this.times[i].IsEqual(info.times[i]))
         {
             return(false);
         }
     }
     return(true);
 }