@ -1,77 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: default
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# - name: build
|
|
||||||
# image: mcr.microsoft.com/dotnet/sdk:7.0
|
|
||||||
# volumes:
|
|
||||||
# - name: docs
|
|
||||||
# path: /docs
|
|
||||||
# commands:
|
|
||||||
# - cd MCTG/
|
|
||||||
# - dotnet restore CI-CD.sln
|
|
||||||
# - dotnet build CI-CD.sln -c Release --no-restore
|
|
||||||
# - dotnet publish CI-CD.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
|
|
||||||
commands:
|
|
||||||
- cd MCTG/
|
|
||||||
- dotnet restore SAE-2.01.sln
|
|
||||||
- dotnet build SAE-2.01.sln -c Release --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
|
|
||||||
- dotnet publish MCTGApp/MCTGApp.csproj -c Release --no-restore -o CI_PROJECT_DIR/build/release
|
|
||||||
- dotnet publish Views/Views.csproj -c Release --no-restore -o $CI_PROJECT_DIR/build/release -f:net7.0-android /p:AndroidSdkDirectory=/usr/lib/android-sdk
|
|
||||||
|
|
||||||
- name: tests
|
|
||||||
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dotnet7-maui:latest
|
|
||||||
commands:
|
|
||||||
- cd MCTG/
|
|
||||||
- dotnet restore SAE-2.01.sln
|
|
||||||
- dotnet test SAE-2.01.sln --no-restore /p:AndroidSdkDirectory=$ANDROID_SDK_ROOT -property:Aapt2ToolPath=$ANDROID_SDK_ROOT/build-tools/33.0.0
|
|
||||||
depends_on: [ build ]
|
|
||||||
|
|
||||||
- name: code-analysis
|
|
||||||
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7
|
|
||||||
commands:
|
|
||||||
- cd MCTG/
|
|
||||||
- cp SAE-2.01.sln CI.sln
|
|
||||||
- sed -i '30,35d' CI.sln
|
|
||||||
- sed -i '10,11d' CI.sln
|
|
||||||
- dotnet restore CI.sln
|
|
||||||
- dotnet sonarscanner begin /k:SAE-2.01 /d:sonar.host.url=$${PLUGIN_SONAR_HOST} /d:sonar.coverageReportPaths="coveragereport/SonarQube.xml" /d:sonar.coverage.exclusions="Tests/**" /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
|
||||||
- dotnet build CI.sln -c Release --no-restore
|
|
||||||
- dotnet test CI.sln --logger trx --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --collect "XPlat Code Coverage"
|
|
||||||
- reportgenerator -reports:"**/coverage.cobertura.xml" -reporttypes:SonarQube -targetdir:"coveragereport"
|
|
||||||
- dotnet publish CI.sln -c Release --no-restore -o CI_PROJECT_DIR/build/release
|
|
||||||
- dotnet sonarscanner end /d:sonar.login=$${PLUGIN_SONAR_TOKEN}
|
|
||||||
secrets: [ SECRET_SONAR_LOGIN ]
|
|
||||||
settings:
|
|
||||||
# accessible en ligne de commande par ${PLUGIN_SONAR_HOST}
|
|
||||||
sonar_host: https://codefirst.iut.uca.fr/sonar/
|
|
||||||
# accessible en ligne de commande par ${PLUGIN_SONAR_TOKEN}
|
|
||||||
sonar_token:
|
|
||||||
from_secret: SECRET_SONAR_LOGIN
|
|
||||||
depends_on: [ tests ]
|
|
||||||
|
|
||||||
- name: generate-and-deploy-docs
|
|
||||||
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-docdeployer
|
|
||||||
failure: ignore
|
|
||||||
volumes:
|
|
||||||
- name: docs
|
|
||||||
path: /docs
|
|
||||||
commands:
|
|
||||||
- cd Doc/doxygen
|
|
||||||
- doxygen Doxyfile
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
depends_on: [ build ]
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: docs
|
|
||||||
temp: {}
|
|
@ -1,9 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,25 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
<IsTestProject>true</IsTestProject>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
@ -1,11 +0,0 @@
|
|||||||
namespace MCTGLib_UnitTests
|
|
||||||
{
|
|
||||||
public class UnitTest1
|
|
||||||
{
|
|
||||||
[Fact]
|
|
||||||
public void Test1()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
global using Xunit;
|
|
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:local="clr-namespace:Views"
|
||||||
|
x:Class="Views.ContainerBase"
|
||||||
|
x:Name="root">
|
||||||
|
|
||||||
|
<Grid RowDefinitions="80, *"
|
||||||
|
ColumnDefinitions="300, *">
|
||||||
|
|
||||||
|
<local:CustomHeader
|
||||||
|
Grid.Column="1"
|
||||||
|
MinimumHeightRequest="80"
|
||||||
|
VerticalOptions="StartAndExpand"/>
|
||||||
|
|
||||||
|
<local:ContainerFlyout
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
MinimumWidthRequest="300"
|
||||||
|
HorizontalOptions="StartAndExpand"
|
||||||
|
IsNotConnected="{Binding IsNotConnected, Source={x:Reference root}}"
|
||||||
|
NeedReturn="{Binding NeedReturn, Source={x:Reference root}}">
|
||||||
|
<local:ContainerFlyout.MyFlyoutContent>
|
||||||
|
<ContentView
|
||||||
|
Content="{Binding MyFlyoutContent, Source={x:Reference root}}"/>
|
||||||
|
</local:ContainerFlyout.MyFlyoutContent>
|
||||||
|
</local:ContainerFlyout>
|
||||||
|
|
||||||
|
<ContentView
|
||||||
|
VerticalOptions="StartAndExpand"
|
||||||
|
Grid.Row="1" Grid.Column="1"
|
||||||
|
Content="{Binding MyContent, Source={x:Reference root}}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,49 @@
|
|||||||
|
namespace Views;
|
||||||
|
|
||||||
|
public partial class ContainerBase : ContentView
|
||||||
|
{
|
||||||
|
public ContainerBase()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bind MyContent
|
||||||
|
public static readonly BindableProperty MyContentProperty =
|
||||||
|
BindableProperty.Create("MyContent", typeof(View), typeof(ContainerBase), new Grid());
|
||||||
|
|
||||||
|
public View MyContent
|
||||||
|
{
|
||||||
|
get => (View)GetValue(MyContentProperty);
|
||||||
|
set => SetValue(MyContentProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bind MyFlyoutContent
|
||||||
|
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||||
|
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerBase), 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:local="clr-namespace:Views"
|
||||||
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
x:Class="Views.ContainerFlyout"
|
||||||
|
x:Name="fl"
|
||||||
|
BackgroundColor="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray600}}">
|
||||||
|
|
||||||
|
<Grid RowDefinitions="250, *, 100">
|
||||||
|
<VerticalStackLayout Grid.Row="0">
|
||||||
|
|
||||||
|
<Grid RowDefinitions="auto, *">
|
||||||
|
<!-- Return -->
|
||||||
|
<local:ReturnButton NeedReturn="{Binding NeedReturn, Source={x:Reference fl}}" Grid.Row="0"
|
||||||
|
HorizontalOptions="Start" Padding="10, 10, 0, 0"/>
|
||||||
|
<!-- Header -->
|
||||||
|
<ImageButton Source="person_default.png" HorizontalOptions="Center"
|
||||||
|
BackgroundColor="{StaticResource Secondary}"
|
||||||
|
WidthRequest="100" HeightRequest="100"
|
||||||
|
CornerRadius="50" Margin="0, 30, 0, 10"
|
||||||
|
BorderWidth="5" BorderColor="Black"
|
||||||
|
IsEnabled="{Binding IsNotConnected, Source={x:Reference fl}}"
|
||||||
|
Grid.RowSpan="2"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Button Text="Connection" ImageSource="login_icon.png"
|
||||||
|
Style="{StaticResource button2}"
|
||||||
|
IsVisible="{Binding IsNotConnected, Source={x:Reference fl}}"
|
||||||
|
IsEnabled="{Binding IsNotConnected, Source={x:Reference fl}}"/>
|
||||||
|
<Label Text="Jean-Baptiste De La Fontaine"
|
||||||
|
HorizontalOptions="Center" Margin="15"
|
||||||
|
FontSize="20" FontAttributes="Bold" HorizontalTextAlignment="Center"
|
||||||
|
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"
|
||||||
|
IsVisible="{Binding IsNotConnected, Converter={toolkit:InvertedBoolConverter} ,Source={x:Reference fl}}"/>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
|
<!-- Content -->
|
||||||
|
<ContentView
|
||||||
|
VerticalOptions="Fill"
|
||||||
|
Grid.Row="1"
|
||||||
|
Content="{Binding MyFlyoutContent, Source={x:Reference fl}}"/>
|
||||||
|
|
||||||
|
|
||||||
|
<VerticalStackLayout Grid.Row="2">
|
||||||
|
<!-- Footer -->
|
||||||
|
<Button Text="Déconnection" ImageSource="logout_icon.png"
|
||||||
|
Style="{StaticResource button2}"
|
||||||
|
IsVisible="{Binding IsNotConnected, Converter={toolkit:InvertedBoolConverter}, Source={x:Reference fl}}"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,39 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="Views.CustomHeader"
|
||||||
|
BackgroundColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray900}}">
|
||||||
|
|
||||||
|
<Grid ColumnDefinitions="*">
|
||||||
|
|
||||||
|
<Label Text="Ma cuisine trop géniale"
|
||||||
|
FontAttributes="Bold" FontSize="30" FontFamily="Forte"
|
||||||
|
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"
|
||||||
|
Margin="20, 10, 0, 0"
|
||||||
|
VerticalOptions="Start" HorizontalOptions="Start"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,14 @@
|
|||||||
|
namespace Views;
|
||||||
|
|
||||||
|
public partial class CustomHeader : ContentView
|
||||||
|
{
|
||||||
|
public CustomHeader()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ImageButton_Clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
(App.Current.MainPage as Shell).FlyoutIsPresented ^= true;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
<?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>
|
@ -1,41 +0,0 @@
|
|||||||
<?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.MainPage">
|
|
||||||
|
|
||||||
<ScrollView>
|
|
||||||
<VerticalStackLayout
|
|
||||||
Spacing="25"
|
|
||||||
Padding="30,0"
|
|
||||||
VerticalOptions="Center">
|
|
||||||
|
|
||||||
<Image
|
|
||||||
Source="dotnet_bot.png"
|
|
||||||
SemanticProperties.Description="Cute dot net bot waving hi to you!"
|
|
||||||
HeightRequest="200"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Label
|
|
||||||
Text="Hello, World!"
|
|
||||||
SemanticProperties.HeadingLevel="Level1"
|
|
||||||
FontSize="32"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Label
|
|
||||||
Text="Welcome to .NET Multi-platform App UI"
|
|
||||||
SemanticProperties.HeadingLevel="Level2"
|
|
||||||
SemanticProperties.Description="Welcome to dot net Multi platform App U I"
|
|
||||||
FontSize="18"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
x:Name="CounterBtn"
|
|
||||||
Text="Click me"
|
|
||||||
SemanticProperties.Hint="Counts the number of times you click"
|
|
||||||
Clicked="OnCounterClicked"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</ContentPage>
|
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:local="clr-namespace:Views"
|
||||||
|
x:Class="Views.MiniHeader"
|
||||||
|
x:Name="miniheader">
|
||||||
|
<Grid BackgroundColor="#116466" ColumnDefinitions="*,*,*">
|
||||||
|
<local:ReturnButton NeedReturn="{Binding NeedReturn, Source={x:Reference miniheader}}"
|
||||||
|
HorizontalOptions="Start" Padding="10, 10, 0, 0"
|
||||||
|
WidthRequest="60"
|
||||||
|
/>
|
||||||
|
<Label Grid.Column="1"
|
||||||
|
Text="{Binding TitleMini, Source={Reference miniheader}}"
|
||||||
|
FontSize="Medium"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
LineBreakMode="WordWrap"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<ImageButton Grid.Column="2"
|
||||||
|
Source="person_default.svg"
|
||||||
|
WidthRequest="80" HeightRequest="80"
|
||||||
|
CornerRadius="50"
|
||||||
|
BorderWidth="4" BorderColor="Black"/>
|
||||||
|
</Grid>
|
||||||
|
</ContentView>
|
@ -0,0 +1,27 @@
|
|||||||
|
namespace Views;
|
||||||
|
|
||||||
|
public partial class MiniHeader : ContentView
|
||||||
|
{
|
||||||
|
public MiniHeader()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public readonly BindableProperty TitleMiniProperty =
|
||||||
|
BindableProperty.Create("TitleMini", typeof(string), typeof(MiniHeader), "Erreur de titre");
|
||||||
|
|
||||||
|
public string TitleMini
|
||||||
|
{
|
||||||
|
get => (string)GetValue(TitleMiniProperty);
|
||||||
|
set => SetValue(TitleMiniProperty, 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
<?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:local="clr-namespace:Views"
|
||||||
|
x:Class="Views.MyPosts"
|
||||||
|
Title="MyPosts">
|
||||||
|
|
||||||
|
<local:ContainerBase
|
||||||
|
IsNotConnected="False"
|
||||||
|
NeedReturn="True">
|
||||||
|
|
||||||
|
<local:ContainerBase.MyFlyoutContent>
|
||||||
|
|
||||||
|
<Grid RowDefinitions="250, *, *" VerticalOptions="Fill">
|
||||||
|
<VerticalStackLayout Grid.Row="1">
|
||||||
|
<Button Text="Mes informations" ImageSource="person_default.png" Style="{StaticResource button1}" Grid.Row="1"/>
|
||||||
|
<Button Text="Modifier" ImageSource="settings_icon.png" Style="{StaticResource button1}" Grid.Row="2"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</local:ContainerBase.MyFlyoutContent>
|
||||||
|
|
||||||
|
<local:ContainerBase.MyContent>
|
||||||
|
|
||||||
|
<ScrollView>
|
||||||
|
<StackLayout>
|
||||||
|
<Label Text="Mon profil" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
FontSize="24" Padding="15, 15, 20, 5"/>
|
||||||
|
<Label Text="Mes publications" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
|
||||||
|
FontSize="20" 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"/>
|
||||||
|
|
||||||
|
</FlexLayout>
|
||||||
|
</StackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</local:ContainerBase.MyContent>
|
||||||
|
|
||||||
|
</local:ContainerBase>
|
||||||
|
|
||||||
|
</ContentPage>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace Views;
|
||||||
|
|
||||||
|
public partial class MyPosts : ContentPage
|
||||||
|
{
|
||||||
|
public MyPosts()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
<maui:MauiWinUIApplication
|
<maui:MauiWinUIApplication
|
||||||
x:Class="Views.WinUI.App"
|
x:Class="Vue.WinUI.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:maui="using:Microsoft.Maui"
|
xmlns:maui="using:Microsoft.Maui"
|
||||||
xmlns:local="using:Views.WinUI">
|
xmlns:local="using:Vue.WinUI">
|
||||||
|
|
||||||
</maui:MauiWinUIApplication>
|
</maui:MauiWinUIApplication>
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:local="clr-namespace:Views"
|
||||||
|
x:Class="Views.RecipeCase"
|
||||||
|
x:Name="rCase">
|
||||||
|
|
||||||
|
<Border Style="{StaticResource recipeCase}">
|
||||||
|
<Grid RowDefinitions="*, 40">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
Grid.Row="0" VerticalOptions="Fill"
|
||||||
|
Source="{Binding CaseImageSource, Source={x:Reference rCase}}"/>
|
||||||
|
|
||||||
|
<Label Text="Recette 1" FontSize="18"
|
||||||
|
Grid.Row="1" HorizontalOptions="Center"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,18 @@
|
|||||||
|
namespace Views;
|
||||||
|
|
||||||
|
public partial class RecipeCase : ContentView
|
||||||
|
{
|
||||||
|
public RecipeCase()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly BindableProperty CaseImageSourceProperty =
|
||||||
|
BindableProperty.Create("CaseImageSource", typeof(ImageSource), typeof(Image));
|
||||||
|
|
||||||
|
public ImageSource CaseImageSource
|
||||||
|
{
|
||||||
|
get => (ImageSource)GetValue(CaseImageSourceProperty);
|
||||||
|
set => SetValue(CaseImageSourceProperty, value);
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 168 B |
After Width: | Height: | Size: 355 B |
After Width: | Height: | Size: 450 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 694 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 244 B |
After Width: | Height: | Size: 548 B |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 413 B |
After Width: | Height: | Size: 886 B |
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="Views.ReturnButton"
|
||||||
|
x:Name="rb">
|
||||||
|
|
||||||
|
<Border
|
||||||
|
MaximumWidthRequest="100"
|
||||||
|
MaximumHeightRequest="45"
|
||||||
|
BackgroundColor="{AppThemeBinding Light={StaticResource Tertiary}, Dark={StaticResource Gray400}}"
|
||||||
|
IsEnabled="{Binding NeedReturn, Source={x:Reference rb}}"
|
||||||
|
IsVisible="{Binding NeedReturn, Source={x:Reference rb}}">
|
||||||
|
<Border.StrokeShape>
|
||||||
|
<RoundRectangle CornerRadius="10"/>
|
||||||
|
</Border.StrokeShape>
|
||||||
|
|
||||||
|
<ImageButton Source="arrow_back_icon.png"
|
||||||
|
HorizontalOptions="Center" VerticalOptions="Center"
|
||||||
|
Aspect="Center" Scale="0.7"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</ContentView>
|
@ -0,0 +1,19 @@
|
|||||||
|
namespace Views;
|
||||||
|
|
||||||
|
public partial class ReturnButton : ContentView
|
||||||
|
{
|
||||||
|
public ReturnButton()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
<?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.ViewRecette"
|
||||||
|
xmlns:local="clr-namespace:Views"
|
||||||
|
Title="ViewRecette"
|
||||||
|
x:Name="nrecipe">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<local:MiniHeader
|
||||||
|
TitleMini="Cookies aux Pépites de chocolat"
|
||||||
|
NeedReturn="True"
|
||||||
|
HeightRequest="100"/>
|
||||||
|
<Image
|
||||||
|
BackgroundColor="Green"
|
||||||
|
HeightRequest="150"/>
|
||||||
|
<Grid ColumnDefinitions="200,*">
|
||||||
|
<Label Margin="10,50,0,0"
|
||||||
|
Text="Ingrédients :"/>
|
||||||
|
<Label Margin="10,60,0,0">
|
||||||
|
<Label.Text>
|
||||||
|
|
||||||
|
6 pommes
|
||||||
|
6poires
|
||||||
|
</Label.Text>
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,13 @@
|
|||||||
|
namespace Views;
|
||||||
|
/// <summary>
|
||||||
|
/// Classe de la page contenant le detail de la recette
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public partial class ViewRecette : ContentPage
|
||||||
|
{
|
||||||
|
public ViewRecette()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|