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); 
            };
            
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string href = "";
            
            if (DeviceNetworkInformation.IsNetworkAvailable)
            {
                if (NavigationContext.QueryString.TryGetValue("external", out href))
                {
                    if (NavigationContext.QueryString.TryGetValue("href", out href))
                    {
                        if (!href.Contains("http://"))
                        {
                            href = CndHealthSite + href;
                        }
                        WebBrowserTask task = new WebBrowserTask();
                        task.Uri = new Uri(href);
                        task.Show();
                    }
                }
                else if (NavigationContext.QueryString.TryGetValue("href", out href))
                {
                    loadPage(href);
                }
            }
            else
            {
                this.NavigationService.Navigate(new Uri("/ErrorPageNoDataConn.xaml", UriKind.Relative));
            }
        }
Beispiel #3
0
 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();
 }
Beispiel #4
0
 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();
 }
Beispiel #5
0
 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();
 }
        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
        }
 private void BTNAlipay_Click(object sender, RoutedEventArgs e)
 {
     WebBrowserTask wbt01 = new WebBrowserTask();
     UriBuilder uriSite = new UriBuilder("http://shenghuo.alipay.com/tocard.htm");
     wbt01.Uri = uriSite.Uri;
     wbt01.Show();
 }
Beispiel #8
0
        private void TextBlockAbout_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            WebBrowserTask wbt = new Microsoft.Phone.Tasks.WebBrowserTask();

            wbt.Uri = new Uri("http://generoso.info/homegenie");
            wbt.Show();
        }
Beispiel #9
0
        public AboutViewModel()
        {
            EmailCommand = new RelayCommand<string>(emailAddress =>
            {
                try
                {
                    var task = new EmailComposeTask
                                   {
                                       To = emailAddress,
                                       Subject = "StackRep"
                                   };
                    task.Show();
                }
                catch { }
            });

            WebsiteCommand = new RelayCommand<string>(url =>
            {
                try
                {
                    var task = new WebBrowserTask
                                   {
                                       Uri = new Uri(url)
                                   };
                    task.Show();
                }
                catch { }
            });
        }
        private void homePage_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask webBrowserTask = new WebBrowserTask();

            webBrowserTask.Uri = new Uri("http://www.howboutcoffeeapp.com", UriKind.Absolute);
            webBrowserTask.Show();
        }
        private void websiteBtn_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask browserTask = new WebBrowserTask();

            browserTask.URL = "http://davidheyduck.weebly.com/";
            browserTask.Show(); 
        }
 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();
 }
Beispiel #13
0
 private void OpenInBrowserInternal()
 {
     var task = new WebBrowserTask {
         Uri = url
     };
     task.Show();
 }
Beispiel #14
0
        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();
        }
 public override void Execute(object parameter)
 {
     if (parameter == null)
     {
         return;
     }
     try
     {
         EnsureInternet();
         string url = Convert.ToString(parameter);
         if (url.StartsWith(ZUMPA_PREFIX)) //zumpa link, open it in app
         {
             url = String.Format("?url={0}", HttpUtility.UrlEncode(url));
             _navigationService.Navigate(new Uri("/ZumpaReader;component/Pages/ThreadPage.xaml" + url, UriKind.RelativeOrAbsolute));
         }
         else //just go to web
         {
             WebBrowserTask webBrowserTask = new WebBrowserTask();
             webBrowserTask.Uri = new Uri(url, UriKind.Absolute);
             webBrowserTask.Show();
         }
     }
     catch (Exception e)
     {
         ShowError(e);
     }
 }
Beispiel #16
0
        public void Navigate()
        {
            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

            if (this.VideoFileUri != null && !string.IsNullOrEmpty(this.VideoFileUri.ToString()))
            {
                var launcher = new MediaPlayerLauncher
                {
                    Controls = MediaPlaybackControls.All,
                    Media = this.VideoFileUri
                };
                launcher.Show();

            }
            else
            {
                WebBrowserTask browser = new WebBrowserTask();
                browser.URL = this.VideoUri.ToString();
                browser.Show();
            }
            #endif
        }
        private void twitterLink_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask browserTask = new WebBrowserTask();

            browserTask.URL = "www.twitter.com/griffinfujioka";
            browserTask.Show();
        }
        private void hyperlinkButton1_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask browserTask = new WebBrowserTask();

            browserTask.URL = "http://www.windowsphone.com/en-US/publishers/Griffin%20Fujioka?appid=17f6789f-95ce-4afa-8e48-3866768dc145&name=Griffin Fujioka";
            browserTask.Show(); 
        }
        private void websiteLink_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask browserTask = new WebBrowserTask();

            browserTask.URL = "www.griffinfujioka.tumblr.com";
            browserTask.Show(); 
        }
