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

📄 main.cs

📁 c#精彩编程百例(源代码)
💻 CS
字号:
// Main.cs
// Copyright (c) 2001 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
// (at your option) 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.Drawing;

using System;
using System.Windows.Forms;
using System.Diagnostics;
using System.Xml;
using System.Globalization;
using System.Threading;
using System.Reflection;

using SharpDevelop.Tool.Data;
using SharpDevelop.Tool.Function;
using SharpDevelop.Gui;
using SharpDevelop.Actions.Edit;
using SharpDevelop.Actions.Menu;
using SharpDevelop.Internal.Text;
using SharpDevelop.Internal.Project;
using SharpDevelop.Internal.Modules;
using SharpDevelop.Internal.Templates;
using SharpDevelop.Gui.ErrorDialogs;
using SharpDevelop.Internal.Messages;
using SharpDevelop.Internal.Messages.Standard;

namespace SharpDevelop {
	/// <summary>
	/// This Class is the SharpDevelop main class, it starts the program.
	/// </summary>
	public class SharpDevelopMain
	{
		public static string VERSION = "0.70";
		public static string BUILD   = "14:05 06/19/2001";
		
		public static EventHandler InitComplete;
		
		[STAThreadAttribute]
		public static void Main(string[] args)
		{
			MainWindow mainwindow = null;
			try {
				// load some stuff
				Option.LoadOptions();
				ToolLoader.LoadTools();
				
				TextTemplate.LoadTextTemplates();
				CodeTemplateLoader.LoadTemplates();
				ProjectTemplate.LoadProjectTemplates();
				FileTemplate.LoadFileTemplates();
				
				EditActionLoader.LoadEditActions();
				Syntax.LoadSyntaxDefinitions();
				FontContainer.LoadFonts();
				ModuleManager.LoadModules();
				FileUtility.LoadImageList(); // ProjectManager MUST load the language information before the fileutility can load

				mainwindow = new MainWindow();
				mainwindow.Show();
				foreach (string file in args)
					mainwindow.OpenWindow(file);
				
				// show tip of the day
				if (Boolean.Parse(Option.GetProperty("SharpDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup", true).ToString())) {
					ViewTipOfTheDay dview = new ViewTipOfTheDay();
					dview.Execute(mainwindow);
				}
			} catch (Exception e) {
				new LoadingError(e).ShowDialog();
				Application.Exit();
				return;
			}
			
			Messenger.SendMessage(new IDEMessage(IDEMessage.MSGStarted));
			Application.Run(mainwindow);
			Messenger.SendMessage(new IDEMessage(IDEMessage.MSGClosed));
			
			FileUtility.DisposeImageList();
			CodeTemplateLoader.SaveTemplates();
			ToolLoader.SaveTools();
			Option.SaveOptions();
		}
	}
}

⌨️ 快捷键说明

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