Exemplo n.º 1
0
        public static void Init(AppSetup appSetup)
        {
            _container = appSetup.CreateContainer();

            MasterPageViewModel = _container.Resolve <MasterPageViewModel>();
            MainPageViewModel   = _container.Resolve <MainPageViewModel>();
            ScanPageViewModel   = _container.Resolve <ScanPageViewModel>();
            LoginViewModel      = _container.Resolve <LoginViewModel>();
            RegisterViewModel   = _container.Resolve <RegisterViewModel>();
            ProfileViewModel    = _container.Resolve <ProfileViewModel>();

            MainMapPageViewModel    = _container.Resolve <MainMapPageViewModel>();
            AddEventViewModel       = _container.Resolve <AddEventViewModel>();
            EventsViewModel         = _container.Resolve <EventsViewModel>();
            GuideViewModel          = _container.Resolve <GuideViewModel>();
            LocationLookupViewModel = _container.Resolve <LocationLookupViewModel>();
            EventDetailViewModel    = _container.Resolve <EventDetailViewModel>();
            ViewProfileViewModel    = _container.Resolve <ViewProfileViewModel>();

            // static pages
            MainMap     = new MainMapPage();
            ProfilePage = new UI.Pages.Profile.Profile();
            EventsPage  = new UI.Pages.Events.Events();
            MyProfile   = new UI.Pages.Profile.MyProfile();
        }
Exemplo n.º 2
0
 private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     foreach (var kid in KidsList.Items)
     {
         var vals = kid.ToString().Split(':');
         MainMapPage.KnownKids.Add(new Models.Kid
         {
             Age = float.Parse(vals[1]), Name = vals[0]
         });
     }
     Hide();
     MainMapPage.NamesEntered();
 }
        public MainWindowViewModel()
        {
            this.SemanticLinks          = SemanticLink.GetAllSemanticLinks();
            this.ExtractedSemanticLinks = new ObservableCollection <SemanticLink>(SemanticLink.GetDefaultOutwardSemanticLinks());
            this.TripDirection          = new TripDirection()
            {
                Direction = "outward"
            };

            var page = new MainMapPage();

            page.DataContext = new MainMapPageViewModel(this.ExtractedSemanticLinks.ToList(), this.TripDirection, page.InvokeScript);

            this.CurrentPage = page;
        }
Exemplo n.º 4
0
        private void Button_Click_Map(object sender, RoutedEventArgs e)
        {
            var context = this.DataContext as MainWindowViewModel;

            if (context == null)
            {
                return;
            }


            MainMapPage page = new MainMapPage();

            page.DataContext = new MainMapPageViewModel(context.ExtractedSemanticLinks.ToList(), context.TripDirection, page.InvokeScript);

            context.CurrentPage = page;
        }