Esempio n. 1
0
        // F12ボタン(キャンセル) クリック
        public override void btnF12_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            Dlg_InpSearch win = (Dlg_InpSearch)ExVisualTreeHelper.FindPerentChildWindow(this);

            win.Close();
        }
        // F1ボタン(出力) クリック
        public override void btnF1_Click(object sender, RoutedEventArgs e)
        {
            // OK
            if (Common.gWinGroupType == Common.geWinGroupType.InpList)
            {
                if (entityList == null)
                {
                    ExMessageBox.Show("データが検索されていません。");
                    return;
                }
                if (entityList.Count == 0)
                {
                    ExMessageBox.Show("データが検索されていません。");
                    return;
                }

                int intIndex = this.dgPrint.SelectedIndex;
                if (intIndex < 0)
                {
                    ExMessageBox.Show("行が選択されていません。");
                    return;
                }

                this.no           = ExCast.zCLng(this.lst[this.dgPrint.SelectedIndex].no);
                this.DialogResult = true;

                Dlg_InpSearch win = (Dlg_InpSearch)ExVisualTreeHelper.FindPerentChildWindow(this);
                win.Close();

                // 直接設定すると何故か画面がフリーズする為、コメントアウト
                //win.no = this.lst[this.dg.SelectedIndex].no;
                //win.DialogResult = true;
            }
            // 出力
            else
            {
                if (Common.gWinGroupType == Common.geWinGroupType.InpListReport)
                {
                    this.ProcKbn = eProcKbn.Report;
                }
                else
                {
                    this.ProcKbn = eProcKbn.ReportDetail;
                }

                this.utlReport.rptKbn = DataReport.geReportKbn.OutPut;
                this.ProcKbn          = eProcKbn.Report;

                // ボタン押下時非同期入力チェックON
                Common.gblnBtnDesynchronizeLock = true;

                ExBackgroundInputCheckWk bk = new ExBackgroundInputCheckWk();
                bk.utl                  = this;
                bk.waitTime             = 500;
                this.txtDummy.IsTabStop = true;
                bk.focusCtl             = this.txtDummy;
                bk.bw.RunWorkerAsync();
            }
        }