コード例 #1
0
        ///<summary>
        ///judTokuisakiKeyDown
        ///コード入力項目でのキー入力判定
        ///</summary>
        private void judTokuisakiKeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F9)
            {
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    TorihikikbnList torihikikbnList = new TorihikikbnList(this.Parent.Parent, this);
                    torihikikbnList.StartPosition = FormStartPosition.Manual;
                    torihikikbnList.intFrmKind    = CommonTeisu.FRM_TOKUISAKI;
                    torihikikbnList.ShowDialog();
                }
                else
                {
                    TorihikikbnList torihikikbnList = new TorihikikbnList(this.Parent, this);
                    torihikikbnList.StartPosition = FormStartPosition.Manual;
                    torihikikbnList.intFrmKind    = CommonTeisu.FRM_TOKUISAKI;
                    torihikikbnList.ShowDialog();
                }
            }
            else if (e.KeyCode == Keys.Enter)
            {
                //TABボタンと同じ効果
                SendKeys.Send("{TAB}");
            }

            //入金入力、支払入力の場合
            //if (this.Parent.Name == "B0040_NyukinInput" || this.Parent.Name == "B0060_ShiharaiInput")
            if (this.Parent.Name == "JuchuInput_Test")
            {
                if (e.KeyCode == Keys.Up)
                {
                    //SendKeys.SendWait("^{TAB}");
                    this.SelectNextControl(this.ActiveControl, false, true, true, true);
                }
                else if (e.KeyCode == Keys.Down)
                {
                    //TABボタンと同じ効果
                    SendKeys.Send("{TAB}");
                }
            }
        }
コード例 #2
0
        ///<summary>
        ///shoTorihikikbn
        ///コード入力項目でのキー入力判定
        ///</summary>
        private void shoTorihikikbn()
        {
            //取引区分リストのインスタンス生成
            TorihikikbnList torihikikbnList = new TorihikikbnList(this);

            try
            {
                //取引区分リストの表示、画面IDを渡す
                torihikikbnList.StartPosition = FormStartPosition.Manual;
                torihikikbnList.intFrmKind    = CommonTeisu.FRM_TORIHIKIKBN;
                torihikikbnList.ShowDialog();
            }
            catch (Exception ex)
            {
                //データロギング
                new CommonException(ex);
                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                return;
            }
        }