private void btn_Giris_Click(object sender, EventArgs e) { try { USER usr = DB.USERs.First(s => s.USERNAME == txtUserName.Text && s.PASSWORD == txtPassword.Text); if (usr.ISACTIVE == true) { usr.ISONLINE = true; DB.SubmitChanges(); Classes.ClsUser.UserName = usr.USERNAME; Classes.ClsUser.UserID = usr.USERID; this.Close(); } else { MessageBox.Show("Aktif Degilsin", "ADMIN", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception) { MessageBox.Show("kullanici adi veya parola hatasi"); } } What I have tried: private void Parola_Animsa() { if (!Directory.Exists(Application.StartupPath + "\\Pasword")) { Directory.CreateDirectory(Application.StartupPath + "\\Pasword"); } string possibleFileName = (Application.StartupPath + "\\Pasword\\" + Classes.ClsUser.UserName + "#Public" + ".EdL"); if (File.Exists(possibleFileName)) { string content = File.ReadAllText(possibleFileName); txtPassword.Text = content; } } private void checkBox1_CheckedChanged(object sender, EventArgs e) { Parola_Animsa(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)