public void AddReceiveHttpFile(OfflineFileResponse response) { this.ShowFileList(); NewFileListItem item = new NewFileListItem(response.filename, response.id, response.size, this, this.staff, response.iconString); this.FileList.fileList.Items.Add(item); item.EndEvent = new NewFileListItem.EndEventDelegate(this.FileEndEventHandle); }
private void FileDataRequestEvent(OfflineFileResponse response) { INWindow inWindow = this.dataService.INWindow as INWindow; if (response != null && inWindow != null) { EntStaffTab item = this.dataService.GetStaffChatTab(response.fromUid) as EntStaffTab; if (item == null) { IDKin.IM.Core.Staff staff = this.dataService.GetStaff(response.fromUid); if (staff != null) { item = new EntStaffTab(staff); item.SetFlashingStyle(); ((INWindow)this.dataService.INWindow).ContentTab.Items.Add(item); this.dataService.AddStaffChatTab(staff.Uid, item); } } if (item != null) { PersonalChatTabControl tab = item.TabContent; if (tab != null) { tab.AddReceiveHttpFile(response); if (!this.IsCurrentItem(item)) { item.SetFlashingStyle(); } } } this.PickUpMessageProcessor(); MessageBoxWindow mbw = this.dataModel.GetMessageBox(); if (mbw != null) { mbw.Refresh(); } if (inWindow.WindowState == WindowState.Minimized && item != null) { this.ActiveInWindow(); this.SelectedTab(item); } else { this.ActiveInWindow(); } this.FlashIconPorcessor(); } }
private void StaffMessageCacheProcessor(OfflineFileResponse response, PersonalChatTabControl tab) { System.Collections.Generic.List<Message> list = this.dataModel.GetMessage(response.fromUid, MessageActorType.EntStaff); if (list != null) { foreach (Message message in list) { tab.ChatComponent.AddMessageStaff(message, false); } } DataModel.Instance.RemoveMessage(response.fromUid, MessageActorType.EntStaff); MessageBoxWindow box = this.dataModel.GetMessageBox(); if (box != null) { box.Refresh(); } }