app.cs

来自「c#标准教程适合与处于不同学习阶段的人」· CS 代码 · 共 29 行

CS
29
字号
using System;
using SWF = System.Windows.Forms;
using ST = System.Threading;
using T = System.Diagnostics.Trace;

namespace BankCustomerApp
{

	public class App
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		public static void Main() 
		{
			try
			{
				// setup generic exception handler...
				SWF.Application.ThreadException += new ST.ThreadExceptionEventHandler(App.OnAppException);

				// setup cleanup routine for normal app shutdown...
				SWF.Application.ThreadExit += new System.EventHandler(App.OnAppExit);

				// when app starts, delete the previous log file (if any)
				string  logfile = System.AppDomain.CurrentDomain.BaseDirectory + "AppLog.txt";
				System.IO.TextWriter  log = new System.IO.StreamWriter(logfile);

				if (Globals.Trace)  // then also send trace output to log file

⌨️ 快捷键说明

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