lg
2024-09-06 3d6533f1381e3e513ffb3d65bf34fb254f967088
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using DevExpress.LookAndFeel;
using DevExpress.Skins;
using DevExpress.UserSkins;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
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);
                //Application.Run(new Gs.DevApp.TestForm.FluentDesignForm1());
                DevFrm.FrmLogin fmLogin = new DevFrm.FrmLogin();
                fmLogin.ShowDialog();
                if (fmLogin.DialogResult == DialogResult.OK)
                {
                    Application.Run(new DevFrm.FrmMain());
                }
            }
        }
    }
 
 
}