From 4787609e9eafd73398dfc699cc0434f8617d68c9 Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期三, 07 一月 2026 16:50:44 +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