Exemplo n.º 1
0
        private void OnTopUpAnAccountCommandExecuted(object p)
        {
            double sum = Convert.ToDouble(MW.TopUpValue.Text);

            using (var context = new DataBase())
            {
                if (MW.TopUpValue.Text != "")
                {
                    MoneyIncome moneyDrop = new MoneyIncome()
                    {
                        Date = DateTime.Now, Summa = sum, Balance = sum
                    };
                    context.MoneyIncome.Add(moneyDrop);
                    context.SaveChanges();
                }
            }



            Balance = Balance + sum;



            MW.TopUpValue.Text      = "";
            MW.TopUpMenu.Visibility = Visibility.Hidden;
            MW.ListGrid.Visibility  = Visibility.Visible;
        }
Exemplo n.º 2
0
    public void spawn(float currencyPerSecond)
    {
        GameObject  building    = Instantiate(builtbuilding);
        MoneyIncome moneyScript = building.GetComponent <MoneyIncome>();

        moneyScript.moneyManager      = moneyManager;
        moneyScript.currencyPerSecond = currencyPerSecond;
        Debug.Log(moneyManager);
    }