コード例 #1
0
 public PersonalChatTabControl(IDKin.IM.Core.Staff staff)
 {
     if (staff != null)
     {
         this.InitializeComponent();
         this.staff = staff;
         this.userHead.ImageSource = staff.HeaderImage42;
         this.tbkName.Text = staff.Name;
         this.tbkID.Text = "(" + staff.Uid + ")";
         this.tbkSignature.Text = staff.Signature;
         this.tbkToolTip.Text = staff.Signature;
         this.ChatComponent.InitData(staff);
         this.ChatComponent.btnGroupShield.Visibility = Visibility.Collapsed;
         this.ChatComponent.PanelChangeContent.Children.Add(this.FileList);
         this.ChatComponent.PanelChangeContent.Children.Add(this.IShowPanel);
         this.ChatComponent.MsgRecordStatus = new ChatComponent.MsgRecordStatusDelegate(this.MsgRecordStatusHandle);
         this.ChatComponent.viewMsgBox.PreviewDragEnter += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.viewMsgBox.PreviewDragOver += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.viewMsgBox.PreviewDrop += new System.Windows.DragEventHandler(this.UserControl_Drop);
         this.ChatComponent.inputMsgBox.PreviewDragEnter += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.inputMsgBox.PreviewDragOver += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.inputMsgBox.PreviewDrop += new System.Windows.DragEventHandler(this.UserControl_Drop);
         this.ShowIShowPanel();
         this.userProfileFrame.NavigationService.Navigate(this.profilePage);
         this.OACurrentWork.crwDocumentManagement.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.DOCUMENT_MANAGEMENT, this.staff, this.OACurrentWork.crwDocumentManagement);
         this.OACurrentWork.crwInsideDiscussion.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.INSIDE_DISCUSSION, this.staff, this.OACurrentWork.crwInsideDiscussion);
         this.OACurrentWork.crwInsideNotice.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.INSIDE_NOTICE, this.staff, this.OACurrentWork.crwInsideNotice);
         this.OACurrentWork.crwProjectManagement.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.PROJECT_MANAGEMENT, this.staff, this.OACurrentWork.crwProjectManagement);
         this.OACurrentWork.crwSystemManagement.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.SYSTEM_MANAGEMENT, this.staff, this.OACurrentWork.crwSystemManagement);
         this.OACurrentWork.crwWorkCooperation.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.WORK_COOPERATION, this.staff, this.OACurrentWork.crwWorkCooperation);
         this.OACurrentWork.crwWorkPlan.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.WORK_PLAN, this.staff, this.OACurrentWork.crwWorkPlan);
     }
 }
コード例 #2
0
 public void AddRosterRequest(long uid, long rosterId, string rosterJid, string message, IDKin.IM.Protocol.Center.User user, long categotyId = 0L)
 {
     RosterAddRequest request = new RosterAddRequest();
     request.category_id = categotyId;
     request.message = message;
     request.rjid = rosterJid;
     request.ruid = rosterId;
     request.uid = uid;
     request.user = user;
     this.connection.Send(PacketType.ROSTER_ADD, request);
 }
コード例 #3
0
 public MarkedRecordItem(IDKin.IM.Core.Staff staff)
 {
     this.InitializeComponent();
     this.InitData();
     this.InitServic();
     this.imgHead.Source = staff.HeaderImageOnline;
     this.tbkName.Text = staff.Name;
     this.tbkDate.Text = staff.CreateTime;
     this.tbkID.Text = staff.Uid.ToString();
     this.st = staff;
 }
コード例 #4
0
 public void AddRosterRequestAsk(long uid, long ruid, string rjid, string message, int type, long categoryId, long rosterCategoryId, IDKin.IM.Protocol.Center.User user)
 {
     RosterAddResponse response = new RosterAddResponse();
     response.category_id = categoryId;
     response.message = message;
     response.rjid = rjid;
     response.roster_category_id = rosterCategoryId;
     response.ruid = ruid;
     response.type = type;
     response.uid = uid;
     response.user = user;
     this.connection.Send(PacketType.ROSTER_ADD_ASK, response);
 }
コード例 #5
0
 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;
 }
