From 255714ee7499583dd403183aee2ddaf097ee1fc7 Mon Sep 17 00:00:00 2001 From: "maxime.BATISTA@etu.uca.fr" Date: Fri, 14 Apr 2023 15:59:58 +0200 Subject: [PATCH 1/3] add more page --- AppShell.xaml | 5 ++ ShoopNCook - Backup (1).csproj | 107 +++++++++++++++++++++++++++++++++ ShoopNCook.csproj | 20 ++++++ Views/MorePage.xaml | 35 +++++++++++ Views/MorePage.xaml.cs | 9 +++ 5 files changed, 176 insertions(+) create mode 100644 ShoopNCook - Backup (1).csproj create mode 100644 Views/MorePage.xaml create mode 100644 Views/MorePage.xaml.cs diff --git a/AppShell.xaml b/AppShell.xaml index 64dfc90..cf7fbf5 100644 --- a/AppShell.xaml +++ b/AppShell.xaml @@ -23,5 +23,10 @@ Title="Search Page" ContentTemplate="{DataTemplate views:SearchPage}" Route="Search" /> + + \ No newline at end of file diff --git a/ShoopNCook - Backup (1).csproj b/ShoopNCook - Backup (1).csproj new file mode 100644 index 0000000..b8a05fc --- /dev/null +++ b/ShoopNCook - Backup (1).csproj @@ -0,0 +1,107 @@ + + + + net7.0-android;net7.0-ios;net7.0-maccatalyst + $(TargetFrameworks);net7.0-windows10.0.19041.0 + + + Exe + ShoopNCook + true + true + enable + + + ShoopNCook + + + com.companyname.shoopncook + bf17e1fe-a722-42f6-a24d-3327d351c924 + + + 1.0 + 1 + + 11.0 + 13.1 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + + + + diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj index 024478d..6e10a2b 100644 --- a/ShoopNCook.csproj +++ b/ShoopNCook.csproj @@ -49,10 +49,18 @@ + + + + + + + + @@ -71,12 +79,24 @@ + + MSBuild:Compile + + + MSBuild:Compile + MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/Views/MorePage.xaml b/Views/MorePage.xaml new file mode 100644 index 0000000..4e2de2b --- /dev/null +++ b/Views/MorePage.xaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Views/MorePage.xaml.cs b/Views/MorePage.xaml.cs new file mode 100644 index 0000000..8b3fdf5 --- /dev/null +++ b/Views/MorePage.xaml.cs @@ -0,0 +1,9 @@ +namespace ShoopNCook.Views; + +public partial class MorePage : ContentPage +{ + public MorePage() + { + InitializeComponent(); + } +} \ No newline at end of file From 9bac4e84fcd76dd729918213937539af0099c8a7 Mon Sep 17 00:00:00 2001 From: "maxime.BATISTA@etu.uca.fr" Date: Fri, 14 Apr 2023 17:45:49 +0200 Subject: [PATCH 2/3] add headed button and add buttons in the more page --- Pages/MorePage.xaml | 25 ++++++---------------- Resources/Images/share.svg | 3 +++ Resources/Images/user_fill.svg | 4 ++++ ShoopNCook.csproj | 5 +++++ Views/HeadedButton.xaml | 28 ++++++++++++++++++++++++ Views/HeadedButton.xaml.cs | 39 ++++++++++++++++++++++++++++++++++ Views/IngredientView.xaml.cs | 6 +++--- 7 files changed, 88 insertions(+), 22 deletions(-) create mode 100644 Resources/Images/share.svg create mode 100644 Resources/Images/user_fill.svg create mode 100644 Views/HeadedButton.xaml create mode 100644 Views/HeadedButton.xaml.cs diff --git a/Pages/MorePage.xaml b/Pages/MorePage.xaml index 6dbfea9..5387f99 100644 --- a/Pages/MorePage.xaml +++ b/Pages/MorePage.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="ShoopNCook.Pages.MorePage" BackgroundColor="{StaticResource BackgroundPrimary}" + xmlns:views="clr-namespace:ShoopNCook.Views" Title="MorePage"> - - - - - + + + + + \ No newline at end of file diff --git a/Resources/Images/share.svg b/Resources/Images/share.svg new file mode 100644 index 0000000..df811c7 --- /dev/null +++ b/Resources/Images/share.svg @@ -0,0 +1,3 @@ + + + diff --git a/Resources/Images/user_fill.svg b/Resources/Images/user_fill.svg new file mode 100644 index 0000000..90e367c --- /dev/null +++ b/Resources/Images/user_fill.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj index 1cfb821..23b7a0d 100644 --- a/ShoopNCook.csproj +++ b/ShoopNCook.csproj @@ -62,9 +62,11 @@ + + @@ -83,6 +85,9 @@ + + MSBuild:Compile + MSBuild:Compile diff --git a/Views/HeadedButton.xaml b/Views/HeadedButton.xaml new file mode 100644 index 0000000..26a3f4d --- /dev/null +++ b/Views/HeadedButton.xaml @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/Views/HeadedButton.xaml.cs b/Views/HeadedButton.xaml.cs new file mode 100644 index 0000000..e8691ed --- /dev/null +++ b/Views/HeadedButton.xaml.cs @@ -0,0 +1,39 @@ +using System.Xml.Linq; + +namespace ShoopNCook.Views; + +public partial class HeadedButton : ContentView +{ + + private readonly BindableProperty TextProperty = + BindableProperty.Create("Text", typeof(string), typeof(HeadedButton), "No Text Defined."); + + private readonly BindableProperty HeadColorProperty = + BindableProperty.Create("HeadColor", typeof(string), typeof(HeadedButton), "#FFFFFF"); + + private readonly BindableProperty HeadSourceProperty = + BindableProperty.Create("HeadSource", typeof(string), typeof(HeadedButton), default(string)); + + public string Text + { + get => (string)GetValue(TextProperty); + set => SetValue(TextProperty, value); + } + + public string HeadColor + { + get => (string)GetValue(HeadColorProperty); + set => SetValue(HeadColorProperty, value); + } + + public string HeadSource + { + get => (string)GetValue(HeadSourceProperty); + set => SetValue(HeadSourceProperty, value); + } + + public HeadedButton() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Views/IngredientView.xaml.cs b/Views/IngredientView.xaml.cs index 01288d8..2013447 100644 --- a/Views/IngredientView.xaml.cs +++ b/Views/IngredientView.xaml.cs @@ -3,13 +3,13 @@ namespace ShoopNCook.Views; public partial class IngredientView : ContentView { - public static readonly BindableProperty NameProperty = + private readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(IngredientView), default(string)); - public static readonly BindableProperty QuantityProperty = + private readonly BindableProperty QuantityProperty = BindableProperty.Create(nameof(Quantity), typeof(float), typeof(IngredientView), default(float)); - public static readonly BindableProperty UnitProperty = + private readonly BindableProperty UnitProperty = BindableProperty.Create(nameof(Unit), typeof(string), typeof(IngredientView), default(string)); public string Name From b48926f2801e38b07c0fdf707e121a3773e184de Mon Sep 17 00:00:00 2001 From: "maxime.BATISTA@etu.uca.fr" Date: Mon, 17 Apr 2023 17:18:37 +0200 Subject: [PATCH 3/3] dynamise MorePage --- Pages/MorePage.xaml | 4 ++-- Pages/MorePage.xaml.cs | 10 ++++++++-- Views/HeadedButton.xaml.cs | 2 -- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Pages/MorePage.xaml b/Pages/MorePage.xaml index 5387f99..90910d5 100644 --- a/Pages/MorePage.xaml +++ b/Pages/MorePage.xaml @@ -15,14 +15,14 @@ ColumnSpacing="30"> + x:Name="ProfileImage"/>