コード例 #1
0
        void mnuCity_Click(object sender, EventArgs e)
        {
            Form fc           = Application.OpenForms["FrmCity"];
            Form fcParentMenu = Application.OpenForms["FrmMainScreen"];

            if (fc != null)
            {
                fc.Focus();
            }
            else
            {
                FrmCity f1 = new FrmCity();
                f1.MdiParent = fcParentMenu;
                f1.Show();
            }
        }
コード例 #2
0
        private void cityToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form fc           = Application.OpenForms["FrmUserManagement"];
            Form fcParentMenu = Application.OpenForms["FrmMainScreen"];

            if (fc != null)
            {
                fc.Focus();
            }
            else
            {
                FrmCity f1 = new FrmCity();
                f1.MdiParent = fcParentMenu;
                f1.Show();
            }
        }
コード例 #3
0
ファイル: open.cs プロジェクト: jithuin/infogeezer
        public static void cityFrm(byte player, int city, System.Windows.Forms.Control parent)
        {
            wC.show = true;
            FrmCity frm2 = new FrmCity(player, city);

            if (parent != null)
            {
                string title = parent.Text;
                parent.Text = "";

                wC.show = false;
                frm2.ShowDialog();

                parent.Text = title;
            }
            else
            {
                wC.show = false;
                frm2.ShowDialog();
            }
        }