コード例 #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            ForceToClose();
            MainmenuLogin hln = new MainmenuLogin();

            this.Hide();
            hln.ShowDialog();
            this.Close();
        }
コード例 #2
0
 private void Main_Menu_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.F1)
     {
         this.Close();
     }
     else if (e.KeyData == Keys.F12)
     {
         ForceToClose();
         MainmenuLogin hln = new MainmenuLogin();
         this.Hide();
         hln.ShowDialog();
         this.Close();
     }
 }
コード例 #3
0
        static Form LoginFormName()
        {
            Form         pgname = null;
            const string path   = "ftp://202.223.48.145/Sync/";

            Login_BL.SyncPath = path;
            const string localpath = @"C:\SMS\AppData\CKM.ini";

            if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
            {
                FTPData ftp = new FTPData();
                if (!System.IO.File.Exists(localpath))
                {
                    FTPData.Download("CKM.ini", path, "Administrator", "c@p!+A1062O", @"C:\SMS\AppData\");
                }
                //else
                //{
                //    ftp.UpdateSyncData("ftp://202.223.48.145/NewlyModified/");
                //    // Cursor = Cursors.WaitCursor;
                //    // this.Cursor = Cursors.Default;
                //}

                Login_BL.Islocalized = false;
            }
            else
            {
                Login_BL.Islocalized = true;
            }
            if (lbl.ReadConfig())
            {
                if (Base_DL.iniEntity.Login_Type == "CapitalMainMenuLogin")
                {
                    pgname = new MainmenuLogin();
                }
                else if (Base_DL.iniEntity.Login_Type == "HaspoMainMenuLogin")
                {
                    pgname = new HaspoLogin();
                }
                else if (Base_DL.iniEntity.Login_Type == "CapitalStoreMenuLogin")
                {
                    //   var f = Base_DL.iniEntity.IsDM_D30Used;


                    pgname = new CapitalsportsLogin();
                }
                else if (Base_DL.iniEntity.Login_Type == "HaspoStoreMenuLogin")
                {
                    pgname = new Haspo.HaspoStoreMenuLogin();
                }
                else if (Base_DL.iniEntity.Login_Type == "TennicMainMenuLogin")
                {
                    pgname = new TennicLogin();
                }
                else
                {
                    MessageBox.Show("The program cannot initialize with the specified server instaces  inside CKM.ini file. PLease fix ini file!!!!");
                    Environment.Exit(0);
                }
            }
            return(pgname);
        }