當前位置: 首頁>>代碼示例>>C#>>正文


C# Tasks.WebBrowserTask類代碼示例

本文整理匯總了C#中Microsoft.Phone.Tasks.WebBrowserTask的典型用法代碼示例。如果您正苦於以下問題:C# WebBrowserTask類的具體用法?C# WebBrowserTask怎麽用?C# WebBrowserTask使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


WebBrowserTask類屬於Microsoft.Phone.Tasks命名空間,在下文中一共展示了WebBrowserTask類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AppUpdateControl

        public AppUpdateControl(IEnumerable<IAppVersion> appVersions, Action<IAppVersion> updateAction)
        {
            this.NewestVersion = appVersions.First();
            InitializeComponent();

            this.AppIconImage.ImageFailed += (sender, e) => { this.AppIconImage.Source = new BitmapImage(new Uri("/Assets/windows_phone.png", UriKind.RelativeOrAbsolute)); };
            this.AppIconImage.Source = new BitmapImage(new Uri(HockeyClient.Current.AsInternal().ApiBaseVersion2 + "apps/" + NewestVersion.PublicIdentifier + ".png"));

            this.ReleaseNotesBrowser.Opacity = 0;
            this.ReleaseNotesBrowser.Navigated += (sender, e) => { (this.ReleaseNotesBrowser.Resources["fadeIn"] as Storyboard).Begin(); };
            this.ReleaseNotesBrowser.NavigateToString(WebBrowserHelper.WrapContent(NewestVersion.Notes));
            this.ReleaseNotesBrowser.Navigating += (sender, e) =>
            {
                e.Cancel = true;
                WebBrowserTask browserTask = new WebBrowserTask();
                browserTask.Uri = e.Uri;
                browserTask.Show();
            };
            this.InstallAETX.Click += (sender, e) =>
            {
                WebBrowserTask webBrowserTask = new WebBrowserTask();
                webBrowserTask.Uri = new Uri(HockeyClient.Current.AsInternal().ApiBaseVersion2 + "apps/" + NewestVersion.PublicIdentifier + ".aetx", UriKind.Absolute);
                webBrowserTask.Show();
            };
            this.InstallOverApi.Click += (sender, e) => {
                this.Overlay.Visibility = Visibility.Visible;
                updateAction.Invoke(NewestVersion); 
            };
            
        }
開發者ID:bitstadium,項目名稱:HockeySDK-Windows,代碼行數:30,代碼來源:AppUpdateControl.xaml.cs

示例2: Navigate

        public void Navigate()
        {
            App.ViewModel.TrackPageView(this.Name, "/" + this.Parent + "/Video/" + this.Name);

            bool noVideoFileUri = this.VideoFileUri == null || string.IsNullOrWhiteSpace(this.VideoFileUri.ToString());
            #if !WINDOWS_PHONE
            if (noVideoFileUri)
            {
                Windows.System.Launcher.LaunchUriAsync(this.VideoUri);
            }
            else
            {
                Windows.System.Launcher.LaunchUriAsync(this.VideoFileUri);
            }
            #else
            WebBrowserTask browser = new WebBrowserTask();

            if (noVideoFileUri)
            {
                browser.Uri = this.VideoUri;
            }
            else
            {
                browser.Uri = this.VideoFileUri;
            }

            browser.Show();
            #endif
        }
開發者ID:joelmartinez,項目名稱:Khan-Academy-for-Windows-Phone,代碼行數:29,代碼來源:VideoItem.cs

