public BalancePage(Wallet w, DatabaseOps d)
        {
            this.Title = "Balance";

            wallet = w;
            db     = d;

            screenWidth  = DeviceInfo.Hardware.ScreenWidth;
            screenHeight = ConvertPixelsToDp(DeviceInfo.Hardware.ScreenHeight);

            Debug.WriteLine("Height: " + screenHeight + " # Width: " + screenWidth);
            graphMaxHeight = screenHeight * 0.6;

            selectedCurrency = db.GetCurrency(db.GetGlobal("favouriteCurrency"));

            InitializeMainGrid();
            InitializeGraph();
            InitializeTotals();

            var scrollview = new ScrollView
            {
                Content = new StackLayout
                {
                    Children = { mainGrid }
                }
            };

            Content = new StackLayout
            {
                Children = { scrollview }
            };
        }
예제 #2
0
 public static Currency getFavouriteCurrency(DatabaseOps db)
 {
     return(db.GetCurrency(db.GetGlobal("favouriteCurrency")));
 }