public void AddRecentLink(RecentLinkType type, long id)
 {
     switch (type)
     {
     case RecentLinkType.EntStaffChat:
     {
         this.AddEntStaffLink(id);
         RecentLinkInfo info = new RecentLinkInfo();
         info.Id = id;
         info.Type = IsMarkType.FELLOW;
         info.RecentTime = this.sessionService.CalculateSystemTime();
         DataModel.Instance.RecentLinkInfoList.Add(info);
         break;
     }
     }
 }
        public int CompareRecentLinkValue(IDKin.IM.Windows.Model.RecentLink.RecentLinkInfo infoX, IDKin.IM.Windows.Model.RecentLink.RecentLinkInfo infoY)
        {
            string x = infoX.RecentTime;
            string y = infoY.RecentTime;
            int    result;

            if (x == null)
            {
                if (y == null)
                {
                    result = 0;
                }
                else
                {
                    result = -1;
                }
            }
            else
            {
                if (y == null)
                {
                    result = 1;
                }
                else
                {
                    int retval = x.Length.CompareTo(y.Length);
                    if (retval != 0)
                    {
                        result = retval;
                    }
                    else
                    {
                        result = x.CompareTo(y);
                    }
                }
            }
            return(result);
        }
 private void AddEntStaffLinkListItem(RecentLinkInfo info)
 {
     if (info != null)
     {
         try
         {
             Staff staff = this.dataService.GetStaff(info.Id);
             if (staff != null)
             {
                 if (!this.staffNode.ContainsKey(info.Id) && base.Items.Count < 20)
                 {
                     RecentLinkNode node = new RecentLinkNode(staff);
                     base.Items.Insert(0, node);
                     this.staffNode.Add(info.Id, node);
                     node.LastTime = info.RecentTime;
                 }
             }
         }
         catch (System.ArgumentNullException e)
         {
             this.logger.Error(e.ToString());
         }
         catch (System.Exception e2)
         {
             this.logger.Error(e2.ToString());
         }
     }
 }