示例3: TrackInBrowser

        private void TrackInBrowser(object sender, System.Windows.Input.GestureEventArgs e)
        {
            string trackingURL = "";
            PackageViewModel current = (PackageViewModel)DataContext;

            switch (current.Carrier)
            {
                case Carriers.UPS:
                    trackingURL = "http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=";
                    break;
                case Carriers.FEDEX:
                    trackingURL = "http://www.fedex.com/Tracking?action=track&tracknumbers=";
                    break;
                case Carriers.USPS:
                    trackingURL = "https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=";
                    break;
                case Carriers.DHL:
                    trackingURL = "http://track.dhl-usa.com/TrackByNbr.asp?ShipmentNumber=";
                    break;
                case Carriers.ONTRAC:
                    trackingURL = "http://www.ontrac.com/trackingres.asp?tracking_number=";
                    break;
            }

            trackingURL += current.TrackingNumber;

            WebBrowserTask task = new WebBrowserTask();
            task.Uri = new Uri(trackingURL, UriKind.Absolute);
            task.Show();
        }
開發者ID:joplinmj,項目名稱:Tracker,代碼行數:30,代碼來源:DetailsPage.xaml.cs

示例4: HyperlinkButton_Click

 private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
 {
     string uri = (sender as FrameworkElement).Tag as string;
     WebBrowserTask task = new WebBrowserTask();
     task.Uri = new Uri(uri, UriKind.Absolute);
     task.Show();
 }
開發者ID:kindasimple,項目名稱:PGHTechFest,代碼行數:7,代碼來源:Speakers.xaml.cs

示例5: Button_Click

 private void Button_Click(object sender, RoutedEventArgs e)
 {
     //WebBrowserTask used to open IE and send to a pre-determinated webpage
     WebBrowserTask follow = new WebBrowserTask();
     follow.Uri = new Uri("https://m.twitter.com/BrianoStorm", UriKind.Absolute);
     follow.Show();
 }
開發者ID:BrianLima,項目名稱:Helix,代碼行數:7,代碼來源:About.xaml.cs

示例6: gcw_StatusChanged

        private void gcw_StatusChanged(object sender, GeoPositionStatusChangedEventArgs e)
        {
            //throw new NotImplementedException();
            if (e.Status == GeoPositionStatus.Ready)
            {
                GeoCoordinate coord = gcw.Position.Location;
                String CurLatLocation = coord.Latitude.ToString("0.000");
                String CurLonLocation = coord.Longitude.ToString("0.000");
                latitude.Text = "Latitude: " + CurLatLocation;
                longitude.Text = "Longitude: " + CurLonLocation;
                //After you have the location, stop the service to conserve power
                gcw.Stop();

                //Open Web Browser to navigate to Google Map using the current location from GPS;
                WebBrowserTask WebBrowserTask = new WebBrowserTask();
                WebBrowserTask.Uri = new Uri("http://maps.google.com/maps?q=" + CurLatLocation + "," +
                    CurLonLocation);
                WebBrowserTask.Show();

            }
            if (e.Status == GeoPositionStatus.Disabled || e.Status == GeoPositionStatus.NoData)
            {
                latitude.Text = "GPS Disabled";
                longitude.Text = "Please turn on your Location Service (GPS) in the system setting.";
                gcw.Stop();
            }
        }
開發者ID:EGartin,項目名稱:AurariaCampusAppSE,代碼行數:27,代碼來源:GPSLocation.xaml.cs

示例7: womansBureau_Tap

 private void womansBureau_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     Uri uri = new Uri("http://www.dol.gov/wb/welcome.html");
     WebBrowserTask webBrowserTask = new WebBrowserTask();
     webBrowserTask.Uri = uri;
     webBrowserTask.Show();
 }
開發者ID:ravs,項目名稱:Narrow-Wage-Gap,代碼行數:7,代碼來源:MainPage.xaml.cs

