/// <summary> /// 画面が閉じられた時のイベント処理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Closed(object sender, EventArgs e) { if (frmcfg == null) { frmcfg = new ConfigDLY02020(); } 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 = (ConfigDLY02020)ucfg.GetConfigValue(typeof(ConfigDLY02020)); #endregion if (frmcfg == null) { frmcfg = new ConfigDLY02020(); 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 gcSpreadGrid.InputBindings.Add(new KeyBinding(gcSpreadGrid.NavigationCommands.MoveNext, Key.Enter, ModifierKeys.None)); // グリッドボタンにコマンド配置 ButtonCellType btn = new ButtonCellType(); btn.Content = "在庫"; btn.Command = new cmd在庫(gcSpreadGrid); this.gcSpreadGrid.Columns[GridColumnsMapping.在庫.GetHashCode()].CellType = btn; // 検索画面情報を設定 base.MasterMaintenanceWindowList.Add("M09_HIN", new List <Type> { typeof(MST02010), typeof(SCHM09_HIN) }); ScreenClear(); ChangeKeyItemChangeable(true); }