private void FrmLogin_Load(object sender, EventArgs e) { RegistryManager.CreateRegistryKeyReg(); txtLogin.Text = RegistryManager.GetLastLogin(); chRememberPassword.Checked = RegistryManager.GetRememberPasswordCheck(); if (chRememberPassword.Checked) { txtPassword.Text = RegistryManager.GetPassword(); } if (!RegistryManager.RegistryIsWritten()) { btnSettings_Click(this, null); } else { GetData(); } }