public MessageBoxItem(MessageActorType type, long id, string name, string count, ImageSource imageSource)
 {
     this.InitializeComponent();
     this.messageType    = type;
     this.id             = id;
     this.imgFace.Source = imageSource;
     this.tbkName.Text   = name;
     this.tbkCount.Text  = "(" + count + ")";
     this.inWindow       = (this.dataService.INWindow as INWindow);
 }
 public MessageBoxItem(MessageActorType type, long id, string name, string count, ImageSource imageSource)
 {
     this.InitializeComponent();
     this.messageType = type;
     this.id = id;
     this.imgFace.Source = imageSource;
     this.tbkName.Text = name;
     this.tbkCount.Text = "(" + count + ")";
     this.inWindow = (this.dataService.INWindow as INWindow);
 }
Exemplo n.º 3
0
        private BaseTab FindChatTab(MessageActorType type, long id, string projectid)
        {
            INWindow inWindow = this.dataService.INWindow as INWindow;
            BaseTab  result;

            if (inWindow != null)
            {
                ItemCollection ic = inWindow.ContentTab.Items;
                foreach (TabItem item in (System.Collections.IEnumerable)ic)
                {
                    if (item != null)
                    {
                        BaseTab cti = item as BaseTab;
                        if (MessageActorType.EntGroup == type)
                        {
                            GroupChatTabControl gctc = item.Content as GroupChatTabControl;
                            if (gctc != null && gctc.GroupId == id)
                            {
                                result = cti;
                                return(result);
                            }
                        }
                        if (MessageActorType.EntStaff == type)
                        {
                            PersonalChatTabControl pctc = item.Content as PersonalChatTabControl;
                            if (pctc != null && pctc.StaffId == id)
                            {
                                result = cti;
                                return(result);
                            }
                        }
                        if (MessageActorType.Roster == type)
                        {
                            FriendsChatTabControl fctc = item.Content as FriendsChatTabControl;
                            if (fctc != null && fctc.RosterId == id)
                            {
                                result = cti;
                                return(result);
                            }
                        }
                        if (MessageActorType.CooperationStaff == type)
                        {
                            CoopStaffChatTabControl coopStaffChatTabControl = item.Content as CoopStaffChatTabControl;
                            if (coopStaffChatTabControl != null && coopStaffChatTabControl.Uid == id && coopStaffChatTabControl.Projectid == projectid)
                            {
                                result = cti;
                                return(result);
                            }
                        }
                    }
                }
            }
            result = null;
            return(result);
        }
 private bool HasCoopeationSelectedItem(MessageActorType selecteItemType, string itemId)
 {
     return(this.messageType == selecteItemType && itemId == this.projectid);
 }
 private bool HasSelectedItem(MessageActorType selecteItemType, long itemId)
 {
     return(this.messageType == selecteItemType && itemId == this.id);
 }
Exemplo n.º 6
0
 private BaseTab FindChatTab(MessageActorType type, long id, string projectid)
 {
     INWindow inWindow = this.dataService.INWindow as INWindow;
     BaseTab result;
     if (inWindow != null)
     {
         ItemCollection ic = inWindow.ContentTab.Items;
         foreach (TabItem item in (System.Collections.IEnumerable)ic)
         {
             if (item != null)
             {
                 BaseTab cti = item as BaseTab;
                 if (MessageActorType.EntGroup == type)
                 {
                     GroupChatTabControl gctc = item.Content as GroupChatTabControl;
                     if (gctc != null && gctc.GroupId == id)
                     {
                         result = cti;
                         return result;
                     }
                 }
                 if (MessageActorType.EntStaff == type)
                 {
                     PersonalChatTabControl pctc = item.Content as PersonalChatTabControl;
                     if (pctc != null && pctc.StaffId == id)
                     {
                         result = cti;
                         return result;
                     }
                 }
                 if (MessageActorType.Roster == type)
                 {
                     FriendsChatTabControl fctc = item.Content as FriendsChatTabControl;
                     if (fctc != null && fctc.RosterId == id)
                     {
                         result = cti;
                         return result;
                     }
                 }
                 if (MessageActorType.CooperationStaff == type)
                 {
                     CoopStaffChatTabControl coopStaffChatTabControl = item.Content as CoopStaffChatTabControl;
                     if (coopStaffChatTabControl != null && coopStaffChatTabControl.Uid == id && coopStaffChatTabControl.Projectid == projectid)
                     {
                         result = cti;
                         return result;
                     }
                 }
             }
         }
     }
     result = null;
     return result;
 }
