From 4bc7030c4cea5b3deed0c938ec388ae94e33c51c Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 25 十月 2024 09:42:36 +0800
Subject: [PATCH] 修改会页

---
 DevApp/Gs.DevApp/Program.cs |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/DevApp/Gs.DevApp/Program.cs b/DevApp/Gs.DevApp/Program.cs
new file mode 100644
index 0000000..0420d87
--- /dev/null
+++ b/DevApp/Gs.DevApp/Program.cs
@@ -0,0 +1,50 @@
+锘縰sing System;
+using System.Diagnostics;
+using System.Windows.Forms;
+
+namespace Gs.DevApp
+{
+    static class Program
+    {
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            var processName = System.IO.Path.GetFileNameWithoutExtension(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
+            var processes = Process.GetProcessesByName(processName);
+            if (processes.Length > 1)
+            {
+                MessageBox.Show("绋嬪簭宸茬粡鍦ㄨ繍琛岋紒");
+                Environment.Exit(0);
+            }
+            else
+            {
+                Application.EnableVisualStyles();
+                Application.SetCompatibleTextRenderingDefault(false);
+                _startLogin();
+            }
+        }
+        /// <summary>
+        /// 鐧诲綍椤靛惎鍔�
+        /// </summary>
+        private static void _startLogin()
+        {
+            //Application.Run(new TestForm.XtraForm1());
+            //return;
+
+            DevFrm.FrmLogin fmLogin = new DevFrm.FrmLogin();
+            if (fmLogin.IsDisposed == false)
+            {
+                fmLogin.ShowDialog();
+                if (fmLogin.DialogResult == DialogResult.OK)
+                {
+                    Application.Run(new DevFrm.FrmMain());
+                }
+            }
+            else
+                Application.Exit();
+        }
+    }
+}

--
Gitblit v1.9.3