From 6c9631852757c8615825142bb4ff2658e645eb86 Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期一, 05 一月 2026 09:06:16 +0800
Subject: [PATCH] 修复登录显示Bug。
---
LB_SmartVision/Program.cs | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/LB_SmartVision/Program.cs b/LB_SmartVision/Program.cs
index 1885513..d27db66 100644
--- a/LB_SmartVision/Program.cs
+++ b/LB_SmartVision/Program.cs
@@ -24,21 +24,26 @@
System.Threading.Mutex mutex = new System.Threading.Mutex(true, System.Windows.Forms.Application.ProductName, out ret);
if (ret)
{
+ ////登录验证权限
MainWindow.InstanceLoginandConfirmation().ShowDialog();
if (!MainWindow.InstanceLoginandConfirmation().isQuit && MainWindow.InstanceLoginandConfirmation().correctUser)
{
MainWindow.InstanceLoginandConfirmation().closeLoginFrm();
- Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
- System.Windows.Forms.Application.EnableVisualStyles();
- System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
- System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
- System.Windows.Forms.Application.ThreadException += (sender, e) => HandleException(e.Exception);
- AppDomain.CurrentDomain.UnhandledException += (sender, e) => HandleException(e.ExceptionObject as Exception);
- // To customize application configuration such as set high DPI settings or default font,
- // see https://aka.ms/applicationconfiguration.
- System.Windows.Forms.Application.Run(new VisionForm());
}
- // Main 为你程序的主窗体,如果是控制台程序不用这句
+ else
+ {
+ MainWindow.InstanceLoginandConfirmation().closeLoginFrm();
+ }
+ //// Main 为你程序的主窗体,如果是控制台程序不用这句
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+ System.Windows.Forms.Application.EnableVisualStyles();
+ System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
+ System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
+ System.Windows.Forms.Application.ThreadException += (sender, e) => HandleException(e.Exception);
+ AppDomain.CurrentDomain.UnhandledException += (sender, e) => HandleException(e.ExceptionObject as Exception);
+ //// To customize application configuration such as set high DPI settings or default font,
+ //// see https://aka.ms/applicationconfiguration.
+ System.Windows.Forms.Application.Run(new VisionForm());
mutex.ReleaseMutex();
}
else
--
Gitblit v1.9.3