Example #1
0
        /// <summary>
        /// 打开页面标签
        /// </summary>
        /// <param name="host"></param>
        public IChatService OpenChatTab(Host host, bool createNew)
        {
            IChatService cs = chats.SingleOrDefault(s => s.Host == host);

            if (cs == null && createNew)
            {
                //初始化
                cs = new IEView.IETabPage();
                cs.BindHost(host);
                //绑定事件
                cs.FileSendRequest     += cs_FileSendRequest;
                cs.TaskDiscardRequired += cs_TaskDiscardRequired;
                cs.TaskAccepted        += cs_TaskAccepted;

                this.TabPages.Add(cs as TabPage);
                chats.Add(cs);
                OnSessionCountChanged(new EventArgs());
            }

            return(cs);
        }
Example #2
0
		/// <summary>
		/// 打开页面标签
		/// </summary>
		/// <param name="host"></param>
		public IChatService OpenChatTab(Host host, bool createNew)
		{
			IChatService cs = chats.SingleOrDefault(s => s.Host == host);

			if (cs == null && createNew)
			{
				//初始化
				cs = new IEView.IETabPage();
				cs.BindHost(host);
				//绑定事件
				cs.FileSendRequest += cs_FileSendRequest;
				cs.TaskDiscardRequired += cs_TaskDiscardRequired;
				cs.TaskAccepted += cs_TaskAccepted;

				this.TabPages.Add(cs as TabPage);
				chats.Add(cs);
				OnSessionCountChanged(new EventArgs());
			}

			return cs;
		}