You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
839 B
44 lines
839 B
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");
|
|
}
|
|
} |