Example #1
0
        /// <summary>
        /// 画面が閉じられた時のイベント処理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Closed(object sender, EventArgs e)
        {
            if (frmcfg == null)
            {
                frmcfg = new ConfigDLY04011();
            }

            frmcfg.Top    = this.Top;
            frmcfg.Left   = this.Left;
            frmcfg.Height = this.Height;
            frmcfg.Width  = this.Width;

            ucfg.SetConfigValue(frmcfg);
        }
Example #2
0
        /// <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 = (ConfigDLY04011)ucfg.GetConfigValue(typeof(ConfigDLY04011));

            #endregion

            if (frmcfg == null)
            {
                frmcfg = new ConfigDLY04011();
                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("M09_MYHIN", new List <Type> {
                null, typeof(SCHM09_MYHIN)
            });
            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("M22_SOUK", new List <Type> {
                typeof(MST12020), typeof(SCHM22_SOUK)
            });

            ScreenClear();
            ChangeKeyItemChangeable(true);

            // ログインユーザの自社区分によりコントロール状態切換え
            this.txt会社名.Text1     = ccfg.自社コード.ToString();
            this.txt会社名.IsEnabled = ccfg.自社販社区分.Equals((int)自社販社区分.自社);

            this.txt伝票番号.Focus();
        }