diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-11 15:37:14 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-11 15:37:14 -0400 |
| commit | f1e668bad82ff591ed4135459c4f26ae500a4025 (patch) | |
| tree | 4857d3c3a0fd110b3a5821fcb143168d40975669 /MediaBrowser.Common/UI | |
| parent | 670a53258ef79ee92f578335577df4f768c9d7d4 (diff) | |
More code cleanups
Diffstat (limited to 'MediaBrowser.Common/UI')
| -rw-r--r-- | MediaBrowser.Common/UI/BaseApplication.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Common/UI/SingleInstance.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Common/UI/Splash.xaml.cs | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/MediaBrowser.Common/UI/BaseApplication.cs b/MediaBrowser.Common/UI/BaseApplication.cs index d763f202f9..ea3e3718a0 100644 --- a/MediaBrowser.Common/UI/BaseApplication.cs +++ b/MediaBrowser.Common/UI/BaseApplication.cs @@ -28,8 +28,8 @@ namespace MediaBrowser.Common.UI {
Kernel = InstantiateKernel();
- Progress<TaskProgress> progress = new Progress<TaskProgress>();
- Splash splash = new Splash(progress);
+ var progress = new Progress<TaskProgress>();
+ var splash = new Splash(progress);
splash.Show();
diff --git a/MediaBrowser.Common/UI/SingleInstance.cs b/MediaBrowser.Common/UI/SingleInstance.cs index 2b2b6fb459..3fc85a74ec 100644 --- a/MediaBrowser.Common/UI/SingleInstance.cs +++ b/MediaBrowser.Common/UI/SingleInstance.cs @@ -368,7 +368,7 @@ namespace Microsoft.Shell /// <param name="channelName">Application's IPC channel name.</param>
private static void CreateRemoteService(string channelName)
{
- BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
+ var serverProvider = new BinaryServerFormatterSinkProvider { };
serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
IDictionary props = new Dictionary<string, string>();
@@ -383,7 +383,7 @@ namespace Microsoft.Shell ChannelServices.RegisterChannel(channel, true);
// Expose the remote service with the REMOTE_SERVICE_NAME
- IPCRemoteService remoteService = new IPCRemoteService();
+ var remoteService = new IPCRemoteService();
RemotingServices.Marshal(remoteService, RemoteServiceName);
}
@@ -398,13 +398,13 @@ namespace Microsoft.Shell /// </param>
private static void SignalFirstInstance(string channelName, IList<string> args)
{
- IpcClientChannel secondInstanceChannel = new IpcClientChannel();
+ var secondInstanceChannel = new IpcClientChannel();
ChannelServices.RegisterChannel(secondInstanceChannel, true);
string remotingServiceUrl = IpcProtocol + channelName + "/" + RemoteServiceName;
// Obtain a reference to the remoting service exposed by the server i.e the first instance of the application
- IPCRemoteService firstInstanceRemoteServiceReference = (IPCRemoteService)RemotingServices.Connect(typeof(IPCRemoteService), remotingServiceUrl);
+ var firstInstanceRemoteServiceReference = (IPCRemoteService)RemotingServices.Connect(typeof(IPCRemoteService), remotingServiceUrl);
// Check that the remote service exists, in some cases the first instance may not yet have created one, in which case
// the second instance should just exit
@@ -424,7 +424,7 @@ namespace Microsoft.Shell private static object ActivateFirstInstanceCallback(object arg)
{
// Get command line args to be passed to first instance
- IList<string> args = arg as IList<string>;
+ var args = arg as IList<string>;
ActivateFirstInstance(args);
return null;
}
diff --git a/MediaBrowser.Common/UI/Splash.xaml.cs b/MediaBrowser.Common/UI/Splash.xaml.cs index 0956702295..68926a0632 100644 --- a/MediaBrowser.Common/UI/Splash.xaml.cs +++ b/MediaBrowser.Common/UI/Splash.xaml.cs @@ -15,11 +15,11 @@ namespace MediaBrowser.Common.UI {
InitializeComponent();
- progress.ProgressChanged += progress_ProgressChanged;
- Loaded+=Splash_Loaded;
+ progress.ProgressChanged += ProgressChanged;
+ Loaded+=SplashLoaded;
}
- void progress_ProgressChanged(object sender, TaskProgress e)
+ void ProgressChanged(object sender, TaskProgress e)
{
// If logging has loaded, put a message in the log.
if (Logger.LoggerInstance != null)
@@ -31,7 +31,7 @@ namespace MediaBrowser.Common.UI pbProgress.Value = (double)e.PercentComplete;
}
- private void Splash_Loaded(object sender, RoutedEventArgs e)
+ private void SplashLoaded(object sender, RoutedEventArgs e)
{
// Setting this in markup throws an exception at runtime
ShowTitleBar = false;
|
