initial commit
This commit is contained in:
42
Viewer/AlarmViewer/Program.cs
Normal file
42
Viewer/AlarmViewer/Program.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using vmsnet;
|
||||
|
||||
namespace vmsnet
|
||||
{
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool SetProcessDPIAware();
|
||||
|
||||
/// <summary>
|
||||
/// 해당 애플리케이션의 주 진입점입니다.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (Environment.OSVersion.Version.Major >= 6) SetProcessDPIAware();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
if (System.Diagnostics.Debugger.IsAttached == false)
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
if (args != null && args.Any()) PUB.ExtCommand = args[0];
|
||||
Application.Run(new Frm_Alamlist());
|
||||
}
|
||||
|
||||
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
PUB.NotExitMonitor = true;
|
||||
string fn = System.IO.Path.Combine("Bugreport", DateTime.Now.ToString("yyMMddHHmmss") + "_error.xml");
|
||||
var fi = new System.IO.FileInfo(fn);
|
||||
if (fi.Directory.Exists == false) fi.Directory.Create();
|
||||
System.IO.File.WriteAllText(fi.FullName, e.ExceptionObject.ToString(), System.Text.Encoding.Default);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user