private void CloseCanva_Click(object sender, EventArgs e) { if ((ActiveMdiChild as Canvas).Saved == false) { DialogResult result = MessageBox.Show($"Вы хотите сохранить изменения в файле {(ActiveMdiChild as Canvas).Name}?", "My Paint", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (result == DialogResult.OK) { var m_SaveFileDialog = new SaveFileDialog(); m_SaveFileDialog.Filter = @"*.bmp|*.bmp|*.jpg|*.jpg|*.png|*.png|*.gif|*.gif"; m_SaveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures); if (m_SaveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string filename = m_SaveFileDialog.FileName; if ((ActiveMdiChild as Canvas).curimage != null) { (ActiveMdiChild as Canvas).curimage.Save(filename); (ActiveMdiChild as Canvas).Saved = true; } filenames[ActiveMdiChild.Name] = filename; } for (int i = 0; i < WindowsButton.DropDownItems.Count; i++) { if (WindowsButton.DropDownItems[i].Name == ActiveMdiChild.Name) { WindowsButton.DropDownItems[i].Dispose(); } } if (filenames.ContainsKey(ActiveMdiChild.Name)) { filenames.Remove(ActiveMdiChild.Name); } ActiveMdiChild.Close(); } } else { for (int i = 0; i < WindowsButton.DropDownItems.Count; i++) { if (WindowsButton.DropDownItems[i].Name == ActiveMdiChild.Name) { WindowsButton.DropDownItems[i].Dispose(); } } if (filenames.ContainsKey(ActiveMdiChild.Name)) { filenames.Remove(ActiveMdiChild.Name); } ActiveMdiChild.Close(); } }
private void searchBooksToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmSearchBooks searchBooks = new frmSearchBooks(); searchBooks.Show(); searchBooks.MdiParent = this; }
private void profileToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } UserRegistration UserRegistration = new UserRegistration(); UserRegistration.MdiParent = this; UserRegistration.Show(); }
private void patientToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } PrescriptionDetails PrescriptionDetails = new PrescriptionDetails(); PrescriptionDetails.MdiParent = this; PrescriptionDetails.Show(); }
private void addLabTestToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } AddLabTests AddLabTests = new AddLabTests(); AddLabTests.MdiParent = this; AddLabTests.Show(); }
private void btnKlijenti_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmKlijenti frmKlijent = new frmKlijenti(); frmKlijent.MdiParent = this; frmKlijent.Show(); }
private void btnRacuni_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmRacuni frmRacuni = new frmRacuni(); frmRacuni.MdiParent = frmRacuni.ActiveForm; frmRacuni.Show(); }
private void btnPregledRezervacije_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmPregledRezervacija frmPregledRez = new frmPregledRezervacija(); frmPregledRez.MdiParent = frmPregledRezervacija.ActiveForm; frmPregledRez.Show(); }
private void mnuFileClose_Click(object sender, EventArgs e) { try { ActiveMdiChild.Close(); } catch (NullReferenceException nre) { MessageBox.Show("No forms to close", "Close Error"); } }
private void btnIzaberiArtikle_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmNarudzbaArtikli frmNazArtikli = new frmNarudzbaArtikli(); frmNazArtikli.MdiParent = frmNarudzbaArtikli.ActiveForm; frmNazArtikli.Show(); }
private void MenuThoat_Click(object sender, EventArgs e) { if (ActiveMdiChild == null) { Close(); } while (ActiveMdiChild != null) { ActiveMdiChild.Close(); } }
private void returnBookToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmBookReturn bookReturn = new frmBookReturn(); bookReturn.Show(); bookReturn.MdiParent = this; }
private void viewBookIssueToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmViewIBookIssue bookIssue = new frmViewIBookIssue(); bookIssue.Show(); bookIssue.MdiParent = this; }
private void borrowBookToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmBorrowBook borrowBook = new frmBorrowBook(); borrowBook.Show(); borrowBook.MdiParent = this; }
private void hesapKApatToolStripMenuItem_Click_1(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } FrmHesapKapatma y = new FrmHesapKapatma(BankApp); y.MdiParent = this; y.Show(); }
private void btnPovratak_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmKlijenti frmKlijent = new frmKlijenti(); frmKlijent.MdiParent = frmKlijenti.ActiveForm; frmKlijent.Show(); }
private void zatvoriToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild == null) { this.Close(); } else { ActiveMdiChild.Close(); } }
private void btnPovratak_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmDobavljaci frmDobavljac = new frmDobavljaci(); frmDobavljac.MdiParent = frmDobavljaci.ActiveForm; this.Close(); }
private void btnProdaja_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmProdaja frmProdaja = new frmProdaja(); frmProdaja.MdiParent = frmProdaja.ActiveForm; frmProdaja.Show(); }
private void hesapÖzetiToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } FrmHesapOzeti y = new FrmHesapOzeti(BankApp); y.MdiParent = this; y.Show(); }
private void btnArtikli_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmPregledArtikla openPregledArtikla = new frmPregledArtikla(); openPregledArtikla.MdiParent = this; openPregledArtikla.Show(); }
private void paraÇekYatırToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } FrmParaYatirmaVeCekme y = new FrmParaYatirmaVeCekme(BankApp); y.MdiParent = this; y.Show(); }
private void btnNarudzba_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmPregledNarudzbenica frmPregledNar = new frmPregledNarudzbenica(); frmPregledNar.MdiParent = this; frmPregledNar.Show(); }
private void havaleGönderToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } FrmHavale y = new FrmHavale(BankApp); y.MdiParent = this; y.Show(); }
private void addDrugsToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } DrugInfo Druginfo = new DrugInfo(); Druginfo.MdiParent = this; Druginfo.Show(); }
private void gelirGiderListesiToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } FrmBankaGelirGider y = new FrmBankaGelirGider(BankApp); y.MdiParent = this; y.Show(); }
private void ptientInfoToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } PatientInfoReport PatientInfoReport = new PatientInfoReport(); PatientInfoReport.MdiParent = this; PatientInfoReport.Show(); }
private void müşteriBilgileriToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } MusteriBilgi y = new MusteriBilgi(BankApp); y.MdiParent = this; y.Show(); }
private void menuItemClose_Click(object sender, System.EventArgs e) { if (dockPanel.DocumentStyle == DocumentStyle.SystemMdi) { ActiveMdiChild.Close(); } else if (dockPanel.ActiveDocument != null) { dockPanel.ActiveDocument.DockHandler.Close(); } }
private void btnDodaj_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmDodajDobavljaca frmDodaj = new frmDodajDobavljaca(); frmDodaj.MdiParent = frmDodajDobavljaca.ActiveForm; frmDodaj.Show(); }