本文整理汇总了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);
};
}
示例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
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
示例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
}
示例9: websiteLink_Click
private void websiteLink_Click(object sender, RoutedEventArgs e)
{
WebBrowserTask browserTask = new WebBrowserTask();
browserTask.URL = "www.griffinfujioka.tumblr.com";
browserTask.Show();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}