Esempio n. 1
0
 /// <summary>
 /// コンストラクタ
 /// 引数を追加することによりPrismに対して各インスタンスを要求しています。
 /// CommonDatasは、App.xaml.csのRegisterTypesにて登録されます。
 /// </summary>
 /// <param name="container">拡張コンテナを設定します。</param>
 /// <param name="regionManager">リージョンマネージャを設定します。</param>
 /// <param name="eventAggregator">イベントアグリゲータを設定します。</param>
 /// <param name="commonSettings">共通設定を設定します。</param>
 /// <param name="commonDatas">共通データを設定します。</param>
 public ViewCViewModel(
     [param: Required] IContainerExtension container,
     [param: Required] IRegionManager regionManager,
     [param: Required] IEventAggregator eventAggregator,
     [param: Required] Common.CommonSettings commonSettings,
     [param: Required] Common.CommonDatas commonDatas
     ) : base(
         container: container,
         regionManager: regionManager,
         eventAggregator: eventAggregator,
         commonSettings: commonSettings,
         commonDatas: commonDatas,
         // MainViewName, ViewNameを設定します。
         mainViewName: EnumDatas.ViewNames.Main.ToString(),
         viewName: EnumDatas.ViewNames.ViewC.ToString()
         )
 {
     // 初期化処理を行います。
     this.Initialize();
 }
Esempio n. 2
0
        /// <summary>
        /// 共通設定の設定を表します。
        /// </summary>
        /// <param name="commonSettings">共通設定を設定します。</param>
        private void SetCommonSettints(
            Common.CommonSettings commonSettings
            )
        {
            commonSettings.MainTitle = "メインタイトル";

            // ボタン表示設定
            commonSettings.ButtonInfo = new Dictionary <string, Common.ButtonInfo>()
            {
                // BtnInfo1押下時の表示View
                {
                    "BtnInfo1",
                    new Common.ButtonInfo()
                    {
                        PropertyName  = "BtnInfo1",
                        ButtonTitle   = "ViewA", //EnumDatas.ViewTitle.氏名.ToString()
                        ButtonCommand = "Move ViewA",
                        IsEnable      = true,
                        IsVisible     = true,
                    }
                },
                // BtnInfo2押下時の表示View
                {
                    "BtnInfo2",
                    new Common.ButtonInfo()
                    {
                        PropertyName  = "BtnInfo2",
                        ButtonTitle   = "ViewB", //EnumDatas.ViewTitle.住所.ToString()
                        ButtonCommand = "Move ViewB",
                        IsEnable      = true,
                        IsVisible     = true,
                    }
                },
                // BtnInfo3押下時の表示View
                {
                    "BtnInfo3",
                    new Common.ButtonInfo()
                    {
                        PropertyName  = "BtnInfo3",
                        ButtonTitle   = "ViewC", //EnumDatas.ViewTitle.設定.ToString()
                        ButtonCommand = "Move ViewC",
                        IsEnable      = true,
                        IsVisible     = true,
                    }
                },
                // BtnInfo4押下時の表示View
                {
                    "BtnInfo4",
                    new Common.ButtonInfo()
                    {
                        PropertyName = "BtnInfo4",
                        IsEnable     = false,
                        IsVisible    = false,
                    }
                },
                // BtnInfo5押下時の表示View
                {
                    "BtnInfo5",
                    new Common.ButtonInfo()
                    {
                        PropertyName = "BtnInfo5",
                        IsEnable     = false,
                        IsVisible    = false,
                    }
                },
            };

            // サブタイトル表示設定
            commonSettings.ViewTitle = new Dictionary <string, string>()
            {
                // ViewA表示時のサブタイトル
                {
                    EnumDatas.ViewNames.ViewA.ToString(),
                    "TitleA" //EnumDatas.ViewTitle.氏名.ToString()
                },
                // ViewB表示時のサブタイトル
                {
                    EnumDatas.ViewNames.ViewB.ToString(),
                    "TitleB" //EnumDatas.ViewTitle.氏名.ToString()
                },
                // ViewC表示時のサブタイトル
                {
                    EnumDatas.ViewNames.ViewC.ToString(),
                    "TitleC" //EnumDatas.ViewTitle.氏名.ToString()
                },
            };
        }