private void AttractorLoopPlayer_Interacted(object sender, InteractedEventArgs args)
        {
            // get the locator from app.xaml
            ViewModels.ViewModelLocator Locator = Application.Current.Resources["Locator"] as ViewModels.ViewModelLocator;

            // use it to get the navigation service
            NavigationServiceEx NavigationService = Locator?.NavigationService;

            // navigate
            NavigationService?.Navigate(typeof(FlipViewViewModel).FullName);
        }
Exemplo n.º 2
0
        private MainView()
        {
            InitializeComponent();
            var locator = new ViewModels.ViewModelLocator();

            this.DataContext = locator.MainVM;
            m_wpfHelper      = new BMWPF.WPFInteropHelper(this);
            m_wpfHelper.Attach(Program.Addin, true, "MainView");
            this.AddHandler(System.Windows.Controls.Primitives.TextBoxBase.TextChangedEvent, new TextChangedEventHandler(TextBoxes_Changed), true);
            this.AddHandler(System.Windows.Controls.Primitives.ButtonBase.ClickEvent, new RoutedEventHandler(Button_click), true);
        }
Exemplo n.º 3
0
        private void DeviceTwoButton_Click(object sender, RoutedEventArgs e)
        {
            // navigate to the next page (flipview)

            // get the locator from app.xaml
            ViewModels.ViewModelLocator Locator = Application.Current.Resources["Locator"] as ViewModels.ViewModelLocator;

            // use it to get the navigation service
            NavigationServiceEx NavigationService = Locator?.NavigationService;

            // navigate to the flipview page
            NavigationService?.Navigate(typeof(FlipViewViewModel).FullName);
        }
Exemplo n.º 4
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            // configure StructureMap
            BootStrapper.Run();

            //Console.WriteLine(ObjectFactory.WhatDoIHave());

            // Get the MainViewModel
            var locator = new ViewModels.ViewModelLocator();
            var main = locator.Main;
            main.ActivateItem<PatientSearchViewModel>();
        }
        private void AttractorLoopPlayer_Interacted(object sender, InteractedEventArgs args)
        {
            // get the locator from app.xaml
            ViewModels.ViewModelLocator Locator = Application.Current.Resources["Locator"] as ViewModels.ViewModelLocator;

            // use it to get the navigation service
            NavigationServiceEx NavigationService = Locator?.NavigationService;

            // navigate to the starting page - is choose pah enabled?
            if ((ConfigurationService.Current.IsLoaded) && (ConfigurationService.Current.Configuration.IsChoosePathPageEnabled))
            {
                // go to the choose path page
                NavigationService?.Navigate(typeof(ChoosePathViewModel).FullName);
            }
            else
            {
                // no, so go to the intro hero page
                NavigationService?.Navigate(typeof(FlipViewViewModel).FullName);
            }
        }