private void SimctoolStripMenuItem_Click(object sender, EventArgs e) { var frm = new frmSimc(CitySQL.SelectAllPlaceFromSimc()); SetFormProperties(frm); SimctoolStripMenuItem.Enabled = false; frm.TheEnd += (s, ex) => SimctoolStripMenuItem.Enabled = true; frm.Show(); }
private void cmdSimc_Click(object sender, EventArgs e) { using (var dlg = new frmSimc(CitySQL.SelectPlaceFromSimc())) { dlg.FormBorderStyle = FormBorderStyle.FixedDialog; dlg.MaximizeBox = false; dlg.MinimizeBox = false; dlg.cmdOK.Visible = true; dlg.cmdCancel.Text = "Anuluj"; dlg.AcceptButton = cmdOK; dlg.CancelButton = cmdCancel; if (dlg.ShowDialog() == DialogResult.OK) { LoadCity(dlg.City, true); } } }