MainForm.cs
上传用户:chizxy
上传日期:2014-11-29
资源大小:407k
文件大小:94k
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Data;
- using System.Data.SqlClient;
- using System.Threading;
- //引用第三方控件名字空间
- using Crownwood.DotNetMagic.Common;
- using Crownwood.DotNetMagic.Menus;
- using Crownwood.DotNetMagic.Docking;
- using Crownwood.DotNetMagic.Controls;
- using Crownwood.DotNetMagic.Controls.Command;
- namespace MKIms3
- {
- /// <summary>
- /// Form1 的摘要说明。
- /// </summary>
- public class MainForm : System.Windows.Forms.Form
- {
- private DockingManager dockingManager;
- private bool closeButtons;
- private bool captionBars;
- private Content kong_query;
- private Content map_manage;
- private Content legend;
- private Content other_query;
- private string mapname;
- private SuperMapLib.soGeometry flash_Geo;
- private int flash_i; //闪烁标志
- private int form_opactiy; //窗体透明度
- enum enum_option_track {query,add_point,other_query};// 用来标记track层上的具体动作
- private int option_track;
- private string data_map_name;
- private Login myl;
- #region 系统自动生成的字段
- private Crownwood.DotNetMagic.Menus.MenuControl menu_Main;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_sys;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_pwd_change;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_user_manage;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_logout;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand19;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_kong;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_map_manage;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_tool;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_yan_manage;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_view;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_data_out;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_kong_query;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_kong_add;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_map_out;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_map_print;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_fill_edit;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_yan_edit;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_zoom_in;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_zoom_out;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_pan;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_full_view;
- private System.Windows.Forms.ImageList imageList;
- private Crownwood.DotNetMagic.Controls.StatusBarControl statusBarControl1;
- private System.Windows.Forms.Panel panel_kong_query;
- private System.Windows.Forms.Panel panel_map_manage;
- private System.Windows.Forms.Panel panel_legend;
- private AxSuperMapLib.AxSuperMap axSuperMap1;
- private AxSuperLegendLib.AxSuperLegend axSuperLegend1;
- private AxSuperWkspManagerLib.AxSuperWkspManager axSuperWkspManager1;
-
- private AxSuperMapLib.AxSuperMap axSuperMap2;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_legend;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_kong;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_map;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_all;
- private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_close;
- private System.Windows.Forms.GroupBox groupBox_query;
- private System.Windows.Forms.GroupBox groupBox_re_kong;
- private System.Windows.Forms.GroupBox groupBox_re_map;
- private System.Windows.Forms.Panel panel_query_result;
- private System.Windows.Forms.TextBox txt_k_id;
- private Crownwood.DotNetMagic.Controls.ButtonWithStyle btn_map_query;
- private Crownwood.DotNetMagic.Controls.ButtonWithStyle btn_clear_select;
- private System.Windows.Forms.GroupBox groupBox_map_query;
- private System.Windows.Forms.ListView listView_re_kong;
- private System.Windows.Forms.ColumnHeader columnHeader2;
- private System.Windows.Forms.ListView listView_re_map;
- private System.Windows.Forms.ColumnHeader columnHeader4;
- private System.Windows.Forms.Splitter splitter_re_map_kong;
- private System.Windows.Forms.Panel panel_query_bianhao;
- private System.Windows.Forms.Timer timer_flash_kong;
- private System.Windows.Forms.ContextMenu contextMenu_kong;
- private System.Windows.Forms.MenuItem menu_k_position;
- private System.Windows.Forms.MenuItem menu_k_info;
- private System.Windows.Forms.MenuItem menu_k_del;
- private System.Windows.Forms.Button btn_query;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_k_addDATA;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_k_addMAP;
- private Crownwood.DotNetMagic.Controls.ToolControl toolControl2;
- private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_null;
- private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_in;
- private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_out;
- private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_free;
- private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_pan;
- private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_full;
- private Crownwood.DotNetMagic.Controls.Command.SeparatorCommand separatorCommand1;
- private Crownwood.DotNetMagic.Controls.Command.SeparatorCommand separatorCommand2;
- private System.Windows.Forms.Panel panel_query_other;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.ListView listView_r_other;
- private System.Windows.Forms.ColumnHeader columnHeader1;
- private System.Windows.Forms.Button btn_other_query_draw;
- private System.Windows.Forms.Button btn_other_query;
- private System.Windows.Forms.RadioButton radioButton_jinbian;
- private System.Windows.Forms.RadioButton radioButton_dixian;
- private System.Windows.Forms.RadioButton radioButton_kanxian;
- private System.Windows.Forms.TextBox textBox_other;
- private System.Windows.Forms.ToolTip toolTip1;
- private System.Windows.Forms.ContextMenu contextMenu_other;
- private System.Windows.Forms.MenuItem menuItem_other_map_ding;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_query_other;
- private Crownwood.DotNetMagic.Controls.StatusPanel statusPanel_user;
- private Crownwood.DotNetMagic.Controls.StatusPanel statusPanel_xy;
- private Crownwood.DotNetMagic.Controls.StatusPanel statusPanel_infor;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand1;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_help;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_about;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_null;
- private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_free;
- private System.Windows.Forms.Timer timer_form;
- private AxSuperMapLib.AxSuperWorkspace axSuperWorkspace1;
- private System.ComponentModel.IContainer components;
- #endregion
- public MainForm()
- {
- //使用双缓冲
- SetStyle(ControlStyles.DoubleBuffer, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- //
- // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
- //
-
- captionBars = true;
- closeButtons = true;
- //ignoreClose =1;
- dockingManager = new DockingManager(this, VisualStyle.Office2003);
- dockingManager.ContentShown += new DockingManager.ContentHandler(OnContentShown);
- dockingManager.ContentHidden += new DockingManager.ContentHandler(OnContentHidden);
- dockingManager.ContentHiding += new DockingManager.ContentHidingHandler(OnContentHiding);
-
-
- dockingManager.InnerControl = this.axSuperMap2;
- dockingManager.OuterControl = this.toolControl2;
- }
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
-
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
- #region Windows 窗体设计器生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
- this.panel_legend = new System.Windows.Forms.Panel();
- this.axSuperLegend1 = new AxSuperLegendLib.AxSuperLegend();
- this.axSuperMap1 = new AxSuperMapLib.AxSuperMap();
- this.menu_Main = new Crownwood.DotNetMagic.Menus.MenuControl();
- this.menuCommand_sys = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_pwd_change = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_user_manage = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_logout = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_kong = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_data_out = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_kong_query = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand19 = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_kong_add = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand_k_addDATA = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand_k_addMAP = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_map_manage = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_map_out = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_map_print = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_yan_manage = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_fill_edit = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_yan_edit = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_tool = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand_null = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_zoom_in = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_zoom_out = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand_free = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_pan = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_full_view = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_view = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_mianban_kong = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_mianban_map = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_mianban_legend = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand_query_other = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_mianban_all = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menu_mianban_close = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand1 = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand_help = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.menuCommand_about = new Crownwood.DotNetMagic.Menus.MenuCommand();
- this.imageList = new System.Windows.Forms.ImageList(this.components);
- this.statusBarControl1 = new Crownwood.DotNetMagic.Controls.StatusBarControl();
- this.statusPanel_infor = new Crownwood.DotNetMagic.Controls.StatusPanel();
- this.statusPanel_user = new Crownwood.DotNetMagic.Controls.StatusPanel();
- this.statusPanel_xy = new Crownwood.DotNetMagic.Controls.StatusPanel();
- this.panel_kong_query = new System.Windows.Forms.Panel();
- this.panel_query_result = new System.Windows.Forms.Panel();
- this.groupBox_re_map = new System.Windows.Forms.GroupBox();
- this.listView_re_map = new System.Windows.Forms.ListView();
- this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
- this.splitter_re_map_kong = new System.Windows.Forms.Splitter();
- this.groupBox_re_kong = new System.Windows.Forms.GroupBox();
- this.listView_re_kong = new System.Windows.Forms.ListView();
- this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
- this.contextMenu_kong = new System.Windows.Forms.ContextMenu();
- this.menu_k_position = new System.Windows.Forms.MenuItem();
- this.menu_k_info = new System.Windows.Forms.MenuItem();
- this.menu_k_del = new System.Windows.Forms.MenuItem();
- this.panel_query_bianhao = new System.Windows.Forms.Panel();
- this.groupBox_query = new System.Windows.Forms.GroupBox();
- this.btn_query = new System.Windows.Forms.Button();
- this.txt_k_id = new System.Windows.Forms.TextBox();
- this.groupBox_map_query = new System.Windows.Forms.GroupBox();
- this.btn_map_query = new Crownwood.DotNetMagic.Controls.ButtonWithStyle();
- this.btn_clear_select = new Crownwood.DotNetMagic.Controls.ButtonWithStyle();
- this.panel_map_manage = new System.Windows.Forms.Panel();
- this.axSuperWkspManager1 = new AxSuperWkspManagerLib.AxSuperWkspManager();
- this.timer_flash_kong = new System.Windows.Forms.Timer(this.components);
- this.toolControl2 = new Crownwood.DotNetMagic.Controls.ToolControl();
- this.separatorCommand1 = new Crownwood.DotNetMagic.Controls.Command.SeparatorCommand();
- this.buttonCommand_null = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
- this.separatorCommand2 = new Crownwood.DotNetMagic.Controls.Command.SeparatorCommand();
- this.buttonCommand_in = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
- this.buttonCommand_out = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
- this.buttonCommand_free = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
- this.buttonCommand_pan = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
- this.buttonCommand_full = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
- this.axSuperMap2 = new AxSuperMapLib.AxSuperMap();
- this.panel_query_other = new System.Windows.Forms.Panel();
- this.listView_r_other = new System.Windows.Forms.ListView();
- this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
- this.contextMenu_other = new System.Windows.Forms.ContextMenu();
- this.menuItem_other_map_ding = new System.Windows.Forms.MenuItem();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.btn_other_query = new System.Windows.Forms.Button();
- this.textBox_other = new System.Windows.Forms.TextBox();
- this.btn_other_query_draw = new System.Windows.Forms.Button();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.radioButton_kanxian = new System.Windows.Forms.RadioButton();
- this.radioButton_dixian = new System.Windows.Forms.RadioButton();
- this.radioButton_jinbian = new System.Windows.Forms.RadioButton();
- this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.timer_form = new System.Windows.Forms.Timer(this.components);
- this.axSuperWorkspace1 = new AxSuperMapLib.AxSuperWorkspace();
- this.panel_legend.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.axSuperLegend1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.axSuperMap1)).BeginInit();
- this.panel_kong_query.SuspendLayout();
- this.panel_query_result.SuspendLayout();
- this.groupBox_re_map.SuspendLayout();
- this.groupBox_re_kong.SuspendLayout();
- this.panel_query_bianhao.SuspendLayout();
- this.groupBox_query.SuspendLayout();
- this.groupBox_map_query.SuspendLayout();
- this.panel_map_manage.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.axSuperWkspManager1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.toolControl2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.axSuperMap2)).BeginInit();
- this.panel_query_other.SuspendLayout();
- this.groupBox2.SuspendLayout();
- this.groupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.axSuperWorkspace1)).BeginInit();
- this.SuspendLayout();
- //
- // panel_legend
- //
- this.panel_legend.Controls.Add(this.axSuperLegend1);
- this.panel_legend.Controls.Add(this.axSuperMap1);
- this.panel_legend.Location = new System.Drawing.Point(456, 88);
- this.panel_legend.Name = "panel_legend";
- this.panel_legend.Size = new System.Drawing.Size(168, 232);
- this.panel_legend.TabIndex = 10;
- //
- // axSuperLegend1
- //
- this.axSuperLegend1.ContainingControl = this;
- this.axSuperLegend1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.axSuperLegend1.Enabled = true;
- this.axSuperLegend1.Location = new System.Drawing.Point(0, 144);
- this.axSuperLegend1.Name = "axSuperLegend1";
- this.axSuperLegend1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperLegend1.OcxState")));
- this.axSuperLegend1.Size = new System.Drawing.Size(168, 88);
- this.axSuperLegend1.TabIndex = 1;
- this.axSuperLegend1.Modified += new System.EventHandler(this.axSuperLegend1_Modified);
- //
- // axSuperMap1
- //
- this.axSuperMap1.ContainingControl = this;
- this.axSuperMap1.Dock = System.Windows.Forms.DockStyle.Top;
- this.axSuperMap1.Enabled = true;
- this.axSuperMap1.Location = new System.Drawing.Point(0, 0);
- this.axSuperMap1.Name = "axSuperMap1";
- this.axSuperMap1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperMap1.OcxState")));
- this.axSuperMap1.Size = new System.Drawing.Size(168, 144);
- this.axSuperMap1.TabIndex = 0;
- this.axSuperMap1.MouseDownEvent += new AxSuperMapLib._DSuperMapEvents_MouseDownEventHandler(this.axSuperMap1_MouseDownEvent);
- //
- // menu_Main
- //
- this.menu_Main.AllowLayered = true;
- this.menu_Main.AnimateStyle = Crownwood.DotNetMagic.Menus.Animation.System;
- this.menu_Main.AnimateTime = 100;
- this.menu_Main.BackColor = System.Drawing.SystemColors.Control;
- this.menu_Main.Cursor = System.Windows.Forms.Cursors.Arrow;
- this.menu_Main.Direction = Crownwood.DotNetMagic.Common.LayoutDirection.Horizontal;
- this.menu_Main.Dock = System.Windows.Forms.DockStyle.Top;
- this.menu_Main.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((System.Byte)(134)));
- this.menu_Main.HighlightBackColor = System.Drawing.SystemColors.Highlight;
- this.menu_Main.HighlightTextColor = System.Drawing.SystemColors.MenuText;
- this.menu_Main.IgnoreF10 = false;
- this.menu_Main.Location = new System.Drawing.Point(0, 0);
- this.menu_Main.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menuCommand_sys,
- this.menu_kong,
- this.menu_map_manage,
- this.menu_yan_manage,
- this.menu_tool,
- this.menu_view,
- this.menuCommand1});
- this.menu_Main.Name = "menu_Main";
- this.menu_Main.PlainSelectedTextColor = System.Drawing.SystemColors.ActiveCaptionText;
- this.menu_Main.SelectedBackColor = System.Drawing.SystemColors.Control;
- this.menu_Main.SelectedTextColor = System.Drawing.SystemColors.MenuText;
- this.menu_Main.Size = new System.Drawing.Size(832, 25);
- this.menu_Main.Style = Crownwood.DotNetMagic.Common.VisualStyle.IDE2005;
- this.menu_Main.TabIndex = 0;
- this.menu_Main.TabStop = false;
- this.menu_Main.Text = "menu_Mian";
- this.menu_Main.TextColor = System.Drawing.SystemColors.MenuText;
- //
- // menuCommand_sys
- //
- this.menuCommand_sys.Description = "Menu";
- this.menuCommand_sys.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menu_pwd_change,
- this.menu_user_manage,
- this.menu_logout});
- this.menuCommand_sys.Text = " 系统管理 (&S)";
- //
- // menu_pwd_change
- //
- this.menu_pwd_change.Description = "Menu";
- this.menu_pwd_change.Text = "密码修改";
- this.menu_pwd_change.Click += new System.EventHandler(this.menu_pwd_change_Click);
- //
- // menu_user_manage
- //
- this.menu_user_manage.Description = "Menu";
- this.menu_user_manage.Text = "用户管理";
- this.menu_user_manage.Click += new System.EventHandler(this.menu_user_manage_Click);
- //
- // menu_logout
- //
- this.menu_logout.Description = "Menu";
- this.menu_logout.Text = "退出登陆";
- this.menu_logout.Click += new System.EventHandler(this.menu_logout_Click);
- //
- // menu_kong
- //
- this.menu_kong.Description = "Menu";
- this.menu_kong.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menu_data_out,
- this.menu_kong_query,
- this.menuCommand19,
- this.menu_kong_add});
- this.menu_kong.Text = "钻孔管理(&K)";
- //
- // menu_data_out
- //
- this.menu_data_out.Description = "Menu";
- this.menu_data_out.Text = "钻孔数据导出";
- this.menu_data_out.Click += new System.EventHandler(this.menu_data_out_Click);
- //
- // menu_kong_query
- //
- this.menu_kong_query.Description = "Menu";
- this.menu_kong_query.Text = "钻孔数据浏览";
- this.menu_kong_query.Click += new System.EventHandler(this.menu_kong_query_Click);
- //
- // menuCommand19
- //
- this.menuCommand19.Description = "Menu";
- this.menuCommand19.Text = "-";
- //
- // menu_kong_add
- //
- this.menu_kong_add.Description = "Menu";
- this.menu_kong_add.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menuCommand_k_addDATA,
- this.menuCommand_k_addMAP});
- this.menu_kong_add.Text = "钻孔数据添加";
- //
- // menuCommand_k_addDATA
- //
- this.menuCommand_k_addDATA.Description = "Menu";
- this.menuCommand_k_addDATA.Text = "直接录入";
- this.menuCommand_k_addDATA.Click += new System.EventHandler(this.menuCommand_k_addDATA_Click);
- //
- // menuCommand_k_addMAP
- //
- this.menuCommand_k_addMAP.Description = "Menu";
- this.menuCommand_k_addMAP.Text = "图上添加";
- this.menuCommand_k_addMAP.Click += new System.EventHandler(this.menuCommand_k_addMAP_Click);
- //
- // menu_map_manage
- //
- this.menu_map_manage.Description = "Menu";
- this.menu_map_manage.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menu_map_out,
- this.menu_map_print});
- this.menu_map_manage.Text = "地图管理(&M)";
- //
- // menu_map_out
- //
- this.menu_map_out.Description = "Menu";
- this.menu_map_out.Text = "当前数据集导出";
- this.menu_map_out.Click += new System.EventHandler(this.menu_map_out_Click);
- //
- // menu_map_print
- //
- this.menu_map_print.Description = "Menu";
- this.menu_map_print.Text = "地图打印输出";
- this.menu_map_print.Click += new System.EventHandler(this.menu_map_print_Click);
- //
- // menu_yan_manage
- //
- this.menu_yan_manage.Description = "Menu";
- this.menu_yan_manage.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menu_fill_edit,
- this.menu_yan_edit});
- this.menu_yan_manage.Text = "岩性管理(&R)";
- //
- // menu_fill_edit
- //
- this.menu_fill_edit.Description = "Menu";
- this.menu_fill_edit.Text = "填充库编辑";
- this.menu_fill_edit.Click += new System.EventHandler(this.menu_fill_edit_Click);
- //
- // menu_yan_edit
- //
- this.menu_yan_edit.Description = "Menu";
- this.menu_yan_edit.Text = "岩性库编辑";
- this.menu_yan_edit.Click += new System.EventHandler(this.menu_yan_edit_Click);
- //
- // menu_tool
- //
- this.menu_tool.Description = "Menu";
- this.menu_tool.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menuCommand_null,
- this.menu_zoom_in,
- this.menu_zoom_out,
- this.menuCommand_free,
- this.menu_pan,
- this.menu_full_view});
- this.menu_tool.Text = "工具(&T)";
- //
- // menuCommand_null
- //
- this.menuCommand_null.Description = "Menu";
- this.menuCommand_null.Text = "置空";
- this.menuCommand_null.Click += new System.EventHandler(this.menuCommand_null_Click);
- //
- // menu_zoom_in
- //
- this.menu_zoom_in.Description = "Menu";
- this.menu_zoom_in.Text = "放大";
- this.menu_zoom_in.Click += new System.EventHandler(this.buttonCommand_in_Click);
- //
- // menu_zoom_out
- //
- this.menu_zoom_out.Description = "Menu";
- this.menu_zoom_out.Text = "缩小";
- this.menu_zoom_out.Click += new System.EventHandler(this.buttonCommand_out_Click);
- //
- // menuCommand_free
- //
- this.menuCommand_free.Description = "Menu";
- this.menuCommand_free.Text = "自由缩放";
- this.menuCommand_free.Click += new System.EventHandler(this.menuCommand_free_Click);
- //
- // menu_pan
- //
- this.menu_pan.Description = "Menu";
- this.menu_pan.Text = "漫游";
- this.menu_pan.Click += new System.EventHandler(this.buttonCommand_pan_Click);
- //
- // menu_full_view
- //
- this.menu_full_view.Description = "Menu";
- this.menu_full_view.Text = "全图显示";
- this.menu_full_view.Click += new System.EventHandler(this.buttonCommand_full_Click);
- //
- // menu_view
- //
- this.menu_view.Description = "Menu";
- this.menu_view.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menu_mianban_kong,
- this.menu_mianban_map,
- this.menu_mianban_legend,
- this.menuCommand_query_other,
- this.menu_mianban_all,
- this.menu_mianban_close});
- this.menu_view.Text = "视图(&V)";
- //
- // menu_mianban_kong
- //
- this.menu_mianban_kong.Description = "Menu";
- this.menu_mianban_kong.Text = "钻孔信息查询";
- this.menu_mianban_kong.Click += new System.EventHandler(this.menu_mianban_kong_Click);
- this.menu_mianban_kong.Update += new System.EventHandler(this.menu_mianban_kong_Update);
- //
- // menu_mianban_map
- //
- this.menu_mianban_map.Description = "Menu";
- this.menu_mianban_map.Text = "地图数据管理";
- this.menu_mianban_map.Click += new System.EventHandler(this.menu_mianban_map_Click);
- this.menu_mianban_map.Update += new System.EventHandler(this.menu_mianban_map_Update);
- //
- // menu_mianban_legend
- //
- this.menu_mianban_legend.Description = "Menu";
- this.menu_mianban_legend.Text = "图例导航";
- this.menu_mianban_legend.Click += new System.EventHandler(this.menu_mianban_legend_Click);
- this.menu_mianban_legend.Update += new System.EventHandler(this.menu_mianban_legend_Update);
- //
- // menuCommand_query_other
- //
- this.menuCommand_query_other.Description = "Menu";
- this.menuCommand_query_other.Text = "其他查询";
- this.menuCommand_query_other.Click += new System.EventHandler(this.menuCommand_query_other_Click);
- this.menuCommand_query_other.Update += new System.EventHandler(this.menuCommand_query_other_Update);
- //
- // menu_mianban_all
- //
- this.menu_mianban_all.Description = "Menu";
- this.menu_mianban_all.Text = "显示所有面板";
- this.menu_mianban_all.Click += new System.EventHandler(this.menu_mianban_all_Click);
- //
- // menu_mianban_close
- //
- this.menu_mianban_close.Description = "Menu";
- this.menu_mianban_close.Text = "关闭所有面板";
- this.menu_mianban_close.Click += new System.EventHandler(this.menu_mianban_close_Click);
- //
- // menuCommand1
- //
- this.menuCommand1.Description = "Menu";
- this.menuCommand1.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
- this.menuCommand_help,
- this.menuCommand_about});
- this.menuCommand1.Text = "帮助 (&H)";
- //
- // menuCommand_help
- //
- this.menuCommand_help.Description = "Menu";
- this.menuCommand_help.Shortcut = System.Windows.Forms.Shortcut.F1;
- this.menuCommand_help.Text = "系统帮助";
- this.menuCommand_help.Click += new System.EventHandler(this.menuCommand_help_Click);
- //
- // menuCommand_about
- //
- this.menuCommand_about.Description = "Menu";
- this.menuCommand_about.Text = "关于我们";
- this.menuCommand_about.Click += new System.EventHandler(this.menuCommand_about_Click);
- //
- // imageList
- //
- this.imageList.ImageSize = new System.Drawing.Size(16, 16);
- this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
- this.imageList.TransparentColor = System.Drawing.Color.Transparent;
- //
- // statusBarControl1
- //
- this.statusBarControl1.Location = new System.Drawing.Point(0, 469);
- this.statusBarControl1.Name = "statusBarControl1";
- this.statusBarControl1.Size = new System.Drawing.Size(832, 24);
- this.statusBarControl1.StatusPanels.AddRange(new Crownwood.DotNetMagic.Controls.StatusPanel[] {
- this.statusPanel_infor,
- this.statusPanel_user,
- this.statusPanel_xy});
- this.statusBarControl1.TabIndex = 6;
- //
- // statusPanel_infor
- //
- this.statusPanel_infor.AutoScrollMargin = new System.Drawing.Size(0, 0);
- this.statusPanel_infor.AutoScrollMinSize = new System.Drawing.Size(0, 0);
- this.statusPanel_infor.AutoSizing = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
- this.statusPanel_infor.Location = new System.Drawing.Point(2, 2);
- this.statusPanel_infor.Name = "statusPanel_infor";
- this.statusPanel_infor.RequestedWidth = 200;
- this.statusPanel_infor.Size = new System.Drawing.Size(348, 18);
- this.statusPanel_infor.TabIndex = 0;
- this.statusPanel_infor.Text = "1111111111111";
- //
- // statusPanel_user
- //
- this.statusPanel_user.AutoScrollMargin = new System.Drawing.Size(0, 0);
- this.statusPanel_user.AutoScrollMinSize = new System.Drawing.Size(0, 0);
- this.statusPanel_user.Location = new System.Drawing.Point(2, 2);
- this.statusPanel_user.Name = "statusPanel_user";
- this.statusPanel_user.RequestedWidth = 200;
- this.statusPanel_user.Size = new System.Drawing.Size(200, 18);
- this.statusPanel_user.TabIndex = 0;
- this.statusPanel_user.Text = "2222222222222";
- //
- // statusPanel_xy
- //
- this.statusPanel_xy.AutoScrollMargin = new System.Drawing.Size(0, 0);
- this.statusPanel_xy.AutoScrollMinSize = new System.Drawing.Size(0, 0);
- this.statusPanel_xy.Location = new System.Drawing.Point(2, 2);
- this.statusPanel_xy.Name = "statusPanel_xy";
- this.statusPanel_xy.RequestedWidth = 250;
- this.statusPanel_xy.Size = new System.Drawing.Size(250, 18);
- this.statusPanel_xy.TabIndex = 0;
- this.statusPanel_xy.Text = "3";
- //
- // panel_kong_query
- //
- this.panel_kong_query.AutoScroll = true;
- this.panel_kong_query.Controls.Add(this.panel_query_result);
- this.panel_kong_query.Controls.Add(this.panel_query_bianhao);
- this.panel_kong_query.Location = new System.Drawing.Point(24, 72);
- this.panel_kong_query.Name = "panel_kong_query";
- this.panel_kong_query.Size = new System.Drawing.Size(144, 376);
- this.panel_kong_query.TabIndex = 8;
- //
- // panel_query_result
- //
- this.panel_query_result.Controls.Add(this.groupBox_re_map);
- this.panel_query_result.Controls.Add(this.splitter_re_map_kong);
- this.panel_query_result.Controls.Add(this.groupBox_re_kong);
- this.panel_query_result.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel_query_result.Location = new System.Drawing.Point(0, 96);
- this.panel_query_result.Name = "panel_query_result";
- this.panel_query_result.Size = new System.Drawing.Size(144, 280);
- this.panel_query_result.TabIndex = 3;
- //
- // groupBox_re_map
- //
- this.groupBox_re_map.Controls.Add(this.listView_re_map);
- this.groupBox_re_map.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBox_re_map.Location = new System.Drawing.Point(0, 156);
- this.groupBox_re_map.Name = "groupBox_re_map";
- this.groupBox_re_map.Size = new System.Drawing.Size(144, 124);
- this.groupBox_re_map.TabIndex = 2;
- this.groupBox_re_map.TabStop = false;
- this.groupBox_re_map.Text = "相关地图";
- //
- // listView_re_map
- //
- this.listView_re_map.BackColor = System.Drawing.Color.WhiteSmoke;
- this.listView_re_map.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.listView_re_map.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeader4});
- this.listView_re_map.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView_re_map.FullRowSelect = true;
- this.listView_re_map.GridLines = true;
- this.listView_re_map.Location = new System.Drawing.Point(3, 17);
- this.listView_re_map.MultiSelect = false;
- this.listView_re_map.Name = "listView_re_map";
- this.listView_re_map.Size = new System.Drawing.Size(138, 104);
- this.listView_re_map.SmallImageList = this.imageList;
- this.listView_re_map.TabIndex = 1;
- this.listView_re_map.View = System.Windows.Forms.View.Details;
- this.listView_re_map.DoubleClick += new System.EventHandler(this.listView_re_map_DoubleClick);
- //
- // columnHeader4
- //
- this.columnHeader4.Text = "地图名称";
- this.columnHeader4.Width = 117;
- //
- // splitter_re_map_kong
- //
- this.splitter_re_map_kong.Dock = System.Windows.Forms.DockStyle.Top;
- this.splitter_re_map_kong.Location = new System.Drawing.Point(0, 152);
- this.splitter_re_map_kong.Name = "splitter_re_map_kong";
- this.splitter_re_map_kong.Size = new System.Drawing.Size(144, 4);
- this.splitter_re_map_kong.TabIndex = 3;
- this.splitter_re_map_kong.TabStop = false;
- //
- // groupBox_re_kong
- //
- this.groupBox_re_kong.Controls.Add(this.listView_re_kong);
- this.groupBox_re_kong.Dock = System.Windows.Forms.DockStyle.Top;
- this.groupBox_re_kong.Location = new System.Drawing.Point(0, 0);
- this.groupBox_re_kong.Name = "groupBox_re_kong";
- this.groupBox_re_kong.Size = new System.Drawing.Size(144, 152);
- this.groupBox_re_kong.TabIndex = 1;
- this.groupBox_re_kong.TabStop = false;
- this.groupBox_re_kong.Text = "查询结果";
- //
- // listView_re_kong
- //
- this.listView_re_kong.BackColor = System.Drawing.Color.WhiteSmoke;
- this.listView_re_kong.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.listView_re_kong.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeader2});
- this.listView_re_kong.ContextMenu = this.contextMenu_kong;
- this.listView_re_kong.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView_re_kong.FullRowSelect = true;
- this.listView_re_kong.GridLines = true;
- this.listView_re_kong.HideSelection = false;
- this.listView_re_kong.Location = new System.Drawing.Point(3, 17);
- this.listView_re_kong.MultiSelect = false;
- this.listView_re_kong.Name = "listView_re_kong";
- this.listView_re_kong.Size = new System.Drawing.Size(138, 132);
- this.listView_re_kong.SmallImageList = this.imageList;
- this.listView_re_kong.TabIndex = 1;
- this.listView_re_kong.View = System.Windows.Forms.View.Details;
- this.listView_re_kong.DoubleClick += new System.EventHandler(this.listView_re_kong_DoubleClick);
- this.listView_re_kong.SelectedIndexChanged += new System.EventHandler(this.listView_re_kong_SelectedIndexChanged);
- //
- // columnHeader2
- //
- this.columnHeader2.Text = "钻孔编号";
- this.columnHeader2.Width = 118;
- //
- // contextMenu_kong
- //
- this.contextMenu_kong.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menu_k_position,
- this.menu_k_info,
- this.menu_k_del});
- //
- // menu_k_position
- //
- this.menu_k_position.Index = 0;
- this.menu_k_position.Text = "图上定位";
- this.menu_k_position.Click += new System.EventHandler(this.menu_k_position_Click);
- //
- // menu_k_info
- //
- this.menu_k_info.Index = 1;
- this.menu_k_info.Text = "详细信息";
- this.menu_k_info.Click += new System.EventHandler(this.menu_k_info_Click);
- //
- // menu_k_del
- //
- this.menu_k_del.Index = 2;
- this.menu_k_del.Text = "删除钻孔";
- this.menu_k_del.Click += new System.EventHandler(this.menu_k_del_Click);
- //
- // panel_query_bianhao
- //
- this.panel_query_bianhao.Controls.Add(this.groupBox_query);
- this.panel_query_bianhao.Controls.Add(this.groupBox_map_query);
- this.panel_query_bianhao.Dock = System.Windows.Forms.DockStyle.Top;
- this.panel_query_bianhao.Location = new System.Drawing.Point(0, 0);
- this.panel_query_bianhao.Name = "panel_query_bianhao";
- this.panel_query_bianhao.Size = new System.Drawing.Size(144, 96);
- this.panel_query_bianhao.TabIndex = 5;
- //
- // groupBox_query
- //
- this.groupBox_query.Controls.Add(this.btn_query);
- this.groupBox_query.Controls.Add(this.txt_k_id);
- this.groupBox_query.Dock = System.Windows.Forms.DockStyle.Top;
- this.groupBox_query.Location = new System.Drawing.Point(0, 48);
- this.groupBox_query.Name = "groupBox_query";
- this.groupBox_query.Size = new System.Drawing.Size(144, 48);
- this.groupBox_query.TabIndex = 0;
- this.groupBox_query.TabStop = false;
- this.groupBox_query.Text = "按编号查询";
- //
- // btn_query
- //
- this.btn_query.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_query.Location = new System.Drawing.Point(88, 16);
- this.btn_query.Name = "btn_query";
- this.btn_query.Size = new System.Drawing.Size(48, 24);
- this.btn_query.TabIndex = 1;
- this.btn_query.Text = "查询";
- this.toolTip1.SetToolTip(this.btn_query, "执行查询");
- this.btn_query.Click += new System.EventHandler(this.btn_query_Click);
- //
- // txt_k_id
- //
- this.txt_k_id.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.txt_k_id.Location = new System.Drawing.Point(9, 18);
- this.txt_k_id.Name = "txt_k_id";
- this.txt_k_id.Size = new System.Drawing.Size(71, 21);
- this.txt_k_id.TabIndex = 0;
- this.txt_k_id.Text = "";
- this.toolTip1.SetToolTip(this.txt_k_id, "请输入您想查询的钻孔编号");
- //
- // groupBox_map_query
- //
- this.groupBox_map_query.Controls.Add(this.btn_map_query);
- this.groupBox_map_query.Controls.Add(this.btn_clear_select);
- this.groupBox_map_query.Dock = System.Windows.Forms.DockStyle.Top;
- this.groupBox_map_query.Location = new System.Drawing.Point(0, 0);
- this.groupBox_map_query.Name = "groupBox_map_query";
- this.groupBox_map_query.Size = new System.Drawing.Size(144, 48);
- this.groupBox_map_query.TabIndex = 4;
- this.groupBox_map_query.TabStop = false;
- this.groupBox_map_query.Text = "图上查询";
- //
- // btn_map_query
- //
- this.btn_map_query.AlwaysDrawBorder = true;
- this.btn_map_query.Location = new System.Drawing.Point(8, 16);
- this.btn_map_query.Name = "btn_map_query";
- this.btn_map_query.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.btn_map_query.Size = new System.Drawing.Size(62, 24);
- this.btn_map_query.TabIndex = 1;
- this.btn_map_query.Text = "拉框选择";
- this.toolTip1.SetToolTip(this.btn_map_query, "在地图上拉框来选择钻孔");
- this.btn_map_query.Click += new System.EventHandler(this.btn_map_query_Click);
- //
- // btn_clear_select
- //
- this.btn_clear_select.AlwaysDrawBorder = true;
- this.btn_clear_select.Location = new System.Drawing.Point(76, 16);
- this.btn_clear_select.Name = "btn_clear_select";
- this.btn_clear_select.Size = new System.Drawing.Size(62, 24);
- this.btn_clear_select.TabIndex = 2;
- this.btn_clear_select.Text = "清除选择";
- this.toolTip1.SetToolTip(this.btn_clear_select, "清除地图上的显示结果");
- this.btn_clear_select.Click += new System.EventHandler(this.btn_clear_select_Click);
- //
- // panel_map_manage
- //
- this.panel_map_manage.Controls.Add(this.axSuperWkspManager1);
- this.panel_map_manage.Location = new System.Drawing.Point(744, 48);
- this.panel_map_manage.Name = "panel_map_manage";
- this.panel_map_manage.Size = new System.Drawing.Size(88, 152);
- this.panel_map_manage.TabIndex = 9;
- //
- // axSuperWkspManager1
- //
- this.axSuperWkspManager1.ContainingControl = this;
- this.axSuperWkspManager1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.axSuperWkspManager1.Enabled = true;
- this.axSuperWkspManager1.Location = new System.Drawing.Point(0, 0);
- this.axSuperWkspManager1.Name = "axSuperWkspManager1";
- this.axSuperWkspManager1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperWkspManager1.OcxState")));
- this.axSuperWkspManager1.Size = new System.Drawing.Size(88, 152);
- this.axSuperWkspManager1.TabIndex = 0;
- this.axSuperWkspManager1.LDbClick += new AxSuperWkspManagerLib._DSuperWkspManagerEvents_LDbClickEventHandler(this.axSuperWkspManager1_LDbClick);
- //
- // timer_flash_kong
- //
- this.timer_flash_kong.Interval = 400;
- this.timer_flash_kong.Tick += new System.EventHandler(this.timer_flash_kong_Tick);
- //
- // toolControl2
- //
- this.toolControl2.Commands.AddRange(new Crownwood.DotNetMagic.Controls.Command.CommandBase[] {
- this.separatorCommand1,
- this.buttonCommand_null,
- this.separatorCommand2,
- this.buttonCommand_in,
- this.buttonCommand_out,
- this.buttonCommand_free,
- this.buttonCommand_pan,
- this.buttonCommand_full});
- this.toolControl2.Location = new System.Drawing.Point(0, 25);
- this.toolControl2.Name = "toolControl2";
- this.toolControl2.Size = new System.Drawing.Size(832, 26);
- this.toolControl2.TabIndex = 13;
- //
- // separatorCommand1
- //
- this.separatorCommand1.Tag = null;
- //
- // buttonCommand_null
- //
- this.buttonCommand_null.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_null.Image")));
- this.buttonCommand_null.Tag = null;
- this.buttonCommand_null.Text = "";
- this.buttonCommand_null.Tooltip = "空操作";
- this.buttonCommand_null.Click += new System.EventHandler(this.buttonCommand_null_Click);
- //
- // separatorCommand2
- //
- this.separatorCommand2.Tag = null;
- //
- // buttonCommand_in
- //
- this.buttonCommand_in.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_in.Image")));
- this.buttonCommand_in.Tag = null;
- this.buttonCommand_in.Text = "";
- this.buttonCommand_in.Tooltip = "放大";
- this.buttonCommand_in.Click += new System.EventHandler(this.buttonCommand_in_Click);
- //
- // buttonCommand_out
- //
- this.buttonCommand_out.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_out.Image")));
- this.buttonCommand_out.Tag = null;
- this.buttonCommand_out.Text = "";
- this.buttonCommand_out.Tooltip = "缩小";
- this.buttonCommand_out.Click += new System.EventHandler(this.buttonCommand_out_Click);
- //
- // buttonCommand_free
- //
- this.buttonCommand_free.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_free.Image")));
- this.buttonCommand_free.Tag = null;
- this.buttonCommand_free.Text = "";
- this.buttonCommand_free.Tooltip = "自由缩放";
- this.buttonCommand_free.Click += new System.EventHandler(this.buttonCommand_free_Click);
- //
- // buttonCommand_pan
- //
- this.buttonCommand_pan.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_pan.Image")));
- this.buttonCommand_pan.Tag = null;
- this.buttonCommand_pan.Text = "";
- this.buttonCommand_pan.Tooltip = "漫游";
- this.buttonCommand_pan.Click += new System.EventHandler(this.buttonCommand_pan_Click);
- //
- // buttonCommand_full
- //
- this.buttonCommand_full.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_full.Image")));
- this.buttonCommand_full.Tag = null;
- this.buttonCommand_full.Text = "";
- this.buttonCommand_full.Tooltip = "全屏显示";
- this.buttonCommand_full.Click += new System.EventHandler(this.buttonCommand_full_Click);
- //
- // axSuperMap2
- //
- this.axSuperMap2.Enabled = true;
- this.axSuperMap2.Location = new System.Drawing.Point(640, 152);
- this.axSuperMap2.Name = "axSuperMap2";
- this.axSuperMap2.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperMap2.OcxState")));
- this.axSuperMap2.Size = new System.Drawing.Size(96, 216);
- this.axSuperMap2.TabIndex = 12;
- this.axSuperMap2.AfterMapDraw += new AxSuperMapLib._DSuperMapEvents_AfterMapDrawEventHandler(this.axSuperMap2_AfterMapDraw);
- this.axSuperMap2.Tracked += new System.EventHandler(this.axSuperMap2_Tracked);
- this.axSuperMap2.MouseWheelEvent += new AxSuperMapLib._DSuperMapEvents_MouseWheelEventHandler(this.axSuperMap2_MouseWheelEvent);
- this.axSuperMap2.MouseMoveEvent += new AxSuperMapLib._DSuperMapEvents_MouseMoveEventHandler(this.axSuperMap2_MouseMoveEvent);
- //
- // panel_query_other
- //
- this.panel_query_other.Controls.Add(this.listView_r_other);
- this.panel_query_other.Controls.Add(this.groupBox2);
- this.panel_query_other.Controls.Add(this.groupBox1);
- this.panel_query_other.Location = new System.Drawing.Point(216, 96);
- this.panel_query_other.Name = "panel_query_other";
- this.panel_query_other.Size = new System.Drawing.Size(144, 296);
- this.panel_query_other.TabIndex = 14;
- //
- // listView_r_other
- //
- this.listView_r_other.BackColor = System.Drawing.Color.WhiteSmoke;
- this.listView_r_other.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.listView_r_other.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeader1});
- this.listView_r_other.ContextMenu = this.contextMenu_other;
- this.listView_r_other.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listView_r_other.FullRowSelect = true;
- this.listView_r_other.GridLines = true;
- this.listView_r_other.Location = new System.Drawing.Point(0, 176);
- this.listView_r_other.MultiSelect = false;
- this.listView_r_other.Name = "listView_r_other";
- this.listView_r_other.Size = new System.Drawing.Size(144, 120);
- this.listView_r_other.SmallImageList = this.imageList;
- this.listView_r_other.TabIndex = 2;
- this.toolTip1.SetToolTip(this.listView_r_other, "双击记录图上定位");
- this.listView_r_other.View = System.Windows.Forms.View.Details;
- this.listView_r_other.DoubleClick += new System.EventHandler(this.listView_r_other_DoubleClick);
- //
- // columnHeader1
- //
- this.columnHeader1.Text = "查询结果";
- this.columnHeader1.Width = 123;
- //
- // contextMenu_other
- //
- this.contextMenu_other.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuItem_other_map_ding});
- //
- // menuItem_other_map_ding
- //
- this.menuItem_other_map_ding.Index = 0;
- this.menuItem_other_map_ding.Text = "图上定位";
- this.menuItem_other_map_ding.Click += new System.EventHandler(this.menuItem_other_map_ding_Click);
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.btn_other_query);
- this.groupBox2.Controls.Add(this.textBox_other);
- this.groupBox2.Controls.Add(this.btn_other_query_draw);
- this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
- this.groupBox2.Location = new System.Drawing.Point(0, 96);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(144, 80);
- this.groupBox2.TabIndex = 1;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "查询方式";
- //
- // btn_other_query
- //
- this.btn_other_query.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_other_query.Location = new System.Drawing.Point(87, 49);
- this.btn_other_query.Name = "btn_other_query";
- this.btn_other_query.Size = new System.Drawing.Size(48, 24);
- this.btn_other_query.TabIndex = 2;
- this.btn_other_query.Text = "查询";
- this.btn_other_query.Click += new System.EventHandler(this.btn_other_query_Click);
- //
- // textBox_other
- //
- this.textBox_other.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.textBox_other.Location = new System.Drawing.Point(9, 51);
- this.textBox_other.Name = "textBox_other";
- this.textBox_other.Size = new System.Drawing.Size(72, 21);
- this.textBox_other.TabIndex = 1;
- this.textBox_other.Text = "";
- //
- // btn_other_query_draw
- //
- this.btn_other_query_draw.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.btn_other_query_draw.Location = new System.Drawing.Point(8, 19);
- this.btn_other_query_draw.Name = "btn_other_query_draw";
- this.btn_other_query_draw.Size = new System.Drawing.Size(128, 24);
- this.btn_other_query_draw.TabIndex = 0;
- this.btn_other_query_draw.Text = "图上拉框选择";
- this.btn_other_query_draw.Click += new System.EventHandler(this.btn_other_query_draw_Click);
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.radioButton_kanxian);
- this.groupBox1.Controls.Add(this.radioButton_dixian);
- this.groupBox1.Controls.Add(this.radioButton_jinbian);
- this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
- this.groupBox1.Location = new System.Drawing.Point(0, 0);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(144, 96);
- this.groupBox1.TabIndex = 0;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "查询条件";
- //
- // radioButton_kanxian
- //
- this.radioButton_kanxian.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.radioButton_kanxian.Location = new System.Drawing.Point(16, 64);
- this.radioButton_kanxian.Name = "radioButton_kanxian";
- this.radioButton_kanxian.TabIndex = 2;
- this.radioButton_kanxian.Text = "勘探线查询";
- this.toolTip1.SetToolTip(this.radioButton_kanxian, "按照勘探线编号查询");
- this.radioButton_kanxian.CheckedChanged += new System.EventHandler(this.radioButton_kanxian_CheckedChanged);
- //
- // radioButton_dixian
- //
- this.radioButton_dixian.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.radioButton_dixian.Location = new System.Drawing.Point(16, 40);
- this.radioButton_dixian.Name = "radioButton_dixian";
- this.radioButton_dixian.Size = new System.Drawing.Size(120, 24);
- this.radioButton_dixian.TabIndex = 1;
- this.radioButton_dixian.Text = "煤层露头线查询";
- this.toolTip1.SetToolTip(this.radioButton_dixian, "按照煤层名称查询");
- this.radioButton_dixian.CheckedChanged += new System.EventHandler(this.radioButton_dixian_CheckedChanged);
- //
- // radioButton_jinbian
- //
- this.radioButton_jinbian.Checked = true;
- this.radioButton_jinbian.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.radioButton_jinbian.Location = new System.Drawing.Point(16, 17);
- this.radioButton_jinbian.Name = "radioButton_jinbian";
- this.radioButton_jinbian.Size = new System.Drawing.Size(104, 23);
- this.radioButton_jinbian.TabIndex = 0;
- this.radioButton_jinbian.TabStop = true;
- this.radioButton_jinbian.Text = "井田边界查询";
- this.toolTip1.SetToolTip(this.radioButton_jinbian, "按照煤矿名称进行查询");
- this.radioButton_jinbian.CheckedChanged += new System.EventHandler(this.radioButton_jinbian_CheckedChanged);
- //
- // timer_form
- //
- this.timer_form.Interval = 5;
- this.timer_form.Tick += new System.EventHandler(this.timer_form_Tick);
- //
- // axSuperWorkspace1
- //
- this.axSuperWorkspace1.Enabled = true;
- this.axSuperWorkspace1.Location = new System.Drawing.Point(424, 368);
- this.axSuperWorkspace1.Name = "axSuperWorkspace1";
- this.axSuperWorkspace1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperWorkspace1.OcxState")));
- this.axSuperWorkspace1.Size = new System.Drawing.Size(32, 32);
- this.axSuperWorkspace1.TabIndex = 15;
- //
- // MainForm
- //
- this.AcceptButton = this.btn_query;
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.AutoScroll = true;
- this.ClientSize = new System.Drawing.Size(832, 493);
- this.Controls.Add(this.axSuperWorkspace1);
- this.Controls.Add(this.panel_query_other);
- this.Controls.Add(this.axSuperMap2);
- this.Controls.Add(this.toolControl2);
- this.Controls.Add(this.menu_Main);
- this.Controls.Add(this.panel_legend);
- this.Controls.Add(this.panel_map_manage);
- this.Controls.Add(this.panel_kong_query);
- this.Controls.Add(this.statusBarControl1);
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.KeyPreview = true;
- this.Name = "MainForm";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "煤矿信息管理系统";
- this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
- this.Closing += new System.ComponentModel.CancelEventHandler(this.MainForm_Closing);
- this.Load += new System.EventHandler(this.MainForm_Load);
- this.panel_legend.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.axSuperLegend1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.axSuperMap1)).EndInit();
- this.panel_kong_query.ResumeLayout(false);
- this.panel_query_result.ResumeLayout(false);
- this.groupBox_re_map.ResumeLayout(false);
- this.groupBox_re_kong.ResumeLayout(false);
- this.panel_query_bianhao.ResumeLayout(false);
- this.groupBox_query.ResumeLayout(false);
- this.groupBox_map_query.ResumeLayout(false);
- this.panel_map_manage.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.axSuperWkspManager1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.toolControl2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.axSuperMap2)).EndInit();
- this.panel_query_other.ResumeLayout(false);
- this.groupBox2.ResumeLayout(false);
- this.groupBox1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.axSuperWorkspace1)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- private void MainForm_Load(object sender, System.EventArgs e)
- {
- this.Visible = false;
- this.Opacity=0;
- myl = new Login();
- myl.SendLogin +=new MKIms3.Login.SendMessLogin(myl_SendLogin);
- myl.Show();
- }
- /// <summary>
- /// 图上拉框选择查询 按钮响应
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btn_map_query_Click(object sender, System.EventArgs e)
- {
- axSuperMap2.Action=SuperMapLib.seAction.scaTrackPolygon;
- axSuperMap2.TrackingLayer.ClearEvents();
- axSuperMap2.TrackingLayer.Refresh();
- this.option_track = (int)enum_option_track.query; //设定track上的操作标志为查询钻孔。
- }
- private void listView_re_kong_SelectedIndexChanged(object sender, System.EventArgs e)
- {
- if(this.listView_re_kong.SelectedItems.Count>0)
- {
- string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
- this.Cursor = Cursors.WaitCursor;
- fill_map_view(k_id);
- this.Cursor = Cursors.Default;
- }
- }
- private void axSuperMap2_Tracked(object sender, System.EventArgs e)
- {
- switch(this.option_track)
- {
- case (int)enum_option_track.query : //钻孔查询
- {
- SuperMapLib.soGeometry myGeo;
- myGeo = this.axSuperMap2.TrackedGeometry;
- SuperMapLib.soRecordset myRecord = map_query_kong(myGeo);
- fill_map_list_kong(myRecord);
- break;
- }
- case (int)enum_option_track.add_point:
- {
- SuperMapLib.soGeometry myGeo;
- myGeo = this.axSuperMap2.TrackedGeometry;
- ZKAdd addf = new ZKAdd(myGeo.CentroidPoint.x,myGeo.CentroidPoint.y,true);
- addf.Send+= new MKIms3.ZKAdd.SendMess(myadd_Send);
- addf.ShowDialog();
- break;
- }
- case (int)enum_option_track.other_query:
- {
- //这里进行空间查询
- SuperMapLib.soGeometry myGeo;
- myGeo = this.axSuperMap2.TrackedGeometry; //得到了查询的对象
- fill_listview(getRecotd(get_lay(),myGeo));
- break;
- }
- }
- }
- private void listView_re_kong_DoubleClick(object sender, System.EventArgs e)
- {
- if(this.listView_re_kong.SelectedItems.Count>0)
- {
-
- //开始闪烁。
- string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
- flash_Geo = re_kong_flash(k_id);
- if(flash_Geo!=null)
- {
- if(flash_Geo.Dimension!=0)
- {
- this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5); //居中现实
- this.axSuperMap2.CtlRefresh();
- }
- else
- {
- this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,0.02);
- this.axSuperMap2.CtlRefresh();
- }
- this.timer_flash_kong.Start();
- }
-
- }
- }
- private void menu_k_position_Click(object sender, System.EventArgs e)
- {
- if(this.listView_re_kong.SelectedItems.Count>0)
- {
-
- //开始闪烁。
- string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
- flash_Geo = re_kong_flash(k_id);
- if(flash_Geo!=null)
- {
- if(flash_Geo.Dimension!=0)
- {
- this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5); //居中现实
- this.axSuperMap2.CtlRefresh();
- }
- else
- {
- this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,0.02);
- this.axSuperMap2.CtlRefresh();
- }
- this.timer_flash_kong.Start();
- }
-
- }
- }
- private void listView_re_map_DoubleClick(object sender, System.EventArgs e)
- {
- if(this.listView_re_map.SelectedItems.Count>0)
- {
- string mapname = this.listView_re_map.SelectedItems[0].Text.Trim().ToString();
- openmap(mapname);
- }
- }
- private void menu_m_open_Click(object sender, System.EventArgs e)
- {
- if(this.listView_re_map.SelectedItems.Count>0)
- {
- string mapname = this.listView_re_map.SelectedItems[0].Text.Trim().ToString();
- this.Cursor = Cursors.WaitCursor;
- openmap(mapname);
- this.Cursor = Cursors.Default;
- }
- }
- private void menu_k_info_Click(object sender, System.EventArgs e)
- {
- if(this.listView_re_kong.SelectedItems.Count>0)
- {
- string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
- this.Cursor = Cursors.WaitCursor;
- ZKShow myK = new ZKShow(k_id);
- myK.ShowDialog();
- this.Cursor = Cursors.Default;
- }
- }
- private void axSuperMap2_AfterMapDraw(object sender, AxSuperMapLib._DSuperMapEvents_AfterMapDrawEvent e)
- {
- min_view();
- }
- private void axSuperMap1_MouseDownEvent(object sender, AxSuperMapLib._DSuperMapEvents_MouseDownEvent e)
- {
- main_view_change(e);
- }
-
- private void btn_query_Click(object sender, System.EventArgs e)
- {
- //清除地图列表
- this.listView_re_map.Items.Clear();
- string k_id = this.txt_k_id.Text.Trim();
- if(k_id.Length>0)
- {
- this.Cursor = Cursors.WaitCursor;
- fill_DB_list_kong( k_id);
- this.Cursor = Cursors.Default;
- }
- else
- {
- MessageBox.Show("钻孔编号不能为空","错误信息",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- private void menu_kong_query_Click(object sender, System.EventArgs e)
- {
- this.Cursor = Cursors.WaitCursor;
- ZKView k_view = new ZKView();
- k_view.ShowDialog();
- this.Cursor = Cursors.Default;
- }
- private void menu_data_out_Click(object sender, System.EventArgs e)
- {
- this.Cursor = Cursors.WaitCursor;
- KDataOut myout = new KDataOut();
- myout.ShowDialog();
- this.Cursor = Cursors.Default;
- }
- private void menu_pwd_change_Click(object sender, System.EventArgs e)
- {
- this.Cursor = Cursors.WaitCursor;
- pwd mypwd = new pwd();
- mypwd.ShowDialog();
- this.Cursor = Cursors.Default;
-
- }
- private void menuCommand_k_addDATA_Click(object sender, System.EventArgs e)
- {
- this.Cursor = Cursors.WaitCursor;
- if(this.mapname!="某某矿地形地质图")
- {
- DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔添加!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
- if(br==DialogResult.OK)
- {
- //先打开这个地图
- this.openmap("某某矿地形地质图");
- ZKAdd myadd = new ZKAdd(0,0,false);
- myadd.Send +=new MKIms3.ZKAdd.SendMess(myadd_Send);
- myadd.ShowDialog();
- }
- }
- else
- {
- ZKAdd myadd = new ZKAdd(0,0,false);
- myadd.Send +=new MKIms3.ZKAdd.SendMess(myadd_Send);
- myadd.ShowDialog();
- }
-
-
- this.Cursor = Cursors.Default;
- }
- private void menuCommand_k_addMAP_Click(object sender, System.EventArgs e)
- {
- this.Cursor = Cursors.WaitCursor;
- if(this.mapname!="某某矿地形地质图")
- {
- DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔添加!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
- if(br==DialogResult.OK)
- {
- //先打开这个地图
- this.openmap("某某矿地形地质图");
- this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPoint;
- this.option_track = (int)enum_option_track.add_point;
- }
- }
- else
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPoint;
- this.option_track = (int)enum_option_track.add_point;
- }
- this.Cursor = Cursors.Default;
-
- }
- private void menu_k_del_Click(object sender, System.EventArgs e)
- {
- if(this.mapname!="某某矿地形地质图")
- {
- DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔信息删除。nn此操作将不可恢复,您确认进行该删除操作?!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
- if(br ==DialogResult.OK)
- {
- if(this.listView_re_kong.SelectedItems.Count>0)
- {
- string kk_id = this.listView_re_kong.SelectedItems[0].Text.Trim();
- if(kong_map_dell(kk_id) && kong_DB_dell(kk_id))
- {
- MessageBox.Show("成功删除该钻孔信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
- }
- }
- }
- }
- else
- {
- DialogResult br = MessageBox.Show("系统将完全删除有关此钻孔的所有信息。nn此操作将不可恢复,您确认进行该删除操作?!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
- if(br ==DialogResult.OK)
- {
- if(this.listView_re_kong.SelectedItems.Count>0)
- {
- string kk_id = this.listView_re_kong.SelectedItems[0].Text.Trim();
- if(kong_map_dell(kk_id) && kong_DB_dell(kk_id))
- {
- MessageBox.Show("成功删除该钻孔信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
- }
- }
- }
- }
- this.axSuperMap2.CtlRefresh();
-
- }
- private void menu_user_manage_Click(object sender, System.EventArgs e)
- {
- this.Cursor = Cursors.WaitCursor;
- UserManage usermangage = new UserManage();
- usermangage.ShowDialog();
- this.Cursor = Cursors.Default;
- }
- private void axSuperWkspManager1_LDbClick(object sender, AxSuperWkspManagerLib._DSuperWkspManagerEvents_LDbClickEvent e)
- {
- switch(e.nFlag)
- {
- case SuperWkspManagerLib.seSelectedItemFlag.scsDataset:
- this.data_map_name = e.strParent;
- dataout(this.data_map_name);
- break;
- case SuperWkspManagerLib.seSelectedItemFlag.scsDatasource:
- this.data_map_name = e.strSelected;
- dataout(this.data_map_name);
- break;
- case SuperWkspManagerLib.seSelectedItemFlag.scsMap:
- this.mapname = e.strSelected;
- openmap(this.mapname);
- break;
- }
- }
- private void buttonCommand_null_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
- this.timer_flash_kong.Stop();
- this.axSuperMap2.TrackingLayer.ClearEvents();
- this.axSuperMap2.TrackingLayer.Refresh();
- }
- private void buttonCommand_in_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomIn;
- }
- private void buttonCommand_out_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomOut;
- }
- private void buttonCommand_free_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomFree;
- }
- private void buttonCommand_pan_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaPan;
- }
- private void buttonCommand_full_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.ViewEntire();
- }
-
- private void menu_fill_edit_Click(object sender, System.EventArgs e)
- {
- open_fill_lab();
- }
- private void menu_yan_edit_Click(object sender, System.EventArgs e)
- {
- FillEdit myfill = new FillEdit();
- myfill.ShowDialog();
- }
- private void MainForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- if(App.u_flag == (int)flag.admin)
- {
- work_mif(e);
- }
- else
- {
- this.axSuperMap2.Disconnect();
- this.axSuperLegend1.Disconnect();
- this.axSuperWkspManager1.Disconnect();
- this.axSuperMap1.Disconnect();
- this.axSuperMap2 = null;
- this.axSuperMap1 = null;
- this.axSuperLegend1 = null;
- this.axSuperWkspManager1 = null;
- Application.Exit();
- }
- }
- private void menu_map_out_Click(object sender, System.EventArgs e)
- {
- dataout(this.mapname);
- }
- private void menu_map_print_Click(object sender, System.EventArgs e)
- {
- LayOut mylay = new LayOut();
- mylay.axSuperLayout1.Connect(this.axSuperWorkspace1.CtlHandle);
- mylay.ShowDialog();
- }
- private void axSuperMap2_MouseWheelEvent(object sender, AxSuperMapLib._DSuperMapEvents_MouseWheelEvent e)
- {
- if((int)e.zDelta > 0 )
- {
- this.axSuperMap2.Zoom(1.2);
- this.axSuperMap2.CtlRefresh();
- }
- else
- {
- this.axSuperMap2.Zoom(0.8);
- this.axSuperMap2.CtlRefresh();
- }
- }
-
- private void axSuperLegend1_Modified(object sender, System.EventArgs e)
- {
- this.axSuperMap2.CtlRefresh();
- }
- private void btn_other_query_draw_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPolygon;
- this.option_track = (int)enum_option_track.other_query;
- }
- private void btn_other_query_Click(object sender, System.EventArgs e)
- {
- string where = this.textBox_other.Text.Trim();
- if(where.Length>0)
- {
- int lay = get_lay();
- fill_listview(getRecotd(lay,where));
- }
- else
- {
- MessageBox.Show("请输入查询条件","错误信息",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- private void radioButton_jinbian_CheckedChanged(object sender, System.EventArgs e)
- {
- this.listView_r_other.Items.Clear();
- }
- private void radioButton_dixian_CheckedChanged(object sender, System.EventArgs e)
- {
- this.listView_r_other.Items.Clear();
- }
- private void radioButton_kanxian_CheckedChanged(object sender, System.EventArgs e)
- {
- this.listView_r_other.Items.Clear();
- }
- private void listView_r_other_DoubleClick(object sender, System.EventArgs e)
- {
- other_flash();
- }
- private void menuItem_other_map_ding_Click(object sender, System.EventArgs e)
- {
- other_flash();
- }
- private void axSuperMap2_MouseMoveEvent(object sender, AxSuperMapLib._DSuperMapEvents_MouseMoveEvent e)
- {
- double x = this.axSuperMap2.PixelToMapX(e.x);
- double y = this.axSuperMap2.PixelToMapY(e.y);
- this.statusPanel_xy.Text = "x="+y+" "+"y="+x;
- }
-
- private void menuCommand_about_Click(object sender, System.EventArgs e)
- {
- string about = "超图杯第三届全国高校GIS应用开发大赛 nn"+
- "(河南理工大学参赛小组)nn"+
- "参赛指导老师:谢洪波、文广超nn"+
- "参赛小组成员:张俊、李建欣、赵领军";
- MessageBox.Show(about,"关于我们");
- }
-
- private void menuCommand_help_Click(object sender, System.EventArgs e)
- {
- string helpfile = Application.StartupPath+"\help.chm";
- Help.ShowHelp(this, helpfile);
- }
- private void menu_logout_Click(object sender, System.EventArgs e)
- {
- this.Close();
- }
- private void btn_clear_select_Click(object sender, System.EventArgs e)
- {
- this.timer_flash_kong.Stop();
- this.axSuperMap2.TrackingLayer.ClearEvents();
- this.axSuperMap2.TrackingLayer.Refresh();
- }
- private void menuCommand_free_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomFree;
- }
-
- private void menuCommand_null_Click(object sender, System.EventArgs e)
- {
- this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
- }
- private void timer_form_Tick(object sender, System.EventArgs e)
- {
- this.form_opactiy=this.form_opactiy+5;
- this.Opacity = this.form_opactiy/100.00;
- if(this.form_opactiy==100)
- {
- this.timer_form.Stop();
- }
- }
- #region 活动面板生成与加载 、控制
- /// <summary>
- /// 在程序中加载工具面板
- /// </summary>
- private void create_RTool()
- {
- kong_query = Creat_kong_query();
- map_manage = Creat_map_manage();
- legend = Creat_legend();
- other_query = Creat_other();
- InitializeContent(kong_query);
- InitializeContent(map_manage);
- InitializeContent(legend);
- InitializeContent(other_query);
- dockingManager.AllowFloating = true;
- dockingManager.AllowRedocking =true;
- this.SuspendLayout();
-
- WindowContent wc=dockingManager.AddContentWithState(kong_query, Crownwood.DotNetMagic.Docking.State.DockLeft) as WindowContent;
- dockingManager.AddContentToWindowContent(map_manage, wc);
- dockingManager.AddContentToWindowContent(legend, wc);
- dockingManager.AddContentToWindowContent(other_query, wc);
- dockingManager.ToggleContentAutoHide(kong_query);
- this.ResumeLayout();
- }
- /// <summary>
- /// 生成钻孔查询工具面板
- /// </summary>
- /// <returns></returns>
- private Content Creat_kong_query()
- {
-
- return dockingManager.Contents.Add(panel_kong_query,"钻孔信息查询",imageList, 3);
- }
- /// <summary>
- /// 生成地图数据管理工具面板
- /// </summary>
- /// <returns></returns>
- private Content Creat_map_manage()
- {
-
- return dockingManager.Contents.Add(panel_map_manage,"地图数据管理",imageList, 1);
- }
- /// <summary>
- /// 生成图例导航工具面板
- /// </summary>
- /// <returns></returns>
- private Content Creat_legend()
- {
-
- return dockingManager.Contents.Add(panel_legend,"图例导航",imageList, 0);
- }
- /// <summary>
- /// 生成其他查询面板
- /// </summary>
- /// <returns></returns>
- private Content Creat_other()
- {
-
- return dockingManager.Contents.Add(this.panel_query_other,"其他查询",imageList, 2);
- }
- /// <summary>
- /// 设置面板的公共属性
- /// </summary>
- /// <param name="c"></param>
- private void InitializeContent(Content c)
- {
- c.CaptionBar = captionBars;
- c.CloseButton = closeButtons;
- }
- protected void OnContentShown(Content c, EventArgs cea)
- {
- Console.WriteLine("OnContentShown {0}", c.Title);
- }
- protected void OnContentHidden(Content c, EventArgs cea)
- {
- Console.WriteLine("OnContentHidden {0}", c.Title);
- }
- protected void OnContentHiding(Content c, CancelEventArgs cea)
- {
- Console.WriteLine("OnContentHiding {0}", c.Title);
- }
- /// <summary>
- /// 控制面板的显示与隐藏
- /// </summary>
- /// <param name="mianban">面板对象</param>
- private void MianBanCotorl(Content mianban)
- {
- if(mianban.Visible==false)
- {
- dockingManager.ShowContent(mianban);
- }
- else
- {
- dockingManager.HideContent(mianban);
- }
- }
- /// <summary>
- /// 控制所有面板的显示
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_all_Click(object sender, System.EventArgs e)
- {
- dockingManager.ShowAllContents();
- }
- /// <summary>
- /// 控制地图数据面板的显示
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_map_Click(object sender, System.EventArgs e)
- {
- MianBanCotorl(this.map_manage);
- }
- /// <summary>
- /// 更新地图面板控制菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_map_Update(object sender, System.EventArgs e)
- {
- MenuCommand mc = sender as MenuCommand;
- mc.Checked = this.map_manage.Visible;
- }
- /// <summary>
- /// 控制图例和鹰眼面板
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_legend_Click(object sender, System.EventArgs e)
- {
- MianBanCotorl(this.legend);
- }
- /// <summary>
- /// 图例鹰眼菜单更新
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_legend_Update(object sender, System.EventArgs e)
- {
- MenuCommand mc = sender as MenuCommand;
- mc.Checked = this.legend.Visible;
- }
- /// <summary>
- /// 控制钻孔查询面板
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_kong_Click(object sender, System.EventArgs e)
- {
- MianBanCotorl(this.kong_query);
- }
- /// <summary>
- /// 更新钻孔查询面板菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_kong_Update(object sender, System.EventArgs e)
- {
- MenuCommand mc = sender as MenuCommand;
- mc.Checked = this.kong_query.Visible;
- }
- /// <summary>
- /// 关闭所有的面板
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void menu_mianban_close_Click(object sender, System.EventArgs e)
- {
- dockingManager.HideAllContents();
- }
- private void menuCommand_query_other_Click(object sender, System.EventArgs e)
- {
- MianBanCotorl(this.other_query);
- }
- private void menuCommand_query_other_Update(object sender, System.EventArgs e)
- {
- MenuCommand mc = sender as MenuCommand;
- mc.Checked = this.other_query.Visible;
- }
-
- #endregion
- #region 系统数据加载(连接服务器、打开工作空间、打开默认地图)
-
- /// <summary>
- /// 执行连接地图服务器,打开工作空间,打开默认地图的功能
- /// </summary>
- private void loadData()
- {
-
- Splasher.Status = "正在连接地图数据库...";
- DataBase myDB = new DataBase();
- string[] mapconn = myDB.MapConn();
- Splasher.Status = "正在打开地图数据工作空间....";
- bool flag = this.axSuperWorkspace1.Open(mapconn[0], mapconn[1]);
- if(flag !=true)
- {
- MessageBox.Show("加载数据失败!nn请联系系统管理员,检查服务器","系统错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
- return;
- }
- Splasher.Status = "正在获取服务器端数据....";
- this.axSuperMap2.Connect(this.axSuperWorkspace1.CtlHandle);
- this.axSuperWkspManager1.Connect(this.axSuperWorkspace1.CtlHandle);
- this.axSuperLegend1.Connect(this.axSuperMap2.CtlHandle);
- this.axSuperMap1.Connect(this.axSuperWorkspace1.CtlHandle); //这个为鹰眼
- Splasher.Status = "正在打开默认地图....";
- openmap("某某矿地形地质图");
- Splasher.Status = "系统初始化完毕,正在打开应用程序";
-
-
-
- }
- /// <summary>
- /// 打开某张地图,同时刷新所有的supermap控件
- /// </summary>
- /// <param name="mapname">地图的名称</param>
- private void openmap(string mapname)
- {
- this.axSuperMap2.TrackingLayer.ClearEvents();
- this.axSuperMap2.TrackingLayer.Refresh();
- this.axSuperMap2.OpenMap(mapname);
- //this.axSuperMap2.ViewEntire();
- this.axSuperMap2.CtlRefresh();
- this.axSuperMap1.OpenMap(mapname);
- this.axSuperMap1.ViewEntire();
- this.axSuperMap1.CtlRefresh();
- this.axSuperLegend1.CtlRefresh();
- this.mapname = mapname;
- this.Text = "煤矿信息管理系统 当前日期:" + DateTime.Today.ToShortDateString();
- this.statusPanel_infor.Text = "当前地图为:"+mapname;
- if(this.timer_flash_kong.Enabled)
- {
- this.timer_flash_kong.Stop();
- }
- }
-
- #endregion
-
- #region 钻孔数据的查询,关联地图的显示,钻孔的图上定位
- /// <summary>
- /// 根据数据层的名称 返回该层在地图中的索引号
- /// </summary>
- /// <param name="map_ceng_name">地图图层的名称</param>
- /// <returns>图层的索引号 int</returns>
- private int find_lay(string map_ceng_name)
- {
- int ceng = 0;
- for(int i=1;i<=this.axSuperMap1.Layers.Count;i++)
- {
- if(this.axSuperMap1.Layers[i].Name==map_ceng_name)
- {
- ceng = i;
- break;
- }
- }
- return ceng;
- }
- /// <summary>
- /// 地图上按照空间信息查询钻孔
- /// </summary>
- /// <param name="myGeo">track层上的对象集</param>
- /// <returns>SuperMapLib.soRecordset 包含钻孔信息的数据集</returns>
- private SuperMapLib.soRecordset map_query_kong(SuperMapLib.soGeometry myGeo)
- {
- string map_ceng_name = "钻孔@"+this.mapname;
- int ceng = find_lay(map_ceng_name);
- if(ceng!=0)
- {
- axSuperMap2.Layers[ceng].Snapable=true;
- SuperMapLib.soRecordset myRecord ;
- SuperMapLib.soDatasetVector myV ;
- myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
- myRecord = myV.QueryEx(myGeo,SuperMapLib.seSpatialQueryMode.scsAreaIntersect,"");
- this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
- return myRecord;
- }
- else
- {
- return null;
- }
- }
- /// <summary>
- /// 用空间查询的结果进行钻孔结果的显示
- /// </summary>
- /// <param name="myRecord">空间查询过来的数据集</param>
- private void fill_map_list_kong(SuperMapLib.soRecordset myRecord)
- {
- if(myRecord != null)
- {
- if(myRecord.RecordCount>0)
- {
-
- this.listView_re_kong.Items.Clear();
- myRecord.MoveFirst();
- for(int i=0;i<myRecord.RecordCount;i++)
- {
- ListViewItem kong_Item = new ListViewItem(myRecord.GetFieldValue("钻孔编号").ToString(),4);
- this.listView_re_kong.Items.Add(kong_Item);
- myRecord.MoveNext();
- }
- }
- else
- {
- MessageBox.Show("对不起,没有符合条件的钻孔 。","信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
- }
- }
- else
- {
- MessageBox.Show("对不起,当前地图中没有钻孔信息 nn请打开相关地图中的地图后再操作。","信息",MessageBoxButtons.OK,MessageBoxIcon.Warning);
- }
- }
- /// <summary>
- /// 用从数据库中查询的结果来 进行钻孔结果的显示
- /// </summary>
- private void fill_DB_list_kong(string k_id)
- {
- this.listView_re_kong.Items.Clear();
- DataBase myDB = new DataBase();
- SqlDataReader myReader = null;
- SqlParameter[] myParamers={new SqlParameter("@k_id",SqlDbType.Char,10)} ;
- myParamers[0].Value = k_id;
- myReader = myDB.RunProcedure("up_get_kong_info",myParamers);
- if(myReader!=null)
- {
- if(myReader.HasRows)
- {
- //把查询到的钻孔编号显示在list_view中
- myReader.Read();
- ListViewItem kong_Item = new ListViewItem(myReader["钻孔编号"].ToString(),4);
- this.listView_re_kong.Items.Add(kong_Item);
- myReader.Close();
- }
- else
- {
- MessageBox.Show("对不起,没有符合条件的钻孔","信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
- }
- }
- }
-
- /// <summary>
- /// 根据钻孔编号来填充相关地图列表
- /// </summary>
- /// <param name="k_id">钻孔编号</param>
- private void fill_map_view(string k_id)
- {
- this.listView_re_map.Items.Clear();
- DataBase myDB = new DataBase();
- SqlDataReader myReader = null;
- SqlParameter[] myParamers={new SqlParameter("@k_id",SqlDbType.Char,10)} ;
- myParamers[0].Value = k_id;
- myReader = myDB.RunProcedure("up_get_map",myParamers);
- if(myReader!=null)
- {
- if(myReader.HasRows)
- {
- //把查询到的钻孔编号显示在list_view中
- while(myReader.Read())
- {
- ListViewItem kong_Item = new ListViewItem(myReader["地图名称"].ToString(),4);
- this.listView_re_map.Items.Add(kong_Item);
- }
- myReader.Close();
- }
- else
- {
- ListViewItem kong_Item = new ListViewItem("无相关地图",4);
- this.listView_re_map.Items.Add(kong_Item);
- }
- }
- }
- /// <summary>
- /// 实现选中钻孔的图上定位功能
- /// </summary>
- /// <param name="k_id">钻孔编号</param>
- /// <returns>返回需要闪烁的地物</returns>
- private SuperMapLib.soGeometry re_kong_flash(string k_id)
- {
- //axSuperMap1.Layers[ceng].Snapable=true;
- string map_ceng_name = "钻孔@"+this.mapname;
- int ceng = find_lay(map_ceng_name);
- if(ceng!=0)
- {
- SuperMapLib.soRecordset myRecord ;
- SuperMapLib.soDatasetVector myV ;
- SuperMapLib.soGeometry myGeo;
- myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
-
- string SQLFileter = "钻孔编号='"+k_id+"'";
- myRecord = myV.Query(SQLFileter,true,null,"");
- if(myRecord.RecordCount>0)
- {
- myGeo=myRecord.GetGeometry();
- return myGeo;
- }
- else
- {
- MessageBox.Show("对不起,当前地图中没有该钻孔信息 nn请打开相关地图中的地图后再操作。","信息",MessageBoxButtons.OK,MessageBoxIcon.Warning);
- return null;
- }
- }
- else
- {
- MessageBox.Show("对不起,当前地图中没有钻孔信息 nn请打开相关地图中的地图后再操作。","信息",MessageBoxButtons.OK,MessageBoxIcon.Warning);
- return null;
- }
- }
- /// <summary>
- ///Timer 控件,实现地物的闪烁显示
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void timer_flash_kong_Tick(object sender, System.EventArgs e)
- {
- SuperMapLib.soStyle myStylea = new SuperMapLib.soStyleClass();
- myStylea.PenColor = (uint)ColorTranslator.ToOle(Color.Red);
- myStylea.PenStyle = 4;
- myStylea.PenWidth = 6;
- myStylea.BrushColor = (uint)ColorTranslator.ToOle(Color.Red);
- myStylea.SymbolSize = 80;
- SuperMapLib.soStyle myStyleb = new SuperMapLib.soStyleClass();
- myStyleb.PenColor = (uint)ColorTranslator.ToOle(Color.Blue);
- myStyleb.PenStyle = 4;
- myStyleb.PenWidth = 6;
- myStyleb.BrushColor = (uint)ColorTranslator.ToOle(Color.Blue);
- myStyleb.SymbolSize = 80;
- flash_i++;
-
- if(flash_i%2==0)
- {
- axSuperMap2.TrackingLayer.ClearEvents();
- axSuperMap2.TrackingLayer.AddEvent(flash_Geo,myStylea,"");
- axSuperMap2.TrackingLayer.Refresh();
- }
- else
- {
- axSuperMap2.TrackingLayer.ClearEvents();
- axSuperMap2.TrackingLayer.AddEvent(flash_Geo,myStyleb,"");
- axSuperMap2.TrackingLayer.Refresh();
- }
-
- }
- #endregion
- #region 鹰眼窗口的显示,鹰眼窗口导航
- /// <summary>
- /// 实现鹰眼功能
- /// </summary>
- private void min_view()
- {
- SuperMapLib.soStyle myStyle = new SuperMapLib.soStyleClass();
- SuperMapLib.soRect myRect = new SuperMapLib.soRectClass();
- SuperMapLib.soGeoLine myLine = new SuperMapLib.soGeoLineClass();
- SuperMapLib.soPoints myPoints = new SuperMapLib.soPointsClass();
- double dt,dl,dr,db;
- myRect = this.axSuperMap2.ViewBounds;
- dt = myRect.Top;
- dl = myRect.Left;
- dr = myRect.Right;
- db = myRect.Bottom;
- myPoints.Add2(dl,dt);
- myPoints.Add2(dr,dt);
- myPoints.Add2(dr,db);
- myPoints.Add2(dl,db);
- myPoints.Add2(dl,dt);
- myStyle.PenColor =(uint)ColorTranslator.ToOle(Color.Blue);
- myStyle.PenWidth =6;
- myLine.AddPart(myPoints);
- this.axSuperMap1.TrackingLayer.ClearEvents();
- this.axSuperMap1.TrackingLayer.AddEvent((SuperMapLib.soGeometry)myLine,myStyle,"");
- this.axSuperMap1.TrackingLayer.Refresh();
- }
- /// <summary>
- /// 实现鹰眼定位(单击)导航功能
- /// </summary>
- private void main_view_change(AxSuperMapLib._DSuperMapEvents_MouseDownEvent e)
- {
- double xCent,yCent;
- xCent = this.axSuperMap1.PixelToMapX(e.x);
- yCent = this.axSuperMap1.PixelToMapY(e.y);
- this.axSuperMap2.CenterX = xCent;
- this.axSuperMap2.CenterY = yCent;
- this.axSuperMap2.CtlRefresh();
- }
- #endregion
- #region 对默认地图进行加点 ,删除点,修改点操作
- /// <summary>
- /// 用来响应事件在图上添加一个钻孔
- /// </summary>
- /// <param name="x"></param>
- /// <param name="y"></param>
- /// <param name="z"></param>
- /// <param name="k_id"></param>
- private void myadd_Send(double x, double y,double z,string k_id)
- {
- if(this.mapname!="某某矿地形地质图")
- {
- //先打开这个地图
- this.openmap("某某矿地形地质图");
- }
-
- int ceng=this.find_lay("钻孔@某某矿地形地质图");
-
- if(ceng!=0)
- {
- axSuperMap2.Layers[ceng].Snapable=true;
- //再添加纪录集
- SuperMapLib.soRecordset myRecord ;
- SuperMapLib.soDatasetVector myV ;
-
- SuperMapLib.soGeoPoint myGp= new SuperMapLib.soGeoPointClass();
- SuperMapLib.soStrings myString1;
- myString1=new SuperMapLib.soStringsClass();
- myString1.Add("*");
-
- myGp.x = x;
- myGp.y = y;
-
- myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
- myRecord = myV.Query("1<0",true,myString1,"");
- myRecord.AddNew((SuperMapLib.soGeometry)myGp,null);
- myRecord.SetFieldValue("SmX",x);
- myRecord.SetFieldValue("SmY",y);
- myRecord.SetFieldValue("Elevation",z);
- myRecord.SetFieldValue("钻孔编号",k_id);
- myRecord.Update();
- this.axSuperMap2.CtlRefresh();
- MessageBox.Show("基本信息添加成功,请继续添加煤层信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
- }
- else
- {
- MessageBox.Show("在默认地图上添加钻孔失败,nn 您可以删除该钻孔的属性信息后再进行添加","错误信息!",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- #endregion
- #region 钻孔数据的删除
- /// <summary>
- /// 删除选定的钻孔
- /// </summary>
- /// <param name="k_id">钻孔的编号 *-*</param>
- /// <returns></returns>
- private bool kong_map_dell(string k_id)
- {
- int ceng=ceng=this.find_lay("钻孔@某某矿地形地质图");
- if(ceng!=0)
- {
- SuperMapLib.soRecordset myRecord ;
- SuperMapLib.soDatasetVector myV ;
- SuperMapLib.soStrings myString2;
- myString2=new SuperMapLib.soStringsClass();
- myString2.Add("*");
- myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
- myRecord = myV.Query("钻孔编号='"+k_id+"'",true,null,"");
- if(myRecord!=null)
- {
- myRecord.Delete();
- myRecord.Update();
- return true;
- }
- else
- {
- return false;
- }
- }
- else
- {
- MessageBox.Show("删除图上钻孔错误","错误信息!",MessageBoxButtons.OK,MessageBoxIcon.Error);
- return false;
- }
- }
- private bool kong_DB_dell(string k_id)
- {
- DataBase myDB = new DataBase();
- SqlParameter[] myParamers={new SqlParameter("@k_id",SqlDbType.Char,10)} ;
- myParamers[0].Value = k_id.Trim();
- if(myDB.RunProcedure_Nr("up_del_kong",myParamers))
- {
- return true;
- }
- else
- {
- MessageBox.Show("删除钻孔属性信息错误","错误信息!",MessageBoxButtons.OK,MessageBoxIcon.Error);
- return false;
- }
- }
- #endregion
- #region 打开填充库,编辑系统的岩性关联
- void open_fill_lab()
- {
- SuperMapLib.soFillStyleLib myFill;
- SuperMapLib.soResources myResourse;
- myResourse = this.axSuperWorkspace1.Resources;
- myFill = myResourse.FillStyleLib;
- myFill.ShowEditor();
- myFill =null;
- myResourse = null;
- }
- #endregion
- #region 检验工作空间是否被修改,保存工作空间
- private void work_mif(System.ComponentModel.CancelEventArgs e)
- {
- if(this.axSuperWorkspace1.Modified)
- {
- DialogResult br = MessageBox.Show("系统数据有未保存的部分nn 是否保存您所做的修改","系统提示",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Warning);
- if(br == DialogResult.Yes)
- {
- if(this.axSuperWorkspace1.Save())
- {
- MessageBox.Show("系统数据保存成功","系统提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
-
- }
- else
- {
- MessageBox.Show("系统数据保存失败","系统提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- this.axSuperMap2.Disconnect();
- this.axSuperLegend1.Disconnect();
- this.axSuperWkspManager1.Disconnect();
- this.axSuperMap1.Disconnect();
- this.axSuperMap2 = null;
- this.axSuperMap1 = null;
- this.axSuperLegend1 = null;
- this.axSuperWkspManager1 = null;
- Application.Exit();
- }
- else if(br == DialogResult.Cancel)
- {
- e.Cancel = true;
- }
- else
- {
- this.axSuperMap2.Disconnect();
- this.axSuperLegend1.Disconnect();
- this.axSuperWkspManager1.Disconnect();
- this.axSuperMap1.Disconnect();
- this.axSuperMap2 = null;
- this.axSuperMap1 = null;
- this.axSuperLegend1 = null;
- this.axSuperWkspManager1 = null;
- Application.Exit();
- }
- }
- }
- #endregion
- #region 将系统填充库复制到本地
- /// <summary>
- /// 获取系统填充库文件
- /// </summary>
- private void get_fill_file()
- {
- SuperMapLib.soFillStyleLib myFill;
- SuperMapLib.soResources myResourse;
- myResourse = this.axSuperWorkspace1.Resources;
- myFill = myResourse.FillStyleLib;
- try
- {
- myFill.Export(Application.StartupPath+"\fill.dll");
- }
- catch(Exception e)
- {
- MessageBox.Show("岩性填充库加载失败,您可能无法看到正确的钻孔剖面示意图nn错误信息:"+e.Message,"系统错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- finally
- {
- myFill =null;
- myResourse = null;
- }
-
- }
- #endregion
- #region 当前地图数据集导出
-
- private string[] getDataSetName(string dataname)
- {
- int j = this.axSuperWorkspace1.Datasources[dataname].Datasets.Count;
- string[] setname = new string[j];
- for(int i=1;i<=j;i++)
- {
- setname[i-1] = this.axSuperWorkspace1.Datasources[dataname].Datasets[i].Name;
- }
- return setname;
- }
- private void dataout(string data_name)
- {
- DataOut myout = new DataOut(getDataSetName(data_name));
- myout.myPump = this.axSuperWorkspace1.Datasources[data_name].DataPump;
- if(myout.myPump==null)
- {
- MessageBox.Show("数据源错误","错误信息",MessageBoxButtons.OK,MessageBoxIcon.Error);
- return;
- }
- else
- {
- myout.ShowDialog();
- }
- }
- #endregion
- #region 其他查询功能代码区
- /// <summary>
- /// 得到查询条件,返回被查询的图层
- /// </summary>
- /// <returns></returns>
- private int get_query_where()
- {
- if(this.radioButton_dixian.Checked)
- {
- return this.find_lay("煤层露头线及风化带@某某矿地形地质图");
- }
- else if(this.radioButton_jinbian.Checked)
- {
- return find_lay("井田边界线@某某矿地形地质图");
- }
- else
- {
- return find_lay("勘探线@某某矿地形地质图");
- }
- }
- private int get_lay()
- {
- if(this.mapname!="某某矿地形地质图")
- {
- DialogResult rs = MessageBox.Show("当前地图不是默认主地图nn您希望打开主地图来进行指定的查询吗?","系统信息",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Question);
- if(rs == DialogResult.Yes)
- {
- this.openmap("某某矿地形地质图");
- return get_query_where();
- }
- else
- {
- return 0;
- }
- }
- else
- {
- return get_query_where();
- }
- }
- /// <summary>
- /// 根据 字符串得到查询结果
- /// </summary>
- /// <param name="lay">层号</param>
- /// <param name="where">查询条件</param>
- /// <returns></returns>
- private SuperMapLib.soRecordset getRecotd(int lay,string where)
- {
- if(lay!=0) //开始查询
- {
- axSuperMap2.Layers[lay].Snapable=true;
- SuperMapLib.soRecordset myRecord ;
- SuperMapLib.soDatasetVector myV ;
- SuperMapLib.soStrings mystring = new SuperMapLib.soStringsClass();
- string strSQLFilter = "编号='"+where+"'";
- mystring.Add("*");
- myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[lay].Dataset;
- myRecord = myV.Query(strSQLFilter,true,mystring,"");
- return myRecord;
- }
- else
- {
- return null;
- }
- }
- /// <summary>
- /// 函数重载,根据空间查询得到结果
- /// </summary>
- /// <param name="lay"></param>
- /// <param name="myGeo"></param>
- /// <returns></returns>
- private SuperMapLib.soRecordset getRecotd(int lay,SuperMapLib.soGeometry myGeo)
- {
- if(lay!=0) //开始查询
- {
- axSuperMap2.Layers[lay].Snapable=true;
- SuperMapLib.soRecordset myRecord ;
- SuperMapLib.soDatasetVector myV ;
- myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[lay].Dataset;
- myRecord = myV.QueryEx(myGeo,SuperMapLib.seSpatialQueryMode.scsAreaIntersect,"");
- this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
- return myRecord;
- }
- else
- {
- return null;
- }
- }
- /// <summary>
- /// 填充结果
- /// </summary>
- /// <param name="myR"></param>
- private void fill_listview(SuperMapLib.soRecordset myR)
- {
- this.listView_r_other.Items.Clear();
- if(myR!=null)
- {
- if(myR.RecordCount>0)
- {
- for(int i=0;i<myR.RecordCount;i++)
- {
- string ie = myR.GetFieldValue("编号").ToString()+" "+myR.GetFieldValue("Layer").ToString();
- ListViewItem it = new ListViewItem(ie,4);
- it.Tag = Convert.ToInt32(myR.GetFieldValue("SmID"));
- this.listView_r_other.Items.Add(it);
- myR.MoveNext();
- }
- }
- else
- {
- MessageBox.Show("没有找到符合条件的纪录","系统提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
- ListViewItem it = new ListViewItem("没有找到任何纪录",4);
- it.Tag = "错误";
- this.listView_r_other.Items.Add(it);
- }
- }
- }
- private SuperMapLib.soRecordset flash_other(int lay ,int where)
- {
- if(lay!=0) //开始查询
- {
- axSuperMap2.Layers[lay].Snapable=true;
- SuperMapLib.soRecordset myRecord ;
- SuperMapLib.soDatasetVector myV ;
- SuperMapLib.soStrings mystring = new SuperMapLib.soStringsClass();
- string strSQLFilter = "SmID="+where+"";
- mystring.Add("*");
- myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[lay].Dataset;
- myRecord = myV.Query(strSQLFilter,true,mystring,"");
- return myRecord;
- }
- else
- {
- return null;
- }
- }
- private void other_flash()
- {
- if(this.listView_r_other.SelectedItems.Count>0)
- {
- if(this.listView_r_other.SelectedItems[0].Tag.ToString()!="错误")
- {
- int where = Convert.ToInt32(this.listView_r_other.SelectedItems[0].Tag);
- int lay = get_query_where();
- SuperMapLib.soRecordset myRe = flash_other(lay ,where);
- if(myRe!=null)
- {
- this.flash_Geo=myRe.GetGeometry();
-
- if(flash_Geo.Dimension!=0)
- {
- this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.1); //居中现实
- this.axSuperMap2.CtlRefresh();
- }
- else
- {
- this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5);
- this.axSuperMap2.CtlRefresh();
- }
- this.timer_flash_kong.Start();
- }
- }
- }
- }
- #endregion
- #region 用户权限管理
- private void user_admin()
- {
- this.menu_user_manage.Visible = false; //用户管理不可见
- this.menu_kong_add.Visible = false ; //钻孔添加不可见
- this.menu_yan_manage.Visible = false;//岩性管理不可见
- this.menu_k_del.Visible = false;//不容许删除钻孔
- this.menuCommand19.Visible = false; //同时隐藏一个分割条
- }
- #endregion
- #region 系统开始初始化
- private void myl_SendLogin()
- {
- Splasher.Show();
- create_RTool();
- loadData();
- if(App.u_flag!=(int)flag.admin)
- {
- user_admin();
- }
- this.axSuperMap2.Dock = DockStyle.Fill;
- this.statusPanel_xy.Text = "鼠标位置坐标";
- this.statusPanel_user.Text = "当前用户:"+App.u_name;
- get_fill_file();
- Splasher.Close();
- this.Visible = true;
- this.timer_form.Start();
- }
- #endregion
-
- }
- }