private void ShowChild(Form listForm, Form parent) { ActiveMdiChild?.Close(); foreach (var mdiChild in MdiChildren) { mdiChild.Close(); } listForm.MdiParent = parent; listForm.WindowState = FormWindowState.Maximized; listForm.Show(); ThemeResolutionService.ApplyThemeToControlTree(listForm, ThemeName); ActivateMdiChild(listForm); }
private void page3ToolStripMenuItem2_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. GlassdoorPage3 child = new GlassdoorPage3(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Glassdoor Problems " + "Page 3"; child.Text = formText; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void microsoftInterviewQuestionPage1ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. MicrosoftIQ child = new MicrosoftIQ(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Microsoft Interview Questions " + "Page 1"; child.Text = formText; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void arrayPage6ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. ArrayAndString child = new ArrayAndString(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Array and String " + "Page 6"; child.Text = formText; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void binaryManipulationPage2ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. BitManipulation1 child = new BitManipulation1(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Bit Manipulation" + "Page 2"; child.Text = formText; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void MainWindow_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.D) { cloneWindowToolStripMenuItem_Click(sender, e); } else if (e.Control && e.KeyCode == Keys.O) { openFileToolStripMenuItem_Click(sender, e); } else if (e.Control && e.KeyCode == Keys.S) { ZapiszCTRLSToolStripMenuItem_Click(sender, e); } else if (e.Control && e.KeyCode == Keys.W) { if (ActiveMdiChild != null && ActiveMdiChild.GetType() != typeof(SteganographyPreviewWindow)) { ActiveMdiChild.Close(); } } }
private void linkedListPage1ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. LinkedListPage1 child = new LinkedListPage1(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Linked List" + "Page 1"; child.Text = formText; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void set1ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. AmazonQuestion1Page1 child = new AmazonQuestion1Page1(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Amazon Questions" + "Page 1"; child.Text = formText; child.Dock = DockStyle.Fill; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void btnOdaberi_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { DBClass.Dobavljac dobavljac = new DBClass.Dobavljac(); int odabrani = int.Parse(dataGridView1.SelectedCells[0].Value.ToString()); dobavljac.DohvatiDobavljace(odabrani); ListClass.iDDovacljaca = odabrani; ListClass.listaDobavljaca = dobavljac.ListaDobavljaca(dobavljac); if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmNarudzbenica frmNar = new frmNarudzbenica(); frmNar.MdiParent = frmNarudzbenica.ActiveForm; frmNar.Show(); } else { MessageBox.Show("Niste odabrali dobavljača!"); } }
private void page1ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. Form1 child = new Form1(); child.Location = new System.Drawing.Point(50, 50); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Array and String " + "Page 1"; child.Text = formText; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void cerrarSesionToolStripMenuItem_Click(object sender, EventArgs e) { if (Globals.username == "") { Mensaje_Error("¡Todavía no inicio sesión!", "Inicie una sesión"); return; } var mensaje = Mensaje_Pregunta("¿Desea cerrar la sesión actual: " + Globals.username + "?", "Cerrar sesión"); if (mensaje == DialogResult.No) { return; } Globals.cerrarSesion(); if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } Login.Login login = new Login.Login(); login.mostrar(this); this.menuStrip1.Visible = false; }
private void transferToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { if (ActiveMdiChild.GetType().Name != "Form3") { ActiveMdiChild.Close(); Form3 obj2 = new Form3(); obj2.MdiParent = this; obj2.Show(); } else { MessageBox.Show("Form is already open"); } } else { Form3 obj2 = new Form3(); obj2.MdiParent = this; obj2.Show(); } }
private void btnSelect_Click(object sender, EventArgs e) { if (lvBookReturn.SelectedItems.Count == 0) { MessageBox.Show("Please select a book to return", "Return Book", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } GlobalVariable.selectedIssueID = int.Parse(lvBookReturn.SelectedItems[0].SubItems[1].Text); if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmBookReturn bookReturn = new frmBookReturn() { MdiParent = MdiParent }; bookReturn.Show(); //bookReturn.MdiParent = this; }
private void btnOdabirKlijenta_Click(object sender, EventArgs e) { if (dgvKlijent.SelectedRows.Count > 0) { DBClass.Kupac klijent = new DBClass.Kupac(); int odabrani = int.Parse(dgvKlijent.SelectedCells[0].Value.ToString()); klijent.DohvatiKlijenta(odabrani); ListClass.iDKlijenta = odabrani; ListClass.listaKlijenta = klijent.ListaKlijenta(klijent); if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmRezervacija frmRez = new frmRezervacija(); frmRez.MdiParent = frmRezervacija.ActiveForm; frmRez.Show(); } else { MessageBox.Show("Niste odabrali Klijenta!"); } }
private void techCompaniesPage5ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. TechCompanyPage5 child = new TechCompanyPage5(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Tech companies" + "Page 5"; child.Text = formText; child.Dock = DockStyle.Fill; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void page2ToolStripMenuItem1_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. GLHardProblems_Page2 child = new GLHardProblems_Page2(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Gayle Lakkmann Hard Problems" + "Page 2"; child.Text = formText; child.Dock = DockStyle.Fill; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void expediaPage1ToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } // Create a new form to represent the child form. ProblGlassdoorPage1 child = new ProblGlassdoorPage1(); // Increment the private child count. childFormNumber++; // Set the text of the child form using the count of child forms. String formText = "Tech Companies Interview Questions" + "Page 1"; child.Text = formText; // Make the new form a child form. child.MdiParent = this; // Display the child form. child.Show(); }
private void btnDodaj_Click(object sender, EventArgs e) { int broj = 0; if (int.TryParse(txtCijena.Text.Trim(), out broj) && int.TryParse(txtKolicina.Text.Trim(), out broj)) { artikli.ID_vrsta_artikla = int.Parse(cmboxTipArtikla.SelectedValue.ToString()); artikli.Naziv = txtNaziv.Text; artikli.Cijena = int.Parse(txtCijena.Text); artikli.Kolicina = int.Parse(txtKolicina.Text); artikli.Unos(); if (MessageBox.Show("Uspiješno ste unijeli artikl: " + artikli.Naziv + "\nŽelite li unijeti novi artikl?", "Provjera", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { cmboxTipArtikla.Text = "Tip artikla"; txtNaziv.Text = "Naziv artikla"; txtCijena.Text = "Cijena artila"; txtKolicina.Text = "Kolicina artikla"; } else { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmPregledArtikla pregledArtikla = new frmPregledArtikla(); pregledArtikla.MdiParent = frmPregledArtikla.ActiveForm; pregledArtikla.Show(); } } else { MessageBox.Show("Cijena i količina moraju biti brojevi"); } }
private void toolStripButton1_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } this.IsMdiContainer = false; listView1.Visible = true; button1.Visible = true; button2.Visible = true; button3.Visible = true; button4.Visible = true; button5.Visible = true; label2.Visible = true; label3.Visible = true; label4.Visible = true; label5.Visible = false; label6.Visible = true; comboBox1.Visible = true; textBox1.Visible = true; textBox2.Visible = true; textBox3.Visible = true; label1.Visible = false; }
private void משחקחדשToolStripMenuItem_Click(object sender, EventArgs e) { isOpenSaveGame = false; isOpenNewGame = true; if (ActiveMdiChild != null && ActiveMdiChild.Name == "FormAttributes") { //להעתיק את כל הקטע הזה ActiveMdiChild.Controls[8].Visible = true; //label1 ActiveMdiChild.Controls[2].Enabled = true; //groupBox1 ActiveMdiChild.Controls[9].Visible = false; //groupBox2 ActiveMdiChild.Controls[0].Visible = false; //groupBox3 ActiveMdiChild.Controls[3].Visible = false; //pnlplayer1 ActiveMdiChild.Controls[4].Visible = false; //pnlplayer2 ActiveMdiChild.Controls[5].Visible = false; //pnlplayer4 ActiveMdiChild.Controls[6].Visible = false; //pnlplayer3 ActiveMdiChild.Controls[7].Visible = false; //btnOkNamesKinds } else if (ActiveMdiChild != null && ActiveMdiChild.Name == "FormGame") { if (!isNetworkGame) { Form fs = new FormSaveGame(ActiveMdiChild); fs.Show(); } else { ActiveMdiChild.Close(); } } else if (ActiveMdiChild == null) { Form fw = new FormWellcome(this); fw.MdiParent = this; fw.Show(); } }
public void MostrarElementosDoFormLogin() { ActiveMdiChild.Close(); AlterarVisibilidadeDosElementos(true); }
private void Paint_FormClosing(object sender, FormClosingEventArgs e) { for (int i = 0; i < filenames.Count; i++) { if ((ActiveMdiChild as Canvas).Saved == false) { DialogResult result = MessageBox.Show($"Вы хотите сохранить изменения в файле {(ActiveMdiChild as Canvas).Name}?", "My Paint", MessageBoxButtons.YesNo, 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 j = 0; j < WindowsButton.DropDownItems.Count; j++) { if (WindowsButton.DropDownItems[j].Name == ActiveMdiChild.Name) { WindowsButton.DropDownItems[j].Dispose(); } } if (filenames.ContainsKey(ActiveMdiChild.Name)) { filenames.Remove(ActiveMdiChild.Name); } ActiveMdiChild.Close(); } else { for (int j = 0; j < WindowsButton.DropDownItems.Count; j++) { if (WindowsButton.DropDownItems[j].Name == ActiveMdiChild.Name) { WindowsButton.DropDownItems[j].Dispose(); } } if (filenames.ContainsKey(ActiveMdiChild.Name)) { filenames.Remove(ActiveMdiChild.Name); } ActiveMdiChild.Close(); } } else { for (int j = 0; j < WindowsButton.DropDownItems.Count; j++) { if (WindowsButton.DropDownItems[j].Name == ActiveMdiChild.Name) { WindowsButton.DropDownItems[j].Dispose(); } } if (filenames.ContainsKey(ActiveMdiChild.Name)) { filenames.Remove(ActiveMdiChild.Name); } ActiveMdiChild.Close(); } } }
private void closeToolStripMenuItem_Click(object sender, EventArgs e) { ActiveMdiChild.Close(); openToolStripMenuItem.Enabled = true; closeToolStripMenuItem.Enabled = false; }
private void _miFileClose_Click(object sender, System.EventArgs e) { ActiveMdiChild.Close(); }
private void closeToolStripMenuItem_Click(object sender, EventArgs e) { ActiveMdiChild.Close(); }
private void CloseKubeConfigMenuItem_Click(object sender, EventArgs e) { ActiveMdiChild?.Close(); }
private void закрытьToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) ActiveMdiChild.Close(); }
private void MnuFClose_Click(object sender, EventArgs e) { ActiveMdiChild?.Close(); }
private void menuClose_Click(object sender, EventArgs e) { ActiveMdiChild.Close(); }
private void close2_Click(object sender, EventArgs e) { // закрываем активную дочернюю форму ActiveMdiChild.Close(); }