コード例 #6
0
 public void AddMessageRecords(IDKin.IM.Core.Message[] messages, int total)
 {
     try
     {
         if (messages != null && this.MsgRecordComp != null)
         {
             this.MsgRecordComp.Clear();
             this.MsgRecordComp.Total = total;
             for (int i = messages.Length - 1; i >= 0; i--)
             {
                 this.MsgRecordComp.AddMessageRecord(messages[i]);
             }
             this.MsgRecordComp.ViewPageButton();
         }
     }
     catch (System.Exception e)
     {
         System.Console.WriteLine(e.ToString());
     }
 }
コード例 #7
0
 public void AddMessageRoster(IDKin.IM.Core.Message message, bool send = false)
 {
     if (message != null)
     {
         this.AddMessageRosterChat(message, send);
     }
 }
コード例 #8
0
 public void AddGroupMessageRecords(IDKin.IM.Core.Message[] messages, int total)
 {
     if (messages != null && this.MsgRecordComp != null)
     {
         this.MsgRecordComp.Clear();
         this.MsgRecordComp.Total = total;
         for (int i = messages.Length - 1; i >= 0; i--)
         {
             this.MsgRecordComp.AddMessageRecord(messages[i]);
         }
         this.MsgRecordComp.ViewPageButton();
     }
 }
コード例 #9
0
 public void AddMessageGroup(IDKin.IM.Core.Message message, bool send = false)
 {
     if (message != null)
     {
         if (message.VOType == 0)
         {
             this.AddMessageGroupChat(message, send);
         }
     }
 }
コード例 #10
0
 private void AddMessageStaffChat(IDKin.IM.Core.Message message, bool send = false)
 {
     Block[] blocks;
     if (send)
     {
         message.MessageString = this.utilService.MessageEncode(message.MessageBlocks);
         blocks = this.utilService.MessageDecode(message.MessageString);
     }
     else
     {
         blocks = message.MessageBlocks;
     }
     if (blocks != null && blocks.Length > 0)
     {
         FlowDocument doc = this.viewMsgBox.Document;
         Staff staff = this.dataService.GetStaff((long)((ulong)Jid.GetUid(message.FromJid)));
         if (staff != null)
         {
             if (message.FromJid == this.sessionService.Jid)
             {
                 doc.Blocks.Add(this.GetNameInfo(staff.Name, this.sessionService.CalculateSystemTime(), true));
             }
             else
             {
                 doc.Blocks.Add(this.GetNameInfo(staff.Name, message.CreateTime));
             }
             Block[] array = blocks;
             for (int i = 0; i < array.Length; i++)
             {
                 Paragraph block = (Paragraph)array[i];
                 this.SetParagraphStyle(block, message.Style);
                 doc.Blocks.Add(block);
             }
             this.ScroolToEnd();
         }
     }
 }
コード例 #11
0
 public void UpdateGroupMemberListHandler(IDKin.IM.Core.Staff staff)
 {
     if (this.GroupMemberControl != null)
     {
         this.GroupMemberControl.GroupMemberList.UpdateGroupMember(staff);
         this.GroupMemberControl.UpdateGroupStaffCount(this.GetGroupMemberOnlineCount(), this.GetGroupMemberTotalCount());
     }
 }
コード例 #12
0
 private void GroupNewMessage(IDKin.IM.Core.Message message)
 {
     EntGroupTab item = this.dataService.GetEntGroupChatTab(message.Gid) as EntGroupTab;
     if (item == null)
     {
         EntGroup group = this.dataService.GetEntGroup(message.Gid);
         if (group != null)
         {
             item = new EntGroupTab(group);
             item.SetDefaultStyle();
             ((INWindow)this.dataService.INWindow).ContentTab.Items.Add(item);
             this.dataService.AddEntGroupChatTab(group.Gid, item);
             ((INWindow)this.dataService.INWindow).ContentTab.SelectedItem = item;
         }
     }
     GroupChatTabControl tab = item.TabContent;
     if (tab != null)
     {
         tab.ChatComponent.AddMessageGroup(message, false);
         tab.ChatComponent.inputMsgBox.Focus();
     }
 }
