Refacto (Vu_homePage): Changement nom de dossier et update drone file
continuous-integration/drone/push Build is failing Details

pull/2/head
Louis DUFOUR 2 years ago
parent 2220601ec9
commit b37b21d9ac

@ -11,6 +11,12 @@ trigger:
steps: steps:
#- name: lint #- name: lint
- name: format - name: format
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
commands:
- dotnet tool install -g CSharpier # Installez CSharpier si necessaire
- cd src/
- csharpier --check . # Verifie le formatage
- csharpier --write . # Applique le formatage
- name: build - name: build
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest

@ -3,44 +3,44 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookApp.MainPage"> x:Class="BookApp.MainPage">
<ContentPage.ToolbarItems> <ContentPage.ToolbarItems>
<ToolbarItem Command="{Binding SetLowBrightnessCommand}"> <ToolbarItem Command="{Binding SetLowBrightnessCommand}">
<ToolbarItem.Text Text="Add" Clicked="Add_Clicked" /> <ToolbarItem.Text Text="Add" Clicked="Add_Clicked" />
<ToolbarItem.IconImageSource> <ToolbarItem.IconImageSource>
<FontImageSource <FontImageSource
FontFamily="MaterialIconsOutlined-Regular" FontFamily="MaterialIconsOutlined-Regular"
Glyph="&#xe51c;"/> Glyph="&#xe51c;"/>
</ToolbarItem.IconImageSource> </ToolbarItem.IconImageSource>
</ToolbarItem> </ToolbarItem>
</ContentPage.ToolbarItems> </ContentPage.ToolbarItems>
<StackLayout> <StackLayout>
<Label>Mes livres</Label> <Label>Mes livres</Label>
<CollectionView ItemsSource="{Binding MyCollections}"> <CollectionView ItemsSource="{Binding MyCollections}">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Padding="0" RowDefinitions="Auto"> <Grid Padding="0" RowDefinitions="Auto">
<Image Source="{Binding Icone}" <Image Source="{Binding Icone}"
HeightRequest="60" HeightRequest="60"
WidthRequest="60" /> WidthRequest="60" />
<Label Text="{Binding Name}" <Label Text="{Binding Name}"
FontAttributes="Bold" /> FontAttributes="Bold" />
<!-- Si veiw cela vaudra peut-être le coup de faire une content view (équiavalent de user control) --> <!-- Si veiw cela vaudra peut-être le coup de faire une content view (équiavalent de user control) -->
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </CollectionView>
<Button Text="Click to Rotate Text!" <Button Text="Click to Rotate Text!"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Center" HorizontalOptions="Center"
Clicked="OnButtonClicked" /> Clicked="OnButtonClicked" />
</StackLayout> </StackLayout>

@ -1,5 +1,5 @@
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
namespace BookApp namespace BookApp
{ {
public partial class MainPage : ContentPage public partial class MainPage : ContentPage
@ -7,34 +7,34 @@ namespace BookApp
public class ObjetTemp public class ObjetTemp
{ {
public string Name { get; set; } public string Name { get; set; }
public string Icone { get; set; } public string Icone { get; set; }
public ObjetTemp(string name, string icone) { Name = name; Icone = icone; } public ObjetTemp(string name, string icone) { Name = name; Icone = icone; }
} }
public ObservableCollection<ObjetTemp> MyCollections { get; set; } public ObservableCollection<ObjetTemp> MyCollections { get; set; }
public MainPage() public MainPage()
{ {
InitializeComponent(); InitializeComponent();
MyCollections = new ObservableCollection<ObjetTemp>() MyCollections = new ObservableCollection<ObjetTemp>()
{ {
new ObjetTemp("Item1", "./Reources/Images/tray_2_fill.svg"), new ObjetTemp("Item1", "./Reources/Images/tray_2_fill.svg"),
new ObjetTemp("Item1", "./Reources/Images/person_badge_clock_fill.svg"), new ObjetTemp("Item1", "./Reources/Images/person_badge_clock_fill.svg"),
new ObjetTemp("Item1", "./Reources/Images/arrow_forward.svg"), new ObjetTemp("Item1", "./Reources/Images/arrow_forward.svg"),
new ObjetTemp("Item1", "./Reources/Images/eyeglasses.svg"), new ObjetTemp("Item1", "./Reources/Images/eyeglasses.svg"),
new ObjetTemp("Item1", "./Reources/Images/heart_fill.svg"), new ObjetTemp("Item1", "./Reources/Images/heart_fill.svg"),
new ObjetTemp("Item1", "./Reources/Images/tag_fill.svg"), new ObjetTemp("Item1", "./Reources/Images/tag_fill.svg"),
new ObjetTemp("Item1", "./Reources/Images/person_fill.svg"), new ObjetTemp("Item1", "./Reources/Images/person_fill.svg"),
new ObjetTemp("Item1", "./Reources/Images/calendar.svg"), new ObjetTemp("Item1", "./Reources/Images/calendar.svg"),
new ObjetTemp("Item1", "./Reources/Images/sparkles.svg"), new ObjetTemp("Item1", "./Reources/Images/sparkles.svg"),
}; };
BindingContext = this; BindingContext = this;
} }
async void OnButtonClicked(object sender, EventArgs args) async void OnButtonClicked(object sender, EventArgs args)
{ {
await Shell.Current.GoToAsync(nameof(Tous)); await Shell.Current.GoToAsync(nameof(Tous));
} }
} }
} }

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookApp.Tous" x:Class="BookApp.Tous"
Title="Tous"> Title="Tous">
<ContentPage.Content> <ContentPage.Content>
<StackLayout> <StackLayout>
<Label Text="Welcome to Xamarin.Forms!" <Label Text="Welcome to Xamarin.Forms!"
VerticalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" /> HorizontalOptions="CenterAndExpand" />
</StackLayout> </StackLayout>
</ContentPage.Content> </ContentPage.Content>
</ContentPage> </ContentPage>

@ -1,19 +1,19 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace BookApp namespace BookApp
{ {
[XamlCompilation(XamlCompilationOptions.Compile)] [XamlCompilation(XamlCompilationOptions.Compile)]
public partial class Tous : ContentPage public partial class Tous : ContentPage
{ {
public Tous() public Tous()
{ {
InitializeComponent(); InitializeComponent();
} }
} }
} }

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 785 B

After

Width:  |  Height:  |  Size: 785 B

Before

Width:  |  Height:  |  Size: 703 B

After

Width:  |  Height:  |  Size: 703 B

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before

Width:  |  Height:  |  Size: 560 B

After

Width:  |  Height:  |  Size: 560 B

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 714 B

After

Width:  |  Height:  |  Size: 714 B

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 761 B

Before

Width:  |  Height:  |  Size: 564 B

After

Width:  |  Height:  |  Size: 564 B

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 921 B

After

Width:  |  Height:  |  Size: 921 B

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Loading…
Cancel
Save