From 670a53258ef79ee92f578335577df4f768c9d7d4 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Tue, 11 Sep 2012 14:20:12 -0400 Subject: Some minor code cleanups --- MediaBrowser.Common/UI/BaseApplication.cs | 4 ++-- MediaBrowser.Common/UI/SingleInstance.cs | 9 ++++----- MediaBrowser.Common/UI/Splash.xaml.cs | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'MediaBrowser.Common/UI') diff --git a/MediaBrowser.Common/UI/BaseApplication.cs b/MediaBrowser.Common/UI/BaseApplication.cs index 4cbc57c0d3..d763f202f9 100644 --- a/MediaBrowser.Common/UI/BaseApplication.cs +++ b/MediaBrowser.Common/UI/BaseApplication.cs @@ -19,7 +19,7 @@ namespace MediaBrowser.Common.UI protected override void OnStartup(StartupEventArgs e) { // Without this the app will shutdown after the splash screen closes - this.ShutdownMode = ShutdownMode.OnExplicitShutdown; + ShutdownMode = ShutdownMode.OnExplicitShutdown; LoadKernel(); } @@ -42,7 +42,7 @@ namespace MediaBrowser.Common.UI Logger.LogInfo("Kernel.Init completed in {0} seconds.", (DateTime.UtcNow - now).TotalSeconds); splash.Close(); - this.ShutdownMode = System.Windows.ShutdownMode.OnLastWindowClose; + ShutdownMode = System.Windows.ShutdownMode.OnLastWindowClose; InstantiateMainWindow().ShowDialog(); } catch (Exception ex) diff --git a/MediaBrowser.Common/UI/SingleInstance.cs b/MediaBrowser.Common/UI/SingleInstance.cs index 837d3bb578..2b2b6fb459 100644 --- a/MediaBrowser.Common/UI/SingleInstance.cs +++ b/MediaBrowser.Common/UI/SingleInstance.cs @@ -13,18 +13,17 @@ namespace Microsoft.Shell using System; using System.Collections; using System.Collections.Generic; + using System.ComponentModel; using System.IO; + using System.Runtime.InteropServices; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Ipc; using System.Runtime.Serialization.Formatters; + using System.Security; using System.Threading; using System.Windows; using System.Windows.Threading; - using System.Xml.Serialization; - using System.Security; - using System.Runtime.InteropServices; - using System.ComponentModel; internal enum WM { @@ -184,7 +183,7 @@ namespace Microsoft.Shell finally { - IntPtr p = _LocalFree(argv); + _LocalFree(argv); // Otherwise LocalFree failed. // Assert.AreEqual(IntPtr.Zero, p); } diff --git a/MediaBrowser.Common/UI/Splash.xaml.cs b/MediaBrowser.Common/UI/Splash.xaml.cs index f66f9ec8fc..0956702295 100644 --- a/MediaBrowser.Common/UI/Splash.xaml.cs +++ b/MediaBrowser.Common/UI/Splash.xaml.cs @@ -27,8 +27,8 @@ namespace MediaBrowser.Common.UI Logger.LogInfo(e.Description); } - this.lblProgress.Content = e.Description; - this.pbProgress.Value = (double)e.PercentComplete; + lblProgress.Content = e.Description; + pbProgress.Value = (double)e.PercentComplete; } private void Splash_Loaded(object sender, RoutedEventArgs e) -- cgit v1.2.3