Ejemplo n.º 1
0
 /// <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 ConfigZIJ09010();
         }
         frmcfg.Top              = this.Top;
         frmcfg.Left             = this.Left;
         frmcfg.Width            = this.Width;
         frmcfg.Height           = this.Height;
         frmcfg.spConfigZIJ09010 = AppCommon.SaveSpConfig(this.spGridList);
         ucfg.SetConfigValue(frmcfg);
         spGridList.InputBindings.Clear();
     }
 }
Ejemplo n.º 2
0
        /// <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 = (ConfigZIJ09010)ucfg.GetConfigValue(typeof(ConfigZIJ09010));

            if (frmcfg == null)
            {
                frmcfg = new ConfigZIJ09010();
                ucfg.SetConfigValue(frmcfg);
                frmcfg.spConfigZIJ09010 = 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("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);

            //↓よくわからないプログラム(運坊にあり)
            //AppCommon.LoadSpConfig(this.spGridList, frmcfg.spConfigZIJ09010 != null ? frmcfg.spConfigZIJ09010 : this.sp_Config);
            //this.表示固定列数 = this.spGridList.FrozenColumnCount.ToString();

            //入出庫明細検索用
            //ButtonCellType btn = this.spGridList.Columns[0].CellType as ButtonCellType;
            //btn.Command = new cmd売上詳細表示(spGridList);

            initSearchControl();

            // 初期フォーカスを設定
            this.myCompany.SetFocus();
            ResetAllValidation();
        }