Develop and Download Open Source Software

Browse Subversion Repository

Contents of /NeoFT/starter/Starter.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 84 - (show annotations) (download)
Thu Jan 3 14:29:42 2013 UTC (11 years, 3 months ago) by c477
File size: 1256 byte(s)
first step to terrain drawing with XNA.
1 using System;
2 using System.Diagnostics;
3 using System.Windows.Forms;
4 using System.Collections.Generic;
5 using nft.util;
6 using nft.ui.mainframe;
7 using System.Threading;
8
9 namespace Starter
10 {
11 public class Starter
12 {
13 //[DllImport("DirectDraw.AlphaBlend.dll",EntryPoint="DllRegisterServer")]
14 //private static extern void regsvr();
15
16 [STAThread]
17 static void Main( string[] args )
18 {
19 if (Debugger.IsAttached) {
20 run(args);
21 } else {
22 Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
23 Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
24 try {
25 run(args);
26 } catch (Exception e) {
27 UIUtil.ShowException("ƒGƒ‰[‚Ş”­ś‚ľ‚Ü‚ľ‚˝", e, UIInformLevel.normal);
28 }
29 }
30 }
31
32 private static void run( string[] args ) {
33 // start the game
34 Application.Run(new MainFrame(args));
35 }
36
37 static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) {
38 UIUtil.ShowException(e.Exception.Message, e.Exception, UIInformLevel.severe);
39 }
40 }
41 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26