/// <summary> /// 画面が閉じられた時のイベント処理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Closed(object sender, EventArgs e) { if (frmcfg == null) { frmcfg = new ConfigDLY03020(); } frmcfg.Top = this.Top; frmcfg.Left = this.Left; frmcfg.Height = this.Height; frmcfg.Width = this.Width; ucfg.SetConfigValue(frmcfg); }
/// <summary> /// ロードイベント /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Window_Loaded(object sender, RoutedEventArgs e) { #region 設定項目取得 ucfg = AppCommon.GetConfig(this); ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig)); #region "権限関係" // 登録ボタン設定 if (!権限Get.Authority_Update_Button(ccfg, this.GetType().Name)) { // RibbonWindowViewBaseのプロパティに設定 DataUpdateVisible = System.Windows.Visibility.Hidden; } frmcfg = (ConfigDLY03020)ucfg.GetConfigValue(typeof(ConfigDLY03020)); #endregion if (frmcfg == null) { frmcfg = new ConfigDLY03020(); ucfg.SetConfigValue(frmcfg); //画面サイズをタスクバーをのぞいた状態で表示させる //this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Height; } else { //表示できるかチェック var WidthCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - frmcfg.Left; if (WidthCHK > 10) { this.Left = frmcfg.Left; } //表示できるかチェック var HeightCHK = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmcfg.Top; if (HeightCHK > 10) { this.Top = frmcfg.Top; } this.Width = frmcfg.Width; this.Height = frmcfg.Height; } #endregion // 検索画面情報を設定 base.MasterMaintenanceWindowList.Add("M01_TOK", new List <Type> { typeof(MST01010), typeof(SCHM01_TOK) }); base.MasterMaintenanceWindowList.Add("M09_HIN", new List <Type> { typeof(MST02010), typeof(SCHM09_HIN) }); base.MasterMaintenanceWindowList.Add("M11_TEK", new List <Type> { typeof(MST08010), typeof(SCHM11_TEK) }); base.MasterMaintenanceWindowList.Add("M70_JIS", new List <Type> { typeof(MST16010), typeof(SCHM70_JIS) }); base.MasterMaintenanceWindowList.Add("M21_SYUK", new List <Type> { typeof(MST01020), typeof(SCHM21_SYUK) }); base.MasterMaintenanceWindowList.Add("M22_SOUK", new List <Type> { typeof(MST12020), typeof(SCHM22_SOUK) }); // コンボデータ取得 AppCommon.SetutpComboboxList(this.cmb伝票要否, false); AppCommon.SetutpComboboxList(this.cmb売上区分, false); gridCtl = new GcSpreadGridController(gcSpreadGrid); ScreenClear(); ChangeKeyItemChangeable(true); // ログインユーザの自社区分によりコントロール状態切換え this.txt自社名.Text1 = ccfg.自社コード.ToString(); this.txt自社名.IsEnabled = ccfg.自社販社区分.Equals((int)自社販社区分.自社); this.txt伝票番号.Focus(); }