StartupWizard.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using Emby.Server.Implementations.Browser;
  2. using MediaBrowser.Controller;
  3. using MediaBrowser.Controller.Plugins;
  4. using MediaBrowser.Model.Logging;
  5. namespace Emby.Server.Implementations.EntryPoints
  6. {
  7. /// <summary>
  8. /// Class StartupWizard
  9. /// </summary>
  10. public class StartupWizard : IServerEntryPoint
  11. {
  12. /// <summary>
  13. /// The _app host
  14. /// </summary>
  15. private readonly IServerApplicationHost _appHost;
  16. /// <summary>
  17. /// The _user manager
  18. /// </summary>
  19. private readonly ILogger _logger;
  20. /// <summary>
  21. /// Initializes a new instance of the <see cref="StartupWizard" /> class.
  22. /// </summary>
  23. /// <param name="appHost">The app host.</param>
  24. /// <param name="logger">The logger.</param>
  25. public StartupWizard(IServerApplicationHost appHost, ILogger logger)
  26. {
  27. _appHost = appHost;
  28. _logger = logger;
  29. }
  30. /// <summary>
  31. /// Runs this instance.
  32. /// </summary>
  33. public void Run()
  34. {
  35. if (_appHost.IsFirstRun)
  36. {
  37. LaunchStartupWizard();
  38. }
  39. }
  40. /// <summary>
  41. /// Launches the startup wizard.
  42. /// </summary>
  43. private void LaunchStartupWizard()
  44. {
  45. BrowserLauncher.OpenDashboardPage("wizardstart.html", _appHost);
  46. }
  47. /// <summary>
  48. /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
  49. /// </summary>
  50. public void Dispose()
  51. {
  52. }
  53. }
  54. }