Selaa lähdekoodia

Updated the splash screen to log progress messages

LukePulverenti Luke Pulverenti luke pulverenti 13 vuotta sitten
vanhempi
sitoutus
87245d11fc
1 muutettua tiedostoa jossa 8 lisäystä ja 13 poistoa
  1. 8 13
      MediaBrowser.Common/UI/Splash.xaml.cs

+ 8 - 13
MediaBrowser.Common/UI/Splash.xaml.cs

@@ -1,19 +1,8 @@
 using System;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
 using System.Runtime.InteropServices;
 using System.Runtime.InteropServices;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
+using System.Windows;
 using System.Windows.Interop;
 using System.Windows.Interop;
-using System.Windows.Shapes;
-
+using MediaBrowser.Common.Logging;
 using MediaBrowser.Model.Progress;
 using MediaBrowser.Model.Progress;
 
 
 namespace MediaBrowser.Common.UI
 namespace MediaBrowser.Common.UI
@@ -40,6 +29,12 @@ namespace MediaBrowser.Common.UI
 
 
         void progress_ProgressChanged(object sender, TaskProgress e)
         void progress_ProgressChanged(object sender, TaskProgress e)
         {
         {
+            // If logging has loaded, put a message in the log.
+            if (Logger.LoggerInstance != null)
+            {
+                Logger.LogInfo(e.Description);
+            }
+
             this.lblProgress.Content = e.Description;
             this.lblProgress.Content = e.Description;
             this.pbProgress.Value = (double)e.PercentComplete;
             this.pbProgress.Value = (double)e.PercentComplete;
         }
         }