diff options
Diffstat (limited to 'MediaBrowser.ServerApplication')
| -rw-r--r-- | MediaBrowser.ServerApplication/App.xaml.cs | 27 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/MainWindow.xaml.cs | 4 |
2 files changed, 25 insertions, 6 deletions
diff --git a/MediaBrowser.ServerApplication/App.xaml.cs b/MediaBrowser.ServerApplication/App.xaml.cs index db229905d2..5f1b8d0e06 100644 --- a/MediaBrowser.ServerApplication/App.xaml.cs +++ b/MediaBrowser.ServerApplication/App.xaml.cs @@ -30,7 +30,7 @@ namespace MediaBrowser.ServerApplication SingleInstance<App>.Cleanup();
}
}
-
+
#region ISingleInstanceApp Members
public bool SignalExternalCommandLineArgs(IList<string> args)
{
@@ -42,9 +42,30 @@ namespace MediaBrowser.ServerApplication public static void OpenDashboard()
{
- using (Process process = Process.Start("http://localhost:" + Kernel.Instance.Configuration.HttpServerPortNumber + "/mediabrowser/dashboard/index.html"))
+ OpenUrl("http://localhost:" + Kernel.Instance.Configuration.HttpServerPortNumber +
+ "/mediabrowser/dashboard/index.html");
+ }
+
+ public static void OpenUrl(string url)
+ {
+ var process = new Process
{
- }
+ StartInfo = new ProcessStartInfo
+ {
+ FileName = url
+ },
+
+ EnableRaisingEvents = true
+ };
+
+ process.Exited += ProcessExited;
+
+ process.Start();
+ }
+
+ static void ProcessExited(object sender, EventArgs e)
+ {
+ (sender as Process).Dispose();
}
protected override IKernel InstantiateKernel()
diff --git a/MediaBrowser.ServerApplication/MainWindow.xaml.cs b/MediaBrowser.ServerApplication/MainWindow.xaml.cs index 2e087a7912..04da97a2b2 100644 --- a/MediaBrowser.ServerApplication/MainWindow.xaml.cs +++ b/MediaBrowser.ServerApplication/MainWindow.xaml.cs @@ -23,9 +23,7 @@ namespace MediaBrowser.ServerApplication private void cmVisitCT_click(object sender, RoutedEventArgs e)
{
- using (Process process = Process.Start("http://community.mediabrowser.tv/"))
- {
- }
+ App.OpenUrl("http://community.mediabrowser.tv/");
}
private void cmExit_click(object sender, RoutedEventArgs e)
|
