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

📄 formj.cs

📁 这是用C#编的一个简单的电子日记本软件
💻 CS
📖 第 1 页 / 共 5 页
字号:
			this.TabsMenuSave.Index = 0;
			this.TabsMenuSave.Text = "保存(&S)";
			this.TabsMenuSave.Click += new System.EventHandler(this.TabsMenuSave_Click);
			// 
			// TabsMenuClose
			// 
			this.TabsMenuClose.Index = 1;
			this.TabsMenuClose.Text = "关闭(&C)";
			this.TabsMenuClose.Click += new System.EventHandler(this.TabsMenuClose_Click);
			// 
			// JMenu
			// 
			this.JMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																				  this.JMenuFile,
																				  this.menuItem1,
																				  this.menuItem2});
			// 
			// JMenuFile
			// 
			this.JMenuFile.Index = 0;
			this.JMenuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.JMenuNew,
																					  this.JMenuOpen,
																					  this.JMenuLine1,
																					  this.JMenuSave,
																					  this.JMenuSaveAll,
																					  this.JMenuLine2,
																					  this.JMenuExit});
			this.JMenuFile.Text = "文件(&F)";
			// 
			// JMenuNew
			// 
			this.JMenuNew.Index = 0;
			this.JMenuNew.Text = "新建文件(&N)";
			this.JMenuNew.Click += new System.EventHandler(this.JMenuNew_Click);
			// 
			// JMenuOpen
			// 
			this.JMenuOpen.Index = 1;
			this.JMenuOpen.Text = "打开其他(&O)...";
			this.JMenuOpen.Click += new System.EventHandler(this.JMenuOpen_Click);
			// 
			// JMenuLine1
			// 
			this.JMenuLine1.Index = 2;
			this.JMenuLine1.Text = "-";
			// 
			// JMenuSave
			// 
			this.JMenuSave.Index = 3;
			this.JMenuSave.Text = "保存(&S)";
			this.JMenuSave.Click += new System.EventHandler(this.TabsMenuSave_Click);
			// 
			// JMenuSaveAll
			// 
			this.JMenuSaveAll.Index = 4;
			this.JMenuSaveAll.Text = "全部保存(&L)";
			this.JMenuSaveAll.Click += new System.EventHandler(this.JMenuSaveAll_Click);
			// 
			// JMenuLine2
			// 
			this.JMenuLine2.Index = 5;
			this.JMenuLine2.Text = "-";
			// 
			// JMenuExit
			// 
			this.JMenuExit.Index = 6;
			this.JMenuExit.Text = "退出(&X)";
			this.JMenuExit.Click += new System.EventHandler(this.JMenuExit_Click);
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 1;
			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.JMenuWrap,
																					  this.JMenuFont,
																					  this.JMenuBColor,
																					  this.JMenuFColor});
			this.menuItem1.Text = "查看(&V)";
			// 
			// JMenuWrap
			// 
			this.JMenuWrap.Index = 0;
			this.JMenuWrap.Text = "自动换行(&W)";
			this.JMenuWrap.Click += new System.EventHandler(this.JMenuWrap_Click);
			// 
			// JMenuFont
			// 
			this.JMenuFont.Index = 1;
			this.JMenuFont.Text = "字体(&F)...";
			this.JMenuFont.Click += new System.EventHandler(this.JMenuFont_Click);
			// 
			// JMenuBColor
			// 
			this.JMenuBColor.Index = 2;
			this.JMenuBColor.Text = "背景色(&B)...";
			this.JMenuBColor.Click += new System.EventHandler(this.JMenuBColor_Click);
			// 
			// JMenuFColor
			// 
			this.JMenuFColor.Index = 3;
			this.JMenuFColor.Text = "前景色(&C)...";
			this.JMenuFColor.Click += new System.EventHandler(this.JMenuFColor_Click);
			// 
			// menuItem2
			// 
			this.menuItem2.Index = 2;
			this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.JMenuHelpAbout});
			this.menuItem2.Text = "帮助(&H)";
			// 
			// JMenuHelpAbout
			// 
			this.JMenuHelpAbout.Index = 0;
			this.JMenuHelpAbout.Text = "关于 &J_Note...";
			this.JMenuHelpAbout.Click += new System.EventHandler(this.JMenuHelpAbout_Click);
			// 
			// JChannel
			// 
			this.JChannel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(251)), ((System.Byte)(233)));
			this.JChannel.Dock = System.Windows.Forms.DockStyle.Left;
			this.JChannel.Location = new System.Drawing.Point(0, 0);
			this.JChannel.Name = "JChannel";
			this.JChannel.Size = new System.Drawing.Size(20, 417);
			this.JChannel.TabIndex = 4;
			this.JChannel.Paint += new System.Windows.Forms.PaintEventHandler(this.JChannel_Paint);
			this.JChannel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.JChannel_MouseDown);
			// 
			// GenericPane
			// 
			this.GenericPane.BackColor = System.Drawing.SystemColors.Control;
			this.GenericPane.Controls.Add(this.DocTree);
			this.GenericPane.Location = new System.Drawing.Point(24, 0);
			this.GenericPane.Name = "GenericPane";
			this.GenericPane.Size = new System.Drawing.Size(149, 417);
			this.GenericPane.TabIndex = 6;
			this.GenericPane.SizeChanged += new System.EventHandler(this.GenericPane_SizeChanged);
			this.GenericPane.Enter += new System.EventHandler(this.GenericPane_Enter);
			this.GenericPane.MouseUp += new System.Windows.Forms.MouseEventHandler(this.GenericPane_MouseUp);
			this.GenericPane.Paint += new System.Windows.Forms.PaintEventHandler(this.GenericPane_Paint);
			this.GenericPane.Leave += new System.EventHandler(this.GenericPane_Leave);
			this.GenericPane.MouseMove += new System.Windows.Forms.MouseEventHandler(this.GenericPane_MouseMove);
			this.GenericPane.MouseDown += new System.Windows.Forms.MouseEventHandler(this.GenericPane_MouseDown);
			// 
			// DocTree
			// 
			this.DocTree.ContextMenu = this.DocTreeMenu;
			this.DocTree.ImageList = this.TreeVImgList;
			this.DocTree.LabelEdit = true;
			this.DocTree.Location = new System.Drawing.Point(2, 24);
			this.DocTree.Name = "DocTree";
			this.DocTree.Size = new System.Drawing.Size(144, 392);
			this.DocTree.Sorted = true;
			this.DocTree.TabIndex = 2;
			this.DocTree.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DocTree_KeyDown);
			this.DocTree.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.DocTree_AfterExpand);
			this.DocTree.AfterCollapse += new System.Windows.Forms.TreeViewEventHandler(this.DocTree_AfterCollapse);
			this.DocTree.MouseUp += new System.Windows.Forms.MouseEventHandler(this.DocTree_MouseUp);
			this.DocTree.DoubleClick += new System.EventHandler(this.DocTree_DoubleClick);
			this.DocTree.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.DocTree_AfterLabelEdit);
			// 
			// DocTreeMenu
			// 
			this.DocTreeMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						this.DTMenuNew,
																						this.DTMenuNewF,
																						this.DTMenuOpen,
																						this.DTMenuOpenInCurWnd,
																						this.DTMenuReName,
																						this.menuItem6,
																						this.DTMenuDao,
																						this.menuItem4,
																						this.DTMenuDel});
			this.DocTreeMenu.Popup += new System.EventHandler(this.DocTreeMenu_Popup);
			// 
			// DTMenuNew
			// 
			this.DTMenuNew.Index = 0;
			this.DTMenuNew.Text = "新建文件(&N)";
			this.DTMenuNew.Click += new System.EventHandler(this.JMenuNew_Click);
			// 
			// DTMenuNewF
			// 
			this.DTMenuNewF.Index = 1;
			this.DTMenuNewF.Text = "新建文件夹(F)";
			this.DTMenuNewF.Click += new System.EventHandler(this.DTMenuNewF_Click);
			// 
			// DTMenuOpen
			// 
			this.DTMenuOpen.Index = 2;
			this.DTMenuOpen.Text = "打开(&O)";
			this.DTMenuOpen.Click += new System.EventHandler(this.DTMenuOpen_Click);
			// 
			// DTMenuOpenInCurWnd
			// 
			this.DTMenuOpenInCurWnd.Index = 3;
			this.DTMenuOpenInCurWnd.Text = "在当前窗口打开(&C)";
			// 
			// DTMenuReName
			// 
			this.DTMenuReName.Index = 4;
			this.DTMenuReName.Text = "重命名(&M)";
			this.DTMenuReName.Click += new System.EventHandler(this.DTMenuReName_Click);
			// 
			// menuItem6
			// 
			this.menuItem6.Index = 5;
			this.menuItem6.Text = "-";
			// 
			// DTMenuDao
			// 
			this.DTMenuDao.Index = 6;
			this.DTMenuDao.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.DTMenuDaoFile,
																					  this.DTMenuDaoFolder});
			this.DTMenuDao.Text = "导入(&I)";
			// 
			// DTMenuDaoFile
			// 
			this.DTMenuDaoFile.Index = 0;
			this.DTMenuDaoFile.Text = "文件(&F)..";
			this.DTMenuDaoFile.Click += new System.EventHandler(this.DTMenuDaoFile_Click);
			// 
			// DTMenuDaoFolder
			// 
			this.DTMenuDaoFolder.Index = 1;
			this.DTMenuDaoFolder.Text = "文件夹(&D)..";
			this.DTMenuDaoFolder.Click += new System.EventHandler(this.DTMenuDaoFolder_Click);
			// 
			// menuItem4
			// 
			this.menuItem4.Index = 7;
			this.menuItem4.Text = "-";
			// 
			// DTMenuDel
			// 
			this.DTMenuDel.Index = 8;
			this.DTMenuDel.Text = "删除(&D)";
			this.DTMenuDel.Click += new System.EventHandler(this.DTMenuDel_Click);
			// 
			// TreeVImgList
			// 
			this.TreeVImgList.ImageSize = new System.Drawing.Size(16, 16);
			this.TreeVImgList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("TreeVImgList.ImageStream")));
			this.TreeVImgList.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// MdiContainer
			// 
			this.MdiContainer.BackColor = System.Drawing.SystemColors.Control;
			this.MdiContainer.Controls.Add(this.TextEditPane);
			this.MdiContainer.Controls.Add(this.MdiTabOwner);
			this.MdiContainer.Location = new System.Drawing.Point(184, 16);
			this.MdiContainer.Name = "MdiContainer";
			this.MdiContainer.Size = new System.Drawing.Size(528, 240);
			this.MdiContainer.TabIndex = 5;
			this.MdiContainer.SizeChanged += new System.EventHandler(this.MdiContainer_SizeChanged);
			this.MdiContainer.MouseUp += new System.Windows.Forms.MouseEventHandler(this.MdiContainer_MouseUp);
			this.MdiContainer.Paint += new System.Windows.Forms.PaintEventHandler(this.MdiContainer_Paint);
			this.MdiContainer.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MdiContainer_MouseMove);
			this.MdiContainer.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MdiContainer_MouseDown);
			// 
			// TrundleTimer
			// 
			this.TrundleTimer.Interval = 30;
			this.TrundleTimer.SynchronizingObject = this;
			this.TrundleTimer.Elapsed += new System.Timers.ElapsedEventHandler(this.TrundleTimer_Elapsed);
			// 
			// JWndSpliter
			// 
			this.JWndSpliter.BackColor = System.Drawing.SystemColors.Control;
			this.JWndSpliter.Location = new System.Drawing.Point(169, 0);
			this.JWndSpliter.Name = "JWndSpliter";
			this.JWndSpliter.Size = new System.Drawing.Size(2, 417);
			this.JWndSpliter.TabIndex = 8;
			this.JWndSpliter.TabStop = false;
			// 
			// TimeTab
			// 
			this.TimeTab.Interval = 30;
			// 
			// FormJ
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackColor = System.Drawing.SystemColors.AppWorkspace;
			this.ClientSize = new System.Drawing.Size(728, 417);
			this.Controls.Add(this.JChannel);
			this.Controls.Add(this.GenericPane);
			this.Controls.Add(this.MdiContainer);
			this.Cursor = System.Windows.Forms.Cursors.Arrow;
			this.Menu = this.JMenu;
			this.Name = "FormJ";
			this.Text = "J";
			this.Closing += new System.ComponentModel.CancelEventHandler(this.FormJ_Closing);
			this.SizeChanged += new System.EventHandler(this.FormJ_SizeChanged);
			this.Load += new System.EventHandler(this.FormJ_Load);
			this.MdiTabOwner.ResumeLayout(false);
			this.GenericPane.ResumeLayout(false);
			this.MdiContainer.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.TrundleTimer)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new FormJ());
		}

		private void FormJ_Load(object sender, System.EventArgs e)
		{
			this.GenericPane.Location = new Point (20 - GenericPane.Size.Width, 0) ;
			this.MdiContainer.Location = new Point (20, 0) ;
			this.DocTree.Size = new Size (GenericPane.Size.Width - 4, GenericPane.Size.Height -25) ;
			this.TreeViewLoadNote ();
			// set Controls's state
			this.GenericPaneState = WndState.Docking ;
			this.JChannel.Visible = false ;
			this.GenericPane.Dock = DockStyle.Left ;
			this.MdiContainer .Dock = DockStyle.Fill ;
		
			// Set controls's order in the set.
			this.Controls.Remove (this.GenericPane) ;
			this.Controls.Add (this.JWndSpliter) ;
			this.Controls.Add (this.GenericPane) ;
			this.DocTree.Size = new Size (GenericPane.Size.Width - 2, GenericPane.Size.Height -25) ;

		
			// open today txt
			this.OpenFileFromDocTree () ;
				//
			DeserializeTexePaneAtt () ;
			this.DocTree.ForeColor = this.TextEditPane.ForeColor ;

			this.ehTextEditPane_TextChanged = 
				new System.EventHandler	(this.TextEditPane_TextChanged) ;
			this.TextEditPane.TextChanged += this.ehTextEditPane_TextChanged ;
		}

		private void FormJ_SizeChanged(object sender, System.EventArgs e)
		{
			if (this.GenericPaneState == WndState.Docking) return ;
			this.MdiContainer.Size = new Size (this.ClientSize.Width - 20, this.ClientSize.Height) ; 
			this.GenericPane.Size = new Size (GenericPane.Size.Width, this.ClientSize.Height) ;
		}

		private void FormJ_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if (MdiDocManager.IsEmpty ())
				return ;
			MdiDocManager.TextTakeIn (this.TextEditPane.Lines) ;
			ArrayList Files = MdiDocManager.GetAllFileNoteSave () ;
			// 这里不完善
			if (Files == null) 
				return ;
			if (Files.Count != 0)
			{
				FormSave formS = new FormSave () ;

⌨️ 快捷键说明

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