コード例 #13
0
 private void AddMessageChatNotice(IDKin.IM.Core.Message message)
 {
     if (message != null)
     {
         Paragraph paragraph = new Paragraph();
         paragraph.FontSize = 12.0;
         paragraph.LineHeight = 15.0;
         paragraph.FontFamily = new FontFamily("宋体");
         paragraph.Foreground = new SolidColorBrush(Color.FromRgb(80, 80, 80));
         paragraph.Inlines.Add(new Run("提示:" + message.MessageString));
         this.viewMsgBox.Document.Blocks.Add(paragraph);
         this.ScroolToEnd();
     }
 }
コード例 #14
0
 private string GetMembers(IDKin.IM.Core.CustomGroup c)
 {
     string result = string.Empty;
     string result2;
     if (c == null || c.Members == null)
     {
         result2 = result;
     }
     else
     {
         foreach (IDKin.IM.Core.Staff item in c.Members)
         {
             result = result + item.Uid + ":";
         }
         result2 = result;
     }
     return result2;
 }
コード例 #15
0
 private void CooperationStaffNewMessage(IDKin.IM.Core.Message message)
 {
     CoopStaffTab item = this.dataService.GetCooperationStaffChatTab((long)((ulong)Jid.GetUid(message.FromJid)), message.ProjectId) as CoopStaffTab;
     if (item == null)
     {
         CooperationStaff staff = this.dataService.GetCooperationStaff((long)((ulong)Jid.GetUid(message.FromJid)), message.ProjectId);
         CooperationProjectWrapper cooperationProjectWrapper = this.dataService.GetCooperationProjectWrapper(message.ProjectId);
         if (staff != null && cooperationProjectWrapper != null)
         {
             item = new CoopStaffTab(staff, cooperationProjectWrapper);
             item.SetDefaultStyle();
             ((INWindow)this.dataService.INWindow).ContentTab.Items.Add(item);
             this.dataService.AddCooperationStaffChatTab(staff.Uid, staff.UnitedProjectid, item);
             ((INWindow)this.dataService.INWindow).ContentTab.SelectedItem = item;
         }
     }
     CoopStaffChatTabControl tab = item.TabContent;
     if (tab != null)
     {
         tab.ChatComponent.AddCooperationMessageStaff(message, false);
         tab.ChatComponent.inputMsgBox.Focus();
     }
 }
コード例 #16
0
 public bool ProfileUpdate(IDKin.IM.Core.Staff staff)
 {
     bool result;
     try
     {
         ProfileUpdateRequest request = new ProfileUpdateRequest();
         request.name = staff.Name;
         request.age = staff.Age;
         request.birthday = staff.Birthday;
         request.birthdayType = staff.BirthdayType;
         request.city = staff.City;
         request.country = staff.Country;
         request.email = staff.Email;
         request.job = staff.Job;
         request.mobile = staff.Mobile;
         request.name = staff.Name;
         request.nickname = staff.Nickname;
         request.province = staff.Province;
         request.school = staff.School;
         request.sex = (int)staff.Sex;
         request.signature = staff.Signature;
         request.telphone = staff.Telephone;
         request.uid = staff.Uid;
         request.img = staff.HeaderFileName;
         request.showScope = staff.ShowScope;
         request.description = staff.MyDescription;
         request.site = staff.MyHome;
         request.zodiac = staff.Zodiac;
         request.bloodType = staff.BloodType;
         request.constellation = staff.Constellation;
         request.extension = staff.Extension;
         this.connection = ServiceUtil.Instance.Connection;
         this.connection.Send(PacketType.PROFILE_UPDATE, request);
         result = true;
     }
     catch (System.Exception ex)
     {
         if (this.logger != null)
         {
             this.logger.Error(ex.ToString());
         }
         result = false;
     }
     return result;
 }
コード例 #17
0
ファイル: DataModel.cs プロジェクト: super860327/firstwpftest
 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);
 }
コード例 #18
0
ファイル: DataModel.cs プロジェクト: super860327/firstwpftest
 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);
 }
