📄 databaseobjectinfo.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.OleDb;
namespace TreeReportApp
{
/// <summary>
/// DatabaseObjectInfo 的摘要说明。
/// </summary>
public class DatabaseObjectInfo : System.Windows.Forms.Form
{
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TreeView treeView_DbObject;
private System.Windows.Forms.Splitter splitter1;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ImageList imageList_tool;
private System.Windows.Forms.ToolBarButton toolBarButton_NewObject;
private System.Windows.Forms.ToolBarButton toolBarButton_objItem;
private System.Data.OleDb.OleDbConnection conn;
private System.Windows.Forms.ListView listView_content;
private System.Windows.Forms.ImageList imageList_TreeListView;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
private static string currenttreenodetext = "";
public DatabaseObjectInfo()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
conn.Close();//关闭数据库连接
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DatabaseObjectInfo));
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.toolBarButton_NewObject = new System.Windows.Forms.ToolBarButton();
this.toolBarButton_objItem = new System.Windows.Forms.ToolBarButton();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.imageList_tool = new System.Windows.Forms.ImageList(this.components);
this.panel1 = new System.Windows.Forms.Panel();
this.treeView_DbObject = new System.Windows.Forms.TreeView();
this.imageList_TreeListView = new System.Windows.Forms.ImageList(this.components);
this.listView_content = new System.Windows.Forms.ListView();
this.splitter1 = new System.Windows.Forms.Splitter();
this.conn = new System.Data.OleDb.OleDbConnection();
this.SuspendLayout();
//
// toolBar1
//
this.toolBar1.AccessibleDescription = resources.GetString("toolBar1.AccessibleDescription");
this.toolBar1.AccessibleName = resources.GetString("toolBar1.AccessibleName");
this.toolBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("toolBar1.Anchor")));
this.toolBar1.Appearance = ((System.Windows.Forms.ToolBarAppearance)(resources.GetObject("toolBar1.Appearance")));
this.toolBar1.AutoSize = ((bool)(resources.GetObject("toolBar1.AutoSize")));
this.toolBar1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("toolBar1.BackgroundImage")));
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton_NewObject,
this.toolBarButton_objItem,
this.toolBarButton1,
this.toolBarButton2,
this.toolBarButton3});
this.toolBar1.ButtonSize = ((System.Drawing.Size)(resources.GetObject("toolBar1.ButtonSize")));
this.toolBar1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("toolBar1.Dock")));
this.toolBar1.DropDownArrows = ((bool)(resources.GetObject("toolBar1.DropDownArrows")));
this.toolBar1.Enabled = ((bool)(resources.GetObject("toolBar1.Enabled")));
this.toolBar1.Font = ((System.Drawing.Font)(resources.GetObject("toolBar1.Font")));
this.toolBar1.ImageList = this.imageList_tool;
this.toolBar1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("toolBar1.ImeMode")));
this.toolBar1.Location = ((System.Drawing.Point)(resources.GetObject("toolBar1.Location")));
this.toolBar1.Name = "toolBar1";
this.toolBar1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("toolBar1.RightToLeft")));
this.toolBar1.ShowToolTips = ((bool)(resources.GetObject("toolBar1.ShowToolTips")));
this.toolBar1.Size = ((System.Drawing.Size)(resources.GetObject("toolBar1.Size")));
this.toolBar1.TabIndex = ((int)(resources.GetObject("toolBar1.TabIndex")));
this.toolBar1.TextAlign = ((System.Windows.Forms.ToolBarTextAlign)(resources.GetObject("toolBar1.TextAlign")));
this.toolBar1.Visible = ((bool)(resources.GetObject("toolBar1.Visible")));
this.toolBar1.Wrappable = ((bool)(resources.GetObject("toolBar1.Wrappable")));
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
//
// toolBarButton_NewObject
//
this.toolBarButton_NewObject.Enabled = ((bool)(resources.GetObject("toolBarButton_NewObject.Enabled")));
this.toolBarButton_NewObject.ImageIndex = ((int)(resources.GetObject("toolBarButton_NewObject.ImageIndex")));
this.toolBarButton_NewObject.Text = resources.GetString("toolBarButton_NewObject.Text");
this.toolBarButton_NewObject.ToolTipText = resources.GetString("toolBarButton_NewObject.ToolTipText");
this.toolBarButton_NewObject.Visible = ((bool)(resources.GetObject("toolBarButton_NewObject.Visible")));
//
// toolBarButton_objItem
//
this.toolBarButton_objItem.Enabled = ((bool)(resources.GetObject("toolBarButton_objItem.Enabled")));
this.toolBarButton_objItem.ImageIndex = ((int)(resources.GetObject("toolBarButton_objItem.ImageIndex")));
this.toolBarButton_objItem.Text = resources.GetString("toolBarButton_objItem.Text");
this.toolBarButton_objItem.ToolTipText = resources.GetString("toolBarButton_objItem.ToolTipText");
this.toolBarButton_objItem.Visible = ((bool)(resources.GetObject("toolBarButton_objItem.Visible")));
//
// toolBarButton1
//
this.toolBarButton1.Enabled = ((bool)(resources.GetObject("toolBarButton1.Enabled")));
this.toolBarButton1.ImageIndex = ((int)(resources.GetObject("toolBarButton1.ImageIndex")));
this.toolBarButton1.Text = resources.GetString("toolBarButton1.Text");
this.toolBarButton1.ToolTipText = resources.GetString("toolBarButton1.ToolTipText");
this.toolBarButton1.Visible = ((bool)(resources.GetObject("toolBarButton1.Visible")));
//
// toolBarButton2
//
this.toolBarButton2.Enabled = ((bool)(resources.GetObject("toolBarButton2.Enabled")));
this.toolBarButton2.ImageIndex = ((int)(resources.GetObject("toolBarButton2.ImageIndex")));
this.toolBarButton2.Text = resources.GetString("toolBarButton2.Text");
this.toolBarButton2.ToolTipText = resources.GetString("toolBarButton2.ToolTipText");
this.toolBarButton2.Visible = ((bool)(resources.GetObject("toolBarButton2.Visible")));
//
// toolBarButton3
//
this.toolBarButton3.Enabled = ((bool)(resources.GetObject("toolBarButton3.Enabled")));
this.toolBarButton3.ImageIndex = ((int)(resources.GetObject("toolBarButton3.ImageIndex")));
this.toolBarButton3.Text = resources.GetString("toolBarButton3.Text");
this.toolBarButton3.ToolTipText = resources.GetString("toolBarButton3.ToolTipText");
this.toolBarButton3.Visible = ((bool)(resources.GetObject("toolBarButton3.Visible")));
//
// imageList_tool
//
this.imageList_tool.ImageSize = ((System.Drawing.Size)(resources.GetObject("imageList_tool.ImageSize")));
this.imageList_tool.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList_tool.ImageStream")));
this.imageList_tool.TransparentColor = System.Drawing.Color.Transparent;
//
// panel1
//
this.panel1.AccessibleDescription = resources.GetString("panel1.AccessibleDescription");
this.panel1.AccessibleName = resources.GetString("panel1.AccessibleName");
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("panel1.Anchor")));
this.panel1.AutoScroll = ((bool)(resources.GetObject("panel1.AutoScroll")));
this.panel1.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("panel1.AutoScrollMargin")));
this.panel1.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("panel1.AutoScrollMinSize")));
this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage")));
this.panel1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("panel1.Dock")));
this.panel1.Enabled = ((bool)(resources.GetObject("panel1.Enabled")));
this.panel1.Font = ((System.Drawing.Font)(resources.GetObject("panel1.Font")));
this.panel1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("panel1.ImeMode")));
this.panel1.Location = ((System.Drawing.Point)(resources.GetObject("panel1.Location")));
this.panel1.Name = "panel1";
this.panel1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("panel1.RightToLeft")));
this.panel1.Size = ((System.Drawing.Size)(resources.GetObject("panel1.Size")));
this.panel1.TabIndex = ((int)(resources.GetObject("panel1.TabIndex")));
this.panel1.Text = resources.GetString("panel1.Text");
this.panel1.Visible = ((bool)(resources.GetObject("panel1.Visible")));
//
// treeView_DbObject
//
this.treeView_DbObject.AccessibleDescription = resources.GetString("treeView_DbObject.AccessibleDescription");
this.treeView_DbObject.AccessibleName = resources.GetString("treeView_DbObject.AccessibleName");
this.treeView_DbObject.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("treeView_DbObject.Anchor")));
this.treeView_DbObject.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("treeView_DbObject.BackgroundImage")));
this.treeView_DbObject.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("treeView_DbObject.Dock")));
this.treeView_DbObject.Enabled = ((bool)(resources.GetObject("treeView_DbObject.Enabled")));
this.treeView_DbObject.Font = ((System.Drawing.Font)(resources.GetObject("treeView_DbObject.Font")));
this.treeView_DbObject.ImageIndex = ((int)(resources.GetObject("treeView_DbObject.ImageIndex")));
this.treeView_DbObject.ImageList = this.imageList_TreeListView;
this.treeView_DbObject.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("treeView_DbObject.ImeMode")));
this.treeView_DbObject.Indent = ((int)(resources.GetObject("treeView_DbObject.Indent")));
this.treeView_DbObject.ItemHeight = ((int)(resources.GetObject("treeView_DbObject.ItemHeight")));
this.treeView_DbObject.Location = ((System.Drawing.Point)(resources.GetObject("treeView_DbObject.Location")));
this.treeView_DbObject.Name = "treeView_DbObject";
this.treeView_DbObject.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("treeView_DbObject.RightToLeft")));
this.treeView_DbObject.SelectedImageIndex = ((int)(resources.GetObject("treeView_DbObject.SelectedImageIndex")));
this.treeView_DbObject.Size = ((System.Drawing.Size)(resources.GetObject("treeView_DbObject.Size")));
this.treeView_DbObject.TabIndex = ((int)(resources.GetObject("treeView_DbObject.TabIndex")));
this.treeView_DbObject.Text = resources.GetString("treeView_DbObject.Text");
this.treeView_DbObject.Visible = ((bool)(resources.GetObject("treeView_DbObject.Visible")));
this.treeView_DbObject.DoubleClick += new System.EventHandler(this.treeView_DbObject_DoubleClick);
this.treeView_DbObject.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_DbObject_AfterSelect);
//
// imageList_TreeListView
//
this.imageList_TreeListView.ImageSize = ((System.Drawing.Size)(resources.GetObject("imageList_TreeListView.ImageSize")));
this.imageList_TreeListView.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList_TreeListView.ImageStream")));
this.imageList_TreeListView.TransparentColor = System.Drawing.Color.Transparent;
//
// listView_content
//
this.listView_content.AccessibleDescription = resources.GetString("listView_content.AccessibleDescription");
this.listView_content.AccessibleName = resources.GetString("listView_content.AccessibleName");
this.listView_content.Alignment = ((System.Windows.Forms.ListViewAlignment)(resources.GetObject("listView_content.Alignment")));
this.listView_content.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("listView_content.Anchor")));
this.listView_content.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("listView_content.BackgroundImage")));
this.listView_content.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("listView_content.Dock")));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -