MainForm.cs
上传用户:chizxy
上传日期:2014-11-29
资源大小:407k
文件大小:94k
源码类别:

其他行业

开发平台:

C#

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Data;
  7. using System.Data.SqlClient;
  8. using System.Threading;
  9. //引用第三方控件名字空间
  10. using Crownwood.DotNetMagic.Common;
  11. using Crownwood.DotNetMagic.Menus;
  12. using Crownwood.DotNetMagic.Docking;
  13. using Crownwood.DotNetMagic.Controls;
  14. using Crownwood.DotNetMagic.Controls.Command;
  15. namespace MKIms3
  16. {
  17. /// <summary>
  18. /// Form1 的摘要说明。
  19. /// </summary>
  20. public class MainForm : System.Windows.Forms.Form
  21. {   
  22. private DockingManager dockingManager;
  23. private bool closeButtons;
  24. private bool captionBars;
  25. private Content kong_query;
  26. private Content map_manage;
  27. private Content legend;
  28. private Content other_query;
  29. private string mapname;
  30. private SuperMapLib.soGeometry flash_Geo;
  31. private int flash_i; //闪烁标志
  32. private int form_opactiy; //窗体透明度
  33. enum enum_option_track {query,add_point,other_query};//  用来标记track层上的具体动作
  34. private int option_track;
  35. private string data_map_name;
  36. private Login myl;
  37. #region 系统自动生成的字段
  38. private Crownwood.DotNetMagic.Menus.MenuControl menu_Main;
  39. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_sys;
  40. private Crownwood.DotNetMagic.Menus.MenuCommand menu_pwd_change;
  41. private Crownwood.DotNetMagic.Menus.MenuCommand menu_user_manage;
  42. private Crownwood.DotNetMagic.Menus.MenuCommand menu_logout;
  43. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand19;
  44. private Crownwood.DotNetMagic.Menus.MenuCommand menu_kong;
  45. private Crownwood.DotNetMagic.Menus.MenuCommand menu_map_manage;
  46. private Crownwood.DotNetMagic.Menus.MenuCommand menu_tool;
  47. private Crownwood.DotNetMagic.Menus.MenuCommand menu_yan_manage;
  48. private Crownwood.DotNetMagic.Menus.MenuCommand menu_view;
  49. private Crownwood.DotNetMagic.Menus.MenuCommand menu_data_out;
  50. private Crownwood.DotNetMagic.Menus.MenuCommand menu_kong_query;
  51. private Crownwood.DotNetMagic.Menus.MenuCommand menu_kong_add;
  52. private Crownwood.DotNetMagic.Menus.MenuCommand menu_map_out;
  53. private Crownwood.DotNetMagic.Menus.MenuCommand menu_map_print;
  54. private Crownwood.DotNetMagic.Menus.MenuCommand menu_fill_edit;
  55. private Crownwood.DotNetMagic.Menus.MenuCommand menu_yan_edit;
  56. private Crownwood.DotNetMagic.Menus.MenuCommand menu_zoom_in;
  57. private Crownwood.DotNetMagic.Menus.MenuCommand menu_zoom_out;
  58. private Crownwood.DotNetMagic.Menus.MenuCommand menu_pan;
  59. private Crownwood.DotNetMagic.Menus.MenuCommand menu_full_view;
  60. private System.Windows.Forms.ImageList imageList;
  61. private Crownwood.DotNetMagic.Controls.StatusBarControl statusBarControl1;
  62. private System.Windows.Forms.Panel panel_kong_query;
  63. private System.Windows.Forms.Panel panel_map_manage;
  64. private System.Windows.Forms.Panel panel_legend;
  65. private AxSuperMapLib.AxSuperMap axSuperMap1;
  66. private AxSuperLegendLib.AxSuperLegend axSuperLegend1;
  67. private AxSuperWkspManagerLib.AxSuperWkspManager axSuperWkspManager1;
  68. private AxSuperMapLib.AxSuperMap axSuperMap2;
  69. private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_legend;
  70. private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_kong;
  71. private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_map;
  72. private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_all;
  73. private Crownwood.DotNetMagic.Menus.MenuCommand menu_mianban_close;
  74. private System.Windows.Forms.GroupBox groupBox_query;
  75. private System.Windows.Forms.GroupBox groupBox_re_kong;
  76. private System.Windows.Forms.GroupBox groupBox_re_map;
  77. private System.Windows.Forms.Panel panel_query_result;
  78. private System.Windows.Forms.TextBox txt_k_id;
  79. private Crownwood.DotNetMagic.Controls.ButtonWithStyle btn_map_query;
  80. private Crownwood.DotNetMagic.Controls.ButtonWithStyle btn_clear_select;
  81. private System.Windows.Forms.GroupBox groupBox_map_query;
  82. private System.Windows.Forms.ListView listView_re_kong;
  83. private System.Windows.Forms.ColumnHeader columnHeader2;
  84. private System.Windows.Forms.ListView listView_re_map;
  85. private System.Windows.Forms.ColumnHeader columnHeader4;
  86. private System.Windows.Forms.Splitter splitter_re_map_kong;
  87. private System.Windows.Forms.Panel panel_query_bianhao;
  88. private System.Windows.Forms.Timer timer_flash_kong;
  89. private System.Windows.Forms.ContextMenu contextMenu_kong;
  90. private System.Windows.Forms.MenuItem menu_k_position;
  91. private System.Windows.Forms.MenuItem menu_k_info;
  92. private System.Windows.Forms.MenuItem menu_k_del;
  93. private System.Windows.Forms.Button btn_query;
  94. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_k_addDATA;
  95. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_k_addMAP;
  96. private Crownwood.DotNetMagic.Controls.ToolControl toolControl2;
  97. private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_null;
  98. private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_in;
  99. private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_out;
  100. private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_free;
  101. private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_pan;
  102. private Crownwood.DotNetMagic.Controls.Command.ButtonCommand buttonCommand_full;
  103. private Crownwood.DotNetMagic.Controls.Command.SeparatorCommand separatorCommand1;
  104. private Crownwood.DotNetMagic.Controls.Command.SeparatorCommand separatorCommand2;
  105. private System.Windows.Forms.Panel panel_query_other;
  106. private System.Windows.Forms.GroupBox groupBox1;
  107. private System.Windows.Forms.GroupBox groupBox2;
  108. private System.Windows.Forms.ListView listView_r_other;
  109. private System.Windows.Forms.ColumnHeader columnHeader1;
  110. private System.Windows.Forms.Button btn_other_query_draw;
  111. private System.Windows.Forms.Button btn_other_query;
  112. private System.Windows.Forms.RadioButton radioButton_jinbian;
  113. private System.Windows.Forms.RadioButton radioButton_dixian;
  114. private System.Windows.Forms.RadioButton radioButton_kanxian;
  115. private System.Windows.Forms.TextBox textBox_other;
  116. private System.Windows.Forms.ToolTip toolTip1;
  117. private System.Windows.Forms.ContextMenu contextMenu_other;
  118. private System.Windows.Forms.MenuItem menuItem_other_map_ding;
  119. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_query_other;
  120. private Crownwood.DotNetMagic.Controls.StatusPanel statusPanel_user;
  121. private Crownwood.DotNetMagic.Controls.StatusPanel statusPanel_xy;
  122. private Crownwood.DotNetMagic.Controls.StatusPanel statusPanel_infor;
  123. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand1;
  124. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_help;
  125. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_about;
  126. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_null;
  127. private Crownwood.DotNetMagic.Menus.MenuCommand menuCommand_free;
  128. private System.Windows.Forms.Timer timer_form;
  129. private AxSuperMapLib.AxSuperWorkspace axSuperWorkspace1;
  130. private System.ComponentModel.IContainer components;
  131. #endregion
  132. public MainForm()
  133. {
  134. //使用双缓冲
  135. SetStyle(ControlStyles.DoubleBuffer, true);
  136. SetStyle(ControlStyles.AllPaintingInWmPaint, true);
  137. //
  138. // Windows 窗体设计器支持所必需的
  139. //
  140. InitializeComponent();
  141. //
  142. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  143. //
  144. captionBars = true;
  145. closeButtons = true;
  146. //ignoreClose =1;
  147. dockingManager = new DockingManager(this, VisualStyle.Office2003);
  148. dockingManager.ContentShown += new DockingManager.ContentHandler(OnContentShown);
  149. dockingManager.ContentHidden += new DockingManager.ContentHandler(OnContentHidden);
  150. dockingManager.ContentHiding += new DockingManager.ContentHidingHandler(OnContentHiding);
  151. dockingManager.InnerControl = this.axSuperMap2;
  152. dockingManager.OuterControl = this.toolControl2;
  153. }
  154. /// <summary>
  155. /// 清理所有正在使用的资源。
  156. /// </summary>
  157. protected override void Dispose( bool disposing )
  158. {
  159. if( disposing )
  160. {
  161. if (components != null) 
  162. {
  163. components.Dispose();
  164. }
  165. }
  166. base.Dispose( disposing );
  167. }
  168. #region Windows 窗体设计器生成的代码
  169. /// <summary>
  170. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  171. /// 此方法的内容。
  172. /// </summary>
  173. private void InitializeComponent()
  174. {
  175. this.components = new System.ComponentModel.Container();
  176. System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
  177. this.panel_legend = new System.Windows.Forms.Panel();
  178. this.axSuperLegend1 = new AxSuperLegendLib.AxSuperLegend();
  179. this.axSuperMap1 = new AxSuperMapLib.AxSuperMap();
  180. this.menu_Main = new Crownwood.DotNetMagic.Menus.MenuControl();
  181. this.menuCommand_sys = new Crownwood.DotNetMagic.Menus.MenuCommand();
  182. this.menu_pwd_change = new Crownwood.DotNetMagic.Menus.MenuCommand();
  183. this.menu_user_manage = new Crownwood.DotNetMagic.Menus.MenuCommand();
  184. this.menu_logout = new Crownwood.DotNetMagic.Menus.MenuCommand();
  185. this.menu_kong = new Crownwood.DotNetMagic.Menus.MenuCommand();
  186. this.menu_data_out = new Crownwood.DotNetMagic.Menus.MenuCommand();
  187. this.menu_kong_query = new Crownwood.DotNetMagic.Menus.MenuCommand();
  188. this.menuCommand19 = new Crownwood.DotNetMagic.Menus.MenuCommand();
  189. this.menu_kong_add = new Crownwood.DotNetMagic.Menus.MenuCommand();
  190. this.menuCommand_k_addDATA = new Crownwood.DotNetMagic.Menus.MenuCommand();
  191. this.menuCommand_k_addMAP = new Crownwood.DotNetMagic.Menus.MenuCommand();
  192. this.menu_map_manage = new Crownwood.DotNetMagic.Menus.MenuCommand();
  193. this.menu_map_out = new Crownwood.DotNetMagic.Menus.MenuCommand();
  194. this.menu_map_print = new Crownwood.DotNetMagic.Menus.MenuCommand();
  195. this.menu_yan_manage = new Crownwood.DotNetMagic.Menus.MenuCommand();
  196. this.menu_fill_edit = new Crownwood.DotNetMagic.Menus.MenuCommand();
  197. this.menu_yan_edit = new Crownwood.DotNetMagic.Menus.MenuCommand();
  198. this.menu_tool = new Crownwood.DotNetMagic.Menus.MenuCommand();
  199. this.menuCommand_null = new Crownwood.DotNetMagic.Menus.MenuCommand();
  200. this.menu_zoom_in = new Crownwood.DotNetMagic.Menus.MenuCommand();
  201. this.menu_zoom_out = new Crownwood.DotNetMagic.Menus.MenuCommand();
  202. this.menuCommand_free = new Crownwood.DotNetMagic.Menus.MenuCommand();
  203. this.menu_pan = new Crownwood.DotNetMagic.Menus.MenuCommand();
  204. this.menu_full_view = new Crownwood.DotNetMagic.Menus.MenuCommand();
  205. this.menu_view = new Crownwood.DotNetMagic.Menus.MenuCommand();
  206. this.menu_mianban_kong = new Crownwood.DotNetMagic.Menus.MenuCommand();
  207. this.menu_mianban_map = new Crownwood.DotNetMagic.Menus.MenuCommand();
  208. this.menu_mianban_legend = new Crownwood.DotNetMagic.Menus.MenuCommand();
  209. this.menuCommand_query_other = new Crownwood.DotNetMagic.Menus.MenuCommand();
  210. this.menu_mianban_all = new Crownwood.DotNetMagic.Menus.MenuCommand();
  211. this.menu_mianban_close = new Crownwood.DotNetMagic.Menus.MenuCommand();
  212. this.menuCommand1 = new Crownwood.DotNetMagic.Menus.MenuCommand();
  213. this.menuCommand_help = new Crownwood.DotNetMagic.Menus.MenuCommand();
  214. this.menuCommand_about = new Crownwood.DotNetMagic.Menus.MenuCommand();
  215. this.imageList = new System.Windows.Forms.ImageList(this.components);
  216. this.statusBarControl1 = new Crownwood.DotNetMagic.Controls.StatusBarControl();
  217. this.statusPanel_infor = new Crownwood.DotNetMagic.Controls.StatusPanel();
  218. this.statusPanel_user = new Crownwood.DotNetMagic.Controls.StatusPanel();
  219. this.statusPanel_xy = new Crownwood.DotNetMagic.Controls.StatusPanel();
  220. this.panel_kong_query = new System.Windows.Forms.Panel();
  221. this.panel_query_result = new System.Windows.Forms.Panel();
  222. this.groupBox_re_map = new System.Windows.Forms.GroupBox();
  223. this.listView_re_map = new System.Windows.Forms.ListView();
  224. this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
  225. this.splitter_re_map_kong = new System.Windows.Forms.Splitter();
  226. this.groupBox_re_kong = new System.Windows.Forms.GroupBox();
  227. this.listView_re_kong = new System.Windows.Forms.ListView();
  228. this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
  229. this.contextMenu_kong = new System.Windows.Forms.ContextMenu();
  230. this.menu_k_position = new System.Windows.Forms.MenuItem();
  231. this.menu_k_info = new System.Windows.Forms.MenuItem();
  232. this.menu_k_del = new System.Windows.Forms.MenuItem();
  233. this.panel_query_bianhao = new System.Windows.Forms.Panel();
  234. this.groupBox_query = new System.Windows.Forms.GroupBox();
  235. this.btn_query = new System.Windows.Forms.Button();
  236. this.txt_k_id = new System.Windows.Forms.TextBox();
  237. this.groupBox_map_query = new System.Windows.Forms.GroupBox();
  238. this.btn_map_query = new Crownwood.DotNetMagic.Controls.ButtonWithStyle();
  239. this.btn_clear_select = new Crownwood.DotNetMagic.Controls.ButtonWithStyle();
  240. this.panel_map_manage = new System.Windows.Forms.Panel();
  241. this.axSuperWkspManager1 = new AxSuperWkspManagerLib.AxSuperWkspManager();
  242. this.timer_flash_kong = new System.Windows.Forms.Timer(this.components);
  243. this.toolControl2 = new Crownwood.DotNetMagic.Controls.ToolControl();
  244. this.separatorCommand1 = new Crownwood.DotNetMagic.Controls.Command.SeparatorCommand();
  245. this.buttonCommand_null = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
  246. this.separatorCommand2 = new Crownwood.DotNetMagic.Controls.Command.SeparatorCommand();
  247. this.buttonCommand_in = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
  248. this.buttonCommand_out = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
  249. this.buttonCommand_free = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
  250. this.buttonCommand_pan = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
  251. this.buttonCommand_full = new Crownwood.DotNetMagic.Controls.Command.ButtonCommand();
  252. this.axSuperMap2 = new AxSuperMapLib.AxSuperMap();
  253. this.panel_query_other = new System.Windows.Forms.Panel();
  254. this.listView_r_other = new System.Windows.Forms.ListView();
  255. this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
  256. this.contextMenu_other = new System.Windows.Forms.ContextMenu();
  257. this.menuItem_other_map_ding = new System.Windows.Forms.MenuItem();
  258. this.groupBox2 = new System.Windows.Forms.GroupBox();
  259. this.btn_other_query = new System.Windows.Forms.Button();
  260. this.textBox_other = new System.Windows.Forms.TextBox();
  261. this.btn_other_query_draw = new System.Windows.Forms.Button();
  262. this.groupBox1 = new System.Windows.Forms.GroupBox();
  263. this.radioButton_kanxian = new System.Windows.Forms.RadioButton();
  264. this.radioButton_dixian = new System.Windows.Forms.RadioButton();
  265. this.radioButton_jinbian = new System.Windows.Forms.RadioButton();
  266. this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
  267. this.timer_form = new System.Windows.Forms.Timer(this.components);
  268. this.axSuperWorkspace1 = new AxSuperMapLib.AxSuperWorkspace();
  269. this.panel_legend.SuspendLayout();
  270. ((System.ComponentModel.ISupportInitialize)(this.axSuperLegend1)).BeginInit();
  271. ((System.ComponentModel.ISupportInitialize)(this.axSuperMap1)).BeginInit();
  272. this.panel_kong_query.SuspendLayout();
  273. this.panel_query_result.SuspendLayout();
  274. this.groupBox_re_map.SuspendLayout();
  275. this.groupBox_re_kong.SuspendLayout();
  276. this.panel_query_bianhao.SuspendLayout();
  277. this.groupBox_query.SuspendLayout();
  278. this.groupBox_map_query.SuspendLayout();
  279. this.panel_map_manage.SuspendLayout();
  280. ((System.ComponentModel.ISupportInitialize)(this.axSuperWkspManager1)).BeginInit();
  281. ((System.ComponentModel.ISupportInitialize)(this.toolControl2)).BeginInit();
  282. ((System.ComponentModel.ISupportInitialize)(this.axSuperMap2)).BeginInit();
  283. this.panel_query_other.SuspendLayout();
  284. this.groupBox2.SuspendLayout();
  285. this.groupBox1.SuspendLayout();
  286. ((System.ComponentModel.ISupportInitialize)(this.axSuperWorkspace1)).BeginInit();
  287. this.SuspendLayout();
  288. // 
  289. // panel_legend
  290. // 
  291. this.panel_legend.Controls.Add(this.axSuperLegend1);
  292. this.panel_legend.Controls.Add(this.axSuperMap1);
  293. this.panel_legend.Location = new System.Drawing.Point(456, 88);
  294. this.panel_legend.Name = "panel_legend";
  295. this.panel_legend.Size = new System.Drawing.Size(168, 232);
  296. this.panel_legend.TabIndex = 10;
  297. // 
  298. // axSuperLegend1
  299. // 
  300. this.axSuperLegend1.ContainingControl = this;
  301. this.axSuperLegend1.Dock = System.Windows.Forms.DockStyle.Fill;
  302. this.axSuperLegend1.Enabled = true;
  303. this.axSuperLegend1.Location = new System.Drawing.Point(0, 144);
  304. this.axSuperLegend1.Name = "axSuperLegend1";
  305. this.axSuperLegend1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperLegend1.OcxState")));
  306. this.axSuperLegend1.Size = new System.Drawing.Size(168, 88);
  307. this.axSuperLegend1.TabIndex = 1;
  308. this.axSuperLegend1.Modified += new System.EventHandler(this.axSuperLegend1_Modified);
  309. // 
  310. // axSuperMap1
  311. // 
  312. this.axSuperMap1.ContainingControl = this;
  313. this.axSuperMap1.Dock = System.Windows.Forms.DockStyle.Top;
  314. this.axSuperMap1.Enabled = true;
  315. this.axSuperMap1.Location = new System.Drawing.Point(0, 0);
  316. this.axSuperMap1.Name = "axSuperMap1";
  317. this.axSuperMap1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperMap1.OcxState")));
  318. this.axSuperMap1.Size = new System.Drawing.Size(168, 144);
  319. this.axSuperMap1.TabIndex = 0;
  320. this.axSuperMap1.MouseDownEvent += new AxSuperMapLib._DSuperMapEvents_MouseDownEventHandler(this.axSuperMap1_MouseDownEvent);
  321. // 
  322. // menu_Main
  323. // 
  324. this.menu_Main.AllowLayered = true;
  325. this.menu_Main.AnimateStyle = Crownwood.DotNetMagic.Menus.Animation.System;
  326. this.menu_Main.AnimateTime = 100;
  327. this.menu_Main.BackColor = System.Drawing.SystemColors.Control;
  328. this.menu_Main.Cursor = System.Windows.Forms.Cursors.Arrow;
  329. this.menu_Main.Direction = Crownwood.DotNetMagic.Common.LayoutDirection.Horizontal;
  330. this.menu_Main.Dock = System.Windows.Forms.DockStyle.Top;
  331. this.menu_Main.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((System.Byte)(134)));
  332. this.menu_Main.HighlightBackColor = System.Drawing.SystemColors.Highlight;
  333. this.menu_Main.HighlightTextColor = System.Drawing.SystemColors.MenuText;
  334. this.menu_Main.IgnoreF10 = false;
  335. this.menu_Main.Location = new System.Drawing.Point(0, 0);
  336. this.menu_Main.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  337.    this.menuCommand_sys,
  338.    this.menu_kong,
  339.    this.menu_map_manage,
  340.    this.menu_yan_manage,
  341.    this.menu_tool,
  342.    this.menu_view,
  343.    this.menuCommand1});
  344. this.menu_Main.Name = "menu_Main";
  345. this.menu_Main.PlainSelectedTextColor = System.Drawing.SystemColors.ActiveCaptionText;
  346. this.menu_Main.SelectedBackColor = System.Drawing.SystemColors.Control;
  347. this.menu_Main.SelectedTextColor = System.Drawing.SystemColors.MenuText;
  348. this.menu_Main.Size = new System.Drawing.Size(832, 25);
  349. this.menu_Main.Style = Crownwood.DotNetMagic.Common.VisualStyle.IDE2005;
  350. this.menu_Main.TabIndex = 0;
  351. this.menu_Main.TabStop = false;
  352. this.menu_Main.Text = "menu_Mian";
  353. this.menu_Main.TextColor = System.Drawing.SystemColors.MenuText;
  354. // 
  355. // menuCommand_sys
  356. // 
  357. this.menuCommand_sys.Description = "Menu";
  358. this.menuCommand_sys.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  359.  this.menu_pwd_change,
  360.  this.menu_user_manage,
  361.  this.menu_logout});
  362. this.menuCommand_sys.Text = "  系统管理 (&S)";
  363. // 
  364. // menu_pwd_change
  365. // 
  366. this.menu_pwd_change.Description = "Menu";
  367. this.menu_pwd_change.Text = "密码修改";
  368. this.menu_pwd_change.Click += new System.EventHandler(this.menu_pwd_change_Click);
  369. // 
  370. // menu_user_manage
  371. // 
  372. this.menu_user_manage.Description = "Menu";
  373. this.menu_user_manage.Text = "用户管理";
  374. this.menu_user_manage.Click += new System.EventHandler(this.menu_user_manage_Click);
  375. // 
  376. // menu_logout
  377. // 
  378. this.menu_logout.Description = "Menu";
  379. this.menu_logout.Text = "退出登陆";
  380. this.menu_logout.Click += new System.EventHandler(this.menu_logout_Click);
  381. // 
  382. // menu_kong
  383. // 
  384. this.menu_kong.Description = "Menu";
  385. this.menu_kong.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  386.    this.menu_data_out,
  387.    this.menu_kong_query,
  388.    this.menuCommand19,
  389.    this.menu_kong_add});
  390. this.menu_kong.Text = "钻孔管理(&K)";
  391. // 
  392. // menu_data_out
  393. // 
  394. this.menu_data_out.Description = "Menu";
  395. this.menu_data_out.Text = "钻孔数据导出";
  396. this.menu_data_out.Click += new System.EventHandler(this.menu_data_out_Click);
  397. // 
  398. // menu_kong_query
  399. // 
  400. this.menu_kong_query.Description = "Menu";
  401. this.menu_kong_query.Text = "钻孔数据浏览";
  402. this.menu_kong_query.Click += new System.EventHandler(this.menu_kong_query_Click);
  403. // 
  404. // menuCommand19
  405. // 
  406. this.menuCommand19.Description = "Menu";
  407. this.menuCommand19.Text = "-";
  408. // 
  409. // menu_kong_add
  410. // 
  411. this.menu_kong_add.Description = "Menu";
  412. this.menu_kong_add.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  413.    this.menuCommand_k_addDATA,
  414.    this.menuCommand_k_addMAP});
  415. this.menu_kong_add.Text = "钻孔数据添加";
  416. // 
  417. // menuCommand_k_addDATA
  418. // 
  419. this.menuCommand_k_addDATA.Description = "Menu";
  420. this.menuCommand_k_addDATA.Text = "直接录入";
  421. this.menuCommand_k_addDATA.Click += new System.EventHandler(this.menuCommand_k_addDATA_Click);
  422. // 
  423. // menuCommand_k_addMAP
  424. // 
  425. this.menuCommand_k_addMAP.Description = "Menu";
  426. this.menuCommand_k_addMAP.Text = "图上添加";
  427. this.menuCommand_k_addMAP.Click += new System.EventHandler(this.menuCommand_k_addMAP_Click);
  428. // 
  429. // menu_map_manage
  430. // 
  431. this.menu_map_manage.Description = "Menu";
  432. this.menu_map_manage.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  433.  this.menu_map_out,
  434.  this.menu_map_print});
  435. this.menu_map_manage.Text = "地图管理(&M)";
  436. // 
  437. // menu_map_out
  438. // 
  439. this.menu_map_out.Description = "Menu";
  440. this.menu_map_out.Text = "当前数据集导出";
  441. this.menu_map_out.Click += new System.EventHandler(this.menu_map_out_Click);
  442. // 
  443. // menu_map_print
  444. // 
  445. this.menu_map_print.Description = "Menu";
  446. this.menu_map_print.Text = "地图打印输出";
  447. this.menu_map_print.Click += new System.EventHandler(this.menu_map_print_Click);
  448. // 
  449. // menu_yan_manage
  450. // 
  451. this.menu_yan_manage.Description = "Menu";
  452. this.menu_yan_manage.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  453.  this.menu_fill_edit,
  454.  this.menu_yan_edit});
  455. this.menu_yan_manage.Text = "岩性管理(&R)";
  456. // 
  457. // menu_fill_edit
  458. // 
  459. this.menu_fill_edit.Description = "Menu";
  460. this.menu_fill_edit.Text = "填充库编辑";
  461. this.menu_fill_edit.Click += new System.EventHandler(this.menu_fill_edit_Click);
  462. // 
  463. // menu_yan_edit
  464. // 
  465. this.menu_yan_edit.Description = "Menu";
  466. this.menu_yan_edit.Text = "岩性库编辑";
  467. this.menu_yan_edit.Click += new System.EventHandler(this.menu_yan_edit_Click);
  468. // 
  469. // menu_tool
  470. // 
  471. this.menu_tool.Description = "Menu";
  472. this.menu_tool.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  473.    this.menuCommand_null,
  474.    this.menu_zoom_in,
  475.    this.menu_zoom_out,
  476.    this.menuCommand_free,
  477.    this.menu_pan,
  478.    this.menu_full_view});
  479. this.menu_tool.Text = "工具(&T)";
  480. // 
  481. // menuCommand_null
  482. // 
  483. this.menuCommand_null.Description = "Menu";
  484. this.menuCommand_null.Text = "置空";
  485. this.menuCommand_null.Click += new System.EventHandler(this.menuCommand_null_Click);
  486. // 
  487. // menu_zoom_in
  488. // 
  489. this.menu_zoom_in.Description = "Menu";
  490. this.menu_zoom_in.Text = "放大";
  491. this.menu_zoom_in.Click += new System.EventHandler(this.buttonCommand_in_Click);
  492. // 
  493. // menu_zoom_out
  494. // 
  495. this.menu_zoom_out.Description = "Menu";
  496. this.menu_zoom_out.Text = "缩小";
  497. this.menu_zoom_out.Click += new System.EventHandler(this.buttonCommand_out_Click);
  498. // 
  499. // menuCommand_free
  500. // 
  501. this.menuCommand_free.Description = "Menu";
  502. this.menuCommand_free.Text = "自由缩放";
  503. this.menuCommand_free.Click += new System.EventHandler(this.menuCommand_free_Click);
  504. // 
  505. // menu_pan
  506. // 
  507. this.menu_pan.Description = "Menu";
  508. this.menu_pan.Text = "漫游";
  509. this.menu_pan.Click += new System.EventHandler(this.buttonCommand_pan_Click);
  510. // 
  511. // menu_full_view
  512. // 
  513. this.menu_full_view.Description = "Menu";
  514. this.menu_full_view.Text = "全图显示";
  515. this.menu_full_view.Click += new System.EventHandler(this.buttonCommand_full_Click);
  516. // 
  517. // menu_view
  518. // 
  519. this.menu_view.Description = "Menu";
  520. this.menu_view.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  521.    this.menu_mianban_kong,
  522.    this.menu_mianban_map,
  523.    this.menu_mianban_legend,
  524.    this.menuCommand_query_other,
  525.    this.menu_mianban_all,
  526.    this.menu_mianban_close});
  527. this.menu_view.Text = "视图(&V)";
  528. // 
  529. // menu_mianban_kong
  530. // 
  531. this.menu_mianban_kong.Description = "Menu";
  532. this.menu_mianban_kong.Text = "钻孔信息查询";
  533. this.menu_mianban_kong.Click += new System.EventHandler(this.menu_mianban_kong_Click);
  534. this.menu_mianban_kong.Update += new System.EventHandler(this.menu_mianban_kong_Update);
  535. // 
  536. // menu_mianban_map
  537. // 
  538. this.menu_mianban_map.Description = "Menu";
  539. this.menu_mianban_map.Text = "地图数据管理";
  540. this.menu_mianban_map.Click += new System.EventHandler(this.menu_mianban_map_Click);
  541. this.menu_mianban_map.Update += new System.EventHandler(this.menu_mianban_map_Update);
  542. // 
  543. // menu_mianban_legend
  544. // 
  545. this.menu_mianban_legend.Description = "Menu";
  546. this.menu_mianban_legend.Text = "图例导航";
  547. this.menu_mianban_legend.Click += new System.EventHandler(this.menu_mianban_legend_Click);
  548. this.menu_mianban_legend.Update += new System.EventHandler(this.menu_mianban_legend_Update);
  549. // 
  550. // menuCommand_query_other
  551. // 
  552. this.menuCommand_query_other.Description = "Menu";
  553. this.menuCommand_query_other.Text = "其他查询";
  554. this.menuCommand_query_other.Click += new System.EventHandler(this.menuCommand_query_other_Click);
  555. this.menuCommand_query_other.Update += new System.EventHandler(this.menuCommand_query_other_Update);
  556. // 
  557. // menu_mianban_all
  558. // 
  559. this.menu_mianban_all.Description = "Menu";
  560. this.menu_mianban_all.Text = "显示所有面板";
  561. this.menu_mianban_all.Click += new System.EventHandler(this.menu_mianban_all_Click);
  562. // 
  563. // menu_mianban_close
  564. // 
  565. this.menu_mianban_close.Description = "Menu";
  566. this.menu_mianban_close.Text = "关闭所有面板";
  567. this.menu_mianban_close.Click += new System.EventHandler(this.menu_mianban_close_Click);
  568. // 
  569. // menuCommand1
  570. // 
  571. this.menuCommand1.Description = "Menu";
  572. this.menuCommand1.MenuCommands.AddRange(new Crownwood.DotNetMagic.Menus.MenuCommand[] {
  573.   this.menuCommand_help,
  574.   this.menuCommand_about});
  575. this.menuCommand1.Text = "帮助 (&H)";
  576. // 
  577. // menuCommand_help
  578. // 
  579. this.menuCommand_help.Description = "Menu";
  580. this.menuCommand_help.Shortcut = System.Windows.Forms.Shortcut.F1;
  581. this.menuCommand_help.Text = "系统帮助";
  582. this.menuCommand_help.Click += new System.EventHandler(this.menuCommand_help_Click);
  583. // 
  584. // menuCommand_about
  585. // 
  586. this.menuCommand_about.Description = "Menu";
  587. this.menuCommand_about.Text = "关于我们";
  588. this.menuCommand_about.Click += new System.EventHandler(this.menuCommand_about_Click);
  589. // 
  590. // imageList
  591. // 
  592. this.imageList.ImageSize = new System.Drawing.Size(16, 16);
  593. this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
  594. this.imageList.TransparentColor = System.Drawing.Color.Transparent;
  595. // 
  596. // statusBarControl1
  597. // 
  598. this.statusBarControl1.Location = new System.Drawing.Point(0, 469);
  599. this.statusBarControl1.Name = "statusBarControl1";
  600. this.statusBarControl1.Size = new System.Drawing.Size(832, 24);
  601. this.statusBarControl1.StatusPanels.AddRange(new Crownwood.DotNetMagic.Controls.StatusPanel[] {
  602.   this.statusPanel_infor,
  603.   this.statusPanel_user,
  604.   this.statusPanel_xy});
  605. this.statusBarControl1.TabIndex = 6;
  606. // 
  607. // statusPanel_infor
  608. // 
  609. this.statusPanel_infor.AutoScrollMargin = new System.Drawing.Size(0, 0);
  610. this.statusPanel_infor.AutoScrollMinSize = new System.Drawing.Size(0, 0);
  611. this.statusPanel_infor.AutoSizing = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
  612. this.statusPanel_infor.Location = new System.Drawing.Point(2, 2);
  613. this.statusPanel_infor.Name = "statusPanel_infor";
  614. this.statusPanel_infor.RequestedWidth = 200;
  615. this.statusPanel_infor.Size = new System.Drawing.Size(348, 18);
  616. this.statusPanel_infor.TabIndex = 0;
  617. this.statusPanel_infor.Text = "1111111111111";
  618. // 
  619. // statusPanel_user
  620. // 
  621. this.statusPanel_user.AutoScrollMargin = new System.Drawing.Size(0, 0);
  622. this.statusPanel_user.AutoScrollMinSize = new System.Drawing.Size(0, 0);
  623. this.statusPanel_user.Location = new System.Drawing.Point(2, 2);
  624. this.statusPanel_user.Name = "statusPanel_user";
  625. this.statusPanel_user.RequestedWidth = 200;
  626. this.statusPanel_user.Size = new System.Drawing.Size(200, 18);
  627. this.statusPanel_user.TabIndex = 0;
  628. this.statusPanel_user.Text = "2222222222222";
  629. // 
  630. // statusPanel_xy
  631. // 
  632. this.statusPanel_xy.AutoScrollMargin = new System.Drawing.Size(0, 0);
  633. this.statusPanel_xy.AutoScrollMinSize = new System.Drawing.Size(0, 0);
  634. this.statusPanel_xy.Location = new System.Drawing.Point(2, 2);
  635. this.statusPanel_xy.Name = "statusPanel_xy";
  636. this.statusPanel_xy.RequestedWidth = 250;
  637. this.statusPanel_xy.Size = new System.Drawing.Size(250, 18);
  638. this.statusPanel_xy.TabIndex = 0;
  639. this.statusPanel_xy.Text = "3";
  640. // 
  641. // panel_kong_query
  642. // 
  643. this.panel_kong_query.AutoScroll = true;
  644. this.panel_kong_query.Controls.Add(this.panel_query_result);
  645. this.panel_kong_query.Controls.Add(this.panel_query_bianhao);
  646. this.panel_kong_query.Location = new System.Drawing.Point(24, 72);
  647. this.panel_kong_query.Name = "panel_kong_query";
  648. this.panel_kong_query.Size = new System.Drawing.Size(144, 376);
  649. this.panel_kong_query.TabIndex = 8;
  650. // 
  651. // panel_query_result
  652. // 
  653. this.panel_query_result.Controls.Add(this.groupBox_re_map);
  654. this.panel_query_result.Controls.Add(this.splitter_re_map_kong);
  655. this.panel_query_result.Controls.Add(this.groupBox_re_kong);
  656. this.panel_query_result.Dock = System.Windows.Forms.DockStyle.Fill;
  657. this.panel_query_result.Location = new System.Drawing.Point(0, 96);
  658. this.panel_query_result.Name = "panel_query_result";
  659. this.panel_query_result.Size = new System.Drawing.Size(144, 280);
  660. this.panel_query_result.TabIndex = 3;
  661. // 
  662. // groupBox_re_map
  663. // 
  664. this.groupBox_re_map.Controls.Add(this.listView_re_map);
  665. this.groupBox_re_map.Dock = System.Windows.Forms.DockStyle.Fill;
  666. this.groupBox_re_map.Location = new System.Drawing.Point(0, 156);
  667. this.groupBox_re_map.Name = "groupBox_re_map";
  668. this.groupBox_re_map.Size = new System.Drawing.Size(144, 124);
  669. this.groupBox_re_map.TabIndex = 2;
  670. this.groupBox_re_map.TabStop = false;
  671. this.groupBox_re_map.Text = "相关地图";
  672. // 
  673. // listView_re_map
  674. // 
  675. this.listView_re_map.BackColor = System.Drawing.Color.WhiteSmoke;
  676. this.listView_re_map.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  677. this.listView_re_map.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
  678.   this.columnHeader4});
  679. this.listView_re_map.Dock = System.Windows.Forms.DockStyle.Fill;
  680. this.listView_re_map.FullRowSelect = true;
  681. this.listView_re_map.GridLines = true;
  682. this.listView_re_map.Location = new System.Drawing.Point(3, 17);
  683. this.listView_re_map.MultiSelect = false;
  684. this.listView_re_map.Name = "listView_re_map";
  685. this.listView_re_map.Size = new System.Drawing.Size(138, 104);
  686. this.listView_re_map.SmallImageList = this.imageList;
  687. this.listView_re_map.TabIndex = 1;
  688. this.listView_re_map.View = System.Windows.Forms.View.Details;
  689. this.listView_re_map.DoubleClick += new System.EventHandler(this.listView_re_map_DoubleClick);
  690. // 
  691. // columnHeader4
  692. // 
  693. this.columnHeader4.Text = "地图名称";
  694. this.columnHeader4.Width = 117;
  695. // 
  696. // splitter_re_map_kong
  697. // 
  698. this.splitter_re_map_kong.Dock = System.Windows.Forms.DockStyle.Top;
  699. this.splitter_re_map_kong.Location = new System.Drawing.Point(0, 152);
  700. this.splitter_re_map_kong.Name = "splitter_re_map_kong";
  701. this.splitter_re_map_kong.Size = new System.Drawing.Size(144, 4);
  702. this.splitter_re_map_kong.TabIndex = 3;
  703. this.splitter_re_map_kong.TabStop = false;
  704. // 
  705. // groupBox_re_kong
  706. // 
  707. this.groupBox_re_kong.Controls.Add(this.listView_re_kong);
  708. this.groupBox_re_kong.Dock = System.Windows.Forms.DockStyle.Top;
  709. this.groupBox_re_kong.Location = new System.Drawing.Point(0, 0);
  710. this.groupBox_re_kong.Name = "groupBox_re_kong";
  711. this.groupBox_re_kong.Size = new System.Drawing.Size(144, 152);
  712. this.groupBox_re_kong.TabIndex = 1;
  713. this.groupBox_re_kong.TabStop = false;
  714. this.groupBox_re_kong.Text = "查询结果";
  715. // 
  716. // listView_re_kong
  717. // 
  718. this.listView_re_kong.BackColor = System.Drawing.Color.WhiteSmoke;
  719. this.listView_re_kong.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  720. this.listView_re_kong.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
  721.    this.columnHeader2});
  722. this.listView_re_kong.ContextMenu = this.contextMenu_kong;
  723. this.listView_re_kong.Dock = System.Windows.Forms.DockStyle.Fill;
  724. this.listView_re_kong.FullRowSelect = true;
  725. this.listView_re_kong.GridLines = true;
  726. this.listView_re_kong.HideSelection = false;
  727. this.listView_re_kong.Location = new System.Drawing.Point(3, 17);
  728. this.listView_re_kong.MultiSelect = false;
  729. this.listView_re_kong.Name = "listView_re_kong";
  730. this.listView_re_kong.Size = new System.Drawing.Size(138, 132);
  731. this.listView_re_kong.SmallImageList = this.imageList;
  732. this.listView_re_kong.TabIndex = 1;
  733. this.listView_re_kong.View = System.Windows.Forms.View.Details;
  734. this.listView_re_kong.DoubleClick += new System.EventHandler(this.listView_re_kong_DoubleClick);
  735. this.listView_re_kong.SelectedIndexChanged += new System.EventHandler(this.listView_re_kong_SelectedIndexChanged);
  736. // 
  737. // columnHeader2
  738. // 
  739. this.columnHeader2.Text = "钻孔编号";
  740. this.columnHeader2.Width = 118;
  741. // 
  742. // contextMenu_kong
  743. // 
  744. this.contextMenu_kong.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  745.  this.menu_k_position,
  746.  this.menu_k_info,
  747.  this.menu_k_del});
  748. // 
  749. // menu_k_position
  750. // 
  751. this.menu_k_position.Index = 0;
  752. this.menu_k_position.Text = "图上定位";
  753. this.menu_k_position.Click += new System.EventHandler(this.menu_k_position_Click);
  754. // 
  755. // menu_k_info
  756. // 
  757. this.menu_k_info.Index = 1;
  758. this.menu_k_info.Text = "详细信息";
  759. this.menu_k_info.Click += new System.EventHandler(this.menu_k_info_Click);
  760. // 
  761. // menu_k_del
  762. // 
  763. this.menu_k_del.Index = 2;
  764. this.menu_k_del.Text = "删除钻孔";
  765. this.menu_k_del.Click += new System.EventHandler(this.menu_k_del_Click);
  766. // 
  767. // panel_query_bianhao
  768. // 
  769. this.panel_query_bianhao.Controls.Add(this.groupBox_query);
  770. this.panel_query_bianhao.Controls.Add(this.groupBox_map_query);
  771. this.panel_query_bianhao.Dock = System.Windows.Forms.DockStyle.Top;
  772. this.panel_query_bianhao.Location = new System.Drawing.Point(0, 0);
  773. this.panel_query_bianhao.Name = "panel_query_bianhao";
  774. this.panel_query_bianhao.Size = new System.Drawing.Size(144, 96);
  775. this.panel_query_bianhao.TabIndex = 5;
  776. // 
  777. // groupBox_query
  778. // 
  779. this.groupBox_query.Controls.Add(this.btn_query);
  780. this.groupBox_query.Controls.Add(this.txt_k_id);
  781. this.groupBox_query.Dock = System.Windows.Forms.DockStyle.Top;
  782. this.groupBox_query.Location = new System.Drawing.Point(0, 48);
  783. this.groupBox_query.Name = "groupBox_query";
  784. this.groupBox_query.Size = new System.Drawing.Size(144, 48);
  785. this.groupBox_query.TabIndex = 0;
  786. this.groupBox_query.TabStop = false;
  787. this.groupBox_query.Text = "按编号查询";
  788. // 
  789. // btn_query
  790. // 
  791. this.btn_query.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  792. this.btn_query.Location = new System.Drawing.Point(88, 16);
  793. this.btn_query.Name = "btn_query";
  794. this.btn_query.Size = new System.Drawing.Size(48, 24);
  795. this.btn_query.TabIndex = 1;
  796. this.btn_query.Text = "查询";
  797. this.toolTip1.SetToolTip(this.btn_query, "执行查询");
  798. this.btn_query.Click += new System.EventHandler(this.btn_query_Click);
  799. // 
  800. // txt_k_id
  801. // 
  802. this.txt_k_id.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  803. this.txt_k_id.Location = new System.Drawing.Point(9, 18);
  804. this.txt_k_id.Name = "txt_k_id";
  805. this.txt_k_id.Size = new System.Drawing.Size(71, 21);
  806. this.txt_k_id.TabIndex = 0;
  807. this.txt_k_id.Text = "";
  808. this.toolTip1.SetToolTip(this.txt_k_id, "请输入您想查询的钻孔编号");
  809. // 
  810. // groupBox_map_query
  811. // 
  812. this.groupBox_map_query.Controls.Add(this.btn_map_query);
  813. this.groupBox_map_query.Controls.Add(this.btn_clear_select);
  814. this.groupBox_map_query.Dock = System.Windows.Forms.DockStyle.Top;
  815. this.groupBox_map_query.Location = new System.Drawing.Point(0, 0);
  816. this.groupBox_map_query.Name = "groupBox_map_query";
  817. this.groupBox_map_query.Size = new System.Drawing.Size(144, 48);
  818. this.groupBox_map_query.TabIndex = 4;
  819. this.groupBox_map_query.TabStop = false;
  820. this.groupBox_map_query.Text = "图上查询";
  821. // 
  822. // btn_map_query
  823. // 
  824. this.btn_map_query.AlwaysDrawBorder = true;
  825. this.btn_map_query.Location = new System.Drawing.Point(8, 16);
  826. this.btn_map_query.Name = "btn_map_query";
  827. this.btn_map_query.RightToLeft = System.Windows.Forms.RightToLeft.No;
  828. this.btn_map_query.Size = new System.Drawing.Size(62, 24);
  829. this.btn_map_query.TabIndex = 1;
  830. this.btn_map_query.Text = "拉框选择";
  831. this.toolTip1.SetToolTip(this.btn_map_query, "在地图上拉框来选择钻孔");
  832. this.btn_map_query.Click += new System.EventHandler(this.btn_map_query_Click);
  833. // 
  834. // btn_clear_select
  835. // 
  836. this.btn_clear_select.AlwaysDrawBorder = true;
  837. this.btn_clear_select.Location = new System.Drawing.Point(76, 16);
  838. this.btn_clear_select.Name = "btn_clear_select";
  839. this.btn_clear_select.Size = new System.Drawing.Size(62, 24);
  840. this.btn_clear_select.TabIndex = 2;
  841. this.btn_clear_select.Text = "清除选择";
  842. this.toolTip1.SetToolTip(this.btn_clear_select, "清除地图上的显示结果");
  843. this.btn_clear_select.Click += new System.EventHandler(this.btn_clear_select_Click);
  844. // 
  845. // panel_map_manage
  846. // 
  847. this.panel_map_manage.Controls.Add(this.axSuperWkspManager1);
  848. this.panel_map_manage.Location = new System.Drawing.Point(744, 48);
  849. this.panel_map_manage.Name = "panel_map_manage";
  850. this.panel_map_manage.Size = new System.Drawing.Size(88, 152);
  851. this.panel_map_manage.TabIndex = 9;
  852. // 
  853. // axSuperWkspManager1
  854. // 
  855. this.axSuperWkspManager1.ContainingControl = this;
  856. this.axSuperWkspManager1.Dock = System.Windows.Forms.DockStyle.Fill;
  857. this.axSuperWkspManager1.Enabled = true;
  858. this.axSuperWkspManager1.Location = new System.Drawing.Point(0, 0);
  859. this.axSuperWkspManager1.Name = "axSuperWkspManager1";
  860. this.axSuperWkspManager1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperWkspManager1.OcxState")));
  861. this.axSuperWkspManager1.Size = new System.Drawing.Size(88, 152);
  862. this.axSuperWkspManager1.TabIndex = 0;
  863. this.axSuperWkspManager1.LDbClick += new AxSuperWkspManagerLib._DSuperWkspManagerEvents_LDbClickEventHandler(this.axSuperWkspManager1_LDbClick);
  864. // 
  865. // timer_flash_kong
  866. // 
  867. this.timer_flash_kong.Interval = 400;
  868. this.timer_flash_kong.Tick += new System.EventHandler(this.timer_flash_kong_Tick);
  869. // 
  870. // toolControl2
  871. // 
  872. this.toolControl2.Commands.AddRange(new Crownwood.DotNetMagic.Controls.Command.CommandBase[] {
  873.  this.separatorCommand1,
  874.  this.buttonCommand_null,
  875.  this.separatorCommand2,
  876.  this.buttonCommand_in,
  877.  this.buttonCommand_out,
  878.  this.buttonCommand_free,
  879.  this.buttonCommand_pan,
  880.  this.buttonCommand_full});
  881. this.toolControl2.Location = new System.Drawing.Point(0, 25);
  882. this.toolControl2.Name = "toolControl2";
  883. this.toolControl2.Size = new System.Drawing.Size(832, 26);
  884. this.toolControl2.TabIndex = 13;
  885. // 
  886. // separatorCommand1
  887. // 
  888. this.separatorCommand1.Tag = null;
  889. // 
  890. // buttonCommand_null
  891. // 
  892. this.buttonCommand_null.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_null.Image")));
  893. this.buttonCommand_null.Tag = null;
  894. this.buttonCommand_null.Text = "";
  895. this.buttonCommand_null.Tooltip = "空操作";
  896. this.buttonCommand_null.Click += new System.EventHandler(this.buttonCommand_null_Click);
  897. // 
  898. // separatorCommand2
  899. // 
  900. this.separatorCommand2.Tag = null;
  901. // 
  902. // buttonCommand_in
  903. // 
  904. this.buttonCommand_in.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_in.Image")));
  905. this.buttonCommand_in.Tag = null;
  906. this.buttonCommand_in.Text = "";
  907. this.buttonCommand_in.Tooltip = "放大";
  908. this.buttonCommand_in.Click += new System.EventHandler(this.buttonCommand_in_Click);
  909. // 
  910. // buttonCommand_out
  911. // 
  912. this.buttonCommand_out.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_out.Image")));
  913. this.buttonCommand_out.Tag = null;
  914. this.buttonCommand_out.Text = "";
  915. this.buttonCommand_out.Tooltip = "缩小";
  916. this.buttonCommand_out.Click += new System.EventHandler(this.buttonCommand_out_Click);
  917. // 
  918. // buttonCommand_free
  919. // 
  920. this.buttonCommand_free.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_free.Image")));
  921. this.buttonCommand_free.Tag = null;
  922. this.buttonCommand_free.Text = "";
  923. this.buttonCommand_free.Tooltip = "自由缩放";
  924. this.buttonCommand_free.Click += new System.EventHandler(this.buttonCommand_free_Click);
  925. // 
  926. // buttonCommand_pan
  927. // 
  928. this.buttonCommand_pan.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_pan.Image")));
  929. this.buttonCommand_pan.Tag = null;
  930. this.buttonCommand_pan.Text = "";
  931. this.buttonCommand_pan.Tooltip = "漫游";
  932. this.buttonCommand_pan.Click += new System.EventHandler(this.buttonCommand_pan_Click);
  933. // 
  934. // buttonCommand_full
  935. // 
  936. this.buttonCommand_full.Image = ((System.Drawing.Image)(resources.GetObject("buttonCommand_full.Image")));
  937. this.buttonCommand_full.Tag = null;
  938. this.buttonCommand_full.Text = "";
  939. this.buttonCommand_full.Tooltip = "全屏显示";
  940. this.buttonCommand_full.Click += new System.EventHandler(this.buttonCommand_full_Click);
  941. // 
  942. // axSuperMap2
  943. // 
  944. this.axSuperMap2.Enabled = true;
  945. this.axSuperMap2.Location = new System.Drawing.Point(640, 152);
  946. this.axSuperMap2.Name = "axSuperMap2";
  947. this.axSuperMap2.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperMap2.OcxState")));
  948. this.axSuperMap2.Size = new System.Drawing.Size(96, 216);
  949. this.axSuperMap2.TabIndex = 12;
  950. this.axSuperMap2.AfterMapDraw += new AxSuperMapLib._DSuperMapEvents_AfterMapDrawEventHandler(this.axSuperMap2_AfterMapDraw);
  951. this.axSuperMap2.Tracked += new System.EventHandler(this.axSuperMap2_Tracked);
  952. this.axSuperMap2.MouseWheelEvent += new AxSuperMapLib._DSuperMapEvents_MouseWheelEventHandler(this.axSuperMap2_MouseWheelEvent);
  953. this.axSuperMap2.MouseMoveEvent += new AxSuperMapLib._DSuperMapEvents_MouseMoveEventHandler(this.axSuperMap2_MouseMoveEvent);
  954. // 
  955. // panel_query_other
  956. // 
  957. this.panel_query_other.Controls.Add(this.listView_r_other);
  958. this.panel_query_other.Controls.Add(this.groupBox2);
  959. this.panel_query_other.Controls.Add(this.groupBox1);
  960. this.panel_query_other.Location = new System.Drawing.Point(216, 96);
  961. this.panel_query_other.Name = "panel_query_other";
  962. this.panel_query_other.Size = new System.Drawing.Size(144, 296);
  963. this.panel_query_other.TabIndex = 14;
  964. // 
  965. // listView_r_other
  966. // 
  967. this.listView_r_other.BackColor = System.Drawing.Color.WhiteSmoke;
  968. this.listView_r_other.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  969. this.listView_r_other.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
  970.    this.columnHeader1});
  971. this.listView_r_other.ContextMenu = this.contextMenu_other;
  972. this.listView_r_other.Dock = System.Windows.Forms.DockStyle.Fill;
  973. this.listView_r_other.FullRowSelect = true;
  974. this.listView_r_other.GridLines = true;
  975. this.listView_r_other.Location = new System.Drawing.Point(0, 176);
  976. this.listView_r_other.MultiSelect = false;
  977. this.listView_r_other.Name = "listView_r_other";
  978. this.listView_r_other.Size = new System.Drawing.Size(144, 120);
  979. this.listView_r_other.SmallImageList = this.imageList;
  980. this.listView_r_other.TabIndex = 2;
  981. this.toolTip1.SetToolTip(this.listView_r_other, "双击记录图上定位");
  982. this.listView_r_other.View = System.Windows.Forms.View.Details;
  983. this.listView_r_other.DoubleClick += new System.EventHandler(this.listView_r_other_DoubleClick);
  984. // 
  985. // columnHeader1
  986. // 
  987. this.columnHeader1.Text = "查询结果";
  988. this.columnHeader1.Width = 123;
  989. // 
  990. // contextMenu_other
  991. // 
  992. this.contextMenu_other.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  993.   this.menuItem_other_map_ding});
  994. // 
  995. // menuItem_other_map_ding
  996. // 
  997. this.menuItem_other_map_ding.Index = 0;
  998. this.menuItem_other_map_ding.Text = "图上定位";
  999. this.menuItem_other_map_ding.Click += new System.EventHandler(this.menuItem_other_map_ding_Click);
  1000. // 
  1001. // groupBox2
  1002. // 
  1003. this.groupBox2.Controls.Add(this.btn_other_query);
  1004. this.groupBox2.Controls.Add(this.textBox_other);
  1005. this.groupBox2.Controls.Add(this.btn_other_query_draw);
  1006. this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
  1007. this.groupBox2.Location = new System.Drawing.Point(0, 96);
  1008. this.groupBox2.Name = "groupBox2";
  1009. this.groupBox2.Size = new System.Drawing.Size(144, 80);
  1010. this.groupBox2.TabIndex = 1;
  1011. this.groupBox2.TabStop = false;
  1012. this.groupBox2.Text = "查询方式";
  1013. // 
  1014. // btn_other_query
  1015. // 
  1016. this.btn_other_query.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  1017. this.btn_other_query.Location = new System.Drawing.Point(87, 49);
  1018. this.btn_other_query.Name = "btn_other_query";
  1019. this.btn_other_query.Size = new System.Drawing.Size(48, 24);
  1020. this.btn_other_query.TabIndex = 2;
  1021. this.btn_other_query.Text = "查询";
  1022. this.btn_other_query.Click += new System.EventHandler(this.btn_other_query_Click);
  1023. // 
  1024. // textBox_other
  1025. // 
  1026. this.textBox_other.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  1027. this.textBox_other.Location = new System.Drawing.Point(9, 51);
  1028. this.textBox_other.Name = "textBox_other";
  1029. this.textBox_other.Size = new System.Drawing.Size(72, 21);
  1030. this.textBox_other.TabIndex = 1;
  1031. this.textBox_other.Text = "";
  1032. // 
  1033. // btn_other_query_draw
  1034. // 
  1035. this.btn_other_query_draw.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  1036. this.btn_other_query_draw.Location = new System.Drawing.Point(8, 19);
  1037. this.btn_other_query_draw.Name = "btn_other_query_draw";
  1038. this.btn_other_query_draw.Size = new System.Drawing.Size(128, 24);
  1039. this.btn_other_query_draw.TabIndex = 0;
  1040. this.btn_other_query_draw.Text = "图上拉框选择";
  1041. this.btn_other_query_draw.Click += new System.EventHandler(this.btn_other_query_draw_Click);
  1042. // 
  1043. // groupBox1
  1044. // 
  1045. this.groupBox1.Controls.Add(this.radioButton_kanxian);
  1046. this.groupBox1.Controls.Add(this.radioButton_dixian);
  1047. this.groupBox1.Controls.Add(this.radioButton_jinbian);
  1048. this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
  1049. this.groupBox1.Location = new System.Drawing.Point(0, 0);
  1050. this.groupBox1.Name = "groupBox1";
  1051. this.groupBox1.Size = new System.Drawing.Size(144, 96);
  1052. this.groupBox1.TabIndex = 0;
  1053. this.groupBox1.TabStop = false;
  1054. this.groupBox1.Text = "查询条件";
  1055. // 
  1056. // radioButton_kanxian
  1057. // 
  1058. this.radioButton_kanxian.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  1059. this.radioButton_kanxian.Location = new System.Drawing.Point(16, 64);
  1060. this.radioButton_kanxian.Name = "radioButton_kanxian";
  1061. this.radioButton_kanxian.TabIndex = 2;
  1062. this.radioButton_kanxian.Text = "勘探线查询";
  1063. this.toolTip1.SetToolTip(this.radioButton_kanxian, "按照勘探线编号查询");
  1064. this.radioButton_kanxian.CheckedChanged += new System.EventHandler(this.radioButton_kanxian_CheckedChanged);
  1065. // 
  1066. // radioButton_dixian
  1067. // 
  1068. this.radioButton_dixian.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  1069. this.radioButton_dixian.Location = new System.Drawing.Point(16, 40);
  1070. this.radioButton_dixian.Name = "radioButton_dixian";
  1071. this.radioButton_dixian.Size = new System.Drawing.Size(120, 24);
  1072. this.radioButton_dixian.TabIndex = 1;
  1073. this.radioButton_dixian.Text = "煤层露头线查询";
  1074. this.toolTip1.SetToolTip(this.radioButton_dixian, "按照煤层名称查询");
  1075. this.radioButton_dixian.CheckedChanged += new System.EventHandler(this.radioButton_dixian_CheckedChanged);
  1076. // 
  1077. // radioButton_jinbian
  1078. // 
  1079. this.radioButton_jinbian.Checked = true;
  1080. this.radioButton_jinbian.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
  1081. this.radioButton_jinbian.Location = new System.Drawing.Point(16, 17);
  1082. this.radioButton_jinbian.Name = "radioButton_jinbian";
  1083. this.radioButton_jinbian.Size = new System.Drawing.Size(104, 23);
  1084. this.radioButton_jinbian.TabIndex = 0;
  1085. this.radioButton_jinbian.TabStop = true;
  1086. this.radioButton_jinbian.Text = "井田边界查询";
  1087. this.toolTip1.SetToolTip(this.radioButton_jinbian, "按照煤矿名称进行查询");
  1088. this.radioButton_jinbian.CheckedChanged += new System.EventHandler(this.radioButton_jinbian_CheckedChanged);
  1089. // 
  1090. // timer_form
  1091. // 
  1092. this.timer_form.Interval = 5;
  1093. this.timer_form.Tick += new System.EventHandler(this.timer_form_Tick);
  1094. // 
  1095. // axSuperWorkspace1
  1096. // 
  1097. this.axSuperWorkspace1.Enabled = true;
  1098. this.axSuperWorkspace1.Location = new System.Drawing.Point(424, 368);
  1099. this.axSuperWorkspace1.Name = "axSuperWorkspace1";
  1100. this.axSuperWorkspace1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSuperWorkspace1.OcxState")));
  1101. this.axSuperWorkspace1.Size = new System.Drawing.Size(32, 32);
  1102. this.axSuperWorkspace1.TabIndex = 15;
  1103. // 
  1104. // MainForm
  1105. // 
  1106. this.AcceptButton = this.btn_query;
  1107. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  1108. this.AutoScroll = true;
  1109. this.ClientSize = new System.Drawing.Size(832, 493);
  1110. this.Controls.Add(this.axSuperWorkspace1);
  1111. this.Controls.Add(this.panel_query_other);
  1112. this.Controls.Add(this.axSuperMap2);
  1113. this.Controls.Add(this.toolControl2);
  1114. this.Controls.Add(this.menu_Main);
  1115. this.Controls.Add(this.panel_legend);
  1116. this.Controls.Add(this.panel_map_manage);
  1117. this.Controls.Add(this.panel_kong_query);
  1118. this.Controls.Add(this.statusBarControl1);
  1119. this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  1120. this.KeyPreview = true;
  1121. this.Name = "MainForm";
  1122. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  1123. this.Text = "煤矿信息管理系统";
  1124. this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
  1125. this.Closing += new System.ComponentModel.CancelEventHandler(this.MainForm_Closing);
  1126. this.Load += new System.EventHandler(this.MainForm_Load);
  1127. this.panel_legend.ResumeLayout(false);
  1128. ((System.ComponentModel.ISupportInitialize)(this.axSuperLegend1)).EndInit();
  1129. ((System.ComponentModel.ISupportInitialize)(this.axSuperMap1)).EndInit();
  1130. this.panel_kong_query.ResumeLayout(false);
  1131. this.panel_query_result.ResumeLayout(false);
  1132. this.groupBox_re_map.ResumeLayout(false);
  1133. this.groupBox_re_kong.ResumeLayout(false);
  1134. this.panel_query_bianhao.ResumeLayout(false);
  1135. this.groupBox_query.ResumeLayout(false);
  1136. this.groupBox_map_query.ResumeLayout(false);
  1137. this.panel_map_manage.ResumeLayout(false);
  1138. ((System.ComponentModel.ISupportInitialize)(this.axSuperWkspManager1)).EndInit();
  1139. ((System.ComponentModel.ISupportInitialize)(this.toolControl2)).EndInit();
  1140. ((System.ComponentModel.ISupportInitialize)(this.axSuperMap2)).EndInit();
  1141. this.panel_query_other.ResumeLayout(false);
  1142. this.groupBox2.ResumeLayout(false);
  1143. this.groupBox1.ResumeLayout(false);
  1144. ((System.ComponentModel.ISupportInitialize)(this.axSuperWorkspace1)).EndInit();
  1145. this.ResumeLayout(false);
  1146. }
  1147. #endregion
  1148. private void MainForm_Load(object sender, System.EventArgs e)
  1149. {
  1150. this.Visible = false;
  1151. this.Opacity=0;
  1152. myl = new Login();
  1153. myl.SendLogin +=new MKIms3.Login.SendMessLogin(myl_SendLogin);
  1154. myl.Show();
  1155. }
  1156. /// <summary>
  1157. /// 图上拉框选择查询 按钮响应
  1158. /// </summary>
  1159. /// <param name="sender"></param>
  1160. /// <param name="e"></param>
  1161. private void btn_map_query_Click(object sender, System.EventArgs e)
  1162. {
  1163. axSuperMap2.Action=SuperMapLib.seAction.scaTrackPolygon;
  1164. axSuperMap2.TrackingLayer.ClearEvents();
  1165. axSuperMap2.TrackingLayer.Refresh();
  1166. this.option_track = (int)enum_option_track.query;  //设定track上的操作标志为查询钻孔。
  1167. }
  1168. private void listView_re_kong_SelectedIndexChanged(object sender, System.EventArgs e)
  1169. {
  1170. if(this.listView_re_kong.SelectedItems.Count>0)
  1171. {
  1172. string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
  1173. this.Cursor = Cursors.WaitCursor;
  1174. fill_map_view(k_id);
  1175. this.Cursor = Cursors.Default;
  1176. }
  1177. }
  1178. private void axSuperMap2_Tracked(object sender, System.EventArgs e)
  1179. {
  1180. switch(this.option_track)
  1181. {
  1182. case (int)enum_option_track.query : //钻孔查询
  1183. {
  1184. SuperMapLib.soGeometry myGeo;
  1185. myGeo = this.axSuperMap2.TrackedGeometry;
  1186. SuperMapLib.soRecordset myRecord = map_query_kong(myGeo);
  1187. fill_map_list_kong(myRecord);
  1188. break;
  1189. }
  1190. case (int)enum_option_track.add_point:
  1191. {
  1192. SuperMapLib.soGeometry myGeo;
  1193. myGeo = this.axSuperMap2.TrackedGeometry;
  1194. ZKAdd addf = new ZKAdd(myGeo.CentroidPoint.x,myGeo.CentroidPoint.y,true);
  1195. addf.Send+= new MKIms3.ZKAdd.SendMess(myadd_Send);
  1196. addf.ShowDialog();
  1197. break;
  1198. }
  1199. case (int)enum_option_track.other_query:
  1200. {
  1201. //这里进行空间查询
  1202. SuperMapLib.soGeometry myGeo;
  1203. myGeo = this.axSuperMap2.TrackedGeometry;   //得到了查询的对象
  1204.                     fill_listview(getRecotd(get_lay(),myGeo));
  1205. break;
  1206. }
  1207. }
  1208. }
  1209. private void listView_re_kong_DoubleClick(object sender, System.EventArgs e)
  1210. {
  1211. if(this.listView_re_kong.SelectedItems.Count>0)
  1212. {
  1213.                
  1214. //开始闪烁。
  1215. string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
  1216. flash_Geo = re_kong_flash(k_id);
  1217. if(flash_Geo!=null)
  1218. {
  1219. if(flash_Geo.Dimension!=0)
  1220. {
  1221. this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5);  //居中现实
  1222. this.axSuperMap2.CtlRefresh();
  1223. }
  1224. else
  1225. {
  1226. this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,0.02);
  1227. this.axSuperMap2.CtlRefresh();
  1228. }
  1229. this.timer_flash_kong.Start();
  1230. }
  1231.    
  1232. }
  1233. }
  1234. private void menu_k_position_Click(object sender, System.EventArgs e)
  1235. {
  1236. if(this.listView_re_kong.SelectedItems.Count>0)
  1237. {
  1238.                
  1239. //开始闪烁。
  1240. string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
  1241. flash_Geo = re_kong_flash(k_id);
  1242. if(flash_Geo!=null)
  1243. {
  1244. if(flash_Geo.Dimension!=0)
  1245. {
  1246. this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5);  //居中现实
  1247. this.axSuperMap2.CtlRefresh();
  1248. }
  1249. else
  1250. {
  1251. this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,0.02);
  1252. this.axSuperMap2.CtlRefresh();
  1253. }
  1254. this.timer_flash_kong.Start();
  1255. }
  1256.    
  1257. }
  1258. }
  1259. private void listView_re_map_DoubleClick(object sender, System.EventArgs e)
  1260. {
  1261. if(this.listView_re_map.SelectedItems.Count>0)
  1262. {
  1263. string mapname = this.listView_re_map.SelectedItems[0].Text.Trim().ToString();
  1264. openmap(mapname);
  1265. }
  1266. }
  1267. private void menu_m_open_Click(object sender, System.EventArgs e)
  1268. {
  1269. if(this.listView_re_map.SelectedItems.Count>0)
  1270. {
  1271. string mapname = this.listView_re_map.SelectedItems[0].Text.Trim().ToString();
  1272. this.Cursor = Cursors.WaitCursor;
  1273. openmap(mapname);
  1274. this.Cursor = Cursors.Default;
  1275. }
  1276. }
  1277. private void menu_k_info_Click(object sender, System.EventArgs e)
  1278. {
  1279. if(this.listView_re_kong.SelectedItems.Count>0)
  1280. {
  1281. string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
  1282. this.Cursor = Cursors.WaitCursor;
  1283. ZKShow myK = new ZKShow(k_id);
  1284. myK.ShowDialog();
  1285. this.Cursor = Cursors.Default;
  1286. }
  1287. }
  1288. private void axSuperMap2_AfterMapDraw(object sender, AxSuperMapLib._DSuperMapEvents_AfterMapDrawEvent e)
  1289. {
  1290. min_view();
  1291. }
  1292. private void axSuperMap1_MouseDownEvent(object sender, AxSuperMapLib._DSuperMapEvents_MouseDownEvent e)
  1293. {
  1294. main_view_change(e);
  1295. }
  1296. private void btn_query_Click(object sender, System.EventArgs e)
  1297. {
  1298. //清除地图列表
  1299. this.listView_re_map.Items.Clear();
  1300. string k_id = this.txt_k_id.Text.Trim();
  1301. if(k_id.Length>0)
  1302. {
  1303. this.Cursor = Cursors.WaitCursor;
  1304. fill_DB_list_kong( k_id);
  1305. this.Cursor = Cursors.Default;
  1306. }
  1307. else
  1308. {
  1309. MessageBox.Show("钻孔编号不能为空","错误信息",MessageBoxButtons.OK,MessageBoxIcon.Error);
  1310. }
  1311. }
  1312. private void menu_kong_query_Click(object sender, System.EventArgs e)
  1313. {
  1314. this.Cursor = Cursors.WaitCursor;
  1315. ZKView k_view = new ZKView();
  1316. k_view.ShowDialog();
  1317. this.Cursor = Cursors.Default;
  1318. }
  1319. private void menu_data_out_Click(object sender, System.EventArgs e)
  1320. {
  1321. this.Cursor = Cursors.WaitCursor;
  1322. KDataOut myout = new KDataOut();
  1323. myout.ShowDialog();
  1324. this.Cursor = Cursors.Default;
  1325. }
  1326. private void menu_pwd_change_Click(object sender, System.EventArgs e)
  1327. {
  1328. this.Cursor = Cursors.WaitCursor;
  1329. pwd mypwd = new pwd();
  1330. mypwd.ShowDialog();
  1331. this.Cursor = Cursors.Default;
  1332. }
  1333. private void menuCommand_k_addDATA_Click(object sender, System.EventArgs e)
  1334. {
  1335. this.Cursor = Cursors.WaitCursor;
  1336. if(this.mapname!="某某矿地形地质图")
  1337. {
  1338. DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔添加!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
  1339. if(br==DialogResult.OK)
  1340. {
  1341. //先打开这个地图
  1342. this.openmap("某某矿地形地质图");
  1343. ZKAdd myadd = new ZKAdd(0,0,false);
  1344. myadd.Send +=new MKIms3.ZKAdd.SendMess(myadd_Send);
  1345. myadd.ShowDialog();
  1346. }
  1347. }
  1348. else
  1349. {
  1350. ZKAdd myadd = new ZKAdd(0,0,false);
  1351. myadd.Send +=new MKIms3.ZKAdd.SendMess(myadd_Send);
  1352. myadd.ShowDialog();
  1353. }
  1354. this.Cursor = Cursors.Default;
  1355. }
  1356. private void menuCommand_k_addMAP_Click(object sender, System.EventArgs e)
  1357. {
  1358. this.Cursor = Cursors.WaitCursor;
  1359. if(this.mapname!="某某矿地形地质图")
  1360. {
  1361. DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔添加!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
  1362. if(br==DialogResult.OK)
  1363. {
  1364. //先打开这个地图
  1365. this.openmap("某某矿地形地质图");
  1366. this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPoint;
  1367. this.option_track = (int)enum_option_track.add_point;
  1368. }
  1369. }
  1370. else
  1371. {
  1372. this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPoint;
  1373. this.option_track = (int)enum_option_track.add_point;
  1374. }
  1375. this.Cursor = Cursors.Default;
  1376. }
  1377. private void menu_k_del_Click(object sender, System.EventArgs e)
  1378. {
  1379. if(this.mapname!="某某矿地形地质图")
  1380. {
  1381. DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔信息删除。nn此操作将不可恢复,您确认进行该删除操作?!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
  1382. if(br ==DialogResult.OK)
  1383. {
  1384. if(this.listView_re_kong.SelectedItems.Count>0)
  1385. {
  1386. string kk_id = this.listView_re_kong.SelectedItems[0].Text.Trim();
  1387. if(kong_map_dell(kk_id) && kong_DB_dell(kk_id))
  1388. {
  1389. MessageBox.Show("成功删除该钻孔信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
  1390. }
  1391. }
  1392. }
  1393. }
  1394. else
  1395. {
  1396. DialogResult br = MessageBox.Show("系统将完全删除有关此钻孔的所有信息。nn此操作将不可恢复,您确认进行该删除操作?!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
  1397. if(br ==DialogResult.OK)
  1398. {
  1399. if(this.listView_re_kong.SelectedItems.Count>0)
  1400. {
  1401. string kk_id = this.listView_re_kong.SelectedItems[0].Text.Trim();
  1402. if(kong_map_dell(kk_id) && kong_DB_dell(kk_id))
  1403. {
  1404. MessageBox.Show("成功删除该钻孔信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
  1405. }
  1406. }
  1407. }
  1408. }
  1409. this.axSuperMap2.CtlRefresh();
  1410. }
  1411. private void menu_user_manage_Click(object sender, System.EventArgs e)
  1412. {
  1413. this.Cursor = Cursors.WaitCursor;
  1414. UserManage usermangage = new UserManage();
  1415. usermangage.ShowDialog();
  1416. this.Cursor = Cursors.Default;
  1417. }
  1418. private void axSuperWkspManager1_LDbClick(object sender, AxSuperWkspManagerLib._DSuperWkspManagerEvents_LDbClickEvent e)
  1419. {
  1420. switch(e.nFlag)
  1421. {
  1422. case SuperWkspManagerLib.seSelectedItemFlag.scsDataset:
  1423. this.data_map_name = e.strParent;
  1424.  dataout(this.data_map_name);
  1425. break;
  1426. case SuperWkspManagerLib.seSelectedItemFlag.scsDatasource:
  1427. this.data_map_name = e.strSelected;
  1428.                     dataout(this.data_map_name);
  1429. break;
  1430. case SuperWkspManagerLib.seSelectedItemFlag.scsMap:
  1431. this.mapname = e.strSelected;
  1432. openmap(this.mapname);
  1433. break;
  1434. }
  1435. }
  1436. private void buttonCommand_null_Click(object sender, System.EventArgs e)
  1437. {
  1438. this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
  1439.         this.timer_flash_kong.Stop();
  1440. this.axSuperMap2.TrackingLayer.ClearEvents();
  1441. this.axSuperMap2.TrackingLayer.Refresh();
  1442. }
  1443. private void buttonCommand_in_Click(object sender, System.EventArgs e)
  1444. {
  1445. this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomIn;
  1446. }
  1447. private void buttonCommand_out_Click(object sender, System.EventArgs e)
  1448. {
  1449. this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomOut;
  1450. }
  1451. private void buttonCommand_free_Click(object sender, System.EventArgs e)
  1452. {
  1453. this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomFree;
  1454. }
  1455. private void buttonCommand_pan_Click(object sender, System.EventArgs e)
  1456. {
  1457. this.axSuperMap2.Action = SuperMapLib.seAction.scaPan;
  1458. }
  1459. private void buttonCommand_full_Click(object sender, System.EventArgs e)
  1460. {
  1461. this.axSuperMap2.ViewEntire();
  1462. }
  1463. private void menu_fill_edit_Click(object sender, System.EventArgs e)
  1464. {
  1465. open_fill_lab();
  1466. }
  1467. private void menu_yan_edit_Click(object sender, System.EventArgs e)
  1468. {
  1469. FillEdit myfill = new FillEdit();
  1470. myfill.ShowDialog();
  1471. }
  1472. private void MainForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
  1473. {
  1474. if(App.u_flag == (int)flag.admin)
  1475. {
  1476. work_mif(e);
  1477. }
  1478. else
  1479. {
  1480. this.axSuperMap2.Disconnect();
  1481. this.axSuperLegend1.Disconnect();
  1482. this.axSuperWkspManager1.Disconnect();
  1483. this.axSuperMap1.Disconnect();
  1484. this.axSuperMap2 = null;
  1485. this.axSuperMap1 = null;
  1486. this.axSuperLegend1 = null;
  1487. this.axSuperWkspManager1 = null;
  1488. Application.Exit();
  1489. }
  1490. }
  1491. private void menu_map_out_Click(object sender, System.EventArgs e)
  1492. {
  1493. dataout(this.mapname);
  1494. }
  1495. private void menu_map_print_Click(object sender, System.EventArgs e)
  1496. {
  1497. LayOut mylay = new LayOut();
  1498. mylay.axSuperLayout1.Connect(this.axSuperWorkspace1.CtlHandle);
  1499. mylay.ShowDialog();
  1500. }
  1501. private void axSuperMap2_MouseWheelEvent(object sender, AxSuperMapLib._DSuperMapEvents_MouseWheelEvent e)
  1502. {
  1503. if((int)e.zDelta > 0 )
  1504. {
  1505. this.axSuperMap2.Zoom(1.2);
  1506. this.axSuperMap2.CtlRefresh();
  1507. }
  1508. else
  1509. {
  1510. this.axSuperMap2.Zoom(0.8);
  1511. this.axSuperMap2.CtlRefresh();
  1512. }
  1513. }
  1514. private void axSuperLegend1_Modified(object sender, System.EventArgs e)
  1515. {
  1516. this.axSuperMap2.CtlRefresh();
  1517. }
  1518. private void btn_other_query_draw_Click(object sender, System.EventArgs e)
  1519. {
  1520.    this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPolygon;
  1521. this.option_track = (int)enum_option_track.other_query;
  1522. }
  1523. private void btn_other_query_Click(object sender, System.EventArgs e)
  1524. {
  1525. string where = this.textBox_other.Text.Trim();
  1526. if(where.Length>0)
  1527. {
  1528. int lay = get_lay();
  1529. fill_listview(getRecotd(lay,where));
  1530. }
  1531. else
  1532. {
  1533. MessageBox.Show("请输入查询条件","错误信息",MessageBoxButtons.OK,MessageBoxIcon.Error);
  1534. }
  1535. }
  1536. private void radioButton_jinbian_CheckedChanged(object sender, System.EventArgs e)
  1537. {
  1538. this.listView_r_other.Items.Clear();
  1539. }
  1540. private void radioButton_dixian_CheckedChanged(object sender, System.EventArgs e)
  1541. {
  1542. this.listView_r_other.Items.Clear();
  1543. }
  1544. private void radioButton_kanxian_CheckedChanged(object sender, System.EventArgs e)
  1545. {
  1546. this.listView_r_other.Items.Clear();
  1547. }
  1548. private void listView_r_other_DoubleClick(object sender, System.EventArgs e)
  1549. {
  1550. other_flash();
  1551. }
  1552. private void menuItem_other_map_ding_Click(object sender, System.EventArgs e)
  1553. {
  1554. other_flash();
  1555. }
  1556. private void axSuperMap2_MouseMoveEvent(object sender, AxSuperMapLib._DSuperMapEvents_MouseMoveEvent e)
  1557. {
  1558. double x = this.axSuperMap2.PixelToMapX(e.x);
  1559. double y = this.axSuperMap2.PixelToMapY(e.y);
  1560. this.statusPanel_xy.Text = "x="+y+"  "+"y="+x;
  1561. }
  1562. private void menuCommand_about_Click(object sender, System.EventArgs e)
  1563. {
  1564. string about = "超图杯第三届全国高校GIS应用开发大赛 nn"+ 
  1565.                 "(河南理工大学参赛小组)nn"+
  1566.             "参赛指导老师:谢洪波、文广超nn"+
  1567.             "参赛小组成员:张俊、李建欣、赵领军";
  1568. MessageBox.Show(about,"关于我们");
  1569. }
  1570. private void menuCommand_help_Click(object sender, System.EventArgs e)
  1571. {
  1572. string helpfile = Application.StartupPath+"\help.chm";
  1573. Help.ShowHelp(this, helpfile);
  1574. }
  1575. private void menu_logout_Click(object sender, System.EventArgs e)
  1576. {
  1577. this.Close();
  1578. }
  1579. private void btn_clear_select_Click(object sender, System.EventArgs e)
  1580. {
  1581. this.timer_flash_kong.Stop();
  1582. this.axSuperMap2.TrackingLayer.ClearEvents();
  1583. this.axSuperMap2.TrackingLayer.Refresh();
  1584. }
  1585. private void menuCommand_free_Click(object sender, System.EventArgs e)
  1586. {
  1587. this.axSuperMap2.Action = SuperMapLib.seAction.scaZoomFree;
  1588. }
  1589. private void menuCommand_null_Click(object sender, System.EventArgs e)
  1590. {
  1591. this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
  1592. }
  1593. private void timer_form_Tick(object sender, System.EventArgs e)
  1594. {
  1595. this.form_opactiy=this.form_opactiy+5;
  1596. this.Opacity = this.form_opactiy/100.00;
  1597. if(this.form_opactiy==100)
  1598. {
  1599. this.timer_form.Stop();
  1600. }
  1601. }
  1602. #region 活动面板生成与加载 、控制
  1603. /// <summary>
  1604. /// 在程序中加载工具面板
  1605. /// </summary>
  1606. private void create_RTool()
  1607. {
  1608. kong_query = Creat_kong_query();
  1609. map_manage = Creat_map_manage();
  1610. legend = Creat_legend();
  1611. other_query = Creat_other();
  1612. InitializeContent(kong_query);
  1613. InitializeContent(map_manage);
  1614. InitializeContent(legend);
  1615. InitializeContent(other_query);
  1616. dockingManager.AllowFloating = true;
  1617. dockingManager.AllowRedocking =true;
  1618. this.SuspendLayout();
  1619. WindowContent wc=dockingManager.AddContentWithState(kong_query, Crownwood.DotNetMagic.Docking.State.DockLeft) as WindowContent;
  1620. dockingManager.AddContentToWindowContent(map_manage, wc);
  1621. dockingManager.AddContentToWindowContent(legend, wc);
  1622. dockingManager.AddContentToWindowContent(other_query, wc);
  1623. dockingManager.ToggleContentAutoHide(kong_query);
  1624. this.ResumeLayout();
  1625. }
  1626. /// <summary>
  1627. /// 生成钻孔查询工具面板
  1628. /// </summary>
  1629. /// <returns></returns>
  1630. private Content Creat_kong_query()
  1631. {
  1632. return dockingManager.Contents.Add(panel_kong_query,"钻孔信息查询",imageList, 3);
  1633. }
  1634. /// <summary>
  1635. ///  生成地图数据管理工具面板
  1636. /// </summary>
  1637. /// <returns></returns>
  1638. private Content Creat_map_manage()
  1639. {
  1640. return dockingManager.Contents.Add(panel_map_manage,"地图数据管理",imageList, 1);
  1641. }
  1642. /// <summary>
  1643. ///  生成图例导航工具面板
  1644. /// </summary>
  1645. /// <returns></returns>
  1646. private Content Creat_legend()
  1647. {
  1648. return dockingManager.Contents.Add(panel_legend,"图例导航",imageList, 0);
  1649. }
  1650. /// <summary>
  1651. /// 生成其他查询面板
  1652. /// </summary>
  1653. /// <returns></returns>
  1654. private Content Creat_other()
  1655. {
  1656. return dockingManager.Contents.Add(this.panel_query_other,"其他查询",imageList, 2);
  1657. }
  1658. /// <summary>
  1659. /// 设置面板的公共属性
  1660. /// </summary>
  1661. /// <param name="c"></param>
  1662. private void InitializeContent(Content c)
  1663. {
  1664. c.CaptionBar = captionBars;
  1665. c.CloseButton = closeButtons;
  1666. }
  1667. protected void OnContentShown(Content c, EventArgs cea)
  1668. {
  1669. Console.WriteLine("OnContentShown {0}", c.Title);
  1670. }
  1671. protected void OnContentHidden(Content c, EventArgs cea)
  1672. {
  1673. Console.WriteLine("OnContentHidden {0}", c.Title);
  1674. }
  1675. protected void OnContentHiding(Content c, CancelEventArgs cea)
  1676. {
  1677. Console.WriteLine("OnContentHiding {0}", c.Title);
  1678. }
  1679. /// <summary>
  1680. /// 控制面板的显示与隐藏
  1681. /// </summary>
  1682. /// <param name="mianban">面板对象</param>
  1683. private void MianBanCotorl(Content mianban)
  1684. {
  1685. if(mianban.Visible==false)
  1686. {
  1687. dockingManager.ShowContent(mianban);
  1688. }
  1689. else
  1690. {
  1691. dockingManager.HideContent(mianban);
  1692. }
  1693. }
  1694. /// <summary>
  1695. /// 控制所有面板的显示
  1696. /// </summary>
  1697. /// <param name="sender"></param>
  1698. /// <param name="e"></param>
  1699. private void menu_mianban_all_Click(object sender, System.EventArgs e)
  1700. {
  1701. dockingManager.ShowAllContents();
  1702. }
  1703. /// <summary>
  1704. /// 控制地图数据面板的显示
  1705. /// </summary>
  1706. /// <param name="sender"></param>
  1707. /// <param name="e"></param>
  1708. private void menu_mianban_map_Click(object sender, System.EventArgs e)
  1709. {
  1710. MianBanCotorl(this.map_manage);
  1711. }
  1712. /// <summary>
  1713. /// 更新地图面板控制菜单
  1714. /// </summary>
  1715. /// <param name="sender"></param>
  1716. /// <param name="e"></param>
  1717. private void menu_mianban_map_Update(object sender, System.EventArgs e)
  1718. {
  1719. MenuCommand mc = sender as MenuCommand;
  1720. mc.Checked = this.map_manage.Visible;
  1721. }
  1722. /// <summary>
  1723. /// 控制图例和鹰眼面板
  1724. /// </summary>
  1725. /// <param name="sender"></param>
  1726. /// <param name="e"></param>
  1727. private void menu_mianban_legend_Click(object sender, System.EventArgs e)
  1728. {
  1729. MianBanCotorl(this.legend);
  1730. }
  1731. /// <summary>
  1732. /// 图例鹰眼菜单更新
  1733. /// </summary>
  1734. /// <param name="sender"></param>
  1735. /// <param name="e"></param>
  1736. private void menu_mianban_legend_Update(object sender, System.EventArgs e)
  1737. {
  1738. MenuCommand mc = sender as MenuCommand;
  1739. mc.Checked = this.legend.Visible;
  1740. }
  1741. /// <summary>
  1742. /// 控制钻孔查询面板
  1743. /// </summary>
  1744. /// <param name="sender"></param>
  1745. /// <param name="e"></param>
  1746. private void menu_mianban_kong_Click(object sender, System.EventArgs e)
  1747. {
  1748. MianBanCotorl(this.kong_query);
  1749. }
  1750. /// <summary>
  1751. /// 更新钻孔查询面板菜单
  1752. /// </summary>
  1753. /// <param name="sender"></param>
  1754. /// <param name="e"></param>
  1755. private void menu_mianban_kong_Update(object sender, System.EventArgs e)
  1756. {
  1757. MenuCommand mc = sender as MenuCommand;
  1758. mc.Checked = this.kong_query.Visible;
  1759. }
  1760. /// <summary>
  1761. /// 关闭所有的面板
  1762. /// </summary>
  1763. /// <param name="sender"></param>
  1764. /// <param name="e"></param>
  1765. private void menu_mianban_close_Click(object sender, System.EventArgs e)
  1766. {
  1767. dockingManager.HideAllContents();
  1768. }
  1769. private void menuCommand_query_other_Click(object sender, System.EventArgs e)
  1770. {
  1771.   MianBanCotorl(this.other_query);
  1772. }
  1773. private void menuCommand_query_other_Update(object sender, System.EventArgs e)
  1774. {
  1775. MenuCommand mc = sender as MenuCommand;
  1776. mc.Checked = this.other_query.Visible;
  1777. }
  1778. #endregion 
  1779. #region 系统数据加载(连接服务器、打开工作空间、打开默认地图)
  1780.           
  1781. /// <summary>
  1782. /// 执行连接地图服务器,打开工作空间,打开默认地图的功能
  1783. /// </summary>
  1784. private void loadData()
  1785. {
  1786. Splasher.Status = "正在连接地图数据库...";
  1787. DataBase myDB = new DataBase();
  1788. string[] mapconn = myDB.MapConn();
  1789. Splasher.Status = "正在打开地图数据工作空间....";
  1790. bool flag = this.axSuperWorkspace1.Open(mapconn[0], mapconn[1]);
  1791. if(flag !=true)
  1792. {
  1793. MessageBox.Show("加载数据失败!nn请联系系统管理员,检查服务器","系统错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
  1794. return;
  1795. }
  1796. Splasher.Status = "正在获取服务器端数据....";
  1797. this.axSuperMap2.Connect(this.axSuperWorkspace1.CtlHandle);
  1798. this.axSuperWkspManager1.Connect(this.axSuperWorkspace1.CtlHandle);
  1799. this.axSuperLegend1.Connect(this.axSuperMap2.CtlHandle);
  1800. this.axSuperMap1.Connect(this.axSuperWorkspace1.CtlHandle);  //这个为鹰眼
  1801. Splasher.Status = "正在打开默认地图....";
  1802. openmap("某某矿地形地质图");
  1803. Splasher.Status = "系统初始化完毕,正在打开应用程序";
  1804. }
  1805. /// <summary>
  1806. /// 打开某张地图,同时刷新所有的supermap控件
  1807. /// </summary>
  1808. /// <param name="mapname">地图的名称</param>
  1809. private void openmap(string mapname)
  1810. {
  1811. this.axSuperMap2.TrackingLayer.ClearEvents();
  1812. this.axSuperMap2.TrackingLayer.Refresh();
  1813. this.axSuperMap2.OpenMap(mapname);
  1814. //this.axSuperMap2.ViewEntire();
  1815. this.axSuperMap2.CtlRefresh();
  1816. this.axSuperMap1.OpenMap(mapname);
  1817. this.axSuperMap1.ViewEntire();
  1818. this.axSuperMap1.CtlRefresh();
  1819. this.axSuperLegend1.CtlRefresh();
  1820. this.mapname = mapname;
  1821. this.Text = "煤矿信息管理系统            当前日期:"  + DateTime.Today.ToShortDateString();
  1822. this.statusPanel_infor.Text = "当前地图为:"+mapname;
  1823. if(this.timer_flash_kong.Enabled)
  1824. {
  1825. this.timer_flash_kong.Stop();
  1826. }
  1827. }
  1828. #endregion
  1829. #region 钻孔数据的查询,关联地图的显示,钻孔的图上定位
  1830. /// <summary>
  1831. /// 根据数据层的名称 返回该层在地图中的索引号
  1832. /// </summary>
  1833. /// <param name="map_ceng_name">地图图层的名称</param>
  1834. /// <returns>图层的索引号 int</returns>
  1835. private int find_lay(string map_ceng_name)
  1836. {
  1837. int ceng = 0;
  1838. for(int i=1;i<=this.axSuperMap1.Layers.Count;i++)
  1839. {
  1840. if(this.axSuperMap1.Layers[i].Name==map_ceng_name)
  1841. {
  1842. ceng = i;
  1843. break;
  1844. }
  1845. }
  1846. return ceng;
  1847. }
  1848. /// <summary>
  1849. /// 地图上按照空间信息查询钻孔
  1850. /// </summary>
  1851. /// <param name="myGeo">track层上的对象集</param>
  1852. /// <returns>SuperMapLib.soRecordset  包含钻孔信息的数据集</returns>
  1853. private SuperMapLib.soRecordset  map_query_kong(SuperMapLib.soGeometry myGeo)
  1854. {
  1855. string map_ceng_name = "钻孔@"+this.mapname;
  1856. int ceng = find_lay(map_ceng_name);
  1857. if(ceng!=0)  
  1858. {
  1859. axSuperMap2.Layers[ceng].Snapable=true;
  1860. SuperMapLib.soRecordset myRecord ;
  1861. SuperMapLib.soDatasetVector myV ;
  1862. myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
  1863. myRecord = myV.QueryEx(myGeo,SuperMapLib.seSpatialQueryMode.scsAreaIntersect,"");
  1864. this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
  1865. return myRecord;
  1866. }
  1867. else
  1868. {
  1869. return null;
  1870. }
  1871. }
  1872. /// <summary>
  1873. /// 用空间查询的结果进行钻孔结果的显示
  1874. /// </summary>
  1875. /// <param name="myRecord">空间查询过来的数据集</param>
  1876. private void fill_map_list_kong(SuperMapLib.soRecordset myRecord)
  1877. {
  1878. if(myRecord != null)
  1879. {
  1880. if(myRecord.RecordCount>0)
  1881. {
  1882. this.listView_re_kong.Items.Clear();
  1883. myRecord.MoveFirst();
  1884. for(int i=0;i<myRecord.RecordCount;i++)
  1885. {
  1886. ListViewItem kong_Item = new ListViewItem(myRecord.GetFieldValue("钻孔编号").ToString(),4);
  1887. this.listView_re_kong.Items.Add(kong_Item);
  1888. myRecord.MoveNext();
  1889. }
  1890. }
  1891. else
  1892. {
  1893. MessageBox.Show("对不起,没有符合条件的钻孔 。","信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
  1894. }
  1895. }
  1896. else
  1897. {
  1898. MessageBox.Show("对不起,当前地图中没有钻孔信息 nn请打开相关地图中的地图后再操作。","信息",MessageBoxButtons.OK,MessageBoxIcon.Warning);
  1899. }
  1900. }
  1901. /// <summary>
  1902. /// 用从数据库中查询的结果来 进行钻孔结果的显示
  1903. /// </summary>
  1904. private void fill_DB_list_kong(string k_id)
  1905. {
  1906. this.listView_re_kong.Items.Clear();
  1907. DataBase myDB = new DataBase();
  1908. SqlDataReader myReader = null;
  1909. SqlParameter[] myParamers={new SqlParameter("@k_id",SqlDbType.Char,10)} ;
  1910. myParamers[0].Value = k_id;
  1911. myReader = myDB.RunProcedure("up_get_kong_info",myParamers);
  1912. if(myReader!=null)
  1913. {
  1914. if(myReader.HasRows)
  1915. {
  1916. //把查询到的钻孔编号显示在list_view中
  1917. myReader.Read();
  1918. ListViewItem kong_Item = new ListViewItem(myReader["钻孔编号"].ToString(),4);
  1919. this.listView_re_kong.Items.Add(kong_Item);
  1920. myReader.Close();
  1921. }
  1922. else
  1923. {
  1924. MessageBox.Show("对不起,没有符合条件的钻孔","信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
  1925. }
  1926. }
  1927. }
  1928. /// <summary>
  1929. /// 根据钻孔编号来填充相关地图列表
  1930. /// </summary>
  1931. /// <param name="k_id">钻孔编号</param>
  1932. private void fill_map_view(string k_id)
  1933. {
  1934. this.listView_re_map.Items.Clear();
  1935. DataBase myDB = new DataBase();
  1936. SqlDataReader myReader = null;
  1937. SqlParameter[] myParamers={new SqlParameter("@k_id",SqlDbType.Char,10)} ;
  1938. myParamers[0].Value = k_id;
  1939. myReader = myDB.RunProcedure("up_get_map",myParamers);
  1940. if(myReader!=null)
  1941. {
  1942. if(myReader.HasRows)
  1943. {
  1944. //把查询到的钻孔编号显示在list_view中
  1945. while(myReader.Read())
  1946. {
  1947. ListViewItem kong_Item = new ListViewItem(myReader["地图名称"].ToString(),4);
  1948. this.listView_re_map.Items.Add(kong_Item);
  1949. }
  1950. myReader.Close();
  1951. }
  1952. else
  1953. {
  1954. ListViewItem kong_Item = new ListViewItem("无相关地图",4);
  1955. this.listView_re_map.Items.Add(kong_Item);
  1956. }
  1957. }
  1958. }
  1959. /// <summary>
  1960. /// 实现选中钻孔的图上定位功能
  1961. /// </summary>
  1962. /// <param name="k_id">钻孔编号</param>
  1963. /// <returns>返回需要闪烁的地物</returns>
  1964. private SuperMapLib.soGeometry re_kong_flash(string k_id)
  1965. {
  1966. //axSuperMap1.Layers[ceng].Snapable=true;
  1967. string map_ceng_name = "钻孔@"+this.mapname;
  1968. int ceng = find_lay(map_ceng_name);
  1969. if(ceng!=0)
  1970. {
  1971. SuperMapLib.soRecordset myRecord ;
  1972. SuperMapLib.soDatasetVector myV ;
  1973. SuperMapLib.soGeometry myGeo;
  1974. myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
  1975. string SQLFileter = "钻孔编号='"+k_id+"'";
  1976. myRecord = myV.Query(SQLFileter,true,null,"");
  1977. if(myRecord.RecordCount>0)
  1978. {
  1979. myGeo=myRecord.GetGeometry(); 
  1980. return myGeo;
  1981. }
  1982. else
  1983. {
  1984. MessageBox.Show("对不起,当前地图中没有该钻孔信息 nn请打开相关地图中的地图后再操作。","信息",MessageBoxButtons.OK,MessageBoxIcon.Warning);
  1985. return null;
  1986. }
  1987. }
  1988. else
  1989. {
  1990. MessageBox.Show("对不起,当前地图中没有钻孔信息 nn请打开相关地图中的地图后再操作。","信息",MessageBoxButtons.OK,MessageBoxIcon.Warning);
  1991. return null;
  1992. }
  1993. }
  1994. /// <summary>
  1995. ///Timer 控件,实现地物的闪烁显示
  1996. /// </summary>
  1997. /// <param name="sender"></param>
  1998. /// <param name="e"></param>
  1999. private void timer_flash_kong_Tick(object sender, System.EventArgs e)
  2000. {
  2001. SuperMapLib.soStyle myStylea = new SuperMapLib.soStyleClass();
  2002. myStylea.PenColor = (uint)ColorTranslator.ToOle(Color.Red);
  2003. myStylea.PenStyle = 4;
  2004. myStylea.PenWidth = 6;
  2005. myStylea.BrushColor = (uint)ColorTranslator.ToOle(Color.Red);
  2006. myStylea.SymbolSize = 80;
  2007. SuperMapLib.soStyle myStyleb = new SuperMapLib.soStyleClass();
  2008. myStyleb.PenColor = (uint)ColorTranslator.ToOle(Color.Blue);
  2009. myStyleb.PenStyle = 4;
  2010. myStyleb.PenWidth = 6;
  2011. myStyleb.BrushColor = (uint)ColorTranslator.ToOle(Color.Blue);
  2012. myStyleb.SymbolSize = 80;
  2013. flash_i++;
  2014. if(flash_i%2==0)
  2015. {
  2016. axSuperMap2.TrackingLayer.ClearEvents();
  2017. axSuperMap2.TrackingLayer.AddEvent(flash_Geo,myStylea,""); 
  2018. axSuperMap2.TrackingLayer.Refresh();
  2019. }
  2020. else
  2021. {
  2022. axSuperMap2.TrackingLayer.ClearEvents();
  2023. axSuperMap2.TrackingLayer.AddEvent(flash_Geo,myStyleb,""); 
  2024. axSuperMap2.TrackingLayer.Refresh();
  2025. }
  2026. }
  2027. #endregion
  2028. #region 鹰眼窗口的显示,鹰眼窗口导航
  2029. /// <summary> 
  2030. /// 实现鹰眼功能
  2031. /// </summary>
  2032. private void min_view()
  2033. {
  2034. SuperMapLib.soStyle myStyle = new SuperMapLib.soStyleClass();
  2035. SuperMapLib.soRect myRect = new SuperMapLib.soRectClass();
  2036. SuperMapLib.soGeoLine myLine = new SuperMapLib.soGeoLineClass();
  2037. SuperMapLib.soPoints myPoints = new SuperMapLib.soPointsClass();
  2038. double dt,dl,dr,db;
  2039. myRect = this.axSuperMap2.ViewBounds;
  2040. dt = myRect.Top;
  2041. dl = myRect.Left;
  2042. dr = myRect.Right;
  2043. db = myRect.Bottom;
  2044. myPoints.Add2(dl,dt);
  2045. myPoints.Add2(dr,dt);
  2046. myPoints.Add2(dr,db);
  2047. myPoints.Add2(dl,db);
  2048. myPoints.Add2(dl,dt);
  2049. myStyle.PenColor =(uint)ColorTranslator.ToOle(Color.Blue);
  2050. myStyle.PenWidth =6;
  2051. myLine.AddPart(myPoints);
  2052. this.axSuperMap1.TrackingLayer.ClearEvents();
  2053. this.axSuperMap1.TrackingLayer.AddEvent((SuperMapLib.soGeometry)myLine,myStyle,"");
  2054. this.axSuperMap1.TrackingLayer.Refresh();
  2055. }
  2056. /// <summary>
  2057. /// 实现鹰眼定位(单击)导航功能
  2058. /// </summary>
  2059. private void main_view_change(AxSuperMapLib._DSuperMapEvents_MouseDownEvent e)
  2060. {
  2061. double xCent,yCent;
  2062. xCent = this.axSuperMap1.PixelToMapX(e.x);
  2063. yCent = this.axSuperMap1.PixelToMapY(e.y);
  2064. this.axSuperMap2.CenterX = xCent;
  2065. this.axSuperMap2.CenterY = yCent;
  2066. this.axSuperMap2.CtlRefresh();
  2067. }
  2068. #endregion
  2069. #region 对默认地图进行加点 ,删除点,修改点操作
  2070. /// <summary>
  2071. /// 用来响应事件在图上添加一个钻孔
  2072. /// </summary>
  2073. /// <param name="x"></param>
  2074. /// <param name="y"></param>
  2075. /// <param name="z"></param>
  2076. /// <param name="k_id"></param>
  2077. private void myadd_Send(double x, double y,double z,string k_id)
  2078. {
  2079. if(this.mapname!="某某矿地形地质图")
  2080. {
  2081. //先打开这个地图
  2082. this.openmap("某某矿地形地质图");
  2083. }
  2084. int ceng=this.find_lay("钻孔@某某矿地形地质图");
  2085. if(ceng!=0)
  2086. {
  2087. axSuperMap2.Layers[ceng].Snapable=true;
  2088. //再添加纪录集
  2089. SuperMapLib.soRecordset myRecord ;
  2090. SuperMapLib.soDatasetVector myV ;
  2091. SuperMapLib.soGeoPoint myGp= new SuperMapLib.soGeoPointClass();
  2092. SuperMapLib.soStrings myString1;
  2093. myString1=new SuperMapLib.soStringsClass();
  2094. myString1.Add("*");
  2095. myGp.x = x;
  2096. myGp.y = y;
  2097.       
  2098. myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
  2099. myRecord = myV.Query("1<0",true,myString1,"");
  2100. myRecord.AddNew((SuperMapLib.soGeometry)myGp,null);
  2101. myRecord.SetFieldValue("SmX",x);
  2102. myRecord.SetFieldValue("SmY",y);
  2103. myRecord.SetFieldValue("Elevation",z);
  2104. myRecord.SetFieldValue("钻孔编号",k_id);
  2105. myRecord.Update();
  2106. this.axSuperMap2.CtlRefresh();
  2107. MessageBox.Show("基本信息添加成功,请继续添加煤层信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
  2108. }
  2109. else
  2110. {
  2111. MessageBox.Show("在默认地图上添加钻孔失败,nn 您可以删除该钻孔的属性信息后再进行添加","错误信息!",MessageBoxButtons.OK,MessageBoxIcon.Error);
  2112. }
  2113. }
  2114. #endregion
  2115. #region 钻孔数据的删除
  2116. /// <summary>
  2117. /// 删除选定的钻孔
  2118. /// </summary>
  2119. /// <param name="k_id">钻孔的编号 *-*</param>
  2120. /// <returns></returns>
  2121. private bool kong_map_dell(string k_id)
  2122. {
  2123. int ceng=ceng=this.find_lay("钻孔@某某矿地形地质图");
  2124. if(ceng!=0)
  2125. {
  2126. SuperMapLib.soRecordset myRecord ;
  2127. SuperMapLib.soDatasetVector myV ;
  2128. SuperMapLib.soStrings myString2;
  2129. myString2=new SuperMapLib.soStringsClass();
  2130. myString2.Add("*");
  2131. myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[ceng].Dataset;
  2132. myRecord = myV.Query("钻孔编号='"+k_id+"'",true,null,"");
  2133. if(myRecord!=null)
  2134. {
  2135. myRecord.Delete();
  2136. myRecord.Update();
  2137. return true;
  2138. }
  2139. else
  2140. {
  2141. return false;
  2142. }
  2143. }
  2144. else
  2145. {
  2146. MessageBox.Show("删除图上钻孔错误","错误信息!",MessageBoxButtons.OK,MessageBoxIcon.Error);
  2147. return false;
  2148. }
  2149. }
  2150. private bool kong_DB_dell(string k_id)
  2151. {
  2152. DataBase myDB = new DataBase();
  2153. SqlParameter[] myParamers={new SqlParameter("@k_id",SqlDbType.Char,10)} ;
  2154. myParamers[0].Value = k_id.Trim();
  2155. if(myDB.RunProcedure_Nr("up_del_kong",myParamers))
  2156. {
  2157. return true;
  2158. }
  2159. else
  2160. {
  2161. MessageBox.Show("删除钻孔属性信息错误","错误信息!",MessageBoxButtons.OK,MessageBoxIcon.Error);
  2162. return false;
  2163. }
  2164. }
  2165. #endregion
  2166. #region 打开填充库,编辑系统的岩性关联
  2167. void open_fill_lab()
  2168. {
  2169. SuperMapLib.soFillStyleLib myFill;
  2170. SuperMapLib.soResources myResourse;
  2171. myResourse = this.axSuperWorkspace1.Resources;
  2172. myFill = myResourse.FillStyleLib;
  2173. myFill.ShowEditor();
  2174. myFill =null;
  2175. myResourse = null;
  2176. }
  2177. #endregion
  2178. #region 检验工作空间是否被修改,保存工作空间
  2179. private void work_mif(System.ComponentModel.CancelEventArgs e)
  2180. {
  2181. if(this.axSuperWorkspace1.Modified)
  2182. {
  2183. DialogResult br = MessageBox.Show("系统数据有未保存的部分nn 是否保存您所做的修改","系统提示",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Warning);
  2184. if(br == DialogResult.Yes)
  2185. {
  2186. if(this.axSuperWorkspace1.Save())
  2187. {
  2188. MessageBox.Show("系统数据保存成功","系统提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
  2189. }
  2190. else
  2191. {
  2192. MessageBox.Show("系统数据保存失败","系统提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
  2193. }
  2194. this.axSuperMap2.Disconnect();
  2195. this.axSuperLegend1.Disconnect();
  2196. this.axSuperWkspManager1.Disconnect();
  2197. this.axSuperMap1.Disconnect();
  2198. this.axSuperMap2 = null;
  2199. this.axSuperMap1 = null;
  2200. this.axSuperLegend1 = null;
  2201. this.axSuperWkspManager1 = null;
  2202. Application.Exit();
  2203. }
  2204. else if(br == DialogResult.Cancel)
  2205. {
  2206. e.Cancel = true;
  2207. }
  2208. else
  2209. {
  2210. this.axSuperMap2.Disconnect();
  2211. this.axSuperLegend1.Disconnect();
  2212. this.axSuperWkspManager1.Disconnect();
  2213. this.axSuperMap1.Disconnect();
  2214. this.axSuperMap2 = null;
  2215. this.axSuperMap1 = null;
  2216. this.axSuperLegend1 = null;
  2217. this.axSuperWkspManager1 = null;
  2218. Application.Exit();
  2219. }
  2220. }
  2221. }
  2222. #endregion
  2223. #region  将系统填充库复制到本地
  2224. /// <summary>
  2225. /// 获取系统填充库文件
  2226. /// </summary>
  2227. private void get_fill_file()
  2228. {
  2229. SuperMapLib.soFillStyleLib myFill;
  2230. SuperMapLib.soResources myResourse;
  2231. myResourse = this.axSuperWorkspace1.Resources;
  2232. myFill = myResourse.FillStyleLib;
  2233. try
  2234. {
  2235. myFill.Export(Application.StartupPath+"\fill.dll");
  2236. }
  2237. catch(Exception e)
  2238. {
  2239. MessageBox.Show("岩性填充库加载失败,您可能无法看到正确的钻孔剖面示意图nn错误信息:"+e.Message,"系统错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
  2240. }
  2241. finally
  2242. {
  2243. myFill =null;
  2244. myResourse = null;
  2245. }
  2246. }
  2247. #endregion
  2248. #region 当前地图数据集导出
  2249. private string[] getDataSetName(string dataname)
  2250. {
  2251. int j = this.axSuperWorkspace1.Datasources[dataname].Datasets.Count;
  2252.         string[] setname = new string[j];
  2253. for(int i=1;i<=j;i++)
  2254. {
  2255. setname[i-1] = this.axSuperWorkspace1.Datasources[dataname].Datasets[i].Name;
  2256. }
  2257. return setname;
  2258. }
  2259. private void dataout(string data_name)
  2260. {
  2261. DataOut myout = new DataOut(getDataSetName(data_name)); 
  2262. myout.myPump = this.axSuperWorkspace1.Datasources[data_name].DataPump;
  2263. if(myout.myPump==null)
  2264. {
  2265. MessageBox.Show("数据源错误","错误信息",MessageBoxButtons.OK,MessageBoxIcon.Error);
  2266. return;
  2267. }
  2268. else
  2269. {
  2270. myout.ShowDialog();
  2271. }
  2272. }
  2273. #endregion
  2274. #region 其他查询功能代码区
  2275. /// <summary>
  2276. /// 得到查询条件,返回被查询的图层
  2277. /// </summary>
  2278. /// <returns></returns>
  2279. private int get_query_where()
  2280. {
  2281. if(this.radioButton_dixian.Checked)
  2282. {
  2283. return this.find_lay("煤层露头线及风化带@某某矿地形地质图");
  2284. }
  2285. else if(this.radioButton_jinbian.Checked)
  2286. {
  2287. return find_lay("井田边界线@某某矿地形地质图");
  2288. }
  2289. else
  2290. {
  2291. return find_lay("勘探线@某某矿地形地质图");
  2292. }
  2293. }
  2294. private int get_lay()
  2295. {
  2296. if(this.mapname!="某某矿地形地质图")
  2297. {
  2298. DialogResult rs = MessageBox.Show("当前地图不是默认主地图nn您希望打开主地图来进行指定的查询吗?","系统信息",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Question);
  2299. if(rs == DialogResult.Yes)
  2300. {
  2301. this.openmap("某某矿地形地质图");
  2302. return get_query_where();
  2303. }
  2304. else
  2305. {
  2306. return 0;
  2307. }
  2308. }
  2309. else
  2310. {
  2311. return get_query_where();
  2312. }
  2313. }
  2314. /// <summary>
  2315. /// 根据 字符串得到查询结果
  2316. /// </summary>
  2317. /// <param name="lay">层号</param>
  2318. /// <param name="where">查询条件</param>
  2319. /// <returns></returns>
  2320. private SuperMapLib.soRecordset getRecotd(int lay,string where)
  2321. {
  2322. if(lay!=0)  //开始查询
  2323. {
  2324. axSuperMap2.Layers[lay].Snapable=true;
  2325. SuperMapLib.soRecordset myRecord ;
  2326. SuperMapLib.soDatasetVector myV ;
  2327. SuperMapLib.soStrings mystring = new SuperMapLib.soStringsClass();
  2328. string strSQLFilter = "编号='"+where+"'";
  2329. mystring.Add("*");
  2330. myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[lay].Dataset;
  2331. myRecord = myV.Query(strSQLFilter,true,mystring,"");
  2332. return myRecord;
  2333. }
  2334. else
  2335. {
  2336. return null;
  2337. }
  2338. }
  2339. /// <summary>
  2340. /// 函数重载,根据空间查询得到结果
  2341. /// </summary>
  2342. /// <param name="lay"></param>
  2343. /// <param name="myGeo"></param>
  2344. /// <returns></returns>
  2345. private SuperMapLib.soRecordset getRecotd(int lay,SuperMapLib.soGeometry myGeo)
  2346. {
  2347. if(lay!=0)  //开始查询
  2348. {
  2349. axSuperMap2.Layers[lay].Snapable=true;
  2350. SuperMapLib.soRecordset myRecord ;
  2351. SuperMapLib.soDatasetVector myV ;
  2352. myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[lay].Dataset;
  2353. myRecord = myV.QueryEx(myGeo,SuperMapLib.seSpatialQueryMode.scsAreaIntersect,"");
  2354. this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
  2355. return myRecord;
  2356. }
  2357. else
  2358. {
  2359. return null;
  2360. }
  2361. }
  2362. /// <summary>
  2363. /// 填充结果
  2364. /// </summary>
  2365. /// <param name="myR"></param>
  2366. private void fill_listview(SuperMapLib.soRecordset myR)
  2367. {
  2368. this.listView_r_other.Items.Clear();
  2369. if(myR!=null)
  2370. {
  2371. if(myR.RecordCount>0)
  2372. {
  2373. for(int i=0;i<myR.RecordCount;i++)
  2374. {
  2375. string ie = myR.GetFieldValue("编号").ToString()+" "+myR.GetFieldValue("Layer").ToString();
  2376. ListViewItem it = new ListViewItem(ie,4);
  2377. it.Tag = Convert.ToInt32(myR.GetFieldValue("SmID"));
  2378. this.listView_r_other.Items.Add(it);
  2379. myR.MoveNext();
  2380. }
  2381. }
  2382. else
  2383. {
  2384. MessageBox.Show("没有找到符合条件的纪录","系统提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
  2385. ListViewItem it = new ListViewItem("没有找到任何纪录",4);
  2386. it.Tag = "错误";
  2387. this.listView_r_other.Items.Add(it);
  2388. }
  2389. }
  2390. }
  2391. private SuperMapLib.soRecordset flash_other(int lay ,int where)
  2392. {
  2393. if(lay!=0)  //开始查询
  2394. {
  2395. axSuperMap2.Layers[lay].Snapable=true;
  2396. SuperMapLib.soRecordset myRecord ;
  2397. SuperMapLib.soDatasetVector myV ;
  2398. SuperMapLib.soStrings mystring = new SuperMapLib.soStringsClass();
  2399. string strSQLFilter = "SmID="+where+"";
  2400. mystring.Add("*");
  2401. myV = (SuperMapLib.soDatasetVector)this.axSuperMap2.Layers[lay].Dataset;
  2402. myRecord = myV.Query(strSQLFilter,true,mystring,"");
  2403. return myRecord;
  2404. }
  2405. else
  2406. {
  2407. return null;
  2408. }
  2409. }
  2410. private void other_flash()
  2411. {
  2412. if(this.listView_r_other.SelectedItems.Count>0)
  2413. {
  2414. if(this.listView_r_other.SelectedItems[0].Tag.ToString()!="错误")
  2415. {    
  2416. int where = Convert.ToInt32(this.listView_r_other.SelectedItems[0].Tag);
  2417. int lay = get_query_where();
  2418. SuperMapLib.soRecordset myRe = flash_other(lay ,where);
  2419. if(myRe!=null)
  2420. {
  2421. this.flash_Geo=myRe.GetGeometry();
  2422. if(flash_Geo.Dimension!=0)
  2423. {
  2424. this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.1);  //居中现实
  2425. this.axSuperMap2.CtlRefresh();
  2426. }
  2427. else
  2428. {
  2429. this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5);
  2430. this.axSuperMap2.CtlRefresh();
  2431. }
  2432. this.timer_flash_kong.Start();
  2433. }
  2434. }
  2435. }
  2436. }
  2437. #endregion
  2438. #region 用户权限管理
  2439. private void user_admin()
  2440. {
  2441. this.menu_user_manage.Visible = false; //用户管理不可见
  2442. this.menu_kong_add.Visible = false ; //钻孔添加不可见
  2443. this.menu_yan_manage.Visible = false;//岩性管理不可见
  2444. this.menu_k_del.Visible = false;//不容许删除钻孔
  2445. this.menuCommand19.Visible = false; //同时隐藏一个分割条
  2446. }
  2447. #endregion
  2448. #region 系统开始初始化
  2449. private void myl_SendLogin()
  2450. {
  2451. Splasher.Show();
  2452. create_RTool();
  2453. loadData();
  2454. if(App.u_flag!=(int)flag.admin)
  2455. {
  2456. user_admin();
  2457. }
  2458. this.axSuperMap2.Dock = DockStyle.Fill;
  2459. this.statusPanel_xy.Text = "鼠标位置坐标";
  2460. this.statusPanel_user.Text = "当前用户:"+App.u_name;
  2461. get_fill_file();
  2462. Splasher.Close();
  2463. this.Visible = true;
  2464. this.timer_form.Start();
  2465. }
  2466. #endregion
  2467. }
  2468. }