コード例 #19
0
 public void AddMessageStaff(IDKin.IM.Core.Message message, bool send = false)
 {
     try
     {
         if (message != null)
         {
             if (message.VOType == 0)
             {
                 this.AddMessageStaffChat(message, send);
             }
             if (message.VOType == 1)
             {
                 this.AddMessageAutoReply(message);
             }
             if (message.VOType == 2)
             {
                 message.MessageString = "对方已成功接收文件" + message.MessageString;
                 this.AddMessageChatNotice(message);
             }
             if (message.VOType == 4)
             {
                 message.MessageString = "对方文件" + message.MessageString + "接收失败";
                 this.AddMessageChatNotice(message);
             }
             if (message.VOType == 6)
             {
             }
             if (message.VOType == 3)
             {
             }
             if (message.VOType == 5)
             {
                 message.MessageString = "对方已拒绝接收您的文件" + message.MessageString;
                 this.AddMessageChatNotice(message);
             }
         }
     }
     catch (System.Exception)
     {
         this.AddMessageNotice("发送聊天消息失败.");
     }
 }
コード例 #20
0
ファイル: INWindow.cs プロジェクト: super860327/firstwpftest
 private void SortTheStaff(IDKin.IM.Core.Staff staff, CustomGroupTreeViewItem customGroupTreeViewItem)
 {
     for (int i = 0; i < customGroupTreeViewItem.Items.Count; i++)
     {
         TreeNodeCustomStaff cItem = customGroupTreeViewItem.Items[i] as TreeNodeCustomStaff;
         if (cItem.Staff.Uid == staff.Uid)
         {
             cItem.UpdateInfo();
             System.Collections.Generic.List<TreeNodeCustomStaff> lists = new System.Collections.Generic.List<TreeNodeCustomStaff>(customGroupTreeViewItem.Items.Count);
             for (int j = 0; j < customGroupTreeViewItem.Items.Count; j++)
             {
                 TreeNodeCustomStaff childItem = customGroupTreeViewItem.Items[j] as TreeNodeCustomStaff;
                 lists.Add(childItem);
             }
             customGroupTreeViewItem.Items.Clear();
             IOrderedEnumerable<TreeNodeCustomStaff> v =
                 from t in lists
                 orderby t.Staff.Status == UserStatus.Offline, t.Status == UserStatus.Hide, t.Status == UserStatus.Out, t.Status == UserStatus.DoNotDisturb, t.Status == UserStatus.Busy, t.Status == UserStatus.Meeting, t.Status == UserStatus.Away, t.Status == UserStatus.Online
                 select t;
             foreach (TreeNodeCustomStaff treeNodeCustomStaff in v)
             {
                 customGroupTreeViewItem.Items.Add(treeNodeCustomStaff);
             }
             break;
         }
     }
 }
コード例 #21
0
 private void AddMessageAutoReply(IDKin.IM.Core.Message message)
 {
     FlowDocument doc = this.viewMsgBox.Document;
     Staff staff = this.dataService.GetStaff((long)((ulong)Jid.GetUid(message.FromJid)));
     if (staff != null)
     {
         doc.Blocks.Add(this.GetNameInfo(staff.Name, message.CreateTime));
         Paragraph paragraph = new Paragraph();
         paragraph.FontSize = 12.0;
         paragraph.LineHeight = 15.0;
         paragraph.FontFamily = new FontFamily("宋体");
         paragraph.Foreground = new SolidColorBrush(Color.FromRgb(80, 80, 80));
         paragraph.Inlines.Add(new Run("提示:" + message.MessageString));
         this.viewMsgBox.Document.Blocks.Add(paragraph);
         this.ScroolToEnd();
     }
 }
コード例 #22
0
ファイル: INWindow.cs プロジェクト: super860327/firstwpftest
 private void AddSelfDepartmentJobsLogo(IDKin.IM.Core.Staff staff)
 {
     IDKin.IM.Core.Department department = this.dataService.GetDepartment(staff.DepartmentId);
     if (staff.Uid == department.Uid && this.Employee.SelfDepartmentItem.StaffNode.ContainsKey(staff.Uid))
     {
         SelfDepartmentStaffNode node = this.Employee.SelfDepartmentItem.StaffNode[staff.Uid];
         if (node != null)
         {
             node.ShowJodLogo();
             node.ShowJobName();
         }
     }
 }
