compile ok .ㅠㅠ

This commit is contained in:
chi
2025-05-26 10:21:17 +09:00
parent 57dc6de740
commit 77a6aefb44
27 changed files with 780 additions and 204 deletions

View File

@@ -4,11 +4,14 @@ using System.Net;
using System.Management;
using System.Data;
using AR;
using System.Speech.Synthesis;
using System.Media;
using System.Runtime.InteropServices;
using Microsoft.Data.SqlClient;
using System.Windows.Forms;
using System;
using Microsoft.Speech.Synthesis;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Linq;
namespace Project
{
@@ -185,11 +188,7 @@ namespace Project
public static void init()
{
// 전역 예외 처리기 등록
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.ApplicationExit += Application_ApplicationExit;
Result = new CResult();
//state machine
@@ -243,46 +242,7 @@ namespace Project
else PUB.PatchVersion = string.Empty;
}
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
{
try
{
string errorMessage = $"Thread Exception: {e.Exception.Message}\nStack Trace: {e.Exception.StackTrace}";
log.AddE(errorMessage);
MessageBox.Show($"프로그램 오류가 발생했습니다.\n{errorMessage}", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch
{
// 로깅 실패 시 무시
}
}
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
try
{
Exception ex = e.ExceptionObject as Exception;
string errorMessage = $"Unhandled Exception: {ex?.Message}\nStack Trace: {ex?.StackTrace}";
log.AddE(errorMessage);
MessageBox.Show($"프로그램 오류가 발생했습니다.\n{errorMessage}", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch
{
// 로깅 실패 시 무시
}
}
private static void Application_ApplicationExit(object sender, EventArgs e)
{
try
{
log.Add("프로그램 종료", "Application_ApplicationExit 이벤트 발생");
}
catch
{
// 로깅 실패 시 무시
}
}
public static Boolean CheckManualChargeMode(bool Prompt = true )
{