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

📄 viewgpldialog.cs

📁 c#精彩编程百例(源代码)
💻 CS
字号:
//  ViewGPLDialog.cs 
//  Copyright (C) 2000 Mike Krueger
// 
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or any later version.
// 
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
// 
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

using System;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Resources;

using SharpDevelop.Tool.Data;

namespace SharpDevelop.Gui.Dialogs {
	
	public class ViewGPLDialog : Form 
	{
		
		Container       components;
		Button          okButton;
		RichTextBox     richTextBox1;
		
		public ViewGPLDialog()
		{
			InitializeComponent();
			richTextBox1.LoadFile(Application.StartupPath + "\\COPYING.txt", RichTextBoxStreamType.PlainText);
			richTextBox1.Font = new Font("Times New Roman", 12);
			richTextBox1.ReadOnly = true;
        	okButton.Click += new EventHandler(OkEvent);
			AcceptButton  = okButton;
			StartPosition = FormStartPosition.CenterScreen;
			Icon = Resource.GetIcon("Icons.16x16.CopyLeftIcon");
			TopMost       = true;
			MaximizeBox  = MinimizeBox = false;
			ShowInTaskbar = false;
		}
		
		void OkEvent(object sender, EventArgs e)
	    {
	    	Close();
	    }
	    		
		public override void Dispose() {
			base.Dispose();
			components.Dispose();
		}
		
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.richTextBox1 = new RichTextBox();
			this.okButton = new Button();
			richTextBox1.Text = "";
			richTextBox1.TabIndex = 0;
			
			okButton.Size = new System.Drawing.Size(64, 24);
			okButton.TabIndex = 1;
			okButton.Text = Resource.GetString("Global.OKButtonText");
			
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.Text = Resource.GetString("Dialog.ViewGPL.DialogName");
			
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			
			this.ClientSize = new System.Drawing.Size(474 + 250, 400);
			
			okButton.Location = new System.Drawing.Point((Width - okButton.Width) / 2, ClientSize.Height - okButton.Height - 5);
			richTextBox1.Size = new System.Drawing.Size(ClientSize.Width, okButton.Location.Y - 5);
			
			this.Controls.Add(okButton);
			this.Controls.Add(richTextBox1);
			
		}
		
	}
}

⌨️ 快捷键说明

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