Пример #1
0
 public void OpenSite2()
 {
     //哈佛大学公开课:计算机科学cs50  http://v.163.com/special/opencourse/cs50.html
     //哈佛大学公开课:构建动态网站 http://v.163.com/special/opencourse/buildingdynamicwebsites.html
     //String url = "http://v.163.com/special/opencourse/cs50.html";//"http://v.163.com/special/opencourse/cs50.html";
     //密西西比河谷州立大学:Android应用程序开发
     String url = "http://v.163.com/special/opencourse/developingandroidapplications.html";
     String gb2312 = "gb2312";
     OcClient oc = new OcClient();
     Task<Course> items =oc.DoWork(url,gb2312);
     Course result =items.Result;
 }
Пример #2
0
 private async Task NewMethod(NavigationEventArgs e)
 {
     String gb2312 = "gb2312";
     String url = (String)e.Parameter;
     OcClient oc = new OcClient();
     //获取结果
     Course course = await oc.DoWork(url, gb2312);
     //设置课程标题
     openCourseTitle.Text = course.OpenCourseTitle;
     //设置课程列表
     CourseItem.ItemsSource = course.MCourseItem;
 }
Пример #3
0
        /// <summary>
        /// 在此页将要在 Frame 中显示时进行调用。
        /// </summary>
        /// <param name="e">描述如何访问此页的事件数据。Parameter
        /// 属性通常用于配置页。</param>
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (e.NavigationMode == NavigationMode.New)
            {
                //哈佛大学公开课:计算机科学cs50  http://v.163.com/special/opencourse/cs50.html
                //哈佛大学公开课:构建动态网站 http://v.163.com/special/opencourse/buildingdynamicwebsites.html
                String url = "http://v.163.com/special/opencourse/cs50.html";//"http://v.163.com/special/opencourse/cs50.html";
                //密西西比河谷州立大学:Android应用程序开发
                //String url = "http://v.163.com/special/opencourse/developingandroidapplications.html";
                String gb2312 = "gb2312";
                
                OcClient oc = new OcClient();
                //获取结果
                Course course = await oc.DoWork(url, gb2312);
                //设置课程标题
                openCourseTitle.Text = course.OpenCourseTitle;
                //设置课程列表
                CourseItem.ItemsSource = course.MCourseItem;

            }
        }