Exemplo n.º 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 ConfigDLY06010();
            }

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

            ucfg.SetConfigValue(frmcfg);
        }
Exemplo n.º 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 = (ConfigDLY06010)ucfg.GetConfigValue(typeof(ConfigDLY06010));

            #endregion

            if (frmcfg == null)
            {
                frmcfg = new ConfigDLY06010();
                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));

            // 検索画面情報を設定
            base.MasterMaintenanceWindowList.Add("M01_TOK", new List <Type> {
                typeof(MST01010), typeof(SCHM01_TOK)
            });
            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)
            });

            ScreenClear();
            ChangeKeyItemChangeable(true);

            #region 金種コードのドロップダウンを生成
            // No.145 Add Start
            Window          view     = System.Windows.Window.GetWindow(this.gcSpreadGrid);
            List <CodeData> codeList = AppCommon.GetComboboxCodeList(view, "随時", "出金問合せ", "金種", false);
            codeList = codeList.Where(x => x.コード != 0).ToList();
            foreach (CodeData code in codeList)
            {
                金種Dic.Add(code.コード, code.表示名);
            }
            // No.145 Add End

            GrapeCity.Windows.SpreadGrid.ComboBoxCellType c1 = new GrapeCity.Windows.SpreadGrid.ComboBoxCellType();
            c1.ItemsSource = 金種Dic;
            // リストに表示されるアイテムを定義します
            c1.ContentPath = "Value";
            // 表示される各アイテムに対応したデータを定義します
            c1.SelectedValuePath          = "Key";
            c1.ImeConversionMode          = ImeConversionModeValues.Alphanumeric;
            c1.FocusDropDownControlOnOpen = true;
            c1.ValueType           = ComboBoxValueType.SelectedValue;
            c1.UpdateSourceTrigger = SpreadUpdateSourceTrigger.PropertyChanged;

            this.gcSpreadGrid.Columns[0].CellType = c1;

            #endregion

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

            this.txt伝票番号.Focus();
            //削除機能制御
            if (ccfg.自社販社区分 == (int)自社販社区分.自社)
            {
                rbnF12.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                rbnF12.Visibility = System.Windows.Visibility.Hidden;
            }
        }