Example #1
0
 /// <summary>
 /// 从一个活动片中构造活动
 /// </summary>
 /// <param name="uap"></param>
 public UserActivity(UserActivityPiece uap)
 {
     this.Name      = uap.Name;
     this.Detail    = uap.Detail;
     this.CloseTime = uap.CloseTime;
     this.SpanTime  = uap.SpanTime;
 }
Example #2
0
 /// <summary>
 /// 判断某个活动片是否和本活动是同一个软件
 /// </summary>
 /// <param name="uap"></param>
 /// <returns></returns>
 public bool IsSameActivity(UserActivityPiece uap)
 {
     if (uap.Name == this.Name)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #3
0
        /// <summary>
        /// 判断两个活动片是否是同一款软件
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            UserActivityPiece uap2 = obj as UserActivityPiece;

            if (uap2.Name == this.Name)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #4
0
 /// <summary>
 /// 将和本活动是同一软件的活动片的时间叠加到本活动中
 /// </summary>
 /// <param name="uap"></param>
 public void AddUserActivityPiece(UserActivityPiece uap)
 {
     this.Detail    = uap.Detail;  // 保持最新信息
     this.CloseTime = uap.CloseTime;
     this.SpanTime += uap.SpanTime;
 }