Beispiel #1
0
        private void MainWindow_Closed(object sender, EventArgs e)
        {
            this.spGridList.InputBindings.Clear();
            this.SearchResult = null;

            if (ucfg != null)
            {
                if (frmcfg == null)
                {
                    frmcfg = new ConfigZIJ04010();
                }
                frmcfg.Top              = this.Top;
                frmcfg.Left             = this.Left;
                frmcfg.Width            = this.Width;
                frmcfg.Height           = this.Height;
                frmcfg.spConfig20180118 = AppCommon.SaveSpConfig(this.spGridList);

                ucfg.SetConfigValue(frmcfg);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 画面読み込み
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            // 初期状態を保存(SPREADリセット時にのみ使用する)
            this.sp_Config = AppCommon.SaveSpConfig(this.spGridList);

            base.MasterMaintenanceWindowList.Add("M01_TOK_TOKU_SCH", new List <Type> {
                typeof(MST02010), typeof(SCHM01_TOK)
            });
            base.MasterMaintenanceWindowList.Add("M70_JIS", new List <Type> {
                typeof(MST16010), typeof(SCHM70_JIS)
            });
            base.MasterMaintenanceWindowList.Add("M72_TNT", new List <Type> {
                typeof(MST23010), typeof(SCHM72_TNT)
            });

            #region 設定項目取得
            ucfg   = AppCommon.GetConfig(this);
            ccfg   = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));
            frmcfg = (ConfigZIJ04010)ucfg.GetConfigValue(typeof(ConfigZIJ04010));
            if (frmcfg == null)
            {
                frmcfg = new ConfigZIJ04010();
                ucfg.SetConfigValue(frmcfg);
                frmcfg.spConfig20180118 = this.sp_Config;
            }
            else
            {
                // 表示できるかチェック
                var WidthCHK = WinForms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left;
                if (WidthCHK > 10)
                {
                    this.Left = frmcfg.Left;
                }
                // 表示できるかチェック
                var HeightCHK = WinForms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top;
                if (HeightCHK > 10)
                {
                    this.Top = frmcfg.Top;
                }
                this.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;
            }
            #endregion

            spGridList.InputBindings.Add(new KeyBinding(spGridList.NavigationCommands.MoveNext, Key.Enter, ModifierKeys.None));

            // No.145 Add Start
            // 金種の名称辞書を作成
            Window          view     = System.Windows.Window.GetWindow(this);
            List <CodeData> codeList = AppCommon.GetComboboxCodeList(view, "随時", "出金問合せ", "金種", false);
            codeList = codeList.Where(x => x.コード != 0).ToList();
            foreach (CodeData code in codeList)
            {
                goldNameDic.Add(code.コード, code.表示名);
            }
            // No.145 Add End

            // コントロールの初期設定をおこなう
            initSearchControl();

            spGridList.RowCount = 0;
            SetFocusToTopControl();
            ErrorMessage = string.Empty;
        }