Files
PlantBox/PlantBox.Client/PlantBox.Client/Forms/AboutPage.xaml.cs
Eveldee 21c10ecd43 Base App Interface
"J'avais oublié de branch"
2019-03-10 21:40:47 +01:00

44 lines
1.3 KiB
C#

using PlantBox.Client.Models;
using PlantBox.Client.Resources;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace PlantBox.Client.Forms
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class AboutPage : ContentPage
{
public AboutPage()
{
InitializeComponent();
listView.ItemsSource = new AboutPageItemGroup[]
{
new AboutPageItemGroup(Locale.Informations)
{
new AboutPageItem(Locale.Author, "Eveldee"),
new AboutPageItem(Locale.Version, GetType().Assembly.GetName().Version.ToString()),
new AboutPageItem("GitHub", "https://github.com/eveldee0680/PlantBox", true)
},
new AboutPageItemGroup(Locale.Libraries)
{
new AboutPageItem("Microcharts", "https://github.com/aloisdeniel/Microcharts", true)
}
};
}
private void ListView_ItemTapped(object sender, ItemTappedEventArgs e)
{
if (e.Item is AboutPageItem item && item.IsLink == true)
{
Device.OpenUri(new Uri(item.Value));
}
}
}
}