private void link_RequestNavigate(object sender, RequestNavigateEventArgs e) { var startArgs = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"; var startInfo = new ProcessStartInfo(startArgs, e.Uri.AbsoluteUri); Process.Start(startInfo); e.Handled = true; }
void HyperlinkNavigated(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Context.InvokeUserCode(() => { EventSink.OnNavigateToUrl(e.Uri); e.Handled = true; }); }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { var hyperlink = sender as Hyperlink; Process.Start(new ProcessStartInfo(hyperlink.NavigateUri.ToString())); e.Handled = true; }
private void OnRequestNavigateFromUrl(object sender, RequestNavigateEventArgs e) { ILink link = _session.FromLink(e.Uri.OriginalString); if (link != null) { if (link is ILink<IArtist>) { IArtist artist = ((ILink<IArtist>)link).Object; Artist torshifyArtist = new Artist(artist, Application.Current.Dispatcher); CoreCommands.Views.GoToArtistCommand.Execute(torshifyArtist); } else if (link is ILink<IAlbum>) { IAlbum album = ((ILink<IAlbum>)link).Object; Album torshifyAlbum = new Album(album, Application.Current.Dispatcher); CoreCommands.Views.GoToAlbumCommand.Execute(torshifyAlbum); } else if (link is ILink<ITrackAndOffset>) { ITrackAndOffset track = ((ILink<ITrackAndOffset>) link).Object; Track torshifyTrack = new Track(track.Track, Application.Current.Dispatcher); CoreCommands.PlayTrackCommand.Execute(torshifyTrack); CoreCommands.Player.SeekCommand.Execute(track.Offset); } } }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { Uri uri = e.Uri; try { Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); } catch { } e.Handled = true; }
private void hbUpdates_RequestNavigate(object sender, RequestNavigateEventArgs e) { tbVersion.Text = String.Format("{0} (checking for updates...)", VersionUtil.GetVersionName()); e.Handled = true; versionChecker = new BackgroundWorker(); versionChecker.DoWork += delegate(object s, DoWorkEventArgs args) { string text; if (!UpdateChecker.IsWorking()) { text = "failed to retrieve update information"; } else if (UpdateChecker.IsUpdateAvailable()) { text = String.Format("update available: version {0}, released on {1:dd MMM yyyy}", UpdateChecker.GetLastReleasedVersion().Version, UpdateChecker.GetLastReleasedVersion().ReleaseDate); } else { text = "no update available"; } args.Result = String.Format("{0} ({1})", VersionUtil.GetVersionName(), text); }; versionChecker.RunWorkerCompleted += delegate(object s, RunWorkerCompletedEventArgs args) { tbVersion.Text = args.Result as string; }; versionChecker.RunWorkerAsync(); }
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e) { string uri = e.Uri.AbsoluteUri; Process.Start(new ProcessStartInfo(uri)); e.Handled = true; }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { if (this.NavigateUri != null) { System.Diagnostics.Process.Start(this.NavigateUri); } }
private void Paste_RequestNavigate(object sender, RequestNavigateEventArgs e) { TextPointer start = this._rtb.Document.ContentStart, end = this._rtb.Document.ContentEnd; TextRange tr = new TextRange(start, end); tr.Select(start, end); MemoryStream ms; StringBuilder sb = new StringBuilder(); foreach (String dataFormat in _listOfFormats) { if (tr.CanSave(dataFormat)) { ms = new MemoryStream(); tr.Save(ms, dataFormat); ms.Seek(0, SeekOrigin.Begin); sb.AppendLine(dataFormat); foreach (char c in ms.ToArray().Select<byte, char>((b) => (char)b)) { sb.Append(c); } sb.AppendLine(); } //_tb.Text = sb.ToString(); } }
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e) { if (sender == null) throw new ArgumentNullException("sender"); if (e == null) throw new ArgumentNullException("e"); Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); e.Handled = true; }
private void hbUpdates_RequestNavigate(object sender, RequestNavigateEventArgs e) { tbVersion.Text = String.Format("{0} ({1})", VersionUtil.GetVersionName(), UI.CheckingForUpdates); e.Handled = true; versionChecker = new BackgroundWorker(); versionChecker.DoWork += delegate(object s, DoWorkEventArgs args) { string text; if (!UpdateChecker.IsWorking()) { text = UI.FailedToRetrieveUpdateInformation; } else if (UpdateChecker.IsUpdateAvailable()) { text = String.Format(UI.UpdateAvailable, UpdateChecker.GetLastReleasedVersion().Version, UpdateChecker.GetLastReleasedVersion().ReleaseDate); } else { text = UI.NoUpdateAvailable; } args.Result = String.Format("{0} ({1})", VersionUtil.GetVersionName(), text); }; versionChecker.RunWorkerCompleted += delegate(object s, RunWorkerCompletedEventArgs args) { tbVersion.Text = args.Result as string; }; versionChecker.RunWorkerAsync(); }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { if (e != null) { System.Diagnostics.Process.Start(e.Uri.AbsoluteUri.ToString()); } }
/// <summary>Handle a hyperlink click event</summary> /// <param name="sender">The sender object.</param> /// <param name="e">The <see cref="RequestNavigateEventArgs"/> object.</param> private void HyperlinkRequestNavigate(object sender, RequestNavigateEventArgs e) { Hyperlink hl = (Hyperlink)sender; string navigateUri = hl.NavigateUri.ToString(); Process.Start(new ProcessStartInfo(navigateUri)); e.Handled = true; }
void HyperlinkNavigated(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Xwt.Engine.Toolkit.Invoke(() => { EventSink.OnNavigateToUrl(e.Uri); e.Handled = true; }); }
private void OnRequestNavigate(object sender, RequestNavigateEventArgs e) { if (e.Uri == null) { return; } BrowserHelper.StartBrowser(e.Uri); e.Handled = true; var hyperlink = sender as Hyperlink; if (hyperlink == null) { return; } var item = hyperlink.Tag as DiagnosticData; if (item == null) { return; } var telemetry = item.CustomTags.Any(t => t == WellKnownDiagnosticTags.Telemetry); DiagnosticLogger.LogHyperlink("ErrorList", item.Id, item.Description != null, telemetry, e.Uri.AbsoluteUri); }
public void LoginGuestClick(object sender, RequestNavigateEventArgs e) { ResetStatus(); ClearBlurEffect(_dashboard); Logger.Debug("Logging in as Guest"); GwupeClientAppContext.CurrentAppContext.LoginManager.LoginGuest(); }
private void hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { string uri = e.Uri.AbsoluteUri; System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(uri)); e.Handled = true; }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { System.Diagnostics.Process.Start("http://www.retrosheet.org"); System.Diagnostics.Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); e.Handled = true; }
protected internal override void OnMouseDown(MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left && !e.Handled && LinkIsClickable()) { RequestNavigateEventArgs args = new RequestNavigateEventArgs(this.NavigateUri, this.TargetName); args.RoutedEvent = Hyperlink.RequestNavigateEvent; FrameworkElement element = e.Source as FrameworkElement; if (element != null) { // allow user code to handle the navigation request element.RaiseEvent(args); } if (!args.Handled) { try { Process.Start(this.NavigateUri.ToString()); } catch { // ignore all kinds of errors during web browser start } } e.Handled = true; } }
public void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { var link = (Hyperlink)sender; var text = new TextRange(link.ContentStart, link.ContentEnd).Text; this.Navigation.Navigate(link.NavigateUri, this.Root); }
private void LibraryPath_RequestNavigate(object sender, RequestNavigateEventArgs e) { var path = e.Uri.ToString().Replace('/', '\\'); if (Directory.Exists(path)) { try { Process.Start(path); } catch (Win32Exception) { } } }
private static void onNavigateExecute(RequestNavigateEventArgs args) { try { Process.Start(new ProcessStartInfo(args.Uri.AbsoluteUri)); } catch(Exception) { // ignored } }
// Private Methods (2) private static void hyperlinkRequestNavigateEvent(object sender, RequestNavigateEventArgs e) { if (e.Uri == null || string.IsNullOrWhiteSpace(e.Uri.AbsoluteUri)) return; Process.Start(e.Uri.AbsoluteUri); e.Handled = true; }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { if (e.Uri != null) { Process.Start(e.Uri.AbsoluteUri); e.Handled = true; } }
private void OnRequestNavigate(object sender, RequestNavigateEventArgs e) { try { System.Diagnostics.Process.Start(System.Web.HttpUtility.UrlDecode(e.Uri.AbsoluteUri)); } catch (Exception ex) { MessageBox.Show("Unable to open URL: " + e.Uri.AbsoluteUri, "URL open error", MessageBoxButton.OK, MessageBoxImage.Error); } }
/// <summary> /// Handles click navigation on the hyperlink in the About dialog. /// </summary> /// <param name="sender">Object the sent the event.</param> /// <param name="e">Navigation events arguments.</param> private void OnHyperlinkRequestNavigate(object sender, RequestNavigateEventArgs e) { if (e.Uri != null && string.IsNullOrEmpty(e.Uri.OriginalString) == false) { string uri = e.Uri.AbsoluteUri; Process.Start(new ProcessStartInfo(uri)); e.Handled = true; } }
void OnRequestNavigate(object sender, RequestNavigateEventArgs e) { e.Handled = true; try { Process.Start(e.Uri.ToString()); } catch { // catch exceptions - e.g. incorrectly installed web browser } }
public void OpenHyperLink(object sender, RequestNavigateEventArgs e) { var text = e.Uri.OriginalString; if(text.StartsWith("mylist/")) { text = "http://www.nicovideo.jp/" + text; } NicoNicoOpener.Open(text); }
private void LogLink_RequestNavigate(object sender, RequestNavigateEventArgs e) { string link = Static.StaticData.Settings.LogFilePath; string executablePath = new PathCutHelper().GetExecutablePath(); link = string.Format(@"{0}\{1}", executablePath, link); if (System.IO.File.Exists(link) == false) this.LabelLogLink.IsEnabled = false; else System.Diagnostics.Process.Start(link); }
public void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { var link = (Hyperlink)sender; var text = new TextRange(link.ContentStart, link.ContentEnd).Text; var prototype = new r.location { gm_name = text }; this.Navigation.Navigate(link.NavigateUri, this.CurrentGame.SingleOrCreate(this.CurrentGame.Locations, prototype, true)); }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { //http://stackoverflow.com/questions/10238694/example-using-hyperlink-in-wpf if(e.Uri != null) { Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); e.Handled = true; } }
private static void onLinkRequestNavigate(object sender, RequestNavigateEventArgs args) { if (!ReferenceEquals(sender, args.OriginalSource)) return; if (ObservableObject.IsInDesignMode) return; Hyperlink link = sender as Hyperlink; ICommand command = link?.GetValue(RequestNavigationCommandProperty) as ICommand; if (command != null && command.CanExecute(args)) command.Execute(args); }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { try { Process.Start(e.Uri.OriginalString); } catch (Exception ex) { Log.Add(ex); } }
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e) { try { var navigateUri = (sender as Hyperlink).NavigateUri.ToString(); if(WikiHelper.CheckValidHttpUrl(navigateUri)) System.Diagnostics.Process.Start(navigateUri); } catch { } e.Handled = true; }
private void NavigateToHomepage(object sender, RequestNavigateEventArgs e) { Hyperlink link = sender as Hyperlink; if (link != null) { Process.Start(link.NavigateUri.AbsoluteUri); } e.Handled = true; cbName.ResumeFocusEvents(); }
private static void HyperlinkRequestNavigate(object sender, RequestNavigateEventArgs e) { try { e.Handled = true; if (e.Uri != null && !string.IsNullOrEmpty(e.Uri.ToString())) CommonHelper.OpenBrowser(e.Uri.ToString()); } catch { } }
public void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { var link = (Hyperlink)sender; var text = new TextRange(link.ContentStart, link.ContentEnd).Text; var prototype = new r.character(); var character_belief_split = text.Split(new char[] { prototype.seperator }); prototype.gm_name = character_belief_split[0]; prototype = this.CurrentGame.SingleOrCreate(this.CurrentGame.Characters, prototype, true); this.CurrentGame.SaveBeliefNetworkToCharacter(character_belief_split[1], prototype); this.Navigation.Navigate(link.NavigateUri, prototype); }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { try { if (e.Uri.AbsoluteUri.IsNotEmpty()) { Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); } e.Handled = true; } catch (Exception exp) { MessageBox.Show(exp.ToString()); } }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { try { Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true }); e.Handled = true; } catch (Exception e1) { Trace.WriteLine(e1.Message); } }
private async void hyperlink_TurnOffVpn(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { string batchFile = AppDomain.CurrentDomain.BaseDirectory + @"TurnOffVpn.bat"; if (File.Exists(batchFile)) { Process p = Process.Start(batchFile); await Task.Run(() => p.WaitForExit()); await Task.Delay(2000); ((MainViewModel)DataContext).OnLoaded(); } e.Handled = true; }
public void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { var link = (Hyperlink)sender; var text = new TextRange(link.ContentStart, link.ContentEnd).Text; var character_prototype = new r.character(); var belief_prototype = new r.belief(); var character_belief_hypothesis_split = text.Split(new char[] { character_prototype.seperator }); var character_gm_name = character_belief_hypothesis_split[0]; var belief_variable = character_belief_hypothesis_split[1]; var character = this.CurrentGame .Characters.Single(x => x.gm_name == character_gm_name && x.partition == this.CurrentGame.Partition); var belief = character .beliefs.Single(x => x.variable == belief_variable && x.partition == this.CurrentGame.Partition); var prototype = this.CurrentGame.SaveHypothesesToBelief(character_belief_hypothesis_split[2], belief); this.Navigation.Navigate(this, prototype); }
private void hyperlink_ShowAbout(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { BitmapImage appBi = new BitmapImage(new System.Uri("pack://application:,,,/Asset/egg1.ico")); BitmapImage cBi = new BitmapImage(new System.Uri("pack://application:,,,/Asset/egg1.ico")); AboutControlView about = new AboutControlView(); AboutControlViewModel vm = (AboutControlViewModel)about.FindResource("ViewModel"); vm.IsSemanticVersioning = true; vm.ApplicationLogo = appBi; vm.PublisherLogo = cBi; vm.HyperlinkText = "https://github.com/kmaki565/BentoEx"; vm.Title = "BentoEx (おべんとサッ!と)"; vm.AdditionalNotes = ""; vm.Window.Content = about; vm.Window.Show(); e.Handled = true; }
//private void Button_Click(object sender, RoutedEventArgs e) //{ // Process p = new Process(); // p.StartInfo.UseShellExecute = true; // if (NetDiag.Program.ShowIPAddressesBool()) // if DHCP enabled // { // p.StartInfo.FileName = "https://www.citypassenger.com/dhcpok"; // p.Start(); // } // else // if DHCP disabled // { // p.StartInfo.FileName = "https://www.citypassenger.com/dhcpok"; // p.Start(); // } //} private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Process p = new Process(); p.StartInfo.UseShellExecute = true; //_show_image = NetDiag.Program.ShowIPAddressesBool(); if (NetDiag.Program.ShowIPAddressesBool()) // if DHCP enabled { //image1.Visibility = Visibility.Visible; //System.Windows.Visibility vis = new System.Windows.Visibility(); //image1.Visibility = "Hidden"; p.StartInfo.FileName = "https://www.citypassenger.com/dhcpok"; p.Start(); } else // if DHCP disabled { p.StartInfo.FileName = "https://www.citypassenger.com/dhcpfail"; p.Start(); } }
private static void LinkRequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Process.Start(e.Uri.AbsoluteUri); }
// Don't navigate hyperlinks in our markdown, thanks! // Not sure if this is needed on non Page items, but just in case. private void RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) => e.Handled = true;
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); e.Handled = true; }
private void OnNavigationRequest(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Process.Start(e.Uri.ToString()); e.Handled = true; }
/// <summary> /// launch any web request /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { ProcessHelper.LaunchWebUri(e.Uri); e.Handled = true; }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { System.Diagnostics.Process.Start(e.Uri.ToString()); }
void link_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo("https://blaze-games.com/LinkOut/?Url=" + System.Net.WebUtility.HtmlEncode(e.Uri.AbsoluteUri))); e.Handled = true; }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { System.Diagnostics.Process.Start(e.Uri.AbsoluteUri); e.Handled = true; }
private void OpenHyperlink(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) => ProcessExtensions.OpenFileWithDefaultProgram(e.Uri.ToString());
private void Link(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { System.Diagnostics.Process.Start(e.Uri.AbsoluteUri); }
private void UpdateLink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { Shell.OpenUrl(e.Uri.ToString()); }
void link_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { //http://stackoverflow.com/questions/2288999/how-can-i-get-a-flowdocument-hyperlink-to-launch-browser-and-go-to-url-in-a-wpf Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri)); e.Handled = true; }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { System.Diagnostics.Process.Start("http://www.msn.com"); }