/// <summary> /// 添加监控面板 /// </summary> /// <param name="tabName"></param> /// <returns></returns> public virtual async Task<WatchTab> AddTabAsync(string tabName) { if (WatchTabs.Any(p => p.TabName == tabName)) return null; var watchTab = new WatchTab(tabName); WatchTabs.Add(watchTab); this.ExecuteTabAddEvent(watchTab); return watchTab; }
/// <summary> /// 添加监控面板 /// </summary> /// <param name="tabName"></param> /// <returns></returns> public virtual async Task <WatchTab> AddTabAsync(string tabName) { if (WatchTabs.Any(p => p.TabName == tabName)) { return(null); } var watchTab = new WatchTab(tabName); WatchTabs.Add(watchTab); this.ExecuteTabAddEvent(watchTab); return(watchTab); }
/// <summary> /// 执行选项卡添加事件 /// </summary> /// <param name="sender"></param> internal void ExecuteTabAddEvent(WatchTab sender) { OnTabAdd(sender, new EventArgs()); }