• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Navigation.RequestNavigateEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Navigation.RequestNavigateEventArgs的典型用法代码示例。如果您正苦于以下问题:C# RequestNavigateEventArgs类的具体用法?C# RequestNavigateEventArgs怎么用?C# RequestNavigateEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RequestNavigateEventArgs类属于System.Windows.Navigation命名空间,在下文中一共展示了RequestNavigateEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnRequestNavigateFromUrl

        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);
                }
            }
        }
开发者ID:krikelin,项目名称:torshify-client,代码行数:27,代码来源:SpotifyLinkNavigator.cs


示例2: Hyperlink_RequestNavigate

 private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
 {
     if (this.NavigateUri != null)
     {
         System.Diagnostics.Process.Start(this.NavigateUri);
     }
 }
开发者ID:Microsoft,项目名称:sarif-sdk,代码行数:7,代码来源:InternetHyperlink.xaml.cs


示例3: Hyperlink_RequestNavigate

 private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
 {
     Uri uri = e.Uri;
     try { Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); }
     catch { }
     e.Handled = true;
 }
开发者ID:stevenzeiler,项目名称:FeenPhone,代码行数:7,代码来源:AboutWPF.xaml.cs


示例4: Hyperlink_RequestNavigate

 private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
 {
     if (e != null)
     {
         System.Diagnostics.Process.Start(e.Uri.AbsoluteUri.ToString());
     }
 }
开发者ID:josuecorrea,项目名称:DanfeSharp,代码行数:7,代码来源:MainWindow.xaml.cs


示例5: Hyperlink_OnRequestNavigate

        private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            string uri = e.Uri.AbsoluteUri;
            Process.Start(new ProcessStartInfo(uri));

            e.Handled = true;
        }
开发者ID:Jupotter,项目名称:Terre-Natale-Calculateur,代码行数:7,代码来源:AboutDialog.xaml.cs


示例6: Hyperlink_OnRequestNavigate

 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;
 }
开发者ID:NoImNot,项目名称:LolAnimationChanger,代码行数:7,代码来源:About.xaml.cs


示例7: hbUpdates_RequestNavigate

        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();
        }
开发者ID:WillStefan,项目名称:MPExtended,代码行数:30,代码来源:TabProject.xaml.cs


示例8: Paste_RequestNavigate

 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();
     }
 }
开发者ID:jithuin,项目名称:infogeezer,代码行数:25,代码来源:LinkRichTextView.xaml.cs


示例9: link_RequestNavigate

 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;
 }
开发者ID:vendettamit,项目名称:stackoverflowclient,代码行数:7,代码来源:MainWindowView.xaml.cs


示例10: LoginGuestClick

 public void LoginGuestClick(object sender, RequestNavigateEventArgs e)
 {
     ResetStatus();
     ClearBlurEffect(_dashboard);
     Logger.Debug("Logging in as Guest");
     GwupeClientAppContext.CurrentAppContext.LoginManager.LoginGuest();
 }
开发者ID:gwupe,项目名称:Gwupe,代码行数:7,代码来源:LoginControl.xaml.cs


示例11: Hyperlink_RequestNavigate

        private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            var hyperlink = sender as Hyperlink;

            Process.Start(new ProcessStartInfo(hyperlink.NavigateUri.ToString()));
            e.Handled = true;
        }
开发者ID:mmdurrant,项目名称:ChocolateyExplorer,代码行数:7,代码来源:Packages.xaml.cs


示例12: HyperlinkRequestNavigate

 /// <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;
 }
开发者ID:andreaskoch,项目名称:Hostfile-Manager,代码行数:10,代码来源:About.xaml.cs


示例13: OnMouseDown

 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;
     }
 }
开发者ID:arkanoid1,项目名称:FakePacketSender,代码行数:26,代码来源:VisualLineLinkText.cs


示例14: hbUpdates_RequestNavigate

        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();
        }
开发者ID:aredon,项目名称:MPExtended,代码行数:31,代码来源:TabProject.xaml.cs


示例15: OnRequestNavigate

        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);
        }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:25,代码来源:UriNavigator.cs


示例16: hyperlinkRequestNavigateEvent

        // 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;
        }
开发者ID:Redi0,项目名称:GitHubFolderDownloader,代码行数:9,代码来源:WebHyperlink.cs


示例17: LibraryPath_RequestNavigate

 private void LibraryPath_RequestNavigate(object sender, RequestNavigateEventArgs e) {
     var path = e.Uri.ToString().Replace('/', '\\');
     if (Directory.Exists(path)) {
         try {
             Process.Start(path);
         } catch (Win32Exception) { }
     }
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:8,代码来源:PackageDetails.xaml.cs


示例18: onNavigateExecute

 private static void onNavigateExecute(RequestNavigateEventArgs args) {
   try {
     Process.Start(new ProcessStartInfo(args.Uri.AbsoluteUri));
   }
   catch(Exception) {
     // ignored
   }
 }
开发者ID:stricq,项目名称:UPKManager,代码行数:8,代码来源:AboutController.cs


示例19: OnRequestNavigate

 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);
     }
 }
开发者ID:GoldRenard,项目名称:EFIReboot,代码行数:8,代码来源:AboutWindow.xaml.cs


示例20: Hyperlink_RequestNavigate

 private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
 {
     if (e.Uri != null)
     {
         Process.Start(e.Uri.AbsoluteUri);
         e.Handled = true;
     }
 }
开发者ID:CascadesCarnivoreProject,项目名称:Timelapse,代码行数:8,代码来源:AboutEditor.xaml.cs



注:本文中的System.Windows.Navigation.RequestNavigateEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Shapes.Ellipse类代码示例发布时间:2022-05-26
下一篇:
C# Navigation.NavigationService类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap