void tried_login()
 {
     if (get_type == -1)
     {
         MessageBoxEx.Show("Internet not available!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Application.Exit();
     }
     else if (get_type == 1)
     {
         MessageBoxEx.Show("Username not exists!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         FrmLogin frm = new FrmLogin();
         frm.ShowDialog(this);
     }
     else if (get_type == 1)
     {
         MessageBoxEx.Show("Password incorrect!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         FrmLogin frm = new FrmLogin();
         frm.ShowDialog(this);
     }
     else
     {
         Gib.username = uname;
         Gib.password = pword;
     }
 }
 private void FrmMain_Load(object sender, EventArgs e)
 {
     if (!Directory.Exists("C:\\ProgramData\\CW Soft"))
         Directory.CreateDirectory("C:\\ProgramData\\CW Soft");
     if (!Directory.Exists(Gib.hostpath))
         Directory.CreateDirectory(Gib.hostpath);
     if (!File.Exists(Gib.hostpaths + "username"))
     {
         FrmLogin frm = new FrmLogin();
         frm.ShowDialog(this);
     }
     else
     {
         get_user_info();
         login_check(Gib.username, Gib.password);
         btnLearnWords.Enabled = btnManageWords.Enabled = btnLogout.Enabled = true;
     }
 }