private void FrmMain_Load(object sender, EventArgs e)
 {
     IsMdiContainer = true;
     using (SplashFrm SC = new SplashFrm())// Show Splash Screen..
         SC.ShowDialog();
     using (LoginFrm FrmLogin = new LoginFrm())// Show Login Screen..
         FrmLogin.ShowDialog();
     RebuildForms();
     if (File.Exists(MyCL.FileName))
         UserLookAndFeel.Default.SetSkinStyle(LoadSettings(MyCL.FileName).SkinName);
     LoadCReports();// Load Struc CReports Into LUE;
     //EnableMenuItem();
 }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LoginFrm _LoginFrm = new LoginFrm();

            _LoginFrm.ShowDialog();

            if (_LoginFrm.DialogResult == DialogResult.OK)
            {
                BienvenidoFrm bienvenido = new BienvenidoFrm();
                bienvenido.ShowDialog();
                if (bienvenido.DialogResult == DialogResult.OK)
                {
                    Application.Run(new PrincipalFrm());
                }
            }
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!textBoxOldPwd.Text.Equals(Parameter.user.Password))
            {
                MessageBox.Show("原密码输入错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                textBoxOldPwd.Text = "";
                return;
            }

            if (!textBoxNewPwd.Text.Equals(textBoxConfirmPwd.Text))
            {
                MessageBox.Show("新密码两次输入不一致!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                textBoxNewPwd.Text     = "";
                textBoxConfirmPwd.Text = "";
                return;
            }

            Parameter.user.Password = textBoxConfirmPwd.Text;
            MessageLocal msg = userDao.updatePwd(Parameter.user);

            if (!msg.IsSucess)
            {
                MessageBox.Show(msg.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                Parameter.user = null;

                LoginFrm loginFrm = new LoginFrm();
                loginFrm.setIsOpenMain(false);
                loginFrm.ShowDialog();
                if (null == Parameter.user)
                {
                    this.Close();
                    return;
                }
            }

            // 重新加载用户权限
            this.Close();
        }
        private void MainFrm_Load(object sender, EventArgs e)
        {

            //Load Reports from file and create its item in the interface
            LoadSQLReports();
            //Load Skins and layout
            DevExpress.XtraBars.Helpers.SkinHelper.InitSkinGallery(galleryControlSkins, true);
            UserLookAndFeel.Default.StyleChanged += Default_StyleChanged;
            if (System.IO.File.Exists(FXFW.SqlDB.StyleSettingsPath))
                UserLookAndFeel.Default.SetSkinStyle(LoadSettings(FXFW.SqlDB.StyleSettingsPath).SkinName);
            if (System.IO.File.Exists(FXFW.SqlDB.duckSettingsPath))
                dockManagerMain.RestoreLayoutFromXml(FXFW.SqlDB.duckSettingsPath);
            // Show Splash Screen..
            using (SplashFrm SC = new SplashFrm())
                SC.ShowDialog();
            // Show Login Screen..
            using (LoginFrm FrmLogin = new LoginFrm())
            {
                // Create Administrator user if not exists b4 show login form
                RoleDetialFrm role = new RoleDetialFrm();
                role.PrepareAdminRole();
                role.Dispose();

                FrmLogin.ShowDialog();
            }
            //must choose asase_code to enable the application //Load CD_Asase
            LoadAsase();

            LoadUserPriv(FXFW.SqlDB.UserInfo.UserID);
        }