private void MainForm_Load(object sender, EventArgs e) { txt_kullanici.Text = _kullanici.AdSoyad; if (_kullanici.Sifre == "admin") { MessageBox.Show("Şifreniz Varsayılan Olduğu İçin Değiştiriniz", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information); SifreDegistir form = new SifreDegistir(_kullanici); form.MdiParent = this; form.StartPosition = FormStartPosition.CenterParent; form.Show(); this.Hide(); } }
private void profilAyarlarıToolStripMenuItem_Click(object sender, EventArgs e) { Form kontrol = Application.OpenForms["SifreDegistir"]; if (kontrol == null) { SifreDegistir form = new SifreDegistir(_kullanici); form.MdiParent = this; form.StartPosition = FormStartPosition.CenterParent; form.Show(); } else { acıkForm = Application.OpenForms["SifreDegistir"]; acıkForm.Focus(); } }