Merge pull request 'Modèle version complète n°1 + Console' (#48) from feature/31-menu-console into dev
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #48pull/49/head
commit
cdaa2290fb
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Views.AddRecipe"
|
||||
Title="AddRecipe"
|
||||
xmlns:local="clr-namespace:Views">
|
||||
<VerticalStackLayout>
|
||||
<local:MiniHeader
|
||||
TitleMini="Ajouter une recette"
|
||||
NeedReturn="True"
|
||||
HeightRequest="100"/>
|
||||
<Grid ColumnDefinitions="auto, *"
|
||||
RowDefinitions="auto,auto,auto,auto,auto,auto, auto, auto, auto"
|
||||
Margin="50,20,20,20">
|
||||
<Label Text="Titre de la recette :"/>
|
||||
<Entry Placeholder="Saisie du texte de la recette correspondante"
|
||||
Grid.Row="1"
|
||||
Margin="10"/>
|
||||
<Label Text="Type de la recette" Grid.Row="2"/>
|
||||
<CheckBox x:Name="CheckEntree" Grid.Row="3" Margin="10,0,20,0" />
|
||||
<Label Text="Entrée" Grid.Row="3" Margin="40,20"/>
|
||||
<CheckBox x:Name="CheckPlat" Grid.Row="3" Margin="90,0" />
|
||||
<Label Text="Plat" Grid.Row="3" Margin="120,20"/>
|
||||
<CheckBox x:Name="CheckDessert" Grid.Row="3" Margin="155,0" />
|
||||
<Label Text="Dessert" Grid.Row="3" Margin="185,20"/>
|
||||
|
||||
<Label Text="Type de priorité" Grid.Row="4"/>
|
||||
<Grid BackgroundColor="#D1E8E2"
|
||||
MinimumHeightRequest="100"
|
||||
MaximumWidthRequest="300"
|
||||
Padding="20"
|
||||
Grid.Row="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Text="Recettes économiques" Grid.Row="0" Padding="5,0,0,0"/>
|
||||
<BoxView Color="Black" HeightRequest="1" Margin="10,10,10,10" Grid.Row="1" />
|
||||
<Label Text="Recettes rapides" Grid.Row="2"/>
|
||||
<BoxView Color="Black" HeightRequest="1" Margin="10,10,10,10" Grid.Row="3" />
|
||||
<Label Text="Recettes simples" Grid.Row="4"/>
|
||||
<BoxView Color="Black" HeightRequest="1" Margin="10,10,10,10" Grid.Row="5" />
|
||||
<Label Text="Recettes légères" Grid.Row="6"/>
|
||||
<BoxView Color="Black" HeightRequest="1" Margin="10,10,10,10" Grid.Row="7" />
|
||||
<Label Text="Recettes gourmandes" Grid.Row="8"/>
|
||||
</Grid>
|
||||
<Label Text="Saisir les étapes de la recette " Grid.Row="6" Margin="0,15"/>
|
||||
<Entry Placeholder="Etape de la recette" Grid.Row="7" Margin="12,0"/>
|
||||
<HorizontalStackLayout Grid.Row="8" Margin="20">
|
||||
<Button WidthRequest="100" Text="Précédent" TextColor="Black" Margin="20,0,20,0"/>
|
||||
<Button WidthRequest="100" Text="Ajouter" TextColor="Black" Margin="20,0"/>
|
||||
</HorizontalStackLayout>
|
||||
<Label Text="Saisir les ingrédients de la recette" Grid.Row="6" Grid.Column="1" Margin="50,15"/>
|
||||
<HorizontalStackLayout Grid.Row="7" Grid.Column="1">
|
||||
<Entry Placeholder="Nom de l'ingrédient" Margin="12,0,50,0" WidthRequest="500"/>
|
||||
<Picker Title="Unité">
|
||||
|
||||
</Picker>
|
||||
</HorizontalStackLayout>
|
||||
<HorizontalStackLayout Grid.Row="8" Grid.Column="1" Margin="20">
|
||||
<Button WidthRequest="100" Text="Précédent" TextColor="Black" Margin="20,0,20,0"/>
|
||||
<Button WidthRequest="100" Text="Ajouter" TextColor="Black" Margin="20,0"/>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
@ -0,0 +1,18 @@
|
||||
using CommunityToolkit.Maui.Behaviors;
|
||||
using DataPersistence;
|
||||
using Model;
|
||||
using Model.Managers;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Views
|
||||
{
|
||||
public partial class AddRecipe : ContentPage
|
||||
{
|
||||
public MasterManager MasterMgr => (App.Current as App).MasterMgr;
|
||||
|
||||
public AddRecipe()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,39 +1,49 @@
|
||||
namespace Views;
|
||||
|
||||
public partial class ContainerFlyout : ContentView
|
||||
{
|
||||
public ContainerFlyout()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// Bind MyFlyoutContent
|
||||
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerFlyout), new Grid());
|
||||
|
||||
public View MyFlyoutContent
|
||||
{
|
||||
get => (View)GetValue(MyFlyoutContentProperty);
|
||||
set => SetValue(MyFlyoutContentProperty, value);
|
||||
}
|
||||
|
||||
// Bind IsNotConnected
|
||||
public static readonly BindableProperty IsNotConnectedProperty =
|
||||
BindableProperty.Create("IsNotConnected", typeof(bool), typeof(Button), true);
|
||||
|
||||
public bool IsNotConnected
|
||||
{
|
||||
get => (bool)GetValue(IsNotConnectedProperty);
|
||||
set => SetValue(IsNotConnectedProperty, value);
|
||||
}
|
||||
|
||||
// bind NeedReturn
|
||||
public static readonly BindableProperty NeedReturnProperty =
|
||||
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
||||
|
||||
public bool NeedReturn
|
||||
{
|
||||
get => (bool)GetValue(NeedReturnProperty);
|
||||
set => SetValue(NeedReturnProperty, value);
|
||||
}
|
||||
}
|
||||
using DataPersistence;
|
||||
using Model;
|
||||
using Model.Managers;
|
||||
|
||||
namespace Views;
|
||||
|
||||
public partial class ContainerFlyout : ContentView
|
||||
{
|
||||
public MasterManager MasterMgr => (App.Current as App).MasterMgr;
|
||||
public User user => (App.Current as App).CurrentUser;
|
||||
|
||||
public ContainerFlyout()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = this;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Bind MyFlyoutContent
|
||||
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerFlyout), new Grid());
|
||||
|
||||
public View MyFlyoutContent
|
||||
{
|
||||
get => (View)GetValue(MyFlyoutContentProperty);
|
||||
set => SetValue(MyFlyoutContentProperty, value);
|
||||
}
|
||||
|
||||
// Bind IsNotConnected
|
||||
public static readonly BindableProperty IsNotConnectedProperty =
|
||||
BindableProperty.Create("IsNotConnected", typeof(bool), typeof(Button), true);
|
||||
|
||||
public bool IsNotConnected
|
||||
{
|
||||
get => (bool)GetValue(IsNotConnectedProperty);
|
||||
set => SetValue(IsNotConnectedProperty, value);
|
||||
}
|
||||
|
||||
// bind NeedReturn
|
||||
public static readonly BindableProperty NeedReturnProperty =
|
||||
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
||||
|
||||
public bool NeedReturn
|
||||
{
|
||||
get => (bool)GetValue(NeedReturnProperty);
|
||||
set => SetValue(NeedReturnProperty, value);
|
||||
}
|
||||
}
|
||||
|
@ -1,66 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||
xmlns:local="clr-namespace:Views"
|
||||
x:Class="Views.Home">
|
||||
|
||||
<local:ContainerBase
|
||||
IsNotConnected="True">
|
||||
|
||||
<!-- Flyout -->
|
||||
<local:ContainerBase.MyFlyoutContent>
|
||||
<VerticalStackLayout Grid.Row="1">
|
||||
<!-- Research -->
|
||||
<Button Text="Recherche" ImageSource="search_icon.png"
|
||||
MaximumHeightRequest="20"
|
||||
Style="{StaticResource button1}"/>
|
||||
<SearchBar Placeholder="Mots-clés (ex.: rapide, fromage)" FontAttributes="Italic" TextColor="Black"
|
||||
BackgroundColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray300}}"
|
||||
Margin="15, 10, 15, 40"/>
|
||||
|
||||
<!-- Direct research -->
|
||||
<Button Text="Entrées" ImageSource="flatware_icon.png"
|
||||
Style="{StaticResource button1}"/>
|
||||
<Button Text="Plats" ImageSource="room_service_icon.png"
|
||||
Style="{StaticResource button1}"/>
|
||||
<Button Text="Desserts" ImageSource="coffee_icon.png"
|
||||
Style="{StaticResource button1}"/>
|
||||
</VerticalStackLayout>
|
||||
</local:ContainerBase.MyFlyoutContent>
|
||||
|
||||
<!-- Master -->
|
||||
<local:ContainerBase.MyContent>
|
||||
<ScrollView>
|
||||
<StackLayout>
|
||||
<Label Text="Suggestions" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
|
||||
FontSize="24" Padding="15"/>
|
||||
|
||||
<FlexLayout
|
||||
Margin="0, 15"
|
||||
Wrap="Wrap"
|
||||
JustifyContent="Start"
|
||||
AlignItems="Center"
|
||||
AlignContent="SpaceEvenly"
|
||||
HorizontalOptions="Center">
|
||||
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
|
||||
</FlexLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</local:ContainerBase.MyContent>
|
||||
|
||||
</local:ContainerBase>
|
||||
|
||||
</ContentPage>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||
xmlns:local="clr-namespace:Views"
|
||||
xmlns:model="clr-namespace:Model;assembly=Model"
|
||||
x:Class="Views.Home">
|
||||
|
||||
<local:ContainerBase
|
||||
IsNotConnected="True">
|
||||
|
||||
<!-- Flyout -->
|
||||
<local:ContainerBase.MyFlyoutContent>
|
||||
<VerticalStackLayout Grid.Row="1">
|
||||
<!-- Research -->
|
||||
<Button
|
||||
Text="Recherche"
|
||||
ImageSource="search_icon.png"
|
||||
MaximumHeightRequest="20"
|
||||
Style="{StaticResource button1}"/>
|
||||
<SearchBar
|
||||
Placeholder="Mots-clés (ex.: rapide, fromage)"
|
||||
FontAttributes="Italic" TextColor="Black"
|
||||
BackgroundColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray300}}"
|
||||
Margin="15, 10, 15, 40"/>
|
||||
|
||||
<!-- Direct research -->
|
||||
<Button
|
||||
Text="Entrées"
|
||||
ImageSource="flatware_icon.png"
|
||||
Style="{StaticResource button1}"/>
|
||||
<Button
|
||||
Text="Plats"
|
||||
ImageSource="room_service_icon.png"
|
||||
Style="{StaticResource button1}"/>
|
||||
<Button
|
||||
Text="Desserts"
|
||||
ImageSource="coffee_icon.png"
|
||||
Style="{StaticResource button1}"/>
|
||||
</VerticalStackLayout>
|
||||
</local:ContainerBase.MyFlyoutContent>
|
||||
|
||||
<!-- Master -->
|
||||
<local:ContainerBase.MyContent>
|
||||
<ScrollView>
|
||||
<StackLayout BindingContext="{Binding AllRecipes}" MinimumWidthRequest="400">
|
||||
<!--Modification du prof apportée sur le stacklayout pour empecher l'affichage d'une seule case recipe-->
|
||||
<Label
|
||||
Text="{Binding Description}"
|
||||
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
|
||||
FontSize="24"
|
||||
Padding="15"/>
|
||||
|
||||
<FlexLayout
|
||||
Margin="0, 15"
|
||||
Wrap="Wrap"
|
||||
JustifyContent="Start"
|
||||
AlignItems="Center"
|
||||
AlignContent="SpaceEvenly"
|
||||
HorizontalOptions="Center"
|
||||
BindableLayout.ItemsSource="{Binding}">
|
||||
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="model:Recipe">
|
||||
<Border Style="{StaticResource recipeCase}">
|
||||
<Grid RowDefinitions="*, 40">
|
||||
<!--<local:RecipeCase
|
||||
CaseImageSource="room_service_icon.png"
|
||||
Title="{Binding Title}"/>-->
|
||||
|
||||
<Image
|
||||
Grid.Row="0" VerticalOptions="Fill"
|
||||
Source="{Binding Image}"/>
|
||||
|
||||
<Label
|
||||
Text="{Binding Title}" FontSize="18"
|
||||
Grid.Row="1" HorizontalOptions="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
|
||||
<local:RecipeCase CaseImageSource="room_service_icon.png"/>-->
|
||||
|
||||
</FlexLayout>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</local:ContainerBase.MyContent>
|
||||
|
||||
</local:ContainerBase>
|
||||
|
||||
</ContentPage>
|
||||
|
@ -1,9 +1,20 @@
|
||||
namespace Views;
|
||||
|
||||
public partial class MyProfil : ContentPage
|
||||
{
|
||||
public MyProfil()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
using CommunityToolkit.Maui.Behaviors;
|
||||
using DataPersistence;
|
||||
using Model;
|
||||
using Model.Managers;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Views;
|
||||
|
||||
public partial class MyProfil : ContentPage
|
||||
{
|
||||
public MasterManager MasterMgr => (App.Current as App).MasterMgr;
|
||||
public User user => (App.Current as App).CurrentUser;
|
||||
|
||||
public MyProfil()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BindingContext = this;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue