Beispiel #1
0
        public void Remove(string paramater)
        {
            for (int i = 0; i < MancareaAleasa.Count; i++)
            {
                if (MancareaAleasa[i].Food.Equals(FoodinGarbage))
                {
                    MancareaAleasa.RemoveAt(i);
                    Array[BestStringFunctionEver(FoodinGarbage)]        = 0;
                    ArrayofPrice[BestStringFunctionEver(FoodinGarbage)] = 0;
                    FoodinGarbage = "";


                    pricearrayfunction();
                }
            }
        }
Beispiel #2
0
        public void Deleteone(string paramater)
        {
            for (int i = 0; i < MancareaAleasa.Count; i++)
            {
                if (MancareaAleasa[i].Food.Equals(FoodinGarbage))
                {
                    MancareaAleasa[i].Number = MancareaAleasa[i].Number - 1;
                    Array[BestStringFunctionEver(FoodinGarbage)]        = Array[BestStringFunctionEver(FoodinGarbage)] - 1;
                    ArrayofPrice[BestStringFunctionEver(FoodinGarbage)] = ToateTipurileDeMancare[BestStringFunctionEver(FoodinGarbage)].Price * Array[BestStringFunctionEver(FoodinGarbage)];
                    pricearrayfunction();

                    onepropretychanged("Price");
                    if (MancareaAleasa[i].Number == 0)
                    {
                        FoodinGarbage = "";
                        MancareaAleasa.RemoveAt(i);
                    }
                }
            }
        }
Beispiel #3
0
        public void RemoveallFood(string paramater)
        {
            for (int i = 0; i < 25; i++)
            {
                if (Array[i] != 0)
                {
                    Array[i] = 0;
                }
            }
            int k = MancareaAleasa.Count;

            for (int i = 0; i < k; i++)
            {
                MancareaAleasa.RemoveAt(0);
            }
            for (int i = 0; i < 25; i++)
            {
                ArrayofPrice[i] = 0;
            }
            pricearrayfunction();
        }