예제 #1
0
        public ApplicationExitDispatcher()
        {
            var type = DynamicInvoker.GetType("System.Windows.Forms", "Application");

            if (type != null)
            {
                DynamicInvoker.AddEventHandler <EventHandler>(type, "ApplicationExit", Application_ApplicationExit);
            }
        }
예제 #2
0
파일: AppCrash.cs 프로젝트: sontx/blackcat
        public AppCrash()
        {
            var applicationType = DynamicInvoker.GetType("System.Windows.Forms", "Application");

            if (applicationType != null)
            {
                DynamicInvoker.AddEventHandler <ThreadExceptionEventHandler>(applicationType, "ThreadException", Application_ThreadException);
            }
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            ProductName   = DynamicInvoker.GetPropertyValue(applicationType, "ProductName") as string;
            DeveloperMail = "*****@*****.**";
            CrashDir      = "CrashLogs";
        }