internal RegionDataInfo[] GetRegionDataInfo(int boxID) { List<DB_Talk.Model.m_RegionInfo> dataList = new DB_Talk.BLL.m_RegionInfo().GetModelList(string.Format("BoxID = {0}", boxID)); List<RegionDataInfo> queryDataList = new List<RegionDataInfo>(); foreach (DB_Talk.Model.m_RegionInfo sqlData in dataList) { RegionDataInfo data = new RegionDataInfo(); data.RegionID = sqlData.ID; data.Name = sqlData.vc_Name; data.Memo = sqlData.vc_Memo; data.IncludePersonCount = sqlData.i_IncludePersonCount; queryDataList.Add(data); } return queryDataList.ToArray(); }
/// <summary> /// 根据区域数据创建区域控件 /// </summary> /// <param name="data"></param> private void CreateRegionControlByData(RegionDataInfo data) { SingleRegionControl regionControl = new SingleRegionControl(); regionControl.Tag = data; regionControl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(36)))), ((int)(((byte)(41)))), ((int)(((byte)(48))))); regionControl.Dock = System.Windows.Forms.DockStyle.Fill; m_RegionControlCache.Add(data.RegionID, regionControl); DevComponents.DotNetBar.SuperTabControlPanel superTabControlPanel = new DevComponents.DotNetBar.SuperTabControlPanel(); superTabControlPanel.Controls.Add(regionControl); this.superTabControlRegion.Controls.Add(superTabControlPanel); DevComponents.DotNetBar.SuperTabItem currentTab = new DevComponents.DotNetBar.SuperTabItem(); currentTab.SelectedTabFont = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Bold); DevComponents.DotNetBar.Rendering.SuperTabLinearGradientColorTable superTabLinearGradientColorTable1 = new DevComponents.DotNetBar.Rendering.SuperTabLinearGradientColorTable(); superTabLinearGradientColorTable1.Colors = new System.Drawing.Color[] { System.Drawing.Color.FromArgb(((int)(((byte)(36)))), ((int)(((byte)(41)))), ((int)(((byte)(48))))), System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(113)))), ((int)(((byte)(130)))))}; DevComponents.DotNetBar.Rendering.SuperTabItemStateColorTable superTabItemStateColorTable1 = new DevComponents.DotNetBar.Rendering.SuperTabItemStateColorTable(); superTabItemStateColorTable1.Background = superTabLinearGradientColorTable1; DevComponents.DotNetBar.Rendering.SuperTabColorStates superTabColorStates1 = new DevComponents.DotNetBar.Rendering.SuperTabColorStates(); superTabColorStates1.Selected = superTabItemStateColorTable1; DevComponents.DotNetBar.Rendering.SuperTabItemColorTable superTabItemColorTable1 = new DevComponents.DotNetBar.Rendering.SuperTabItemColorTable(); superTabItemColorTable1.Bottom = superTabColorStates1; currentTab.TabColor = superTabItemColorTable1; currentTab.AttachedControl = superTabControlPanel; currentTab.GlobalItem = false; currentTab.Text = data.Name; currentTab.Tag = data; this.superTabControlRegion.Tabs.Add(currentTab); currentTab.TabFont = new Font("宋体", 16F, System.Drawing.FontStyle.Bold); currentTab.SelectedTabFont = new Font("宋体", 16F, System.Drawing.FontStyle.Bold); currentTab.TabColor = new DevComponents.DotNetBar.Rendering.SuperTabItemColorTable() { Default = new DevComponents.DotNetBar.Rendering.SuperTabColorStates() { Normal = new DevComponents.DotNetBar.Rendering.SuperTabItemStateColorTable() { Background = new DevComponents.DotNetBar.Rendering.SuperTabLinearGradientColorTable() { Colors = new System.Drawing.Color[] { Pub.TabNormalColor } }, Text = Color.White }, Selected = new DevComponents.DotNetBar.Rendering.SuperTabItemStateColorTable() { Background = new DevComponents.DotNetBar.Rendering.SuperTabLinearGradientColorTable() { Colors = new System.Drawing.Color[] { Pub.TabSelectColor } }, Text = Color.Black }, MouseOver = new DevComponents.DotNetBar.Rendering.SuperTabItemStateColorTable() { Background = new DevComponents.DotNetBar.Rendering.SuperTabLinearGradientColorTable() { Colors = new System.Drawing.Color[] { Color.White, Color.FromArgb(255, 192, 128) } } } } }; }