commit
b357890b43
@ -0,0 +1,146 @@
|
||||
<?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="ShoopNCook.Pages.ChangePassword"
|
||||
Title="ChangePassword"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||
|
||||
<ScrollView>
|
||||
<Grid
|
||||
Margin="20"
|
||||
RowDefinitions="Auto, Auto, Auto, *">
|
||||
|
||||
<!-- Change Password label and return button -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
RowDefinitions="Auto, *"
|
||||
ColumnDefinitions="*, 3*"
|
||||
Margin="0, 0, 0, 40">
|
||||
<HorizontalStackLayout>
|
||||
<ImageButton
|
||||
Grid.Column="0"
|
||||
|
||||
HeightRequest="50"
|
||||
WidthRequest="50"
|
||||
Source="arrow_back.svg"/>
|
||||
</HorizontalStackLayout>
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
FontSize="24"
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
Text="Change Password"
|
||||
FontFamily="PoppinsBold"
|
||||
VerticalOptions="Center"/>
|
||||
</Grid>
|
||||
|
||||
<!-- User inputs -->
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
Margin="0, 20, 0, 0"
|
||||
RowDefinitions="Auto, *, Auto, *,Auto,*">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Text="Old Password Here :"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
|
||||
<Border
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
Margin="0,30,10,20">
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="password_icon.svg">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="Old Password"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Text="New Password Here :"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
|
||||
<Border
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
Margin="0,30,0,20">
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="password_icon.svg">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="New Password"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Text="Confirm New Password Here :"
|
||||
FontFamily="PoppinsBold"
|
||||
Margin="0,0,0,0"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
|
||||
<Border
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
Margin="0,30,0,20">
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="password_icon.svg">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="New Password"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
<!-- Save button -->
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="3"
|
||||
VerticalOptions="End">
|
||||
<Border
|
||||
Margin="0, 30, 0, 0"
|
||||
Stroke="{StaticResource BackgroundPrimary}"
|
||||
StrokeShape="RoundRectangle 12">
|
||||
<Button
|
||||
HeightRequest="50"
|
||||
Style="{StaticResource UserButton}"
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
Text="SAVE"/>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</ContentPage>
|
@ -0,0 +1,9 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class ChangePassword : ContentPage
|
||||
{
|
||||
public ChangePassword()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -0,0 +1,170 @@
|
||||
<?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="ShoopNCook.Pages.ForgotPassword"
|
||||
Title="ForgotPassword"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||
<ScrollView>
|
||||
<Grid
|
||||
Padding="20"
|
||||
RowDefinitions="Auto, Auto, Auto, *">
|
||||
|
||||
<!-- Profile label and return button -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
RowDefinitions="Auto, *"
|
||||
ColumnDefinitions="*, 1.5*"
|
||||
Margin="0, 0, 0, 40">
|
||||
<HorizontalStackLayout>
|
||||
<ImageButton
|
||||
Grid.Column="0"
|
||||
|
||||
HeightRequest="50"
|
||||
WidthRequest="50"
|
||||
Source="arrow_back.svg"/>
|
||||
</HorizontalStackLayout>
|
||||
<Label
|
||||
Margin="-40,10,0,0"
|
||||
Grid.Column="1"
|
||||
FontSize="24"
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
Text="Forgot Password"
|
||||
FontFamily="PoppinsBold"
|
||||
VerticalOptions="Start"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Email entry -->
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
RowDefinitions="*, Auto, Auto"
|
||||
>
|
||||
|
||||
<Label
|
||||
|
||||
Grid.Row="0"
|
||||
FontSize="15"
|
||||
TextColor="{StaticResource TextColorSecondary}"
|
||||
Text="Enter your email here : "
|
||||
FontFamily="PoppinsBold"
|
||||
VerticalOptions="Center"/>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
Margin="0,30,0,20">
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="email_icon.svg">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="User Name"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="2"
|
||||
VerticalOptions="End">
|
||||
<Border
|
||||
Margin="0, 30, 0, 0"
|
||||
Stroke="{StaticResource BackgroundPrimary}"
|
||||
StrokeShape="RoundRectangle 12">
|
||||
<Button
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
FontFamily="PoppinsMedium"
|
||||
TextColor="White"
|
||||
Text="Recup my Password"/>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
</Grid>
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
<!-- Sendmail grid -->
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
||||
RowSpacing="10">
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Margin="20"
|
||||
Text="A recuperation code as been send to your email address ! "
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="LightGreen"/>
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="Enter the code here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
>
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="code.png">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="Code"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Text="Enter new Password here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="4"
|
||||
Style="{StaticResource SecondaryBorderShadow}">
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Placeholder="New password"/>
|
||||
</Border>
|
||||
<Label
|
||||
Grid.Row="5"
|
||||
Text="Confirm your new Password here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="6"
|
||||
Style="{StaticResource SecondaryBorderShadow}">
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Placeholder="New password"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Save button -->
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="3"
|
||||
VerticalOptions="End">
|
||||
<Border
|
||||
Margin="0, 30, 0, 0"
|
||||
Stroke="{StaticResource BackgroundPrimary}"
|
||||
StrokeShape="RoundRectangle 12">
|
||||
<Button
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
FontFamily="PoppinsMedium"
|
||||
TextColor="White"
|
||||
Text="Save Change"/>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -0,0 +1,9 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class ForgotPassword : ContentPage
|
||||
{
|
||||
public ForgotPassword()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
<?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="ShoopNCook.Pages.HomePage"
|
||||
xmlns:views="clr-namespace:ShoopNCook.Views"
|
||||
Title="HomePage"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||
|
||||
<ScrollView>
|
||||
<Grid RowDefinitions="Auto,Auto,Auto,*">
|
||||
<FlexLayout
|
||||
Grid.Row="0"
|
||||
JustifyContent="SpaceBetween"
|
||||
AlignItems="Center"
|
||||
AlignContent="Center"
|
||||
Margin="20,35,20,20"
|
||||
>
|
||||
|
||||
<Border
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
StrokeShape="RoundRectangle 1500"
|
||||
>
|
||||
<ImageButton
|
||||
Source="default_profile_picture.png"
|
||||
WidthRequest="65"
|
||||
HeightRequest="65"/>
|
||||
</Border>
|
||||
</FlexLayout>
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
Grid.Row="1"
|
||||
Margin="20">
|
||||
|
||||
<Border
|
||||
Margin="0,10,10,7"
|
||||
Style="{StaticResource SecondaryBorder}">
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="0"
|
||||
Placeholder="Search here..."/>
|
||||
</Border>
|
||||
|
||||
<ImageButton
|
||||
Grid.Column="1"
|
||||
Source="syncalt.svg"
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
WidthRequest="65"
|
||||
HeightRequest="65"
|
||||
CornerRadius="15"
|
||||
Margin="0,5,5,0">
|
||||
</ImageButton>
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="2">
|
||||
<FlexLayout
|
||||
JustifyContent="SpaceBetween"
|
||||
AlignItems="Center"
|
||||
Margin="20"
|
||||
HeightRequest="30">
|
||||
<Label
|
||||
Text="Popular recipe"
|
||||
Style="{StaticResource h2}"/>
|
||||
|
||||
<Label
|
||||
Text="Show All"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
|
||||
</FlexLayout>
|
||||
|
||||
<ScrollView
|
||||
Orientation="Horizontal">
|
||||
<HorizontalStackLayout
|
||||
Spacing="10"
|
||||
Padding="0,0,0,40">
|
||||
<views:RecipeView/>
|
||||
<views:RecipeView/>
|
||||
<views:RecipeView/>
|
||||
<views:RecipeView/>
|
||||
<views:RecipeView/>
|
||||
</HorizontalStackLayout>
|
||||
</ScrollView>
|
||||
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="3">
|
||||
<FlexLayout
|
||||
JustifyContent="SpaceBetween"
|
||||
AlignItems="Center"
|
||||
Margin="20,0,20,20"
|
||||
HeightRequest="30"
|
||||
>
|
||||
<Label
|
||||
Text="Recommended for you"
|
||||
Style="{StaticResource h2}"/>
|
||||
|
||||
<Label
|
||||
Text="Show All"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
|
||||
</FlexLayout>
|
||||
<ScrollView>
|
||||
<FlexLayout
|
||||
JustifyContent="Center"
|
||||
AlignItems="Start"
|
||||
AlignContent="Start"
|
||||
Direction="Row"
|
||||
Wrap="Wrap">
|
||||
<views:RecipeView Margin="2.5"/>
|
||||
<views:RecipeView Margin="2.5"/>
|
||||
<views:RecipeView Margin="2.5"/>
|
||||
<views:RecipeView Margin="2.5"/>
|
||||
<views:RecipeView Margin="2.5"/>
|
||||
<views:RecipeView Margin="2.5"/>
|
||||
<views:RecipeView Margin="2.5"/>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
</VerticalStackLayout>
|
||||
|
||||
</Grid>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -0,0 +1,9 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class HomePage : ContentPage
|
||||
{
|
||||
public HomePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
<?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="ShoopNCook.Pages.MyRecipesPage"
|
||||
Title="MyRecipesPage"
|
||||
xmlns:views="clr-namespace:ShoopNCook.Views"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||
<Grid
|
||||
RowDefinitions="Auto, *, Auto">
|
||||
<!-- Header label and return button -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
Padding="10, 20, 0, 30">
|
||||
|
||||
<ImageButton
|
||||
Grid.Column="0"
|
||||
HeightRequest="50"
|
||||
WidthRequest="50"
|
||||
Source="arrow_back.svg"
|
||||
HorizontalOptions="Start"/>
|
||||
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
FontSize="24"
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
Text="My Recipes"
|
||||
FontFamily="PoppinsBold"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Favorite items -->
|
||||
<ScrollView
|
||||
Grid.Row="1">
|
||||
<FlexLayout
|
||||
JustifyContent="Center"
|
||||
AlignItems="Start"
|
||||
AlignContent="Start"
|
||||
Direction="Row"
|
||||
Wrap="Wrap">
|
||||
|
||||
<views:OwnedRecipeView Margin="5" Note="4.5" Title="Spaghetti Bolognese"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="3" Title="Chickend Curry"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="0.2" Title="Beef Stroganoff"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="1.6" Title="Fish And Ships"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="5" Title="Caesar Salad"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="3.5" Title="Vegetables"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="4.6" Title="Guacamole"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="4" Title="Pad Thai"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="3" Title="French Toast"/>
|
||||
<views:OwnedRecipeView Margin="5" Note="2" Title="Margherita Pizza"/>
|
||||
</FlexLayout>
|
||||
</ScrollView>
|
||||
|
||||
<Border
|
||||
Margin="20, 0, 20, 5"
|
||||
Grid.Row="2"
|
||||
Style="{StaticResource SecondaryBorder}">
|
||||
<Button
|
||||
Style="{StaticResource UserButton}"
|
||||
BackgroundColor="{StaticResource Selected}"
|
||||
Text="Add a new recipe"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -0,0 +1,9 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class MyRecipesPage : ContentPage
|
||||
{
|
||||
public MyRecipesPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 920 B |
After Width: | Height: | Size: 187 B |
After Width: | Height: | Size: 247 B |
@ -0,0 +1,79 @@
|
||||
<?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="ShoopNCook.Views.OwnedRecipeView">
|
||||
<Border
|
||||
Style="{StaticResource SecondaryBorderShadow}"
|
||||
StrokeShape="RoundRectangle 30">
|
||||
|
||||
<Grid
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
Padding="10"
|
||||
MinimumHeightRequest="175"
|
||||
MinimumWidthRequest="150"
|
||||
RowDefinitions="*, Auto">
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Stroke="Transparent"
|
||||
StrokeShape="RoundRectangle 20"
|
||||
BackgroundColor="AliceBlue">
|
||||
<Grid>
|
||||
<Image />
|
||||
<HorizontalStackLayout
|
||||
x:Name="Stars"
|
||||
VerticalOptions="End"
|
||||
HorizontalOptions="End"
|
||||
Margin="0, 0, 15, 2">
|
||||
<Image
|
||||
WidthRequest="10"
|
||||
Source="star_full.svg"/>
|
||||
<Image
|
||||
WidthRequest="10"
|
||||
Source="star_full.svg"/>
|
||||
<Image
|
||||
WidthRequest="10"
|
||||
Source="star_full.svg"/>
|
||||
<Image
|
||||
WidthRequest="10"
|
||||
Source="star_full.svg"/>
|
||||
<Image
|
||||
WidthRequest="10"
|
||||
Source="star_full.svg"/>
|
||||
</HorizontalStackLayout>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<VerticalStackLayout Grid.Row="1">
|
||||
<Label
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
x:Name="TitleLabel"/>
|
||||
<Border
|
||||
BackgroundColor="{StaticResource Selected}"
|
||||
Stroke="Transparent"
|
||||
StrokeShape="RoundRectangle 250"
|
||||
Margin="8, 0, 8, 0">
|
||||
<Grid
|
||||
ColumnDefinitions="Auto, *"
|
||||
Padding="10, 3, 10, 3"
|
||||
ColumnSpacing="4"
|
||||
HorizontalOptions="Center"
|
||||
>
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Tapped="TapGestureRecognizer_Tapped"
|
||||
NumberOfTapsRequired="1"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
Source="bin.svg"
|
||||
MaximumHeightRequest="15"/>
|
||||
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
Text="Delete"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ContentView>
|
@ -0,0 +1,44 @@
|
||||
namespace ShoopNCook.Views;
|
||||
|
||||
public partial class OwnedRecipeView : ContentView
|
||||
{
|
||||
|
||||
public OwnedRecipeView() : this(5, "Title")
|
||||
{ }
|
||||
|
||||
public OwnedRecipeView(float note, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
Note = note;
|
||||
Title = title;
|
||||
}
|
||||
|
||||
public float Note
|
||||
{
|
||||
set => SetNote(value);
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
set => TitleLabel.Text = value;
|
||||
}
|
||||
|
||||
private void SetNote(float note)
|
||||
{
|
||||
int i = 1;
|
||||
foreach (Image img in Stars.Children)
|
||||
{
|
||||
if (i <= note)
|
||||
{
|
||||
img.Opacity = 0;
|
||||
i++;
|
||||
}
|
||||
else img.Opacity = 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e)
|
||||
{
|
||||
Console.WriteLine("This is a test");
|
||||
}
|
||||
}
|
Loading…
Reference in new issue