예제 #1
0
        private void KallaSistaID()
        {
            int   sistaMatID;
            Lunch kalladLunch = new Lunch();

            kalladLunch = lunchList.Lunchlist[lunchList.Lunchlist.Count - 1];
            sistaMatID  = kalladLunch.MatID;
            iDKalk.KallaID(sistaMatID);
        }
예제 #2
0
 private void RegistreraMat()
 {
     if (MatNamn == "")
     {
         MessageBox.Show("ごはんのなまえをいれよう");
     }
     else
     {
         lunch = new Lunch();
         iDKalk.RegistreraID();
         lunch.RegistreraLunch(MatNamn, Ingredienser, iDKalk.ID);
         lunchList.RegistreraList(lunch);
     }
 }
예제 #3
0
        private void VisaSlumpAvIng()
        {
            string slumpMat = "";

            slumpLunch = slumpLunch.OrderBy(i => Guid.NewGuid()).ToList();
            Lunch resultLunch = new Lunch();

            resultLunch = slumpLunch[0];

            ResultMat.Content = resultLunch.MatNamn;
            list6.Items.Clear();

            foreach (var ing in resultLunch.Ingredienser)
            {
                list6.Items.Add($"- {ing}");
            }
            slumpMat = resultLunch.MatNamn;

            MessageBox.Show($"きょうのごはんは・・・・ {slumpMat}だあっ!");
        }
예제 #4
0
 public void RegistreraList(Lunch lunch)
 {
     Lunchlist.Add(lunch);
 }