示例8: Launch

        protected async Task Launch(Uri appToAppUri, Uri webFallbackUri)
        {
#if WINDOWS_PHONE || NETFX_CORE
#if WINDOWS_PHONE
            bool canLaunch = string.Equals(DeviceStatus.DeviceManufacturer, "Nokia", StringComparison.OrdinalIgnoreCase) || string.Equals(DeviceStatus.DeviceManufacturer, "Microsoft", StringComparison.OrdinalIgnoreCase);
#else
            bool canLaunch = true;
#endif
            if (canLaunch)
            {
                // Append the clientId if one has been supplied...
                if (!string.IsNullOrEmpty(this.ClientId))
                {
                    if (appToAppUri.ToString().Contains("?"))
                    {
                        appToAppUri = new Uri(appToAppUri.ToString() + "&client_id=" + this.ClientId);
                    }
                    else
                    {
                        appToAppUri = new Uri(appToAppUri.ToString() + "?client_id=" + this.ClientId);
                    }
                }

                await Windows.System.Launcher.LaunchUriAsync(appToAppUri);
                return;
            }
#endif
#if WINDOWS_PHONE
            WebBrowserTask web = new WebBrowserTask();
            web.Uri = webFallbackUri;
            web.Show();
#endif
        }
開發者ID:ni3bobade,項目名稱:.net-sdk,代碼行數:33,代碼來源:TaskBase.cs

示例9: websiteLink_Click

        private void websiteLink_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask browserTask = new WebBrowserTask();

            browserTask.URL = "www.griffinfujioka.tumblr.com";
            browserTask.Show(); 
        }
開發者ID:griffinfujioka,項目名稱:Ideas,代碼行數:7,代碼來源:FujiokaPage.xaml.cs

示例10: appbar_web_Click_1

 private void appbar_web_Click_1(object sender, EventArgs e)
 {
     DisplayModel dm = ObjectSaver.GetInstance().Get() as DisplayModel;
     WebBrowserTask wbt = new WebBrowserTask();
     wbt.Uri = new Uri(dm.Link,UriKind.Absolute);
     wbt.Show();
 }
開發者ID:ahmeda8,項目名稱:Deals2Buy,代碼行數:7,代碼來源:Details.xaml.cs

示例11: hyperlinkButton_Click

 private void hyperlinkButton_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     WebBrowserTask wbTask = new WebBrowserTask();
     wbTask.Uri = new Uri("https://mobile.twitter.com/PandaWorks2012",
         UriKind.RelativeOrAbsolute);
     wbTask.Show();
 }
開發者ID:sunnnjin,項目名稱:Blackbox,代碼行數:7,代碼來源:AboutPage.xaml.cs

示例12: homePage_Click

        private void homePage_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask webBrowserTask = new WebBrowserTask();

            webBrowserTask.Uri = new Uri("http://www.howboutcoffeeapp.com", UriKind.Absolute);
            webBrowserTask.Show();
        }
開發者ID:smartboyathome,項目名稱:How-About-Coffee,代碼行數:7,代碼來源:Splash.xaml.cs

示例13: aauw_Tap

 private void aauw_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     Uri uri = new Uri("http://www.aauw.org/");
     WebBrowserTask webBrowserTask = new WebBrowserTask();
     webBrowserTask.Uri = uri;
     webBrowserTask.Show();
 }
開發者ID:ravs,項目名稱:Narrow-Wage-Gap,代碼行數:7,代碼來源:Socialize.xaml.cs

示例14: ncpe_Tap

 private void ncpe_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     Uri uri = new Uri("http://www.pay-equity.org/index.html");
     WebBrowserTask webBrowserTask = new WebBrowserTask();
     webBrowserTask.Uri = uri;
     webBrowserTask.Show();
 }
開發者ID:ravs,項目名稱:Narrow-Wage-Gap,代碼行數:7,代碼來源:Socialize.xaml.cs

示例15: wage_Tap

 private void wage_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     Uri uri = new Uri("http://www.wageproject.org/index.php");
     WebBrowserTask webBrowserTask = new WebBrowserTask();
     webBrowserTask.Uri = uri;
     webBrowserTask.Show();
 }
開發者ID:ravs,項目名稱:Narrow-Wage-Gap,代碼行數:7,代碼來源:Socialize.xaml.cs


注:本文中的Microsoft.Phone.Tasks.WebBrowserTask類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。