Develop and Download Open Source Software

Browse Subversion Repository

Contents of /Program.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (show annotations) (download)
Thu Feb 24 14:12:19 2011 UTC (13 years ago) by aqua877
File size: 959 byte(s)
エラー報告機能の実装
1 using System;
2 using System.Windows.Forms;
3 using System.Diagnostics;
4
5 namespace Aqua877.WinApp.IronLivetube
6 {
7 static class Program
8 {
9 /// <summary>
10 /// アプリケーションのメイン エントリ ポイントです。
11 /// </summary>
12 [STAThread]
13 public static void Main()
14 {
15 //設定のロード
16 GlobalValues.LoadSettings();
17
18 //プログラムの起動
19 AppDomain.CurrentDomain.UnhandledException += (s, e) =>
20 {
21 using (var rw = new ErrorReportWindow(e.ExceptionObject as Exception))
22 {
23 rw.ShowDialog();
24 }
25 };
26 Application.EnableVisualStyles();
27 Application.SetCompatibleTextRenderingDefault(false);
28 Application.Run(new MainWindow());
29
30 //設定の保存
31 GlobalValues.SaveSettings();
32
33 //プログラムの再起動の必要があれば再起動
34 if (GlobalValues.RestartProgramTrigger)
35 {
36 Process.Start(Application.ExecutablePath);
37 }
38 }
39 }
40 }

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