using MediaBrowser.Common.Kernel; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Plugins; using System.Linq; namespace MediaBrowser.ServerApplication { /// /// Class StartupWizard /// public class StartupWizard : IServerEntryPoint { /// /// The _app host /// private readonly IApplicationHost _appHost; /// /// The _user manager /// private readonly IUserManager _userManager; /// /// Initializes a new instance of the class. /// /// The app host. /// The user manager. public StartupWizard(IApplicationHost appHost, IUserManager userManager) { _appHost = appHost; _userManager = userManager; } /// /// Runs this instance. /// public void Run() { if (_appHost.IsFirstRun) { LaunchStartupWizard(); } } /// /// Launches the startup wizard. /// private void LaunchStartupWizard() { var user = _userManager.Users.FirstOrDefault(u => u.Configuration.IsAdministrator); App.OpenDashboardPage("wizardStart.html", user); } /// /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// public void Dispose() { } } }