コード例 #1
0
        public void ConstructView(CatagoryList_ModelCollection modelCollection)
        {
            CatagoryModel[] filteredCatagoryModels = GetFilteredCatagoryModels(modelCollection.CatagoryModels);
            decimal[]       expenseTotals          = GetExpenseTotals(filteredCatagoryModels, modelCollection.ExpenseModels);
            ResetOriginalElement(CatagoryElements[0], filteredCatagoryModels.Length);

            CatagoryElements[0].UpdateView(filteredCatagoryModels[0], expenseTotals[0]);
            for (int index = 1; index < CatagoryElements.Length; index++)
            {
                CatagoryElements[index] = ConstructCatagoryElement(filteredCatagoryModels[index], expenseTotals[index], index);
            }
            TileRect.sizeDelta = new Vector2(TileRect.sizeDelta.x, StartingTileHeight + (CatagoryOffset * (CatagoryElements.Length - 1)));

            Header.text = IsRecurring ? modelCollection.Strings[17] : modelCollection.Strings[16];
            Spent.text  = modelCollection.Strings[18];
        }
コード例 #2
0
 public void RefreshView(CatagoryList_ModelCollection modelCollection)
 {
     DeconstructView();
     ConstructView(modelCollection);
 }