コード例 #23
0
 private void AddMessageRosterChat(IDKin.IM.Core.Message message, bool send = false)
 {
     try
     {
         if (send)
         {
             message.MessageString = this.utilService.MessageEncode(message.MessageBlocks);
             Block[] blocks = this.utilService.MessageDecode(message.MessageString);
             if (blocks != null && blocks.Length > 0)
             {
                 FlowDocument doc = this.viewMsgBox.Document;
                 if (message.FromJid == this.sessionService.Jid)
                 {
                     doc.Blocks.Add(this.GetNameInfo(this.sessionService.Name, this.sessionService.CalculateSystemTime(), true));
                 }
                 else
                 {
                     doc.Blocks.Add(this.GetNameInfo(this.sessionService.Name, message.CreateTime));
                 }
                 Block[] array = blocks;
                 for (int i = 0; i < array.Length; i++)
                 {
                     Paragraph block = (Paragraph)array[i];
                     this.SetParagraphStyle(block, message.Style);
                     doc.Blocks.Add(block);
                 }
             }
         }
         else
         {
             Block[] blocks = message.MessageBlocks;
             if (blocks != null && blocks.Length > 0)
             {
                 FlowDocument doc = this.viewMsgBox.Document;
                 Roster roster = this.dataService.GetRoster((long)((ulong)Jid.GetUid(message.FromJid)));
                 if (roster != null)
                 {
                     if (message.FromJid == this.sessionService.Jid)
                     {
                         doc.Blocks.Add(this.GetNameInfo(roster.Name, this.sessionService.CalculateSystemTime(), true));
                     }
                     else
                     {
                         doc.Blocks.Add(this.GetNameInfo(roster.Name, message.CreateTime));
                     }
                     Block[] array = blocks;
                     for (int i = 0; i < array.Length; i++)
                     {
                         Paragraph block = (Paragraph)array[i];
                         this.SetParagraphStyle(block, message.Style);
                         doc.Blocks.Add(block);
                     }
                 }
             }
         }
         this.ScroolToEnd();
     }
     catch (System.ArgumentException ex)
     {
         if (this.logger != null)
         {
             this.logger.Error(ex);
         }
     }
 }
コード例 #24
0
 public bool ChangeStatus(IDKin.IM.Core.Staff staff)
 {
     bool result;
     try
     {
         if (staff != null)
         {
             StaffNoticeRequest request = new StaffNoticeRequest();
             request.signature = staff.Signature;
             request.jid = staff.Jid;
             request.name = staff.Name;
             request.status = (int)staff.Status;
             request.img = staff.HeaderFileName;
             this.connection = ServiceUtil.Instance.Connection;
             this.connection.Send(PacketType.STAFF_NOTICE, request);
         }
         result = true;
     }
     catch (System.Exception ex)
     {
         if (this.logger != null)
         {
             this.logger.Error(ex.ToString());
         }
         result = false;
     }
     return result;
 }
コード例 #25
0
 private void RosterNewMessage(IDKin.IM.Core.Message msg)
 {
     RosterTab item = this.dataService.GetRosterChatTab((long)((ulong)Jid.GetUid(msg.FromJid))) as RosterTab;
     if (item == null)
     {
         Roster roster = this.dataService.GetRoster((long)((ulong)Jid.GetUid(msg.FromJid)));
         if (roster != null)
         {
             item = new RosterTab(roster);
             item.SetDefaultStyle();
             ((INWindow)this.dataService.INWindow).ContentTab.Items.Add(item);
             this.dataService.AddRosterChatTab(roster.Uid, item);
             ((INWindow)this.dataService.INWindow).ContentTab.SelectedItem = item;
         }
     }
     FriendsChatTabControl tab = item.TabContent;
     if (tab != null)
     {
         tab.ChatComponent.AddMessageRoster(msg, false);
         tab.ChatComponent.inputMsgBox.Focus();
     }
 }
コード例 #26
0
 private void AddChildren(IDKin.IM.Core.CustomGroup group, CustomGroupTreeViewItem item)
 {
     try
     {
         if (group != null && group.Members != null && group.Members.Count != 0)
         {
             IOrderedEnumerable<IDKin.IM.Core.Staff> v =
                 from t in @group.Members
                 orderby t.Status == UserStatus.Offline, t.Status == UserStatus.Hide, t.Status == UserStatus.Out, t.Status == UserStatus.DoNotDisturb, t.Status == UserStatus.Busy, t.Status == UserStatus.Meeting, t.Status == UserStatus.Away, t.Status == UserStatus.Online
                 select t;
             foreach (IDKin.IM.Core.Staff staff in v)
             {
                 TreeNodeCustomStaff node = new TreeNodeCustomStaff(staff);
                 node.SessionService = this.sessionService;
                 node.DataService = this.dataService;
                 node.ContextMenu = this.GetContextMenuForStaff(node);
                 item.Items.Add(node);
             }
         }
     }
     catch (System.Exception ex)
     {
         System.Console.WriteLine(ex.ToString());
     }
 }