Exemplo n.º 7
0
 public void RemoveMessage(long id, MessageActorType type)
 {
     if (this.messageCache.ContainsKey(type.ToString() + id))
     {
         this.messageCache.Remove(type.ToString() + id);
     }
     this.RemoveMessageSort(type.ToString() + id);
     this.RemoveMessageBoxSort(type.ToString() + id);
 }
Exemplo n.º 8
0
 public void RemoveCooperationStatffMessage(long id, string projectid, MessageActorType type)
 {
     string key = type.ToString() + CooperationStaff.GetUidAndProjectid(id, projectid);
     if (this.messageCache.ContainsKey(key))
     {
         this.messageCache.Remove(key);
     }
     this.RemoveMessageSort(key);
     this.RemoveMessageBoxSort(key);
 }
Exemplo n.º 9
0
 public System.Collections.Generic.List<IDKin.IM.Core.Message> GetMessage(long id, MessageActorType type)
 {
     System.Collections.Generic.List<IDKin.IM.Core.Message> result;
     if (this.messageCache.ContainsKey(type.ToString() + id))
     {
         result = this.messageCache[type.ToString() + id];
     }
     else
     {
         result = null;
     }
     return result;
 }
Exemplo n.º 10
0
 public System.Collections.Generic.List<IDKin.IM.Core.Message> GetCooperationStaffMessage(long id, string projectid, MessageActorType type)
 {
     string key = type.ToString() + CooperationStaff.GetUidAndProjectid(id, projectid);
     System.Collections.Generic.List<IDKin.IM.Core.Message> result;
     if (this.messageCache.ContainsKey(key))
     {
         result = this.messageCache[key];
     }
     else
     {
         result = null;
     }
     return result;
 }
Exemplo n.º 11
0
 public void AddMessage(long id, MessageActorType type, IDKin.IM.Core.Message message)
 {
     string key = type.ToString() + id;
     if (!this.messageCache.ContainsKey(key))
     {
         System.Collections.Generic.List<IDKin.IM.Core.Message> list = new System.Collections.Generic.List<IDKin.IM.Core.Message>();
         this.messageCache.Add(key, list);
     }
     System.Collections.Generic.List<IDKin.IM.Core.Message> messageList = this.messageCache[key];
     messageList.Add(message);
     this.AddMessageSort(key);
     this.AddMessageBoxSort(key);
 }
Exemplo n.º 12
0
 public void AddCooperationStatffMessage(long id, string projectid, MessageActorType type, IDKin.IM.Core.Message message)
 {
     string key = type.ToString() + CooperationStaff.GetUidAndProjectid(id, projectid);
     if (!this.messageCache.ContainsKey(key))
     {
         System.Collections.Generic.List<IDKin.IM.Core.Message> list = new System.Collections.Generic.List<IDKin.IM.Core.Message>();
         this.messageCache.Add(key, list);
     }
     System.Collections.Generic.List<IDKin.IM.Core.Message> messageList = this.messageCache[key];
     messageList.Add(message);
     this.AddMessageSort(key);
     this.AddMessageBoxSort(key);
 }
Exemplo n.º 13
0
 private bool HasSelectedItem(MessageActorType selecteItemType, long itemId)
 {
     return this.messageType == selecteItemType && itemId == this.id;
 }
Exemplo n.º 14
0
 private bool HasCoopeationSelectedItem(MessageActorType selecteItemType, string itemId)
 {
     return this.messageType == selecteItemType && itemId == this.projectid;
 }