Exemplo n.º 1
0
        private void AllVillagersTapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            VillagersViewModel villagerViewModel = new VillagersViewModel();

            _villagerPage         = new VillagersPage();
            _villagerPage.Content = new VillagersContentView(villagerViewModel);

            Navigation.PushModalAsync(_villagerPage);
        }
Exemplo n.º 2
0
        private void ResidentsTapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            string             filter            = "and IsResident <> 0";
            VillagersViewModel villagerViewModel = new VillagersViewModel(filter);

            _villagerPage         = new VillagersPage();
            _villagerPage.Content = new VillagersContentView(villagerViewModel);

            Navigation.PushModalAsync(_villagerPage);
        }
Exemplo n.º 3
0
        private void VillagerSpeciesTapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            Frame frame        = (Frame)sender;
            Grid  frameGrid    = (Grid)frame.Children[0];
            Label speciesLabel = (Label)frameGrid.Children[1];

            string filter = "and Species = '" + speciesLabel.Text + "'";

            VillagersViewModel villagerViewModel = new VillagersViewModel(filter);

            _villagerPage         = new VillagersPage();
            _villagerPage.Content = new VillagersContentView(villagerViewModel);

            Navigation.PushModalAsync(_villagerPage);
        }
Exemplo n.º 4
0
        public void SetupTabs()
        {
            DashboardPage dashboardPage = new DashboardPage();

            dashboardPage.BindingContext = DashboardTab;

            NavigationPage dashboardNavigationPage = new NavigationPage(dashboardPage);

            dashboardNavigationPage.Title           = "Dashboard";
            dashboardNavigationPage.IconImageSource = "resident_icon";

            Children.Add(dashboardNavigationPage);

            this.CurrentPage = dashboardNavigationPage;

            FishTab      = new FishViewModel();
            BugsTab      = new BugsViewModel();
            VillagersTab = new VillagersViewModel();

            NavigationPage fishPage = new NavigationPage(new CrittersPage(FishTab));

            fishPage.IconImageSource = "fish_anchovy.png";
            fishPage.Title           = "Fish";

            NavigationPage bugsPage = new NavigationPage(new CrittersPage(BugsTab));

            bugsPage.IconImageSource = "bug_Bell_cricket.png";
            bugsPage.Title           = "Bugs";

            NavigationPage villagersPage = new NavigationPage(new VillagerSummaryPage());

            villagersPage.IconImageSource = "villagers.png";
            villagersPage.Title           = "Villagers";

            Children.Add(fishPage);
            Children.Add(bugsPage);
            Children.Add(villagersPage);

            this.CurrentPageChanged += Home_CurrentPageChanged;
        }
Exemplo n.º 5
0
 public VillagersContentView(VillagersViewModel villagerViewModel)
 {
     BindingContext = villagerViewModel;
     InitializeComponent();
 }