forked from NuGetPackageExplorer/NuGetPackageExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPluginManagerDialog.xaml.cs
44 lines (38 loc) · 1.13 KB
/
PluginManagerDialog.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Windows;
using System.Windows.Input;
using NuGetPe;
namespace PackageExplorer
{
public partial class PluginManagerDialog : StandardDialog
{
#pragma warning disable CS8618 // Non-nullable field is uninitialized.
public PluginManagerDialog()
#pragma warning restore CS8618 // Non-nullable field is uninitialized.
{
InitializeComponent();
DiagnosticsClient.TrackPageView(nameof(PluginManagerDialog));
}
private void Button_Click(object sender, RoutedEventArgs e)
{
DialogResult = true;
}
private void GoToPageCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
if (e.Command != NavigationCommands.GoToPage)
{
return;
}
var uri = e.Parameter as Uri;
if (uri == null)
{
var url = (string)e.Parameter;
Uri.TryCreate(url, UriKind.Absolute, out uri);
}
if (uri != null)
{
UriHelper.OpenExternalLink(uri);
}
}
}
}