コード例 #1
0
ファイル: Program.cs プロジェクト: svn2github/eztx
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Login());

            // 读取数据库配置 start
            LinkMySql lms = new LinkMySql();
            lms.getSQLcfg("" + Global.soft_server_url + "\\MySQLConfig.xml");
            // 读取数据库配置 end

            Global.user_name = "";
            Login l = new Login();
            if (l.ShowDialog() == DialogResult.OK)//如果等于ok,就证明通过验证,则打开main窗口
            {
                string _user = Global.user_name;
                main ma = new main();
                Application.Run(ma);

                if (ma.IsDisposed)
                {
                    //程序关闭时写数据库
                    if (_user.Length > 0)
                    {
                        quitWriteSql();
                    }
                }
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: svn2github/eztx
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Login());

            loadMySQLCfg();

            Global.user_name = "";
            Login l = new Login();
            if (l.ShowDialog() == DialogResult.OK)//如果等于ok,就证明通过验证,则打开main窗口
            {
                string _user = Global.user_name;
                main ma = new main();
                Application.Run(ma);

                if (ma.IsDisposed)
                {
                    //程序关闭时写数据库
                    if (_user.Length > 0)
                    {
                        quitWriteSql();
                    }
                }
            }
        }