コード例 #1
0
        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();
        }
コード例 #2
0
        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);
                }
            }
        }