41 lines
921 B
C#
41 lines
921 B
C#
using PlantBox.Client.Forms.Plant;
|
|
using PlantBox.Client.Models;
|
|
using PlantBox.Shared.Communication.Commands;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Xaml;
|
|
|
|
namespace PlantBox.Client.Forms
|
|
{
|
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
|
public partial class HomePage : ContentPage
|
|
{
|
|
public HomePage()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private async void ListView_ItemTapped(object sender, ItemTappedEventArgs e)
|
|
{
|
|
var plant = (PlantInfo)e.Item;
|
|
|
|
await Navigation.PushAsync(new PlantPage(plant)
|
|
{
|
|
Title = plant.Name
|
|
});
|
|
}
|
|
|
|
protected override bool OnBackButtonPressed()
|
|
{
|
|
App.MasterPage.IsPresented = true;
|
|
|
|
return true;
|
|
}
|
|
}
|
|
} |