Explorar o código

#19 - Auto-Run at startup is not working

LukePulverenti %!s(int64=12) %!d(string=hai) anos
pai
achega
b258dcd182
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      MediaBrowser.Common.Implementations/BaseApplicationHost.cs

+ 13 - 0
MediaBrowser.Common.Implementations/BaseApplicationHost.cs

@@ -225,6 +225,8 @@ namespace MediaBrowser.Common.Implementations
                 Resolve<ITaskManager>().AddTasks(GetExports<IScheduledTask>(false));
 
                 Task.Run(() => ConfigureAutoRunAtStartup());
+
+                ConfigurationManager.ConfigurationUpdated += ConfigurationManager_ConfigurationUpdated;
             });
         }
 
@@ -477,6 +479,17 @@ namespace MediaBrowser.Common.Implementations
         /// </summary>
         protected abstract string ProductShortcutPath { get; }
 
+        /// <summary>
+        /// Handles the ConfigurationUpdated event of the ConfigurationManager control.
+        /// </summary>
+        /// <param name="sender">The source of the event.</param>
+        /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
+        /// <exception cref="System.NotImplementedException"></exception>
+        void ConfigurationManager_ConfigurationUpdated(object sender, EventArgs e)
+        {
+            ConfigureAutoRunAtStartup();
+        }
+        
         /// <summary>
         /// Configures the auto run at startup.
         /// </summary>