当前位置:编程学习 > wap >>

Windows Phone 7 开发之Microsoft.Phone.Tasks中的各项Task

 

//PhoneCallTask :打电话 

        private void btnPhoneCall_Click(object sender, RoutedEventArgs e) 

        { 

            PhoneCallTask task = new PhoneCallTask(); 

 

            task.PhoneNumber = "110"; 

 

            task.DisplayName = "亚"; 

 

            task.Show();   www.zzzyk.com

        } 

  

//SmsComposeTask:发送短信  

        private void btnComposeSms_Click(object sender, RoutedEventArgs e) 

        { 

            SmsComposeTask task = new SmsComposeTask(); 

 

            task.To = "110"; 

 

            task.Body = "你好!."; 

 

            task.Show(); 

        } 

  

//EmailComposeTask:发送邮件 

  

            EmailComposeTask task = new EmailComposeTask(); 

 

            task.To = "252456098@qq.com"; 

 

            task.Cc = "ycproc@163.com"; 

 

            task.Subject = "测试"; 

  

            task.Body = "Hello world!"; 

 

            task.Show(); 

  

  

  

//WebBrowserTask:开启Web浏览器 

       private void btnLaunchWebBrowser_Click(object sender, RoutedEventArgs e) 

        { 

            WebBrowserTask task = new WebBrowserTask(); 

 

            task.URL = "<a href="http://blog.csdn.net/fengyarongaa">http://blog.csdn.net/fengyarongaa</a>"; 

            task.Show(); 

        } 

  

//SearchTask:搜索功能 

        private void btnLaunchSearch_Click(object sender, RoutedEventArgs e) 

        { 

            SearchTask task = new SearchTask(); 

            task.SearchQuery = "亚"; 

            task.Show(); 

        } 

  

//MediaPlayerLauncher:启动媒体播放器 

   MediaPlayerLauncher task = new MediaPlayerLauncher(); 

   task.Media = new Uri(@"http://ecn.channel9.msdn.com/o9/learn/videos/Silverlight4-SL4BusinessModule1-SL4LOB_01_01_Introduction/Silverlight4-SL4BusinessModule1-SL4LOB_01_01_Introduction_kit.wmv"); 

   task.Show();   

作者:_亚

补充:移动开发 , Windows Phone ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,