using SuperMap.Data; using SuperMap.Mapping; using SuperMap.UI; using System; using System.Collections.Generic; using System.Data; using System.Drawing; using WeifenLuo.WinFormsUI.Docking; using WWPipeLine.MapBasic.Conditions; using WWPipeLine.MapBasic; using System.Windows.Forms; namespace WWPipeLine.MapTools.Conditions.Locations { public class SearchOnXFSPT : ConditionPanel { public SearchOnXFSPT() : base() { this.ConditionPanelName = "按照消防栓定位"; this.SetSize(800, 450); InitializeComponent(); } private DatasetVector _dv; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.CheckedListBox clbDZMS; private GroupBox groupBox2; private CheckedListBox clbCZ; private GroupBox groupBox3; private CheckedListBox clbXH; private GroupBox groupBox4; private CheckedListBox clbGG; protected override void OnLoad(EventArgs e) { _dv = ComsStatic.Datasource.Datasets["JSXFSPT"] as DatasetVector; if (_dv == null) { Sunny.UI.UIMessageTip.ShowError("当前数据源中不包含相应的矢量数据集", 5000); this.ParentForm.Close(); return; } if (!ComsStatic.HasField(_dv, "xh") || !ComsStatic.HasField(_dv, "cz") || !ComsStatic.HasField(_dv, "gg") || !ComsStatic.HasField(_dv, "dzms")) { Sunny.UI.UIMessageTip.ShowError("当前矢量数据集没有相应的信息", 5000); this.ParentForm.Close(); return; } ComsStatic.BindDataTableOnCheckedListBox(_dv, clbXH, "xh"); ComsStatic.BindDataTableOnCheckedListBox(_dv, clbCZ, "cz"); ComsStatic.BindDataTableOnCheckedListBox(_dv, clbGG, "gg"); ComsStatic.BindDataTableOnCheckedListBox(_dv, clbDZMS, "dzms"); } public override object Do(DockPanel dockPanel = null) { Dictionary dic = new Dictionary(); dic.Add("xh", clbXH); dic.Add("gg", clbGG); dic.Add("cz", clbCZ); dic.Add("dzms", clbDZMS); return ComsStatic.QueryDataTable(_dv, ComsStatic.getSqlCheckListBox(dic), ComsStatic.resultFields); } #region 界面布局 private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); this.clbDZMS = new System.Windows.Forms.CheckedListBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.clbCZ = new System.Windows.Forms.CheckedListBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.clbXH = new System.Windows.Forms.CheckedListBox(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.clbGG = new System.Windows.Forms.CheckedListBox(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.clbDZMS); this.groupBox1.Location = new System.Drawing.Point(601, 5); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(194, 350); this.groupBox1.TabIndex = 14; this.groupBox1.TabStop = false; this.groupBox1.Text = "地址描述"; // // clbDZMS // this.clbDZMS.CheckOnClick = true; this.clbDZMS.Dock = System.Windows.Forms.DockStyle.Fill; this.clbDZMS.Location = new System.Drawing.Point(3, 25); this.clbDZMS.Name = "clbDZMS"; this.clbDZMS.Size = new System.Drawing.Size(188, 322); this.clbDZMS.TabIndex = 0; // // groupBox2 // this.groupBox2.Controls.Add(this.clbCZ); this.groupBox2.Location = new System.Drawing.Point(205, 5); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(194, 350); this.groupBox2.TabIndex = 15; this.groupBox2.TabStop = false; this.groupBox2.Text = "材质"; // // clbCZ // this.clbCZ.CheckOnClick = true; this.clbCZ.Dock = System.Windows.Forms.DockStyle.Fill; this.clbCZ.Location = new System.Drawing.Point(3, 25); this.clbCZ.Name = "clbCZ"; this.clbCZ.Size = new System.Drawing.Size(188, 322); this.clbCZ.TabIndex = 0; // // groupBox3 // this.groupBox3.Controls.Add(this.clbXH); this.groupBox3.Location = new System.Drawing.Point(7, 5); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(194, 350); this.groupBox3.TabIndex = 15; this.groupBox3.TabStop = false; this.groupBox3.Text = "型号"; // // clbXH // this.clbXH.CheckOnClick = true; this.clbXH.Dock = System.Windows.Forms.DockStyle.Fill; this.clbXH.Location = new System.Drawing.Point(3, 25); this.clbXH.Name = "clbXH"; this.clbXH.Size = new System.Drawing.Size(188, 322); this.clbXH.TabIndex = 0; // // groupBox4 // this.groupBox4.Controls.Add(this.clbGG); this.groupBox4.Location = new System.Drawing.Point(403, 5); this.groupBox4.Name = "groupBox4"; this.groupBox4.Size = new System.Drawing.Size(194, 350); this.groupBox4.TabIndex = 15; this.groupBox4.TabStop = false; this.groupBox4.Text = "规格"; // // clbGG // this.clbGG.CheckOnClick = true; this.clbGG.Dock = System.Windows.Forms.DockStyle.Fill; this.clbGG.Location = new System.Drawing.Point(3, 25); this.clbGG.Name = "clbGG"; this.clbGG.Size = new System.Drawing.Size(188, 322); this.clbGG.TabIndex = 0; // // SearchOnXFSPT // this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox1); this.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(242)))), ((int)(((byte)(242)))), ((int)(((byte)(244))))); this.Name = "SearchOnXFSPT"; this.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(140)))), ((int)(((byte)(140)))), ((int)(((byte)(140))))); this.Size = new System.Drawing.Size(800, 365); this.Style = Sunny.UI.UIStyle.Gray; this.groupBox1.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); this.ResumeLayout(false); } #endregion } }