diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources index 58ecaa2..11c13d8 100644 --- a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources +++ b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources index 58ecaa2..11c13d8 100644 --- a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources +++ b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index ce07e15..b1ae22e 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources index 58ecaa2..11c13d8 100644 --- a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources +++ b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index ce07e15..b1ae22e 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index cb2f611..c35ca75 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources index 58ecaa2..11c13d8 100644 --- a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources +++ b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index ce07e15..b1ae22e 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index cb2f611..c35ca75 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.exe b/obj/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/obj/x86/Debug/EMSCyberpipe.exe +++ b/obj/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources index 58ecaa2..11c13d8 100644 --- a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources +++ b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index ce07e15..b1ae22e 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index cb2f611..c35ca75 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.exe b/obj/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/obj/x86/Debug/EMSCyberpipe.exe +++ b/obj/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.pdb b/obj/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/obj/x86/Debug/EMSCyberpipe.pdb +++ b/obj/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources index 58ecaa2..11c13d8 100644 --- a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources +++ b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index ce07e15..b1ae22e 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index cb2f611..c35ca75 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.exe b/obj/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/obj/x86/Debug/EMSCyberpipe.exe +++ b/obj/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.pdb b/obj/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/obj/x86/Debug/EMSCyberpipe.pdb +++ b/obj/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/obj/x86/Debug/GenerateResource.read.1.tlog b/obj/x86/Debug/GenerateResource.read.1.tlog index ffb1c26..2e7aedc 100644 --- a/obj/x86/Debug/GenerateResource.read.1.tlog +++ b/obj/x86/Debug/GenerateResource.read.1.tlog Binary files differ diff --git a/Cyberpipe.csproj b/Cyberpipe.csproj index b88d61a..fe600e5 100644 --- a/Cyberpipe.csproj +++ b/Cyberpipe.csproj @@ -75,6 +75,10 @@ AllRules.ruleset + + False + bin\x86\Debug\Aspose.Cells.dll + False bin\x86\Debug\DevComponents.DotNetBar2.dll diff --git a/Cyberpipe.suo b/Cyberpipe.suo index bb45f87..0baaf3a 100644 --- a/Cyberpipe.suo +++ b/Cyberpipe.suo Binary files differ diff --git a/EMS_Forms/Form_EventManager.Designer.cs b/EMS_Forms/Form_EventManager.Designer.cs index be32759..f948ee9 100644 --- a/EMS_Forms/Form_EventManager.Designer.cs +++ b/EMS_Forms/Form_EventManager.Designer.cs @@ -28,31 +28,9 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dataGridViewX_Event = new DevComponents.DotNetBar.Controls.DataGridViewX(); - this.编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报时间 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件描述 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.纬度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.事件地点 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.经度 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.上报人员 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.任务编号 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理结果 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.处理状态 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.序号 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn(); - this.编辑结果 = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn(); this.buttonX_search = new DevComponents.DotNetBar.ButtonX(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.lab_page_msg = new DevComponents.DotNetBar.LabelItem(); - this.btn_page_first = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_pre = new DevComponents.DotNetBar.ButtonItem(); - this.combo_page_num = new DevComponents.DotNetBar.ComboBoxItem(); - this.btn_page_next = new DevComponents.DotNetBar.ButtonItem(); - this.btn_page_last = new DevComponents.DotNetBar.ButtonItem(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.label3 = new System.Windows.Forms.Label(); @@ -60,161 +38,12 @@ this.label2 = new System.Windows.Forms.Label(); this.comboBox_name = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).BeginInit(); + this.winGridViewPager1 = new WHC.Pager.WinControl.WinGridViewPager(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // dataGridViewX_Event - // - this.dataGridViewX_Event.AllowUserToAddRows = false; - this.dataGridViewX_Event.AllowUserToDeleteRows = false; - this.dataGridViewX_Event.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dataGridViewX_Event.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewX_Event.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.编号, - this.上报时间, - this.事件描述, - this.纬度, - this.事件地点, - this.经度, - this.上报人员, - this.人员编号, - this.任务编号, - this.处理结果, - this.处理状态, - this.序号, - this.编辑结果}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX_Event.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewX_Event.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Event.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); - this.dataGridViewX_Event.Location = new System.Drawing.Point(3, 17); - this.dataGridViewX_Event.Name = "dataGridViewX_Event"; - this.dataGridViewX_Event.ReadOnly = true; - this.dataGridViewX_Event.RowTemplate.Height = 23; - this.dataGridViewX_Event.Size = new System.Drawing.Size(840, 317); - this.dataGridViewX_Event.TabIndex = 1; - this.dataGridViewX_Event.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX_Event_CellContentClick); - this.dataGridViewX_Event.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridViewX_Event_MouseDoubleClick); - // - // 编号 - // - this.编号.DataPropertyName = "DBID"; - this.编号.HeaderText = "编号"; - this.编号.Name = "编号"; - this.编号.ReadOnly = true; - this.编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.编号.Visible = false; - // - // 上报时间 - // - this.上报时间.DataPropertyName = "ACCIDENTTIME"; - this.上报时间.HeaderText = "上报时间"; - this.上报时间.Name = "上报时间"; - this.上报时间.ReadOnly = true; - this.上报时间.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 事件描述 - // - this.事件描述.DataPropertyName = "DESCRIBE"; - this.事件描述.HeaderText = "事件描述"; - this.事件描述.Name = "事件描述"; - this.事件描述.ReadOnly = true; - this.事件描述.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 纬度 - // - this.纬度.DataPropertyName = "LATITUDE"; - this.纬度.HeaderText = "纬度"; - this.纬度.Name = "纬度"; - this.纬度.ReadOnly = true; - this.纬度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.纬度.Visible = false; - // - // 事件地点 - // - this.事件地点.DataPropertyName = "LOCALE"; - this.事件地点.HeaderText = "事件地点"; - this.事件地点.Name = "事件地点"; - this.事件地点.ReadOnly = true; - this.事件地点.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 经度 - // - this.经度.DataPropertyName = "LONGITUDE"; - this.经度.HeaderText = "经度"; - this.经度.Name = "经度"; - this.经度.ReadOnly = true; - this.经度.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.经度.Visible = false; - // - // 上报人员 - // - this.上报人员.DataPropertyName = "PATROLERNAME"; - this.上报人员.HeaderText = "上报人员"; - this.上报人员.Name = "上报人员"; - this.上报人员.ReadOnly = true; - this.上报人员.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 人员编号 - // - this.人员编号.DataPropertyName = "PATROLER_ID"; - this.人员编号.HeaderText = "人员编号"; - this.人员编号.Name = "人员编号"; - this.人员编号.ReadOnly = true; - this.人员编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.人员编号.Visible = false; - // - // 任务编号 - // - this.任务编号.DataPropertyName = "TASK_ID"; - this.任务编号.HeaderText = "任务编号"; - this.任务编号.Name = "任务编号"; - this.任务编号.ReadOnly = true; - this.任务编号.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理结果 - // - this.处理结果.DataPropertyName = "RESULT"; - this.处理结果.HeaderText = "处理结果"; - this.处理结果.Name = "处理结果"; - this.处理结果.ReadOnly = true; - this.处理结果.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 处理状态 - // - this.处理状态.DataPropertyName = "STATE"; - this.处理状态.HeaderText = "事件状态"; - this.处理状态.Name = "处理状态"; - this.处理状态.ReadOnly = true; - this.处理状态.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // 序号 - // - this.序号.DataPropertyName = "rowno"; - this.序号.HeaderText = "序号"; - this.序号.Name = "序号"; - this.序号.ReadOnly = true; - this.序号.Visible = false; - // - // 编辑结果 - // - this.编辑结果.DataPropertyName = "btn"; - this.编辑结果.HeaderText = "编辑结果"; - this.编辑结果.Name = "编辑结果"; - this.编辑结果.ReadOnly = true; - this.编辑结果.Text = "编辑"; - this.编辑结果.UseColumnTextForButtonValue = true; - // // buttonX_search // this.buttonX_search.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -240,8 +69,7 @@ // // groupBox3 // - this.groupBox3.Controls.Add(this.bar1); - this.groupBox3.Controls.Add(this.dataGridViewX_Event); + this.groupBox3.Controls.Add(this.winGridViewPager1); this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox3.Location = new System.Drawing.Point(3, 91); this.groupBox3.Name = "groupBox3"; @@ -250,63 +78,6 @@ this.groupBox3.TabStop = false; this.groupBox3.Text = "事件信息"; // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.lab_page_msg, - this.btn_page_first, - this.btn_page_pre, - this.combo_page_num, - this.btn_page_next, - this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 306); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(840, 28); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 2; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // lab_page_msg - // - this.lab_page_msg.Name = "lab_page_msg"; - this.lab_page_msg.PaddingLeft = 100; - // - // btn_page_first - // - this.btn_page_first.Name = "btn_page_first"; - this.btn_page_first.Text = "|<首页"; - this.btn_page_first.Click += new System.EventHandler(this.btn_page_first_Click); - // - // btn_page_pre - // - this.btn_page_pre.Name = "btn_page_pre"; - this.btn_page_pre.Text = "下一页>"; - this.btn_page_pre.Click += new System.EventHandler(this.btn_page_pre_Click); - // - // combo_page_num - // - this.combo_page_num.DropDownHeight = 106; - this.combo_page_num.ItemHeight = 17; - this.combo_page_num.Name = "combo_page_num"; - this.combo_page_num.Click += new System.EventHandler(this.combo_page_num_Click); - // - // btn_page_next - // - this.btn_page_next.Name = "btn_page_next"; - this.btn_page_next.Text = "下一页>"; - this.btn_page_next.Click += new System.EventHandler(this.btn_page_next_Click); - // - // btn_page_last - // - this.btn_page_last.Name = "btn_page_last"; - this.btn_page_last.Text = "末页>|"; - this.btn_page_last.Click += new System.EventHandler(this.btn_page_last_Click); - // // groupBox2 // this.groupBox2.Controls.Add(this.dateTimePicker_end); @@ -374,6 +145,19 @@ this.label1.TabIndex = 5; this.label1.Text = "上报人员:"; // + // winGridViewPager1 + // + this.winGridViewPager1.AppendedMenu = null; + this.winGridViewPager1.DataSource = null; + this.winGridViewPager1.DisplayColumns = ""; + this.winGridViewPager1.Dock = System.Windows.Forms.DockStyle.Fill; + this.winGridViewPager1.Location = new System.Drawing.Point(3, 17); + this.winGridViewPager1.MinimumSize = new System.Drawing.Size(540, 0); + this.winGridViewPager1.Name = "winGridViewPager1"; + this.winGridViewPager1.PrintTitle = ""; + this.winGridViewPager1.Size = new System.Drawing.Size(840, 317); + this.winGridViewPager1.TabIndex = 0; + // // Form_EventManager // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -388,10 +172,8 @@ this.Text = "事件管理"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form_EventManager_FormClosing); this.Load += new System.EventHandler(this.Form_EventManager_Load); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewX_Event)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); @@ -400,7 +182,6 @@ #endregion - private DevComponents.DotNetBar.Controls.DataGridViewX dataGridViewX_Event; private DevComponents.DotNetBar.ButtonX buttonX_search; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox2; @@ -411,26 +192,7 @@ private System.Windows.Forms.ComboBox comboBox_name; private System.Windows.Forms.Label label1; private System.Windows.Forms.GroupBox groupBox3; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem lab_page_msg; - private DevComponents.DotNetBar.ButtonItem btn_page_first; - private DevComponents.DotNetBar.ButtonItem btn_page_pre; - private DevComponents.DotNetBar.ComboBoxItem combo_page_num; - private DevComponents.DotNetBar.ButtonItem btn_page_next; - private DevComponents.DotNetBar.ButtonItem btn_page_last; - private System.Windows.Forms.DataGridViewTextBoxColumn 编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报时间; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件描述; - private System.Windows.Forms.DataGridViewTextBoxColumn 纬度; - private System.Windows.Forms.DataGridViewTextBoxColumn 事件地点; - private System.Windows.Forms.DataGridViewTextBoxColumn 经度; - private System.Windows.Forms.DataGridViewTextBoxColumn 上报人员; - private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 任务编号; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理结果; - private System.Windows.Forms.DataGridViewTextBoxColumn 处理状态; - private DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn 序号; - private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 编辑结果; + private WHC.Pager.WinControl.WinGridViewPager winGridViewPager1; } } \ No newline at end of file diff --git a/EMS_Forms/Form_EventManager.cs b/EMS_Forms/Form_EventManager.cs index 9b23545..4d914c1 100644 --- a/EMS_Forms/Form_EventManager.cs +++ b/EMS_Forms/Form_EventManager.cs @@ -11,6 +11,7 @@ using GeoScene.Globe; using DevComponents.DotNetBar; using System.Data.OracleClient; +using WHC.Pager.WinControl; namespace Cyberpipe.EMS_Forms { @@ -20,9 +21,8 @@ DataTable dt = new DataTable(); OracleConnection conn; - private int currentpage = 1; - private int lastpage = 1; - private int pagesize = 11; + int maxPageIndex = 20; + int rows = 0; public static bool IS_OPEN = false; @@ -31,6 +31,17 @@ this.globeControl1 = globeControl1; globeControl1.Globe.MemoryLayer.ObjectMinVisiblePixelSize = -1; InitializeComponent(); + + winGridViewPager1.OnPageChanged += new EventHandler(winGridViewPager1_OnPageChanged); + this.winGridViewPager1.OnAddNew += new EventHandler(winGridViewPager1_OnEditSelected); //属性编辑 + this.winGridViewPager1.OnEditSelected += new EventHandler(winGridViewPager1_OnAddNew);//右键定位 + + //this.winGridViewPager1.OnStartExport += new EventHandler(pager1_OnStartExport); + //this.winGridViewPager1.OnEndExport += new EventHandler(pager1_OnEndExport); + //this.winGridViewPager1.ExportCurrent += new ExportCurrentEventHandler(pager1_ExportCurrent); + //this.winGridViewPager1.ExportAll += new ExportAllEventHandler(pager1_ExportAll); + + winGridViewPager1.dataGridView1.MultiSelect = false; } private void Form_EventManager_Load(object sender, EventArgs e) @@ -38,8 +49,8 @@ try { this.dateTimePicker_end.Value = DateTime.Now; - - reloadGrid(currentpage); + + LoadData(); conn = OledbHelper.sqlConnection(); string com = "select * from PATROLER"; @@ -56,7 +67,7 @@ if (Utility.userRole.IndexOf("事件编辑") == -1) { - dataGridViewX_Event.Columns["编辑结果"].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Visible = false; } IS_OPEN = true; @@ -69,13 +80,164 @@ } - private void reloadGrid(int pageIndex) + /// + /// 初始化分页表格 + /// + private void initlizeDatagrid() { - string userName = comboBox_name.Text.ToString(); - string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); - string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + //控制表格显示的列,以及每一列要显示的列名 + this.winGridViewPager1.Dock = DockStyle.Fill; + this.winGridViewPager1.dataGridView1.Dock = DockStyle.Fill; + + + this.winGridViewPager1.AddColumnAlias("ACCIDENTTIME", "上报时间"); + this.winGridViewPager1.AddColumnAlias("DBID", "编号"); + this.winGridViewPager1.AddColumnAlias("DESCRIBE", "事件描述"); + this.winGridViewPager1.AddColumnAlias("LATITUDE", "纬度"); + this.winGridViewPager1.AddColumnAlias("LOCALE", "事件地点"); + this.winGridViewPager1.AddColumnAlias("LONGITUDE", "经度"); + this.winGridViewPager1.AddColumnAlias("PATROLERNAME", "上报人员"); + this.winGridViewPager1.AddColumnAlias("PATROLER_ID", "人员ID"); + this.winGridViewPager1.AddColumnAlias("TASK_ID", "任务编号"); + this.winGridViewPager1.AddColumnAlias("RESULT", "处理结果"); + this.winGridViewPager1.AddColumnAlias("STATE", "处理状态"); + + this.winGridViewPager1.DisplayColumns = "ACCIDENTTIME,DESCRIBE,LOCALE,PATROLERNAME,TASK_ID,RESULT,STATE"; + + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + + //隐藏右键功能按钮 + + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[3].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[4].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[5].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[6].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[7].Visible = false; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[1].Text = "查看位置"; + winGridViewPager1.dataGridView1.ContextMenuStrip.Items[2].Text = "结果编辑"; + //数据铺满表格 + this.winGridViewPager1.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + //控制间隔的颜色 + winGridViewPager1.BackColor = Color.LightCyan;//间隔颜色 + //控制每页显示的最大数据量 + winGridViewPager1.PagerInfo.RecordCount = rows; + winGridViewPager1.PagerInfo.PageSize = maxPageIndex; + winGridViewPager1.dataGridView1.Refresh(); + //winGridViewPager1.Controls.RemoveAt(1); + + } + /// + /// 右键定位 + /// + /// + /// + private void winGridViewPager1_OnAddNew(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + this.WindowState = FormWindowState.Minimized; + globeControl1.Globe.MemoryLayer.RemoveAllFeature(); + this.WindowState = FormWindowState.Minimized; + double x = Convert.ToDouble(row.Cells["LONGITUDE"].Value); + double y = Convert.ToDouble(row.Cells["LATITUDE"].Value); + + string username = Convert.ToString(row.Cells["PATROLERNAME"].Value); + string Atime = Convert.ToString(row.Cells["ACCIDENTTIME"].Value); + string location = Convert.ToString(row.Cells["LOCALE"].Value); + string descp = Convert.ToString(row.Cells["DESCRIBE"].Value); + /////////////////////////////////////// + /*******设置飞行与创建模型******/ + + EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; + GSOPoint3d p = new GSOPoint3d(); + p.X = x; + p.Y = y; + //p.X = 120.608; + //p.Y = 31.1907; + p.Z = 0; + GSOGeoModel model = new GSOGeoModel(); + string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; + + model.FilePath = filepath; + model.Position = p; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f = new GSOFeature(); + f.Geometry = model; + f.Name = "事件:" + Atime; + //double s = 0.1; + //f.Geometry.Scale(s, s, s); + GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); + + GSOLabel label = new GSOLabel(); + label.Text = "上报人员:" + username + "\r\n" + + "上报时间:" + Atime + "\r\n" + + "上报地点:" + location + "\r\n" + + "事件描述:" + descp; + label.Style = new GSOLabelStyle(); + label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label.Style.TracktionLineType = EnumTracktionLineType.Solid; + label.Style.TextStyle.FontHeight = 20; + label.Style.TextStyle.FontName = "黑体"; + label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature.Label = label; + + globeControl1.Globe.JumpToFeature(newFeature, 3000); + + } + catch (Exception ex) + { + MessageBox.Show("标识器定位失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + } + /// + /// 属性编辑 + /// + /// + /// + private void winGridViewPager1_OnEditSelected(object sender, EventArgs e) + { + DataGridView grid = sender as DataGridView; + if (grid != null) + { + DataGridViewRow row = grid.SelectedRows[0]; + try + { + int dbId = Convert.ToInt32(row.Cells["DBID"].Value); + string result = Convert.ToString(row.Cells["RESULT"].Value); + EMS_Forms.Form_EventResult form = new Form_EventResult(dbId, result); + form.refresh += new Form_EventResult.Handle(LoadData);//改变值的事件 + form.ShowDialog(); + } + catch (Exception ex) + { + MessageBox.Show("属性编辑失败:" + ex.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + } + + /// + /// 页面刷新 + /// + /// + /// + private void winGridViewPager1_OnPageChanged(object sender, EventArgs e) + { + LoadData(); + + } + + private void LoadData() + { if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) { int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); @@ -85,95 +247,93 @@ return; } } - string sqlcount = "select count(*) from ACCIDENT t where 1=1"; - string sqlrows = "select * from (select rownum as rowno,dbid," + - "ACCIDENTTIME," + - "DESCRIBE," + - "LATITUDE," + - "LOCALE," + - "LONGITUDE," + - "PATROLERNAME," + - "PATROLER_ID," + - "TASK_ID," + - "RESULT," + - "'查看' as btn " + - "from ACCIDENT where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) - { - sqlcount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - sqlrows += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; - } - if (dateTimePicker_start.Value != null) - { - sqlcount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; - } - if (dateTimePicker_end.Value != null) - { - DateTime time = dateTimePicker_end.Value; - time = time.AddDays(1); - sqlcount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - sqlrows += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; - } - sqlrows += " and rownum<=" + (pagesize * pageIndex) + ") table_alias where table_alias.rowno>=" + ((pageIndex - 1) * pagesize + 1); + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; - int rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlcount).ToString()); - int pages = 0; - if (rows % pagesize == 0) - { - pages = rows / pagesize; - } - else - { - pages = rows / pagesize + 1; - } - - lastpage = pages; - - lab_page_msg.Text = "共" + rows + "条记录,每页" + pagesize + "条,第" + pageIndex + "页,共" + pages + "页"; - combo_page_num.Items.Clear(); - for (int i = 1; i <= pages; i++) - { - combo_page_num.Items.Add(new ComboBoxItem(i.ToString(), i.ToString())); - } - - if (currentpage == 1) - { - btn_page_first.Enabled = false; - btn_page_pre.Enabled = false; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - else if (currentpage == lastpage) - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = false; - btn_page_next.Enabled = false; - } - else - { - btn_page_first.Enabled = true; - btn_page_pre.Enabled = true; - btn_page_last.Enabled = true; - btn_page_next.Enabled = true; - } - - DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlrows).Tables[0]; - dataGridViewX_Event.DataSource = table; if (table.Rows.Count == 0) { MessageBox.Show("没有找到任何数据!", "提示"); } for (int i = 0; i < table.Rows.Count; i++) { - if (dataGridViewX_Event.Rows[i].Cells["处理结果"].Value != null && !(dataGridViewX_Event.Rows[i].Cells["处理结果"].Value.ToString().Trim().Equals(""))) + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) { - dataGridViewX_Event.Rows[i].Cells["处理状态"].Value = "已处理"; + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; } - + + } + winGridViewPager1.Refresh(); + } + + private void LoadData(int pageIndex) + { + if (dateTimePicker_start.Value != null && dateTimePicker_end.Value != null) + { + int compare = DateTime.Compare(dateTimePicker_start.Value, dateTimePicker_end.Value); + if (compare == 1) + { + MessageBox.Show("起始时间不能大于终止时间,请重新设置!", "提示"); + return ; + } + } + string sqlData = GetSql(pageIndex); + initlizeDatagrid(); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; + winGridViewPager1.DataSource = table.DefaultView; + + if (table.Rows.Count == 0) + { + MessageBox.Show("没有找到任何数据!", "提示"); + } + for (int i = 0; i < table.Rows.Count; i++) + { + if (winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value != null && !(winGridViewPager1.dataGridView1.Rows[i].Cells["RESULT"].Value.ToString().Trim().Equals(""))) + { + winGridViewPager1.dataGridView1.Rows[i].Cells["STATE"].Value = "已处理"; + } + + } + winGridViewPager1.Refresh(); + } + + private string GetSql(int pageIndex) + { + string userName = comboBox_name.Text.ToString(); + string startTime = dateTimePicker_start.Value.ToString("yyyy-MM-dd"); + string endTime = dateTimePicker_end.Value.AddDays(1).ToString("yyyy-MM-dd"); + + + string sqlCount = "select count(*) from ACCIDENT where 1=1"; + + string sqlData = "select ACCIDENTTIME,DBID,DESCRIBE,LATITUDE,LOCALE,LONGITUDE,PATROLERNAME,PATROLER_ID,TASK_ID,RESULT,'' as STATE " + + "from (select t.*,rownum row_num from ACCIDENT t order by DBID)b " + + " where(b.row_num between " + (pageIndex - 1) * maxPageIndex + " and " + pageIndex * maxPageIndex + ")"; + + if (!String.IsNullOrEmpty(comboBox_name.Text.Trim())) + { + sqlCount += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + sqlData += " and PATROLERNAME='" + comboBox_name.Text.Trim() + "' "; + } + if (dateTimePicker_start.Value != null) + { + sqlCount += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME>=to_date('" + dateTimePicker_start.Value.ToShortDateString() + "','yyyy-MM-dd') "; + } + if (dateTimePicker_end.Value != null) + { + DateTime time = dateTimePicker_end.Value; + time = time.AddDays(1); + sqlCount += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; + sqlData += "and ACCIDENTTIME<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } private void Form_EventManager_FormClosing(object sender, FormClosingEventArgs e) @@ -182,102 +342,12 @@ IS_OPEN = false; } - private void dataGridViewX_Event_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.RowIndex != -1 && e.ColumnIndex != -1) - { - if (dataGridViewX_Event.Columns[e.ColumnIndex].HeaderText == "编辑结果") - { - try - { - int dbId = Convert.ToInt32(dataGridViewX_Event.Rows[e.RowIndex].Cells["编号"].Value); - string result = Convert.ToString(dataGridViewX_Event.Rows[e.RowIndex].Cells["处理结果"].Value); - EMS_Forms.Form_EventResult form = new Form_EventResult(dbId,result); - currentpage = 1; - form.refresh += new Form_EventResult.Handle(reloadGrid);//改变值的事件 - form.ShowDialog(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - } - - private void dataGridViewX_Event_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - DataGridView.HitTestInfo hittestinfo = dataGridViewX_Event.HitTest(e.X, e.Y); - if (hittestinfo.RowIndex > -1) - { - try - { - globeControl1.Globe.MemoryLayer.RemoveAllFeature(); - this.WindowState = FormWindowState.Minimized; - double x = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["经度"].Value); - double y = Convert.ToDouble(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["纬度"].Value); - - string username = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报人员"].Value); - string Atime = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["上报时间"].Value); - string location = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件地点"].Value); - string descp = Convert.ToString(dataGridViewX_Event.Rows[hittestinfo.RowIndex].Cells["事件描述"].Value); - /////////////////////////////////////// - /*******设置飞行与创建模型******/ - - EnumAltitudeMode altmode = EnumAltitudeMode.Absolute; - GSOPoint3d p = new GSOPoint3d(); - p.X = x; - p.Y = y; - //p.X = 120.608; - //p.Y = 31.1907; - p.Z = 0; - GSOGeoModel model = new GSOGeoModel(); - string filepath = Application.StartupPath + "/EMSgcm/小旗子/hongqi/hongqi.gcm"; - - model.FilePath = filepath; - model.Position = p; - model.AltitudeMode = EnumAltitudeMode.Absolute; - GSOFeature f = new GSOFeature(); - f.Geometry = model; - f.Name = "事件:" + Atime; - //double s = 0.1; - //f.Geometry.Scale(s, s, s); - GSOFeature newFeature = globeControl1.Globe.MemoryLayer.AddFeature(f); - - GSOLabel label = new GSOLabel(); - label.Text = "上报人员:" + username + "\r\n" + - "上报时间:" + Atime + "\r\n" + - "上报地点:" + location + "\r\n" + - "事件描述:" + descp; - - - label.Style = new GSOLabelStyle(); - label.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 - label.Style.TracktionLineType = EnumTracktionLineType.Solid; - label.Style.TextStyle.FontHeight = 20; - label.Style.TextStyle.FontName = "黑体"; - label.Style.TractionLineEndPos = new GSOPoint2d(80, 60); - newFeature.Label = label; - - globeControl1.Globe.JumpToFeature(newFeature,3000); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - } - - } private void buttonX_search_Click(object sender, EventArgs e) { try { - currentpage = 1; - reloadGrid(currentpage); + LoadData(1); } catch (Exception ex) { @@ -285,49 +355,7 @@ } } - - private void btn_page_first_Click(object sender, EventArgs e) - { - currentpage = 1; - reloadGrid(currentpage); - - } - - private void btn_page_pre_Click(object sender, EventArgs e) - { - currentpage--; - if (currentpage < 1) - { - currentpage = 1; - } - reloadGrid(currentpage); - } - - private void combo_page_num_Click(object sender, EventArgs e) - { - if (!String.IsNullOrEmpty(combo_page_num.Text)) - { - currentpage = int.Parse(combo_page_num.Text); - reloadGrid(currentpage); - } - } - - private void btn_page_next_Click(object sender, EventArgs e) - { - currentpage++; - if (currentpage > lastpage) - { - currentpage = lastpage; - } - reloadGrid(currentpage); - } - - private void btn_page_last_Click(object sender, EventArgs e) - { - currentpage = lastpage; - reloadGrid(currentpage); - } - + } } diff --git a/EMS_Forms/Form_EventManager.resx b/EMS_Forms/Form_EventManager.resx index fc3487f..1af7de1 100644 --- a/EMS_Forms/Form_EventManager.resx +++ b/EMS_Forms/Form_EventManager.resx @@ -117,43 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/EMS_Forms/Form_EventResult.cs b/EMS_Forms/Form_EventResult.cs index 6fc1cc7..ab5762b 100644 --- a/EMS_Forms/Form_EventResult.cs +++ b/EMS_Forms/Form_EventResult.cs @@ -16,7 +16,7 @@ int dbId; string result; OracleConnection conn = null; - public delegate void Handle(int index); + public delegate void Handle(); public event Handle refresh; public Form_EventResult(int dbId,string result) @@ -49,7 +49,7 @@ cmd.ExecuteNonQuery(); conn.Close(); MessageBox.Show("事件结果编辑成功!", "提示"); - refresh(1); + refresh(); this.Close(); } catch (Exception ex) diff --git a/EMS_Forms/Form_OnlineTask.cs b/EMS_Forms/Form_OnlineTask.cs index 32de716..5d7c33b 100644 --- a/EMS_Forms/Form_OnlineTask.cs +++ b/EMS_Forms/Form_OnlineTask.cs @@ -140,10 +140,8 @@ } listIDs.Add(li); } - dr.Close(); conn.Close(); - conn = OledbHelper.sqlConnection(); conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); diff --git a/EMS_Forms/Form_TaskManager.Designer.cs b/EMS_Forms/Form_TaskManager.Designer.cs index 811ea0c..64d2c41 100644 --- a/EMS_Forms/Form_TaskManager.Designer.cs +++ b/EMS_Forms/Form_TaskManager.Designer.cs @@ -30,13 +30,15 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.comboBox_userName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboBox_state = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.combo_street = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.labelX5 = new DevComponents.DotNetBar.LabelX(); this.labelX4 = new DevComponents.DotNetBar.LabelX(); this.button_search = new System.Windows.Forms.Button(); this.button_new = new System.Windows.Forms.Button(); this.dateTimePicker_end = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker_start = new System.Windows.Forms.DateTimePicker(); - this.comboBox_userName = new System.Windows.Forms.ComboBox(); this.labelX3 = new DevComponents.DotNetBar.LabelX(); this.labelX2 = new DevComponents.DotNetBar.LabelX(); this.labelX1 = new DevComponents.DotNetBar.LabelX(); @@ -68,35 +70,74 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.comboBox_userName); + this.groupBox1.Controls.Add(this.comboBox_state); this.groupBox1.Controls.Add(this.combo_street); + this.groupBox1.Controls.Add(this.labelX5); this.groupBox1.Controls.Add(this.labelX4); this.groupBox1.Controls.Add(this.button_search); this.groupBox1.Controls.Add(this.button_new); this.groupBox1.Controls.Add(this.dateTimePicker_end); this.groupBox1.Controls.Add(this.dateTimePicker_start); - this.groupBox1.Controls.Add(this.comboBox_userName); this.groupBox1.Controls.Add(this.labelX3); this.groupBox1.Controls.Add(this.labelX2); this.groupBox1.Controls.Add(this.labelX1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(3, 17); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(850, 51); + this.groupBox1.Size = new System.Drawing.Size(850, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // comboBox_userName + // + this.comboBox_userName.DisplayMember = "Text"; + this.comboBox_userName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_userName.FormattingEnabled = true; + this.comboBox_userName.ItemHeight = 15; + this.comboBox_userName.Location = new System.Drawing.Point(97, 18); + this.comboBox_userName.Name = "comboBox_userName"; + this.comboBox_userName.Size = new System.Drawing.Size(132, 21); + this.comboBox_userName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_userName.TabIndex = 7; + // + // comboBox_state + // + this.comboBox_state.DisplayMember = "Text"; + this.comboBox_state.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.comboBox_state.FormattingEnabled = true; + this.comboBox_state.ItemHeight = 15; + this.comboBox_state.Location = new System.Drawing.Point(97, 54); + this.comboBox_state.Name = "comboBox_state"; + this.comboBox_state.Size = new System.Drawing.Size(132, 21); + this.comboBox_state.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.comboBox_state.TabIndex = 6; + // // combo_street // this.combo_street.DisplayMember = "Text"; this.combo_street.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.combo_street.FormattingEnabled = true; this.combo_street.ItemHeight = 15; - this.combo_street.Location = new System.Drawing.Point(541, 20); + this.combo_street.Location = new System.Drawing.Point(350, 54); this.combo_street.Name = "combo_street"; this.combo_street.Size = new System.Drawing.Size(137, 21); this.combo_street.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.combo_street.TabIndex = 5; // + // labelX5 + // + // + // + // + this.labelX5.BackgroundStyle.Class = ""; + this.labelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX5.Location = new System.Drawing.Point(23, 54); + this.labelX5.Name = "labelX5"; + this.labelX5.Size = new System.Drawing.Size(59, 23); + this.labelX5.TabIndex = 4; + this.labelX5.Text = "任务状态"; + // // labelX4 // // @@ -104,7 +145,7 @@ // this.labelX4.BackgroundStyle.Class = ""; this.labelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX4.Location = new System.Drawing.Point(486, 18); + this.labelX4.Location = new System.Drawing.Point(274, 54); this.labelX4.Name = "labelX4"; this.labelX4.Size = new System.Drawing.Size(59, 23); this.labelX4.TabIndex = 4; @@ -112,7 +153,7 @@ // // button_search // - this.button_search.Location = new System.Drawing.Point(684, 15); + this.button_search.Location = new System.Drawing.Point(679, 15); this.button_search.Name = "button_search"; this.button_search.Size = new System.Drawing.Size(75, 26); this.button_search.TabIndex = 3; @@ -122,7 +163,7 @@ // // button_new // - this.button_new.Location = new System.Drawing.Point(766, 15); + this.button_new.Location = new System.Drawing.Point(769, 15); this.button_new.Name = "button_new"; this.button_new.Size = new System.Drawing.Size(75, 26); this.button_new.TabIndex = 0; @@ -132,27 +173,19 @@ // // dateTimePicker_end // - this.dateTimePicker_end.Location = new System.Drawing.Point(359, 18); + this.dateTimePicker_end.Location = new System.Drawing.Point(523, 18); this.dateTimePicker_end.Name = "dateTimePicker_end"; this.dateTimePicker_end.Size = new System.Drawing.Size(121, 21); this.dateTimePicker_end.TabIndex = 2; // // dateTimePicker_start // - this.dateTimePicker_start.Location = new System.Drawing.Point(208, 18); + this.dateTimePicker_start.Location = new System.Drawing.Point(350, 18); this.dateTimePicker_start.Name = "dateTimePicker_start"; - this.dateTimePicker_start.Size = new System.Drawing.Size(125, 21); + this.dateTimePicker_start.Size = new System.Drawing.Size(137, 21); this.dateTimePicker_start.TabIndex = 2; this.dateTimePicker_start.Value = new System.DateTime(2015, 1, 1, 0, 0, 0, 0); // - // comboBox_userName - // - this.comboBox_userName.FormattingEnabled = true; - this.comboBox_userName.Location = new System.Drawing.Point(61, 19); - this.comboBox_userName.Name = "comboBox_userName"; - this.comboBox_userName.Size = new System.Drawing.Size(86, 20); - this.comboBox_userName.TabIndex = 1; - // // labelX3 // this.labelX3.AutoSize = true; @@ -161,7 +194,7 @@ // this.labelX3.BackgroundStyle.Class = ""; this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX3.Location = new System.Drawing.Point(339, 20); + this.labelX3.Location = new System.Drawing.Point(498, 20); this.labelX3.Name = "labelX3"; this.labelX3.Size = new System.Drawing.Size(14, 14); this.labelX3.TabIndex = 0; @@ -174,7 +207,7 @@ // this.labelX2.BackgroundStyle.Class = ""; this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX2.Location = new System.Drawing.Point(153, 18); + this.labelX2.Location = new System.Drawing.Point(273, 18); this.labelX2.Name = "labelX2"; this.labelX2.Size = new System.Drawing.Size(60, 23); this.labelX2.TabIndex = 0; @@ -187,7 +220,7 @@ // this.labelX1.BackgroundStyle.Class = ""; this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.labelX1.Location = new System.Drawing.Point(6, 18); + this.labelX1.Location = new System.Drawing.Point(23, 18); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(62, 23); this.labelX1.TabIndex = 0; @@ -208,10 +241,10 @@ // this.groupBox3.Controls.Add(this.bar1); this.groupBox3.Controls.Add(this.dataGridViewX_Task); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.groupBox3.Location = new System.Drawing.Point(3, 74); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(3, 100); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(850, 342); + this.groupBox3.Size = new System.Drawing.Size(850, 316); this.groupBox3.TabIndex = 1; this.groupBox3.TabStop = false; this.groupBox3.Text = "工单信息"; @@ -220,7 +253,7 @@ // this.bar1.AntiAlias = true; this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Bottom; + this.bar1.DockSide = DevComponents.DotNetBar.eDockSide.Document; this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.lab_page_msg, this.btn_page_first, @@ -228,7 +261,7 @@ this.combo_page_num, this.btn_page_next, this.btn_page_last}); - this.bar1.Location = new System.Drawing.Point(3, 311); + this.bar1.Location = new System.Drawing.Point(3, 285); this.bar1.Name = "bar1"; this.bar1.Size = new System.Drawing.Size(844, 28); this.bar1.Stretch = true; @@ -298,12 +331,12 @@ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.dataGridViewX_Task.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewX_Task.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dataGridViewX_Task.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX_Task.Location = new System.Drawing.Point(3, 17); this.dataGridViewX_Task.Name = "dataGridViewX_Task"; this.dataGridViewX_Task.ReadOnly = true; this.dataGridViewX_Task.RowTemplate.Height = 23; - this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 322); + this.dataGridViewX_Task.Size = new System.Drawing.Size(844, 296); this.dataGridViewX_Task.TabIndex = 1; this.dataGridViewX_Task.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewX1_CellContentClick); // @@ -422,7 +455,6 @@ private System.Windows.Forms.Button button_search; private System.Windows.Forms.DateTimePicker dateTimePicker_end; private System.Windows.Forms.DateTimePicker dateTimePicker_start; - private System.Windows.Forms.ComboBox comboBox_userName; private DevComponents.DotNetBar.LabelX labelX3; private DevComponents.DotNetBar.LabelX labelX2; private DevComponents.DotNetBar.LabelX labelX1; @@ -444,5 +476,8 @@ private DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn 任务信息; private DevComponents.DotNetBar.Controls.ComboBoxEx combo_street; private DevComponents.DotNetBar.LabelX labelX4; + private DevComponents.DotNetBar.LabelX labelX5; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_userName; + private DevComponents.DotNetBar.Controls.ComboBoxEx comboBox_state; } } \ No newline at end of file diff --git a/EMS_Forms/Form_TaskManager.cs b/EMS_Forms/Form_TaskManager.cs index 1f9e196..d832de8 100644 --- a/EMS_Forms/Form_TaskManager.cs +++ b/EMS_Forms/Form_TaskManager.cs @@ -51,6 +51,7 @@ conn = OledbHelper.sqlConnection(); string sql = "select t.username from patroler t"; DataTable dt = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sql).Tables[0]; + comboBox_userName.Items.Add("不限"); foreach(DataRow row in dt.Rows){ comboBox_userName.Items.Add(row[0].ToString()); } @@ -58,13 +59,20 @@ sql = "select distinct 所属道路 from 标识器"; using (OracleDataReader reader = OracleUtils.ExecuteReader(OracleUtils.ConnectionString, CommandType.Text, sql)) { - combo_street.Items.Add(""); + combo_street.Items.Add("不限"); while (reader.Read()) { combo_street.Items.Add(reader[0].ToString()); } } + comboBox_state.Items.Add("不限"); + comboBox_state.Items.Add("下发任务"); + comboBox_state.Items.Add("接受任务"); + comboBox_state.Items.Add("开始任务"); + comboBox_state.Items.Add("任务执行中"); + comboBox_state.Items.Add("结束任务"); + if (Utility.userRole.IndexOf("工单创建") == -1) { button_new.Visible = false; @@ -99,7 +107,17 @@ try { int dbID = 0; + int taskStateInt = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[e.RowIndex].Cells["任务编号"].Value); + string taskState = dataGridViewX_Task.Rows[e.RowIndex].Cells["任务状态"].Value.ToString(); + if (taskState.Equals("开始任务")) + { + taskStateInt = 1; + } + else + { + taskStateInt = 0; + } string sql = "select dbid," + " checktime," + " mark_id," + @@ -115,16 +133,15 @@ " from MARK_TASK where task_id='" + dbID + "' order by dbid"; DataTable taskInfoDt = new DataTable(); taskInfoDt = OledbHelper.ExecuteDataTable(sql); - if (taskInfoDt.Rows.Count == 0) + if (taskInfoDt == null || taskInfoDt.Rows.Count == 0) { MessageBox.Show("没有相应详细任务信息!", "提示"); return; } else { - this.Hide(); - flyToTask(e.RowIndex); + flyToTask(e.RowIndex,taskStateInt); EMS_Forms.Form_TaskInfo p = new Form_TaskInfo(globeControl1,taskInfoDt); p.showParentForm += new Form_TaskInfo.Handle(showThisForm);//改变值的事件 p.Show(); @@ -168,7 +185,7 @@ // } //} - private void flyToTask(int rowIndex) + private void flyToTask(int rowIndex,int taskState) { int dbID = 0; dbID = Convert.ToInt32(dataGridViewX_Task.Rows[rowIndex].Cells["任务编号"].Value); @@ -180,33 +197,27 @@ List listIDs = new List(); conn = OledbHelper.sqlConnection(); conn.Open(); - OracleCommand cmd = new OracleCommand("select * from MARK_TASK", conn); + OracleCommand cmd = new OracleCommand("select * from MARK_TASK where TASK_ID ='" + dbID + "'", conn); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { - int id = Convert.ToInt32(dr["TASK_ID"]); - if (id == dbID) + listID li = new listID(); + li.MarkId = Convert.ToString(dr["MARK_ID"]); + + if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) { - listID li = new listID(); - - li.MarkId = Convert.ToString(dr["MARK_ID"]); - - if (Convert.ToInt32(dr["IS_CHECKED"]) == 1) - { - //Datatime - li.check = Convert.ToInt32(dr["IS_CHECKED"]); - li.checktime = Convert.ToString(dr["CHECKTIME"]); - t = (System.DateTime)dr["CHECKTIME"]; - li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; - } - listIDs.Add(li); + //Datatime + li.check = Convert.ToInt32(dr["IS_CHECKED"]); + li.checktime = Convert.ToString(dr["CHECKTIME"]); + t = (System.DateTime)dr["CHECKTIME"]; + li.t = t.Year * 10000000000 + t.Day * 1000000 + t.Month * 100000000 + t.Hour * 10000 + t.Minute * 100 + t.Second; } + listIDs.Add(li); } dr.Close(); conn.Close(); conn = OledbHelper.sqlConnection(); - conn.Open(); cmd = new OracleCommand("select * from 标识器", conn); dr = cmd.ExecuteReader(); @@ -221,7 +232,7 @@ string filepath; GSOPoint3d p = new GSOPoint3d(); - //GSOPoint3d po = new GSOPoint3d(); + GSOPoint3d po = new GSOPoint3d(); GSOPoint3ds pnts = new GSOPoint3ds(); GSOGeoPolyline3D line = new GSOGeoPolyline3D(); @@ -230,7 +241,6 @@ string id = Convert.ToString(dr["编号"]);//// for (int i = 0; i < listIDs.Count; i++) { - if (id == Convert.ToString(listIDs[i].MarkId)) { x = Convert.ToDouble(dr["X坐标"]); @@ -245,7 +255,6 @@ if (Convert.ToInt16(listIDs[i].check) == 1) { filepath = Application.StartupPath + "/EMSgcm/小旗子/lvqi/lvqi.gcm"; - model.FilePath = filepath; } if (Convert.ToInt16(listIDs[i].check) == 0) @@ -277,11 +286,11 @@ //bai label.Style.MaxVisibleDistance = -1; - newFeature.Label = label; + newFeature.Label = label; listIDs[i].x = p.X; listIDs[i].y = p.Y; - if(i == 0) + if (taskState == 0 && i == 0) globeControl1.Globe.JumpToFeature(newFeature, 200); } } @@ -289,6 +298,49 @@ dr.Close(); conn.Close(); + if(taskState == 1) + { + conn = OledbHelper.sqlConnection(); + conn.Open(); + cmd = new OracleCommand("select * from POSITION", conn); + dr = cmd.ExecuteReader(); + while (dr.Read()) + { + po.X = Convert.ToDouble(dr["LONGITUDE"]); + po.Y = Convert.ToDouble(dr["LATITUDE"]); + po.Z = 2.5; + break; + //} + } + dr.Close(); + conn.Close(); + pnts.Add(po); + + model = new GSOGeoModel(); + + filepath = Application.StartupPath + "/EMSgcm/hat/hat.gcm"; + + model.FilePath = filepath; + model.Position = po; + model.AltitudeMode = EnumAltitudeMode.Absolute; + GSOFeature f1 = new GSOFeature(); + f1.Geometry = model; + double s = 0.1; + f1.Geometry.Scale(s, s, s); + GSOFeature newFeature1 = globeControl1.Globe.MemoryLayer.AddFeature(f1); + + GSOLabel label1 = new GSOLabel(); + label1.Text = "定位员:" + userName; + label1.Style = new GSOLabelStyle(); + label1.Style.Opaque = 0.8; //设置标注的透明度,取值区间是0-1 + label1.Style.TracktionLineType = EnumTracktionLineType.Solid; + label1.Style.TextStyle.FontHeight = 20; + label1.Style.TextStyle.FontName = "黑体"; + label1.Style.TractionLineEndPos = new GSOPoint2d(80, 60); + newFeature1.Label = label1; + } + //获取定位人员位置 + // 按扫描时间对任务点进行排序 int m = 0; @@ -408,7 +460,7 @@ "username," + "'查看' as btn " + "from taskinfo where 1=1 "; - if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim())) + if (!String.IsNullOrEmpty(comboBox_userName.Text.Trim()) && !comboBox_userName.Text.Trim().Equals("不限")) { sqlcount += " and username='" + comboBox_userName.Text.Trim() + "' "; sqlrows += " and username='" + comboBox_userName.Text.Trim() + "' "; @@ -425,7 +477,12 @@ sqlcount += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; sqlrows += "and deploytime<=to_date('" + time.ToShortDateString() + "','yyyy-MM-dd') "; } - if (!String.IsNullOrEmpty(combo_street.Text)) + if (!String.IsNullOrEmpty(comboBox_state.Text.Trim()) && !comboBox_state.Text.Trim().Equals("不限")) + { + sqlcount += "and taskstate='" + comboBox_state.Text + "' "; + sqlrows += "and taskstate='" + comboBox_state.Text + "' "; + } + if (!String.IsNullOrEmpty(combo_street.Text.Trim()) && !combo_street.Text.Trim().Equals("不限")) { sqlcount += "and street='" + combo_street.Text + "' "; sqlrows += "and street='" + combo_street.Text + "' "; @@ -521,5 +578,6 @@ reloadGrid(currentpage); } } + } } diff --git a/FrmDownloadProgress.cs b/FrmDownloadProgress.cs index 444eda2..1820f98 100644 --- a/FrmDownloadProgress.cs +++ b/FrmDownloadProgress.cs @@ -1 +1,193 @@ -using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevComponents.DotNetBar; using System.Diagnostics; using System.IO; namespace Cyberpipe { public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form { string programUrl = ""; //string programConfig = ""; static FrmDownloadProgress frm = null; public static FrmDownloadProgress getForm(string url) { if (frm == null) { frm = new FrmDownloadProgress(url); frm.ShowDialog(); } return frm; } public FrmDownloadProgress(string url) { InitializeComponent(); programUrl = url; } private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { frm = null; } private void FrmDownloadProgress_Load(object sender, EventArgs e) { updateVersion(programUrl); } //���°汾 static string localPath = ""; private static void updateVersion(string programUrl) { try { localPath = System.Environment.GetEnvironmentVariable("temp") + "\\" + Path.GetFileName(programUrl); System.Net.WebClient myWebClient = new System.Net.WebClient(); myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); } catch (Exception e) { MessageBox.Show(e.Message); } } static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { unstall(); if (File.Exists(localPath)) { Process.Start(localPath).WaitForExit(); } } //���ؽ��Ȩ���? static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) { if (frm != null) { float percentage = 0f; try { frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; frm.progressBarX1.Value = (int)e.BytesReceived; percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; } catch { throw; } double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); double currentSize = e.BytesReceived / (1024.0 * 1024.0); frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; if (percentage == 100.0f) { frm.Close(); } } } private static void unstall() { try { // String code = getProductCode("CyberPipe"); // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; if (getProductCode("Cyberpipe") == "") { return; } String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; String sysroot = System.Environment.SystemDirectory; System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); } catch (Exception e) { MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); } } private static String getProductCode(String programName) { string productCode = ""; // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); foreach (string subkey in Uninstall.GetSubKeyNames()) { Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); try { string displayname = productcode.GetValue("DisplayName").ToString(); if (displayname == programName) { string uninstallString = productcode.GetValue("UninstallString").ToString(); string[] strs = uninstallString.Split(new char[2] { '{', '}' }); productCode = strs[1]; return productCode; } } catch { continue; } } return productCode; } } } \ No newline at end of file +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using DevComponents.DotNetBar; +using System.Diagnostics; +using System.IO; + +namespace Cyberpipe +{ + public partial class FrmDownloadProgress : DevComponents.DotNetBar.Office2007Form + { + string programUrl = ""; + //string programConfig = ""; + static FrmDownloadProgress frm = null; + public static FrmDownloadProgress getForm(string url) + { + if (frm == null) + { + frm = new FrmDownloadProgress(url); + frm.ShowDialog(); + } + return frm; + } + + public FrmDownloadProgress(string url) + { + InitializeComponent(); + programUrl = url; + } + + private void FrmDownloadProgress_FormClosing(object sender, FormClosingEventArgs e) + { + frm = null; + + } + + private void FrmDownloadProgress_Load(object sender, EventArgs e) + { + updateVersion(programUrl); + } + + //���°汾 + static string localPath = ""; + private static void updateVersion(string programUrl) + { + try + { + + string ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + if (ent == null) + { + System.Environment.SetEnvironmentVariable("CyberPipe", "C:\\CyberPipe", EnvironmentVariableTarget.Machine); + ent = System.Environment.GetEnvironmentVariable("CyberPipe",EnvironmentVariableTarget.Machine); + } + createFolder(ent); + localPath = ent + "\\" + Path.GetFileName(programUrl); + + //TODO LIST:�ж��ļ��Ƿ���ڣ����ھ�ɾ�� + delOldVersion(localPath); + + + System.Net.WebClient myWebClient = new System.Net.WebClient(); + myWebClient.DownloadProgressChanged += new System.Net.DownloadProgressChangedEventHandler(myWebClient_DownloadProgressChanged); + myWebClient.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(myWebClient_DownloadFileCompleted); + + myWebClient.DownloadFileAsync(new Uri(programUrl), localPath); + + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + } + + private static void createFolder(String folerName) + { + if (!Directory.Exists(folerName)) + { + Directory.CreateDirectory(folerName); + } + } + + private static void delOldVersion(String fileName) + { + + if (System.IO.File.Exists(fileName)) + { + File.Delete(fileName); + } + } + + static void myWebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) + { + + unstall(); + if (File.Exists(localPath)) + { + Process.Start(localPath).WaitForExit(); + } + frm.Close(); + + } + + //���ؽ��Ȩ���? + static void myWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e) + { + if (frm != null) + { + float percentage = 0f; + try + { + frm.progressBarX1.Maximum = (int)e.TotalBytesToReceive; + frm.progressBarX1.Value = (int)e.BytesReceived; + percentage = ((float)e.BytesReceived / (float)e.TotalBytesToReceive) * 100; + } + catch + { + throw; + } + double totalSize = e.TotalBytesToReceive / (1024.0 * 1024.0); + double currentSize = e.BytesReceived / (1024.0 * 1024.0); + frm.labelX1.Text = "������" + e.ProgressPercentage + "%" + "(" + Math.Round(currentSize,1) + "M/" + Math.Round(totalSize,1) + "M)"; + if (percentage == 100.0f) + { + + + } + } + } + + private static void unstall() + { + try + { + // String code = getProductCode("CyberPipe"); + // String code = "/x{b44a09f4-34f0-48f7-86eb-c5c4f526ea19}/qr"; + + if (getProductCode("Cyberpipe") == "") + { + return; + } + String code = "/x {" + getProductCode("Cyberpipe") + "} /qr"; + String sysroot = System.Environment.SystemDirectory; + System.Diagnostics.Process.Start(sysroot + "\\msiexec.exe ", code).WaitForExit(); + + + } + catch (Exception e) + { + MessageBox.Show("�ɰ汾ж��ʧ�ܣ�" + e.Message); + } + + } + private static String getProductCode(String programName) + { + string productCode = ""; + + // �����32λ����ϵͳ��������ϵͳ��64λ������Ҳ��64λ�� + string bit32 = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; + Microsoft.Win32.RegistryKey localMachine = Microsoft.Win32.Registry.LocalMachine; + Microsoft.Win32.RegistryKey Uninstall = localMachine.OpenSubKey(bit32, true); + + foreach (string subkey in Uninstall.GetSubKeyNames()) + { + Microsoft.Win32.RegistryKey productcode = Uninstall.OpenSubKey(subkey); + try + { + string displayname = productcode.GetValue("DisplayName").ToString(); + if (displayname == programName) + { + string uninstallString = productcode.GetValue("UninstallString").ToString(); + + string[] strs = uninstallString.Split(new char[2] { '{', '}' }); + productCode = strs[1]; + return productCode; + } + } + catch + { + continue; + } + } + return productCode; + } + + + + } +} diff --git a/FrmFlagManagers.cs b/FrmFlagManagers.cs index 2fca3f5..37e622e 100644 --- a/FrmFlagManagers.cs +++ b/FrmFlagManagers.cs @@ -47,12 +47,18 @@ void pager1_OnEndExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } void pager1_OnStartExport(object sender, EventArgs e) { - + int pageIndex = winGridViewPager1.PagerInfo.CurrenetPageIndex; + string where = GetSql(1); + DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, where).Tables[0]; + this.winGridViewPager1.AllToExport = table; } @@ -247,8 +253,7 @@ string sqlData = GetSql(pageIndex); initlizeDatagrid(); DataTable table = OracleUtils.ExecuteDataset(OracleUtils.ConnectionString, CommandType.Text, sqlData).Tables[0]; - winGridViewPager1.DataSource = table.DefaultView; - + winGridViewPager1.DataSource = table.DefaultView; winGridViewPager1.Refresh(); } @@ -262,6 +267,31 @@ winGridViewPager1.Refresh(); } + private string GetSql() + { + + string sqlCount = "select count(*) from 标识器 where 使用状态 = '使用中'"; + + string sqlData = "select 编号,标识器ID号,标识器型号,地面高程,标识器埋深,对象编号,对象类型,所属道路,LSSYS_ID,X坐标,Y坐标,使用状态 " + + "from (select t.*,rownum row_num from 标识器 t where 使用状态 = '使用中' order by 编号)b " + + " where 1=1"; + + if (!String.IsNullOrEmpty(txt_no.Text.Trim())) + { + sqlCount += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + sqlData += " and 编号 like '%" + txt_no.Text.Trim() + "%'"; + } + if (null != combo_street.SelectedItem && !String.IsNullOrEmpty(combo_street.SelectedItem.ToString().Trim())) + { + sqlData += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + sqlCount += " and 所属道路='" + combo_street.SelectedItem.ToString().Trim() + "'"; + } + + rows = int.Parse(OracleUtils.ExecuteScalar(OracleUtils.ConnectionString, CommandType.Text, sqlCount).ToString()); + + return sqlData; + } + private string GetSql(int pageIndex) { diff --git a/MainFrm.cs b/MainFrm.cs index a7901c1..14a845a 100644 --- a/MainFrm.cs +++ b/MainFrm.cs @@ -744,10 +744,12 @@ { buttonItem_TaskManager.Visible = false; } - if (Utility.userRole.IndexOf("在线任务") < 0) - { - buttonItem_OnlineTask.Visible = false; - } + buttonItem_OnlineTask.Visible = false; + + //if (Utility.userRole.IndexOf("在线任务") < 0) + //{ + // buttonItem_OnlineTask.Visible = false; + //} if (Utility.userRole.IndexOf("事件管理") < 0) { buttonItem_Event.Visible = false; diff --git a/MainFrm.designer.cs b/MainFrm.designer.cs index c4bd11b..094bf8c 100644 --- a/MainFrm.designer.cs +++ b/MainFrm.designer.cs @@ -30,17 +30,17 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components); this.dockSite4 = new DevComponents.DotNetBar.DockSite(); this.dockSite1 = new DevComponents.DotNetBar.DockSite(); @@ -82,7 +82,6 @@ this.sideBar1 = new DevComponents.DotNetBar.SideBar(); this.panelEx3 = new DevComponents.DotNetBar.PanelEx(); this.layerSensorTree = new System.Windows.Forms.TreeView(); - this.layerTree = new Cyberpipe.MyTreeView(); this.sideBarPanelItem3 = new DevComponents.DotNetBar.SideBarPanelItem(); this.controlContainerItem3 = new DevComponents.DotNetBar.ControlContainerItem(); this.sideBarPanelItem4 = new DevComponents.DotNetBar.SideBarPanelItem(); @@ -366,16 +365,16 @@ this.可编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.保存ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ribbonControl1 = new DevComponents.DotNetBar.RibbonControl(); - this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); - this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); - this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); - this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel3 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar3 = new DevComponents.DotNetBar.RibbonBar(); this.btn_device = new DevComponents.DotNetBar.ButtonItem(); this.btn_Person = new DevComponents.DotNetBar.ButtonItem(); this.btn_constructMap = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem9 = new DevComponents.DotNetBar.ButtonItem(); + this.ribbonPanel7 = new DevComponents.DotNetBar.RibbonPanel(); + this.ribbonBar5 = new DevComponents.DotNetBar.RibbonBar(); + this.btn_flag = new DevComponents.DotNetBar.ButtonItem(); + this.slider4ground = new DevComponents.DotNetBar.SliderItem(); this.ribbonPanel15 = new DevComponents.DotNetBar.RibbonPanel(); this.ribbonBar20 = new DevComponents.DotNetBar.RibbonBar(); this.buttonItemSH = new DevComponents.DotNetBar.ButtonItem(); @@ -654,6 +653,7 @@ this.buttonItem84 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem75 = new DevComponents.DotNetBar.ButtonItem(); this.buttonItem76 = new DevComponents.DotNetBar.ButtonItem(); + this.layerTree = new Cyberpipe.MyTreeView(); this.statusStrip1.SuspendLayout(); this.sideBar1.SuspendLayout(); this.panelEx3.SuspendLayout(); @@ -690,8 +690,8 @@ this.contextMenuStrip3.SuspendLayout(); this.contextMenuStripDeleteLayerNode.SuspendLayout(); this.ribbonControl1.SuspendLayout(); - this.ribbonPanel7.SuspendLayout(); this.ribbonPanel3.SuspendLayout(); + this.ribbonPanel7.SuspendLayout(); this.ribbonPanel15.SuspendLayout(); this.ribbonPanel6.SuspendLayout(); this.ribbonPanel8.SuspendLayout(); @@ -1094,16 +1094,6 @@ this.layerSensorTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerMarkerTree_AfterCheck); this.layerSensorTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.layerMarkerTree_NodeMouseClick); // - // layerTree - // - this.layerTree.CheckBoxes = true; - this.layerTree.ItemHeight = 18; - this.layerTree.Location = new System.Drawing.Point(30, 78); - this.layerTree.Name = "layerTree"; - this.layerTree.Size = new System.Drawing.Size(121, 97); - this.layerTree.TabIndex = 1; - this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); - // // sideBarPanelItem3 // this.sideBarPanelItem3.FontBold = true; @@ -1207,14 +1197,14 @@ this.dataGridViewX4.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX4.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewX4.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX4.Location = new System.Drawing.Point(11, 81); this.dataGridViewX4.Name = "dataGridViewX4"; @@ -1292,14 +1282,14 @@ this.dataGridViewTextBoxColumn4, this.Column3, this.Column4}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX5.DefaultCellStyle = dataGridViewCellStyle13; this.dataGridViewX5.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX5.Location = new System.Drawing.Point(11, 225); this.dataGridViewX5.Name = "dataGridViewX5"; @@ -1493,14 +1483,14 @@ this.dataGridViewX6.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX6.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridViewX6.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX6.Location = new System.Drawing.Point(10, 124); this.dataGridViewX6.Name = "dataGridViewX6"; @@ -1577,14 +1567,14 @@ this.dataGridViewTextBoxColumn7, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9}); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX7.DefaultCellStyle = dataGridViewCellStyle15; this.dataGridViewX7.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX7.Location = new System.Drawing.Point(10, 275); this.dataGridViewX7.Name = "dataGridViewX7"; @@ -1796,14 +1786,14 @@ this.dataGridViewX8.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX8.DefaultCellStyle = dataGridViewCellStyle16; this.dataGridViewX8.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX8.Location = new System.Drawing.Point(10, 118); this.dataGridViewX8.Name = "dataGridViewX8"; @@ -1891,14 +1881,14 @@ this.dataGridViewTextBoxColumn16, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn18}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX9.DefaultCellStyle = dataGridViewCellStyle17; this.dataGridViewX9.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX9.Location = new System.Drawing.Point(8, 269); this.dataGridViewX9.Name = "dataGridViewX9"; @@ -2220,14 +2210,14 @@ this.dataGridViewLineList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20}); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewLineList.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridViewLineList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewLineList.Location = new System.Drawing.Point(9, 155); this.dataGridViewLineList.Name = "dataGridViewLineList"; @@ -2315,14 +2305,14 @@ this.dataGridViewTextBoxColumn24, this.dataGridViewTextBoxColumn25, this.水平净距}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewAnalysisResult.DefaultCellStyle = dataGridViewCellStyle19; this.dataGridViewAnalysisResult.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewAnalysisResult.Location = new System.Drawing.Point(8, 310); this.dataGridViewAnalysisResult.Name = "dataGridViewAnalysisResult"; @@ -2557,14 +2547,14 @@ this.dataGridViewX2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11}); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX2.DefaultCellStyle = dataGridViewCellStyle20; this.dataGridViewX2.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX2.Location = new System.Drawing.Point(9, 130); this.dataGridViewX2.Name = "dataGridViewX2"; @@ -2651,14 +2641,14 @@ this.Column6, this.Colomn12, this.Column5}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX3.DefaultCellStyle = dataGridViewCellStyle21; this.dataGridViewX3.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX3.Location = new System.Drawing.Point(8, 276); this.dataGridViewX3.Name = "dataGridViewX3"; @@ -3776,14 +3766,14 @@ this.dataGridViewX1.AllowUserToAddRows = false; this.dataGridViewX1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewX1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewX1.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridViewX1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewX1.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); this.dataGridViewX1.Location = new System.Drawing.Point(0, 5); @@ -4171,15 +4161,15 @@ // this.ribbonControl1.BackgroundStyle.Class = ""; this.ribbonControl1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonControl1.Controls.Add(this.ribbonPanel2); + this.ribbonControl1.Controls.Add(this.ribbonPanel15); + this.ribbonControl1.Controls.Add(this.ribbonPanel8); this.ribbonControl1.Controls.Add(this.ribbonPanel7); this.ribbonControl1.Controls.Add(this.ribbonPanel3); - this.ribbonControl1.Controls.Add(this.ribbonPanel15); - this.ribbonControl1.Controls.Add(this.ribbonPanel6); - this.ribbonControl1.Controls.Add(this.ribbonPanel8); - this.ribbonControl1.Controls.Add(this.ribbonPanel2); - this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel12); this.ribbonControl1.Controls.Add(this.ribbonPanel5); + this.ribbonControl1.Controls.Add(this.ribbonPanel6); + this.ribbonControl1.Controls.Add(this.ribbonPanel1); this.ribbonControl1.Controls.Add(this.ribbonPanel4); this.ribbonControl1.Dock = System.Windows.Forms.DockStyle.Top; this.ribbonControl1.ImeMode = System.Windows.Forms.ImeMode.NoControl; @@ -4226,84 +4216,6 @@ this.ribbonControl1.UseCustomizeDialog = false; this.ribbonControl1.Click += new System.EventHandler(this.ribbonControl1_Click); // - // ribbonPanel7 - // - this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonPanel7.Controls.Add(this.ribbonBar5); - this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); - this.ribbonPanel7.Name = "ribbonPanel7"; - this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); - // - // - // - this.ribbonPanel7.Style.Class = ""; - this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseDown.Class = ""; - this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonPanel7.StyleMouseOver.Class = ""; - this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonPanel7.TabIndex = 41; - // - // ribbonBar5 - // - this.ribbonBar5.AutoOverflowEnabled = true; - // - // - // - this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; - this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.BackgroundStyle.Class = ""; - this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.ContainerControlProcessDialogKey = true; - this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; - this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.btn_flag, - this.slider4ground}); - this.ribbonBar5.Location = new System.Drawing.Point(3, 0); - this.ribbonBar5.Name = "ribbonBar5"; - this.ribbonBar5.Size = new System.Drawing.Size(427, 59); - this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ribbonBar5.TabIndex = 0; - // - // - // - this.ribbonBar5.TitleStyle.Class = ""; - this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.ribbonBar5.TitleStyleMouseOver.Class = ""; - this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.ribbonBar5.TitleVisible = false; - // - // btn_flag - // - this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; - this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; - this.btn_flag.Name = "btn_flag"; - this.btn_flag.SubItemsExpandWidth = 14; - this.btn_flag.Text = "标识器管理"; - this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); - // - // slider4ground - // - this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; - this.slider4ground.Name = "slider4ground"; - this.slider4ground.Text = "地面透明度"; - this.slider4ground.Value = 0; - this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); - // // ribbonPanel3 // this.ribbonPanel3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -4406,6 +4318,85 @@ this.buttonItem9.Text = "文档管理"; this.buttonItem9.Click += new System.EventHandler(this.buttonItem9_Click); // + // ribbonPanel7 + // + this.ribbonPanel7.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonPanel7.Controls.Add(this.ribbonBar5); + this.ribbonPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.ribbonPanel7.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel7.Name = "ribbonPanel7"; + this.ribbonPanel7.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); + this.ribbonPanel7.Size = new System.Drawing.Size(1328, 62); + // + // + // + this.ribbonPanel7.Style.Class = ""; + this.ribbonPanel7.Style.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseDown.Class = ""; + this.ribbonPanel7.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonPanel7.StyleMouseOver.Class = ""; + this.ribbonPanel7.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonPanel7.TabIndex = 41; + this.ribbonPanel7.Visible = false; + // + // ribbonBar5 + // + this.ribbonBar5.AutoOverflowEnabled = true; + // + // + // + this.ribbonBar5.BackgroundMouseOverStyle.Class = ""; + this.ribbonBar5.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.BackgroundStyle.Class = ""; + this.ribbonBar5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.ContainerControlProcessDialogKey = true; + this.ribbonBar5.Dock = System.Windows.Forms.DockStyle.Left; + this.ribbonBar5.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { + this.btn_flag, + this.slider4ground}); + this.ribbonBar5.Location = new System.Drawing.Point(3, 0); + this.ribbonBar5.Name = "ribbonBar5"; + this.ribbonBar5.Size = new System.Drawing.Size(427, 59); + this.ribbonBar5.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.ribbonBar5.TabIndex = 0; + // + // + // + this.ribbonBar5.TitleStyle.Class = ""; + this.ribbonBar5.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.ribbonBar5.TitleStyleMouseOver.Class = ""; + this.ribbonBar5.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.ribbonBar5.TitleVisible = false; + // + // btn_flag + // + this.btn_flag.Image = global::Cyberpipe.Properties.Resources._24x24icon_03_hover; + this.btn_flag.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top; + this.btn_flag.Name = "btn_flag"; + this.btn_flag.SubItemsExpandWidth = 14; + this.btn_flag.Text = "标识器管理"; + this.btn_flag.Click += new System.EventHandler(this.btn_flag_Click); + // + // slider4ground + // + this.slider4ground.LabelPosition = DevComponents.DotNetBar.eSliderLabelPosition.Top; + this.slider4ground.Name = "slider4ground"; + this.slider4ground.Text = "地面透明度"; + this.slider4ground.Value = 0; + this.slider4ground.ValueChanged += new System.EventHandler(this.slider4ground_ValueChanged); + // // ribbonPanel15 // this.ribbonPanel15.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -5901,10 +5892,10 @@ this.ribbonPanel8.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel8.Controls.Add(this.ribbonBar_UserInfo); this.ribbonPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel8.Location = new System.Drawing.Point(0, 0); + this.ribbonPanel8.Location = new System.Drawing.Point(0, 33); this.ribbonPanel8.Name = "ribbonPanel8"; this.ribbonPanel8.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel8.Size = new System.Drawing.Size(1328, 95); + this.ribbonPanel8.Size = new System.Drawing.Size(1328, 62); // // // @@ -5948,7 +5939,7 @@ this.btn_reset_password}); this.ribbonBar_UserInfo.Location = new System.Drawing.Point(3, 0); this.ribbonBar_UserInfo.Name = "ribbonBar_UserInfo"; - this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 92); + this.ribbonBar_UserInfo.Size = new System.Drawing.Size(427, 59); this.ribbonBar_UserInfo.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar_UserInfo.TabIndex = 0; // @@ -6050,7 +6041,6 @@ this.ribbonPanel2.StyleMouseOver.Class = ""; this.ribbonPanel2.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.ribbonPanel2.TabIndex = 39; - this.ribbonPanel2.Visible = false; // // ribbonBar4 // @@ -6456,10 +6446,10 @@ this.ribbonPanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonPanel5.Controls.Add(this.ribbonBar2); this.ribbonPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.ribbonPanel5.Location = new System.Drawing.Point(0, 33); + this.ribbonPanel5.Location = new System.Drawing.Point(0, 0); this.ribbonPanel5.Name = "ribbonPanel5"; this.ribbonPanel5.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); - this.ribbonPanel5.Size = new System.Drawing.Size(1328, 62); + this.ribbonPanel5.Size = new System.Drawing.Size(1328, 95); // // // @@ -6500,7 +6490,7 @@ this.sliderItem3}); this.ribbonBar2.Location = new System.Drawing.Point(3, 0); this.ribbonBar2.Name = "ribbonBar2"; - this.ribbonBar2.Size = new System.Drawing.Size(379, 59); + this.ribbonBar2.Size = new System.Drawing.Size(379, 92); this.ribbonBar2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.ribbonBar2.TabIndex = 0; // @@ -6766,6 +6756,7 @@ // ribbonTabItem2 // this.ribbonTabItem2.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; + this.ribbonTabItem2.Checked = true; this.ribbonTabItem2.ColorTable = DevComponents.DotNetBar.eRibbonTabColor.Green; this.ribbonTabItem2.HoverImage = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.HoverImage"))); this.ribbonTabItem2.Image = ((System.Drawing.Image)(resources.GetObject("ribbonTabItem2.Image"))); @@ -6787,7 +6778,6 @@ // ribbonTabItem7 // this.ribbonTabItem7.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText; - this.ribbonTabItem7.Checked = true; this.ribbonTabItem7.HoverImage = global::Cyberpipe.Properties.Resources._24x24icon_04_hover1; this.ribbonTabItem7.Image = global::Cyberpipe.Properties.Resources._24x24icon_041; this.ribbonTabItem7.Name = "ribbonTabItem7"; @@ -7108,6 +7098,16 @@ this.buttonItem76.SubItemsExpandWidth = 14; this.buttonItem76.Text = "坐标标注"; // + // layerTree + // + this.layerTree.CheckBoxes = true; + this.layerTree.ItemHeight = 18; + this.layerTree.Location = new System.Drawing.Point(30, 78); + this.layerTree.Name = "layerTree"; + this.layerTree.Size = new System.Drawing.Size(121, 97); + this.layerTree.TabIndex = 1; + this.layerTree.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.layerTree_AfterCheck); + // // MainFrm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -7181,8 +7181,8 @@ this.contextMenuStripDeleteLayerNode.ResumeLayout(false); this.ribbonControl1.ResumeLayout(false); this.ribbonControl1.PerformLayout(); - this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel3.ResumeLayout(false); + this.ribbonPanel7.ResumeLayout(false); this.ribbonPanel15.ResumeLayout(false); this.ribbonPanel6.ResumeLayout(false); this.ribbonPanel8.ResumeLayout(false); diff --git a/MainFrm.resx b/MainFrm.resx index 1a0c130..56b95f8 100644 --- a/MainFrm.resx +++ b/MainFrm.resx @@ -1781,6 +1781,9 @@ 864, 17 + + 864, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/Resources/title.jpg b/Resources/title.jpg index 80a6023..e416495 100644 --- a/Resources/title.jpg +++ b/Resources/title.jpg Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.exe b/bin/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/bin/x86/Debug/EMSCyberpipe.exe +++ b/bin/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/bin/x86/Debug/EMSCyberpipe.pdb b/bin/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/bin/x86/Debug/EMSCyberpipe.pdb +++ b/bin/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/bin/x86/Debug/Resource/title.jpg b/bin/x86/Debug/Resource/title.jpg index 80a6023..e416495 100644 --- a/bin/x86/Debug/Resource/title.jpg +++ b/bin/x86/Debug/Resource/title.jpg Binary files differ diff --git a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources index 58ecaa2..11c13d8 100644 --- a/obj/x86/Debug/Cyberpipe.Properties.Resources.resources +++ b/obj/x86/Debug/Cyberpipe.Properties.Resources.resources Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache index ce07e15..b1ae22e 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache Binary files differ diff --git a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache index cb2f611..c35ca75 100644 --- a/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache +++ b/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.exe b/obj/x86/Debug/EMSCyberpipe.exe index 5a6c31d..8ec8ff8 100644 --- a/obj/x86/Debug/EMSCyberpipe.exe +++ b/obj/x86/Debug/EMSCyberpipe.exe Binary files differ diff --git a/obj/x86/Debug/EMSCyberpipe.pdb b/obj/x86/Debug/EMSCyberpipe.pdb index 3aaf32a..9d34e40 100644 --- a/obj/x86/Debug/EMSCyberpipe.pdb +++ b/obj/x86/Debug/EMSCyberpipe.pdb Binary files differ diff --git a/obj/x86/Debug/GenerateResource.read.1.tlog b/obj/x86/Debug/GenerateResource.read.1.tlog index ffb1c26..2e7aedc 100644 --- a/obj/x86/Debug/GenerateResource.read.1.tlog +++ b/obj/x86/Debug/GenerateResource.read.1.tlog Binary files differ diff --git a/obj/x86/Debug/ResolveAssemblyReference.cache b/obj/x86/Debug/ResolveAssemblyReference.cache index fa82c2f..e85e2b1 100644 --- a/obj/x86/Debug/ResolveAssemblyReference.cache +++ b/obj/x86/Debug/ResolveAssemblyReference.cache Binary files differ