public MenuModelPatchSub(Prism.Ioc.IContainerExtension cp)
        {
            cp.RegisterInstance(DialogCoordinator.Instance);

            DataContext = viewModel = new MenuModelPatchSubViewModel(cp);
            InitializeComponent();
        }
Пример #2
0
        public MainWindow(IContainerExtension container, IRegionManager regionManager)
        {
            InitializeComponent();

            this._container     = container;
            this._regionManager = regionManager;
        }
Пример #3
0
        public SettingsSubViewModel(Prism.Ioc.IContainerExtension cp) : base(cp)
        {
            mahDialogCoordinator = cp.Resolve <IDialogCoordinator>();
            appState             = cp.Resolve <AppState>();

            InvokeRegenerateProfileInfos(null);

            UsingProfileInfo = appState.UsingProfile == null ? null :
                               ProfileInfos.Where(x => x.Filename == appState.UsingProfileInfo.Filename).FirstOrDefault();

            LoadAvailableLanguages();

            appState.FoundedProfileInfosChanged += (s, e) =>
            {
                InvokeRegenerateProfileInfos(() => { UsingProfileInfo = ProfileInfos[appState.UsingProfileInfoIndex]; });
            };
            appState.UsingProfileChanged += (s, e) =>
            {
                InvokeRegenerateProfileInfos(() => { UsingProfileInfo = ProfileInfos[appState.UsingProfileInfoIndex]; });
                ExecuteSetLanguageCommand(appState.UsingProfile.LanguageCode);
            };
        }
Пример #4
0
        //private readonly SettingsView settingsView;
        //private readonly AboutView aboutView;
        //private readonly IRegion mainRegion;

        public MainWindow(Prism.Ioc.IContainerExtension container)
        {
            // this.DataContext = new MainWindowViewModel(container);
            this.regionManager = container.Resolve <IRegionManager>();
            this.resource      = container.Resolve <ResourceDictionary>();
            // this.preference = container.Resolve<AppState>();

            mahDialogCoordinator = DialogCoordinator.Instance;
            container.RegisterInstance(mahDialogCoordinator);

            DataContext = viewModel = new MainWindowViewModel(container);

            InitializeComponent();



            //mainRegion.Activate(mainRegion.GetView("AboutView"));
            //mainRegion.Add(aboutView);
            //mainRegion.Add(settingsView);

            // string mainRegion = "MainRegion";
            // regionManager.RegisterViewWithRegion(mainRegion, typeof(SettingsView));
            // regionManager.RegisterViewWithRegion(mainRegion, typeof(AboutView));
        }
Пример #5
0
 public MenuModelPatchSubViewModel(Prism.Ioc.IContainerExtension cp) : base(cp)
 {
     mahDialogCoordinator = cp.Resolve <IDialogCoordinator>();
     appState             = cp.Resolve <AppState>();
 }