Beispiel #1
0
        public async void ShowRecentVotes(int id)
        {
            webView.EvaluateJavascript("$.mobile.loading( 'show', {\n  text: 'Loading Recent Votes ...',\n  " +
                                       "textVisible: 'false',\n  theme: 'b',\n  textonly: 'false' });");

            var votes = await WebAccess.GetRecentVotesAsync(id);

            var template = new RecentVotesList {
                Model = votes
            };
            var page = template.GenerateString();

            webView.LoadHtmlString(page);
        }
Beispiel #2
0
        public async void ShowBillView(int id, int politicianid)
        {
            webView.EvaluateJavascript("$.mobile.loading( 'show', {\n  text: 'Loading Related Bill ...',\n  " +
                                       "textVisible: 'false',\n  theme: 'b',\n  textonly: 'false' });");

            var bill = await WebAccess.GetBillAsync(id);

            bill.PoliticianId = politicianid;

            var template = new BillView {
                Model = bill
            };
            var page = template.GenerateString();

            webView.LoadHtmlString(page);
        }
Beispiel #3
0
        public async void AddFavoriteBill(int id)
        {
            var bill = await WebAccess.GetBillAsync(id);

            dataAccess.SaveFavoriteBill(bill);
        }