Beispiel #20
0
 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();
 }
Beispiel #21
0
 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();
 }
Beispiel #22
0
 private void epAct_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     Uri uri = new Uri("http://www.eeoc.gov/laws/statutes/epa.cfm");
     WebBrowserTask webBrowserTask = new WebBrowserTask();
     webBrowserTask.Uri = uri;
     webBrowserTask.Show();
 }
Beispiel #23
0
 private void Login_Signup_Button_Click(object sender, RoutedEventArgs e)
 {
     //NavigationService.Navigate(new Uri("/SignupPage.xaml", UriKind.Relative));
     WebBrowserTask wbt = new WebBrowserTask();
     wbt.Uri = new Uri("http://weassist.azurewebsites.net/signup.php");
     wbt.Show();
 }
Beispiel #24
0
 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();
 }
        /// <summary>
        /// Opens the supplied Uri in the default browser.
        /// </summary>
        public Task OpenDefaultBrowser(Uri uri)
        {
            var webBrowserTask = new WebBrowserTask() {Uri = uri};
            webBrowserTask.Show();

            return Task.FromResult(true);
        }
        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();
            }
        }
 private void BTNWeibo_Click(object sender, RoutedEventArgs e)
 {
     WebBrowserTask wbt01 = new WebBrowserTask();
     UriBuilder uriSite = new UriBuilder("http://weibo.com/jevonsflash");
     wbt01.Uri = uriSite.Uri;
     wbt01.Show();
 }
        private void PhoneApplicationPage_LayoutUpdated(object sender, EventArgs e)
        {
            var webBrowserTask = new WebBrowserTask { };

            webBrowserTask.Uri = new Uri("http://zipcar.com");
            webBrowserTask.Show();
        }
Beispiel #29
0
        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
        }
Beispiel #30
0
 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();
 }
 public override void LaunchURI(string url)
 {
     #if WP7
     var task = new WebBrowserTask {Uri = new Uri(url)};
     task.Show();
     #endif
 }
Beispiel #32
0
        private void website_info_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            var task = new Microsoft.Phone.Tasks.WebBrowserTask
            {
                URL = "http://sharetoall1.yolasite.com/"
            };

            task.Show();
        }
Beispiel #33
0
        private void FlurryWebJump_Click(object sender, RoutedEventArgs e)
        {
            var task = new Microsoft.Phone.Tasks.WebBrowserTask
            {
                URL = "https://dev.flurry.com/form.do"
            };

            task.Show();
        }
Beispiel #34
0
        private void HyperlinkButtonClick(object sender, EventArgs e)
        {
            //	await Launcher.LaunchUriAsync( new Uri(  ) );
            System.Uri urlToOpen = new System.Uri(AppResources.AboutLink);
            var        task      = new Microsoft.Phone.Tasks.WebBrowserTask
            {
                Uri = urlToOpen
            };

            task.Show();
        }
Beispiel #35
0
        public void NavigateToUrl(string url)
        {
            var task = new Microsoft.Phone.Tasks.WebBrowserTask
            {
                Uri = new Uri(url)
            };

            task.Show();
            if (OnNavigateToUrl != null)
            {
                OnNavigateToUrl(url);
            }
        }
Beispiel #36
0
        public void ImageTapped(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Image img = sender as Image;

            if (img != null)
            {
                var url = img.Tag as string;
                if (url != null && Uri.IsWellFormedUriString(url, UriKind.Absolute))
                {
                    Deployment.Current.Dispatcher.BeginInvoke(() =>
                    {
                        var task = new Microsoft.Phone.Tasks.WebBrowserTask {
                            Uri = new Uri(url, UriKind.Absolute)
                        };
                        task.Show();
                    });
                }
            }
        }
Beispiel #37
0
 private void ShowInBrowser(string url)
 {
     Microsoft.Phone.Tasks.WebBrowserTask wbt = new Microsoft.Phone.Tasks.WebBrowserTask();
     wbt.Uri = new Uri(url);
     wbt.Show();
 }