コード例 #27
0
ファイル: INWindow.cs プロジェクト: super860327/firstwpftest
 private void UpdateCustomGroup(IDKin.IM.Core.Staff staff)
 {
     if (this.Employee.FirstTreeView != null && this.Employee.FirstTreeView.Items.Count != 0)
     {
         foreach (TreeViewItem item in (System.Collections.IEnumerable)this.Employee.FirstTreeView.Items)
         {
             CustomGroupTreeViewItem customGroupTreeViewItem = item as CustomGroupTreeViewItem;
             if (customGroupTreeViewItem != null)
             {
                 if (customGroupTreeViewItem.Items.Count > 0)
                 {
                     this.SortTheStaff(staff, customGroupTreeViewItem);
                 }
                 if (customGroupTreeViewItem.addMemberCustomGroupWindow != null)
                 {
                     customGroupTreeViewItem.addMemberCustomGroupWindow.UpdateMember(staff);
                 }
             }
         }
     }
 }
コード例 #28
0
 private void StaffNewMessage(IDKin.IM.Core.Message message)
 {
     EntStaffTab item = this.dataService.GetStaffChatTab((long)((ulong)Jid.GetUid(message.FromJid))) as EntStaffTab;
     if (item == null)
     {
         Staff staff = this.dataService.GetStaff((long)((ulong)Jid.GetUid(message.FromJid)));
         if (staff != null)
         {
             item = new EntStaffTab(staff);
             item.SetDefaultStyle();
             ((INWindow)this.dataService.INWindow).ContentTab.Items.Add(item);
             this.dataService.AddStaffChatTab(staff.Uid, item);
             ((INWindow)this.dataService.INWindow).ContentTab.SelectedItem = item;
         }
     }
     PersonalChatTabControl tab = item.TabContent;
     if (tab != null)
     {
         tab.ChatComponent.AddMessageStaff(message, false);
         tab.ChatComponent.inputMsgBox.Focus();
     }
 }
コード例 #29
0
ファイル: INWindow.cs プロジェクト: super860327/firstwpftest
 private void EntGroupMemberUpdate(IDKin.IM.Core.Staff staff)
 {
     foreach (TabItem item in this.dataService.GetEntGroupChatTabs().Values)
     {
         CloseableTabItem closeItem = item as CloseableTabItem;
         if (closeItem != null)
         {
             GroupChatTabControl tab = closeItem.Content as GroupChatTabControl;
             if (tab != null)
             {
                 tab.UpdateGroupMemberListHandler(staff);
             }
         }
     }
 }
コード例 #30
0
 private IDKin.IM.Core.Message[] ChatContentMaxLengthProcessor(bool send, FlowDocument doc, Block[] blocks, ref IDKin.IM.Core.Message[] messages)
 {
     TextRange tr = new TextRange(this.inputMsgBox.Document.ContentStart, this.inputMsgBox.Document.ContentEnd);
     if (tr.Text.Length < this.ContentMaxLength)
     {
         messages = new IDKin.IM.Core.Message[1];
         messages[0] = new IDKin.IM.Core.Message();
         messages[0].MessageBlocks = blocks;
         messages[0].Style = this.messageStyle;
     }
     else
     {
         string[] contents = this.ContentToArray(tr.Text, this.ContentMaxLength);
         if (contents != null && contents.Length > 0)
         {
             messages = new IDKin.IM.Core.Message[contents.Length];
             for (int i = 0; i < contents.Length; i++)
             {
                 messages[i] = new IDKin.IM.Core.Message();
                 Paragraph[] tempParagraph = new Paragraph[]
                 {
                     new Paragraph()
                 };
                 tempParagraph[0].Inlines.Add(new Run(contents[i]));
                 messages[i].MessageBlocks = tempParagraph;
                 messages[i].Style = this.messageStyle;
             }
         }
     }
     if (send)
     {
         doc.Blocks.Clear();
     }
     return messages;
 }