Esempio n. 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            AddDoneButton();

            try
            {
                _category = new Category(CategoryId);
                CategoryDetail_Name.Text = _category.Name;
                CategoryDetail_Plan.Text = _category.Plan.ToString();

                var expenses   = _category.GetExpenses();
                var tableView  = new UITableViewController();
                var listSource = new ExpenseListSource(expenses, new UITableViewController());
                CategoryDetail_ExpenseList.Source = listSource;
                CategoryDetail_ExpenseList.ReloadData();
                SetupChart();
            }
            catch
            {
                _category = new Category();
            }

            MountEvents();
        }
        void ReleaseDesignerOutlets()
        {
            if (CategoryDetail_Cancel != null)
            {
                CategoryDetail_Cancel.Dispose();
                CategoryDetail_Cancel = null;
            }

            if (CategoryDetail_Chart != null)
            {
                CategoryDetail_Chart.Dispose();
                CategoryDetail_Chart = null;
            }

            if (CategoryDetail_Delete != null)
            {
                CategoryDetail_Delete.Dispose();
                CategoryDetail_Delete = null;
            }

            if (CategoryDetail_ExpenseList != null)
            {
                CategoryDetail_ExpenseList.Dispose();
                CategoryDetail_ExpenseList = null;
            }

            if (CategoryDetail_Name != null)
            {
                CategoryDetail_Name.Dispose();
                CategoryDetail_Name = null;
            }

            if (CategoryDetail_Plan != null)
            {
                CategoryDetail_Plan.Dispose();
                CategoryDetail_Plan = null;
            }

            if (CategoryDetail_Save != null)
            {
                CategoryDetail_Save.Dispose();
                CategoryDetail_Save = null;
            }
        }