private void LoadToTable()
        {
            InvokeOnMainThread(delegate
            {
                for (int i = 0; i < 3; i++)
                {
                    /*UIAlertView alert = new UIAlertView()
                     * {
                     *      Title = "Loading...",
                     *      Message = i.ToString() + " time(s) try"
                     * };*/

                    //alert.Show();
                    var costManager = CostManager.Create();

                    ReportTable.Source = new ReportResource(costManager.Costs, this);



                    ReportTable.RowHeight = UITableView.AutomaticDimension;

                    ReportTable.EstimatedRowHeight = 40f;

                    ReportTable.ReloadData();

                    DisplaySuggestion(costManager.Costs);
                    //alert.Dispose();
                }
            });
        }
        public static CostManager Create()

        {
            //if (_instance == null)
            _instance = new CostManager();

            return(_instance);
        }
        private void ConstantlyRefresh()
        {
            do
            {
                InvokeOnMainThread(
                    delegate {
                    var costManager  = CostManager.Create();
                    CostTable.Source = new CostResource(costManager.Costs, this);

                    CostTable.ReloadData();
                });
                Thread.Sleep(10000);
            } while (true);
        }
Example #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            List <ReportData> report = new List <ReportData>();

            var costManager = CostManager.Create();

            tempList = costManager.Costs;
            report   = CostTypeCollect();
            displayChart(report);


            // Perform any additional setup after loading the view, typically from a nib.
        }