Esempio n. 1
0
    public void UpdateMonthlyRevenue()
    {
        FinanceOverview FO = GetFinances();

        FO.monthlyRevenue = FO.monthlyIncome + FO.monthlyUpkeep;
        UpdateMonthlySum();
    }
Esempio n. 2
0
    public int CalculateMonthlySum(int financeID)
    {
        FinanceOverview FO = GetFinances(financeID);

        return(FO.monthlyRevenue + FO.monthlyBuildCosts);
        //FO.monthlyBuildCosts + FO.monthlyIncome + FO.monthlyRevenue + FO.monthlyUpkeep;
    }
Esempio n. 3
0
    public void UpdateMonthlyBuildCosts(int buildCost)
    {
        FinanceOverview FO = GetFinances();

        FO.monthlyBuildCosts -= buildCost;
        UpdateMonthlySum();
    }
Esempio n. 4
0
    public void UpdateMonthlyIncome(int incomeGain)
    {
        FinanceOverview FO = GetFinances();

        FO.monthlyIncome += incomeGain;
        UpdateMonthlyRevenue();
        UpdateMonthlySum();
    }
Esempio n. 5
0
    public void UpdateMonthlyUpkeep(int upkeep)
    {
        FinanceOverview FO = GetFinances();

        FO.monthlyUpkeep -= upkeep;
        UpdateMonthlyRevenue();
        UpdateMonthlySum();
    }
Esempio n. 6
0
 public void WriteTotalOverview(FinanceOverview FO)
 {
     ShopRevTotal.text    = FO.monthlyIncome.ToString() + " €";
     UpkeepTotal.text     = FO.monthlyUpkeep.ToString() + " €";
     RevenueTotal.text    = FO.monthlyRevenue.ToString() + " €";
     BuildCostsTotal.text = FO.monthlyBuildCosts.ToString() + " €";
     SumTotal.text        = FO.monthlySum.ToString() + " €";
 }
Esempio n. 7
0
 public void WriteLastOverview(FinanceOverview FO)
 {
     ShopRevLast.text    = FO.monthlyIncome.ToString() + " €";
     UpkeepLast.text     = FO.monthlyUpkeep.ToString() + " €";
     RevenueLast.text    = FO.monthlyRevenue.ToString() + " €";
     BuildCostsLast.text = FO.monthlyBuildCosts.ToString() + " €";
     SumLast.text        = FO.monthlySum.ToString() + " €";
 }
Esempio n. 8
0
 public void WriteCurrentOverview(FinanceOverview FO)
 {
     ShopRevCur.text    = FO.monthlyIncome.ToString() + " €";
     UpkeepCur.text     = FO.monthlyUpkeep.ToString() + " €";
     RevenueCur.text    = FO.monthlyRevenue.ToString() + " €";
     BuildCostsCur.text = FO.monthlyBuildCosts.ToString() + " €";
     SumCur.text        = FO.monthlySum.ToString() + " €";
 }
Esempio n. 9
0
    public void WriteToolTipFinances(FinanceOverview FO)
    {
        ShopRevTT.text = FO.monthlyIncome.ToString() + " €";
        UpkeepTT.text  = FO.monthlyUpkeep.ToString() + " €";
        int profit = FO.monthlyIncome + FO.monthlyUpkeep;

        SumTT.text = profit + " €";
    }
Esempio n. 10
0
 public FinanceOverview[] WholeOverview()
 {
     FinanceOverview[] FOs = new FinanceOverview[3];
     UpdateMonthlySum();
     FOs[0] = GetFinances();
     FOs[1] = GetFinances(curFinanceID - 1);
     FOs[2] = TotalFinances();
     return(FOs);
 }
Esempio n. 11
0
 private FinanceOverview GetFinances(int month)
 {
     if (month <= curFinanceID && month > 0)
     {
         return(monthlyFinances[month]);
     }
     else
     {
         FinanceOverview fo = new FinanceOverview();
         return(fo);
     }
 }
Esempio n. 12
0
    public List <FinanceOverview> YearOverview()
    {
        List <FinanceOverview> FOs = new List <FinanceOverview>();
        int curMonth = curFinanceID / CurYear();

        UpdateMonthlySum();
        for (int i = 1; i <= curMonth; i++)
        {
            FinanceOverview FO = new FinanceOverview();
            FO = GetFinances(i);
            FOs.Add(FO);
        }
        return(FOs);
    }
Esempio n. 13
0
    private FinanceOverview TotalFinances()
    {
        FinanceOverview newFO = new FinanceOverview();

        foreach (KeyValuePair <int, FinanceOverview> fo in monthlyFinances)
        {
            newFO.monthlyIncome     += fo.Value.monthlyIncome;
            newFO.monthlyUpkeep     += fo.Value.monthlyUpkeep;
            newFO.monthlyRevenue    += fo.Value.monthlyRevenue;
            newFO.monthlyBuildCosts += fo.Value.monthlyBuildCosts;
            newFO.monthlySum         = CalculateMonthlySum(curFinanceID);
            //newFO.monthlySum += fo.Value.monthlySum;
        }
        return(newFO);
    }
Esempio n. 14
0
    public void UpdateMonthlySum()
    {
        FinanceOverview FO = GetFinances();

        FO.monthlySum = CalculateMonthlySum(curFinanceID);
    }