/// <summary> /// 画面が表示された後のイベント処理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MainWindow_Loaded(object sender, RoutedEventArgs e) { // 初期状態を保存(SPREADリセット時にのみ使用する) this.spGridList.Rows.Clear(); this.sp_Config = AppCommon.SaveSpConfig(this.spGridList); #region 設定項目取得 ucfg = AppCommon.GetConfig(this); ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig)); frmcfg = (ConfigZIJ07010)ucfg.GetConfigValue(typeof(ConfigZIJ07010)); if (frmcfg == null) { frmcfg = new ConfigZIJ07010(); ucfg.SetConfigValue(frmcfg); frmcfg.spConfigZIJ07010 = this.sp_Config; } else { // 表示できるかチェック var WidthCHK = WinFormsScreen.PrimaryScreen.Bounds.Width - frmcfg.Left; if (WidthCHK > 10) { this.Left = frmcfg.Left; } // 表示できるかチェック var HeightCHK = WinFormsScreen.PrimaryScreen.Bounds.Height - frmcfg.Top; if (HeightCHK > 10) { this.Top = frmcfg.Top; } this.Width = frmcfg.Width; this.Height = frmcfg.Height; } #endregion base.MasterMaintenanceWindowList.Add("M09_MYHIN", new List <Type> { typeof(MST02010), typeof(SCHM09_MYHIN) }); base.MasterMaintenanceWindowList.Add("M22_SOUK", new List <Type> { typeof(MST12020), typeof(SCHM22_SOUK) }); AppCommon.SetutpComboboxList(cmbInbound); initSearchControl(); SetFocusToTopControl(); ResetAllValidation(); }
/// <summary> /// 画面が閉じられた時、データを保持する /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Closed(object sender, EventArgs e) { spGridList.InputBindings.Clear(); SearchResult = null; if (ucfg != null) { if (frmcfg == null) { frmcfg = new ConfigZIJ07010(); } frmcfg.Top = this.Top; frmcfg.Left = this.Left; frmcfg.Width = this.Width; frmcfg.Height = this.Height; frmcfg.spConfigZIJ07010 = AppCommon.SaveSpConfig(this.spGridList); ucfg.SetConfigValue(frmcfg); } }