private void ckM_Button1_Click(object sender, EventArgs e)
        {
            ForceToclose();
            // this.Hide();
            CapitalsportsLogin hln = new CapitalsportsLogin();

            this.Hide();
            hln.ShowDialog();
            this.Close();
        }
Esempio n. 2
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);
        }