/// <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 = (ConfigZIJ01010)ucfg.GetConfigValue(typeof(ConfigZIJ01010)); if (frmcfg == null) { frmcfg = new ConfigZIJ01010(); 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)); // コントロールの初期設定をおこなう initSearchControl(); spGridList.RowCount = 0; SetFocusToTopControl(); ErrorMessage = ""; }
private void MainWindow_Closed(object sender, EventArgs e) { this.spGridList.InputBindings.Clear(); this.SearchResult = null; if (ucfg != null) { if (frmcfg == null) { frmcfg = new ConfigZIJ01010(); } 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); } }