Пример #1
0
        public MainPage()
        {
            InitializeComponent();

            StackyClient client = new StackyClient("0.9", "", Sites.StackOverflow, new UrlClient(), new JsonProtocol());

            client.GetUsers(users =>
            {
                DataContext = new MainPageViewModel(users);
                //MessageBox.Show(String.Format("There are {0} total users", users.TotalItems));
            }, error =>
            {
                MessageBox.Show(error.Message);
            });
        }
Пример #2
0
        public MainPage()
        {
            InitializeComponent();

            SupportedOrientations = SupportedPageOrientation.Portrait;
            Loaded += new RoutedEventHandler(MainPage_Loaded);

            PageTransitionList.Completed += new EventHandler(PageTransitionList_Completed);

            StackyClient client = new StackyClient("0.9", "", Sites.StackOverflow, new UrlClient(), new JsonProtocol());

            client.GetUsers(users =>
            {
                DataContext = new MainViewModel(users);
            }, error =>
            {
                MessageBox.Show(error.Message);
            });
        }