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

📄 control.cs

📁 电子像册: 采用C#和SQL编写
💻 CS
📖 第 1 页 / 共 4 页
字号:
using System;
using System.Windows.Forms;

namespace EAlbum
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	/// 控制类
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.TabPage tabPage1;
		private System.Windows.Forms.TabPage tabPage2;
		private System.Windows.Forms.TabControl 列表;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.ComboBox comboBox1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Button btnSearch;
		private Search listView1;
		private Attribute textName;
		private Attribute textTime;
		private Attribute textDesc;
		private System.Windows.Forms.Button btnModify;
		private List treeAlbum;
		private picture pictureBox;
		private System.Windows.Forms.Button btnUpdate;
		private System.Windows.Forms.ColumnHeader columnHeader1;
		private System.Windows.Forms.ColumnHeader columnHeader2;
		private System.Windows.Forms.ColumnHeader columnHeader3;
		private System.Windows.Forms.OpenFileDialog FileOpenDlg;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.Label lblmessage;
		private System.Windows.Forms.Button buttondel;
		private System.Windows.Forms.Button buttonadd;
		private System.Windows.Forms.Panel panel1;
 		private Model model=new Model();

		public Form1()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			LoadData();
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
			this.列表 = new System.Windows.Forms.TabControl();
			this.tabPage1 = new System.Windows.Forms.TabPage();
			this.treeAlbum = new EAlbum.List();
			this.tabPage2 = new System.Windows.Forms.TabPage();
			this.listView1 = new EAlbum.Search();
			this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
			this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
			this.btnSearch = new System.Windows.Forms.Button();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.comboBox1 = new System.Windows.Forms.ComboBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.pictureBox = new EAlbum.picture();
			this.textName = new EAlbum.Attribute();
			this.textTime = new EAlbum.Attribute();
			this.textDesc = new EAlbum.Attribute();
			this.btnModify = new System.Windows.Forms.Button();
			this.btnUpdate = new System.Windows.Forms.Button();
			this.FileOpenDlg = new System.Windows.Forms.OpenFileDialog();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.lblmessage = new System.Windows.Forms.Label();
			this.buttondel = new System.Windows.Forms.Button();
			this.buttonadd = new System.Windows.Forms.Button();
			this.panel1 = new System.Windows.Forms.Panel();
			this.列表.SuspendLayout();
			this.tabPage1.SuspendLayout();
			this.tabPage2.SuspendLayout();
			this.panel1.SuspendLayout();
			this.SuspendLayout();
			// 
			// 列表
			// 
			this.列表.AccessibleDescription = resources.GetString("列表.AccessibleDescription");
			this.列表.AccessibleName = resources.GetString("列表.AccessibleName");
			this.列表.Alignment = ((System.Windows.Forms.TabAlignment)(resources.GetObject("列表.Alignment")));
			this.列表.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("列表.Anchor")));
			this.列表.Appearance = ((System.Windows.Forms.TabAppearance)(resources.GetObject("列表.Appearance")));
			this.列表.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("列表.BackgroundImage")));
			this.列表.Controls.Add(this.tabPage1);
			this.列表.Controls.Add(this.tabPage2);
			this.列表.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("列表.Dock")));
			this.列表.Enabled = ((bool)(resources.GetObject("列表.Enabled")));
			this.列表.Font = ((System.Drawing.Font)(resources.GetObject("列表.Font")));
			this.列表.ImageList = this.imageList1;
			this.列表.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("列表.ImeMode")));
			this.列表.ItemSize = ((System.Drawing.Size)(resources.GetObject("列表.ItemSize")));
			this.列表.Location = ((System.Drawing.Point)(resources.GetObject("列表.Location")));
			this.列表.Name = "列表";
			this.列表.Padding = ((System.Drawing.Point)(resources.GetObject("列表.Padding")));
			this.列表.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("列表.RightToLeft")));
			this.列表.SelectedIndex = 0;
			this.列表.ShowToolTips = ((bool)(resources.GetObject("列表.ShowToolTips")));
			this.列表.Size = ((System.Drawing.Size)(resources.GetObject("列表.Size")));
			this.列表.TabIndex = ((int)(resources.GetObject("列表.TabIndex")));
			this.列表.Text = resources.GetString("列表.Text");
			this.列表.Visible = ((bool)(resources.GetObject("列表.Visible")));
			// 
			// tabPage1
			// 
			this.tabPage1.AccessibleDescription = resources.GetString("tabPage1.AccessibleDescription");
			this.tabPage1.AccessibleName = resources.GetString("tabPage1.AccessibleName");
			this.tabPage1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("tabPage1.Anchor")));
			this.tabPage1.AutoScroll = ((bool)(resources.GetObject("tabPage1.AutoScroll")));
			this.tabPage1.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("tabPage1.AutoScrollMargin")));
			this.tabPage1.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("tabPage1.AutoScrollMinSize")));
			this.tabPage1.BackColor = System.Drawing.Color.Peru;
			this.tabPage1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("tabPage1.BackgroundImage")));
			this.tabPage1.Controls.Add(this.treeAlbum);
			this.tabPage1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("tabPage1.Dock")));
			this.tabPage1.Enabled = ((bool)(resources.GetObject("tabPage1.Enabled")));
			this.tabPage1.Font = ((System.Drawing.Font)(resources.GetObject("tabPage1.Font")));
			this.tabPage1.ImageIndex = ((int)(resources.GetObject("tabPage1.ImageIndex")));
			this.tabPage1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("tabPage1.ImeMode")));
			this.tabPage1.Location = ((System.Drawing.Point)(resources.GetObject("tabPage1.Location")));
			this.tabPage1.Name = "tabPage1";
			this.tabPage1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("tabPage1.RightToLeft")));
			this.tabPage1.Size = ((System.Drawing.Size)(resources.GetObject("tabPage1.Size")));
			this.tabPage1.TabIndex = ((int)(resources.GetObject("tabPage1.TabIndex")));
			this.tabPage1.Text = resources.GetString("tabPage1.Text");
			this.tabPage1.ToolTipText = resources.GetString("tabPage1.ToolTipText");
			this.tabPage1.Visible = ((bool)(resources.GetObject("tabPage1.Visible")));
			// 
			// treeAlbum
			// 
			this.treeAlbum.AccessibleDescription = resources.GetString("treeAlbum.AccessibleDescription");
			this.treeAlbum.AccessibleName = resources.GetString("treeAlbum.AccessibleName");
			this.treeAlbum.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("treeAlbum.Anchor")));
			this.treeAlbum.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("treeAlbum.BackgroundImage")));
			this.treeAlbum.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("treeAlbum.Dock")));
			this.treeAlbum.Enabled = ((bool)(resources.GetObject("treeAlbum.Enabled")));
			this.treeAlbum.Font = ((System.Drawing.Font)(resources.GetObject("treeAlbum.Font")));
			this.treeAlbum.ImageIndex = ((int)(resources.GetObject("treeAlbum.ImageIndex")));
			this.treeAlbum.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("treeAlbum.ImeMode")));
			this.treeAlbum.Indent = ((int)(resources.GetObject("treeAlbum.Indent")));
			this.treeAlbum.ItemHeight = ((int)(resources.GetObject("treeAlbum.ItemHeight")));
			this.treeAlbum.Location = ((System.Drawing.Point)(resources.GetObject("treeAlbum.Location")));
			this.treeAlbum.Name = "treeAlbum";
			this.treeAlbum.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("treeAlbum.RightToLeft")));
			this.treeAlbum.SelectedImageIndex = ((int)(resources.GetObject("treeAlbum.SelectedImageIndex")));
			this.treeAlbum.Size = ((System.Drawing.Size)(resources.GetObject("treeAlbum.Size")));
			this.treeAlbum.TabIndex = ((int)(resources.GetObject("treeAlbum.TabIndex")));
			this.treeAlbum.Text = resources.GetString("treeAlbum.Text");
			this.treeAlbum.Visible = ((bool)(resources.GetObject("treeAlbum.Visible")));
			this.treeAlbum.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeAlbum_AfterSelect);
			// 
			// tabPage2
			// 
			this.tabPage2.AccessibleDescription = resources.GetString("tabPage2.AccessibleDescription");
			this.tabPage2.AccessibleName = resources.GetString("tabPage2.AccessibleName");
			this.tabPage2.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("tabPage2.Anchor")));
			this.tabPage2.AutoScroll = ((bool)(resources.GetObject("tabPage2.AutoScroll")));
			this.tabPage2.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("tabPage2.AutoScrollMargin")));
			this.tabPage2.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("tabPage2.AutoScrollMinSize")));
			this.tabPage2.BackColor = System.Drawing.Color.Transparent;
			this.tabPage2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("tabPage2.BackgroundImage")));
			this.tabPage2.Controls.Add(this.listView1);
			this.tabPage2.Controls.Add(this.btnSearch);
			this.tabPage2.Controls.Add(this.label2);
			this.tabPage2.Controls.Add(this.label1);
			this.tabPage2.Controls.Add(this.comboBox1);
			this.tabPage2.Controls.Add(this.textBox2);
			this.tabPage2.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("tabPage2.Dock")));
			this.tabPage2.Enabled = ((bool)(resources.GetObject("tabPage2.Enabled")));
			this.tabPage2.Font = ((System.Drawing.Font)(resources.GetObject("tabPage2.Font")));
			this.tabPage2.ImageIndex = ((int)(resources.GetObject("tabPage2.ImageIndex")));
			this.tabPage2.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("tabPage2.ImeMode")));
			this.tabPage2.Location = ((System.Drawing.Point)(resources.GetObject("tabPage2.Location")));
			this.tabPage2.Name = "tabPage2";
			this.tabPage2.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("tabPage2.RightToLeft")));
			this.tabPage2.Size = ((System.Drawing.Size)(resources.GetObject("tabPage2.Size")));
			this.tabPage2.TabIndex = ((int)(resources.GetObject("tabPage2.TabIndex")));
			this.tabPage2.Text = resources.GetString("tabPage2.Text");
			this.tabPage2.ToolTipText = resources.GetString("tabPage2.ToolTipText");
			this.tabPage2.Visible = ((bool)(resources.GetObject("tabPage2.Visible")));
			// 
			// listView1
			// 
			this.listView1.AccessibleDescription = resources.GetString("listView1.AccessibleDescription");
			this.listView1.AccessibleName = resources.GetString("listView1.AccessibleName");
			this.listView1.Activation = System.Windows.Forms.ItemActivation.OneClick;
			this.listView1.Alignment = ((System.Windows.Forms.ListViewAlignment)(resources.GetObject("listView1.Alignment")));
			this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("listView1.Anchor")));
			this.listView1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("listView1.BackgroundImage")));
			this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {

⌨️ 快捷键说明

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