protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            object    classNewsOb = (object)e.Parameter;
            ClassNews classNews   = (ClassNews)classNewsOb;

            // if (e.Parameter is string && !string.IsNullOrWhiteSpace((string)e.Parameter))
            //  {
            Uri myUri = new Uri("https://yandex.ru/pogoda/moscow");



            web.Source = myUri;
            myUri2     = myUri;

            await MyParser();

            // }
            //  else
            // {
            //Uri myUri = new Uri(e.Parameter.ToString());
            // myUri2 = myUri;
            // web.Source = myUri;


            //}
            base.OnNavigatedTo(e);
        }
示例#2
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            object    classNewsOb = (object)e.Parameter;
            ClassNews classNews   = (ClassNews)classNewsOb;

            // if (e.Parameter is string && !string.IsNullOrWhiteSpace((string)e.Parameter))
            //  {
            Uri myUri = new Uri(classNews.Link);


            if (classNews.istochnic == "Lenta.ru")
            {
                myUri2 = myUri;
                await MyParser();
            }
            else
            {
                web.Source = myUri;
                myUri2     = myUri;
            }

            // }
            //  else
            // {
            //Uri myUri = new Uri(e.Parameter.ToString());
            // myUri2 = myUri;
            // web.Source = myUri;


            //}
            base.OnNavigatedTo(e);
        }
示例#3
0
        private async void GridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            GridView  GridViewNews = sender as GridView;
            ClassNews classNews    = (ClassNews)GridViewNews.SelectedItem;
            // MessageDialog messageDialog = new MessageDialog(classNews.Description);
            //  await messageDialog.ShowAsync();

            BlankPageWeb blankPageWeb = new BlankPageWeb();

            blankPageWeb.hh = classNews.Link;
            Frame rootFrame = Window.Current.Content as Frame;

            rootFrame.Navigate(typeof(BlankPageWeb), classNews.Link);
        }
 public void AddListNews(ClassNews classNews)
 {
     ListNews.Add(classNews);
 }