More code cleanups

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-09-11 15:37:14 -04:00
parent 670a53258e
commit f1e668bad8
58 changed files with 296 additions and 298 deletions

View File

@@ -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()

View File

@@ -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)