/// <summary> /// 画面が閉じられた時、データを保持する /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Closed(object sender, EventArgs e) { if (ucfg != null) { if (frmcfg == null) { frmcfg = new ConfigZIK07010(); } frmcfg.Top = this.Top; frmcfg.Left = this.Left; frmcfg.Width = this.Width; frmcfg.Height = this.Height; frmcfg.spConfigZIK07010 = AppCommon.SaveSpConfig(this.spGridList); ucfg.SetConfigValue(frmcfg); spGridList.InputBindings.Clear(); } }
/// <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 = (ConfigZIK07010)ucfg.GetConfigValue(typeof(ConfigZIK07010)); if (frmcfg == null) { frmcfg = new ConfigZIK07010(); ucfg.SetConfigValue(frmcfg); frmcfg.spConfigZIK07010 = 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("M70_JIS", new List <Type> { typeof(MST16010), typeof(SCHM70_JIS) }); base.MasterMaintenanceWindowList.Add("M22_SOUK", new List <Type> { typeof(MST12020), typeof(SCHM22_SOUK) }); base.MasterMaintenanceWindowList.Add("M09_MYHIN", new List <Type> { typeof(MST02010), typeof(SCHM09_MYHIN) }); base.MasterMaintenanceWindowList.Add("M14_BRAND", new List <Type> { typeof(MST04020), typeof(SCHM14_BRAND) }); base.MasterMaintenanceWindowList.Add("M15_SERIES", new List <Type> { typeof(MST04021), typeof(SCHM15_SERIES) }); AppCommon.SetutpComboboxList(this.cmbItemType, false); initSearchControl(); // 初期フォーカスを設定 this.txt自社.SetFocus(); ResetAllValidation(); }