Beispiel #1
0
        /// <summary>フォームロードのUOCメソッド</summary>
        protected override void UOC_FormInit()
        {
            //base.UOC_FormInit();

            // 画面数とIDを画面に表示する。
            this.txtStatus.Text = string.Format("現在 {0}枚目の表示",
                                                MyBaseControllerWin.GetWindowsCount(this.GetType()));

            this.txtGuid.Text = string.Format("画面を識別するID:{0}", this.ID);
        }
 /// <summary>画面起動</summary>
 protected void UOC_btnOpenForm2_Click(RcFxEventArgs rcFxEventArgs)
 {
     if (MyBaseControllerWin.GetWindowsCount(typeof(Form2)) > 3)
     {
         MessageBox.Show("5画面以上は起動できません。");
     }
     else
     {
         Form2 f = new Form2();
         f.Show();
     }
 }
Beispiel #3
0
        /// <summary>Formを識別するIDをリストする</summary>
        protected void UOC_btnFormList_Click(RcFxEventArgs rcFxEventArgs)
        {
            string temp = "";

            // 当該Formインスタンスリストを取得する。
            List <Form> fl =
                MyBaseControllerWin.GetWindowInstances(this.GetType());

            // 表示する文字列を作成する。
            foreach (Form2 f2 in fl)
            {
                temp += "・" + f2.ID + "\r\n";
            }

            // メッセージボックスにリストする。
            MessageBox.Show(temp, "Form2のID一覧",
                            MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Beispiel #4
0
        /// <summary>画面起動</summary>
        protected void UOC_btnOpenForm2_Click(RcFxEventArgs rcFxEventArgs)
        {
            if (MyBaseControllerWin.GetWindowsCount(typeof(Form2)) > 3)
            {
                MessageBox.Show("5画面以上は起動できません。");
            }
            else
            {
                Form2 f = new Form2();
                f.Show();

                //// イベント二重登録対策のテスト
                //f.ShowDialog();
                //f.Hide();
                //f.ShowDialog();
                //// ココで、Form2のイベントが2回実行される。
                //f.Hide();
            }
        }