Пример #1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length == 1 && args[0].CompareTo("DEBUG") == 0)
            {
                LoginUserInfo m_currentLoginUser = new LoginUserInfo();

                if (AccessAuthorization.getInctance().passwordIsValidate("Manager", "Manager", out m_currentLoginUser))
                //if (AccessAuthorization.getInctance().passwordIsValidate("老王", "12345", out m_currentLoginUser))
                {
                    DbPublic.getInctance().setCurrentLoginUserName(m_currentLoginUser.staffName);
                    DbPublic.getInctance().setCurrentLoginUserID(m_currentLoginUser.pkey);

                    //Application.Run(new FormProjectInfoTrack(FormProjectInfoTrack.OrderType.ALL));
                    //Application.Run(new FormTransfer());
                    //Application.Run(new FormProjectMaterielChangeOrder(1, "123"));
                    //Application.Run(new FormProductionReport());
                    Application.Run(new FormMain());

                    return;
                }
            }

            FormLogin login = new FormLogin();

            login.ShowDialog();

            if (login.loginSuccessful())
            {
                Application.Run(new FormMain());
            }
        }
Пример #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FormLogin login = new FormLogin();

            login.ShowDialog();

            if (login.loginSuccessful())
            {
                Application.Run(new FormMain());
            }
        }