From ca3e50a78787685fb5a39c6f751a87b2beb65c17 Mon Sep 17 00:00:00 2001 From: Sjory Date: Sun, 1 Dec 2024 12:42:33 +0100 Subject: testing made classes for alcohol and drinks tried to make a list of drinks gonna try maybe a json to store information and make a page for creating new drinks --- DrinksMachineWebsite/Pages/Counter.razor | 51 +++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) (limited to 'DrinksMachineWebsite/Pages') diff --git a/DrinksMachineWebsite/Pages/Counter.razor b/DrinksMachineWebsite/Pages/Counter.razor index ef23cb3..ac2f9c7 100644 --- a/DrinksMachineWebsite/Pages/Counter.razor +++ b/DrinksMachineWebsite/Pages/Counter.razor @@ -1,15 +1,58 @@ @page "/counter" +@using DrinksMachineWebsite.Data -Counter +Drinks + +

List of Drinks

+ +@if (drinks[0] == null) +{ +

Loading...

+} +else +{ + + + + + + + + + + + @for (int i = 0; i < 1; i++) + { + + + + + + + + + } + + +
NameDescriptionAlcoholAmount of shots
@drinks[i].Name@drinks[i].Description@drinks[i].AlcoholAndAmounts.Alcohol.name@drinks[i].AlcoholAndAmounts.amountOfShots
+} + -

Counter

-

Current count: @currentCount

- @code { private int currentCount = 0; + public static Alcohol gin = new Alcohol("Gin", 40, 70); + private static AlcoholAndAmount ginInGinTnoic = new AlcoholAndAmount(gin, 2); + public Drinks ginTonic = new Drinks("Gin & Tonic", "a nice classic that my dear babesiboo loves", ginInGinTnoic); + + public Drinks[] drinks = new Drinks[100]; + + public void Updatelist(){ + drinks[0] = ginTonic; + } + private void IncrementCount() { -- cgit v1.3.1