Esempio n. 1
0
        public App()
        {
            InitializeComponent();

            var model = new GreatQuoteViewModel(QuoteManager.Load().First());

            MainPage = new NavigationPage(new QuoteDetailPage(model));
        }
        protected override void OnSleep()
        {
            base.OnSleep();

            // Persist the quotes back out.
            QuoteManager.Save(DependencyService.Get <MainViewModel>()
                              .Quotes.Select(qvm => qvm.Model));
        }
Esempio n. 3
0
        public App()
        {
            InitializeComponent();

            var quote = QuoteManager.Load().First();

            MainPage = new NavigationPage(new QuoteDetailPage(quote));
        }
Esempio n. 4
0
        public App()
        {
            InitializeComponent();

            var quotes = QuoteManager.Load().ToList();
            var quote  = quotes[new Random().Next(0, quotes.Count - 1)];

            MainPage = new NavigationPage(new QuoteDetailPage(new GreatQuoteViewModel(quote)));
        }
Esempio n. 5
0
        public App()
        {
            InitializeComponent();

            var list      = QuoteManager.Load().ToList();
            var quote     = list[new Random().Next(list.Count)];
            var viewModel = new GreatQuoteViewModel(quote);

            MainPage = new NavigationPage(new QuoteDetailPage(viewModel));
        }
Esempio n. 6
0
 public QuoteListPage()
 {
     BindingContext = new List <GreatQuote>(QuoteManager.Load());
     InitializeComponent();
 }