Beispiel #1
0
        /// <summary>
        /// 画面読み込み
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //初期状態記憶
            this.spConfig = AppCommon.SaveSpConfig(this.spKodate);
            //初期化
            ScreenClear();

            //得意先ID用
            base.MasterMaintenanceWindowList.Add("M01_TOK", new List <Type> {
                typeof(MST01010), typeof(SCH01010)
            });
            //着地ID用
            base.MasterMaintenanceWindowList.Add("M08_TIK_UC", new List <Type> {
                typeof(MST03010), typeof(SCH03010)
            });
            //データ取得

            base.SendRequest(new CommunicationObject(MessageType.RequestData, spTargetTableNm, new object[] { }));

            #region 設定項目取得
            ucfg = AppCommon.GetConfig(this);
            // 権限設定を呼び出す(ucfgを取得した後のに入れる)
            ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));
            // 登録ボタン設定
            if (!権限Get.Authority_Update_Button(ccfg, this.GetType().Name))
            {
                DataUpdateVisible = System.Windows.Visibility.Hidden;
            }
            frmcfg = (ConfigMST22010)ucfg.GetConfigValue(typeof(ConfigMST22010));
            if (frmcfg == null)
            {
                frmcfg = new ConfigMST22010();
                ucfg.SetConfigValue(frmcfg);
                frmcfg.spConfig = this.spConfig;
            }
            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.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;
            }
            #endregion

            if (frmcfg.spConfig != null)
            {
                AppCommon.LoadSpConfig(this.spKodate, frmcfg.spConfig);
            }

            spKodate.InputBindings.Add(new KeyBinding(spKodate.NavigationCommands.MoveNext, Key.Enter, ModifierKeys.None));
        }
Beispiel #2
0
        /// <summary>
        /// 画面読み込み
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // 初期化
            ScreenClear();

            #region 設定項目取得
            ucfg = AppCommon.GetConfig(this);
            // 権限設定を呼び出す(ucfgを取得した後のに入れる)
            ccfg = (CommonConfig)ucfg.GetConfigValue(typeof(CommonConfig));
            // 登録ボタン設定
            if (!権限Get.Authority_Update_Button(ccfg, this.GetType().Name))
            {
                DataUpdateVisible = System.Windows.Visibility.Hidden;
            }
            frmcfg = (ConfigMST22010)ucfg.GetConfigValue(typeof(ConfigMST22010));
            if (frmcfg == null)
            {
                frmcfg = new ConfigMST22010();
                ucfg.SetConfigValue(frmcfg);
                frmcfg.spConfig = this.spConfig;
            }
            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.Height = frmcfg.Height;
                this.Width  = frmcfg.Width;
            }
            #endregion

            //if (frmcfg.spConfig != null)
            //    AppCommon.LoadSpConfig(this.spComponent, frmcfg.spConfig);

            spComponent.InputBindings.Add(new KeyBinding(spComponent.NavigationCommands.MoveNext, Key.Enter, ModifierKeys.None));

            base.MasterMaintenanceWindowList.Add("M09_MYHIN", new List <Type> {
                null, typeof(SCHM09_MYHIN)
            });
            base.MasterMaintenanceWindowList.Add("M06_IRO", new List <Type> {
                null, typeof(SCHM06_IRO)
            });

            if (!string.IsNullOrEmpty(this.txtMyProduct.Text1))
            {
                // セット品構成品取得
                this.SendRequest(
                    new CommunicationObject(
                        MessageType.RequestData,
                        TargetTableNm,
                        new object[] {
                    this.txtMyProduct.Text1,
                    this.txtMyColor.Text1
                }));
            }

            // 初期状態記憶
            //this.spConfig = AppCommon.SaveSpConfig(this.spComponent);
        }