예제 #1
0
        private void refresh()
        {
            var freshData = FactsData.GetFacts(true);

            Title = freshData.title;

            //initialize at the launch
            Facts = new ObservableCollection <Fact>(freshData.rows);
        }
예제 #2
0
        public MainViewModel()
        {
            mdata = FactsData.GetFacts(true);
            Title = mdata.title;

            RefreshCommand = new Command(() =>
            {
                refresh();
            });

            SortCommand = new Command(() =>
            {
                sort();
            });
            Facts = new ObservableCollection <Fact>(mdata.rows);
        }