⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainform.cs

📁 煤矿信息管理系统是基于SuperMap Object
💻 CS
📖 第 1 页 / 共 5 页
字号:
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();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -