Nexus.Client.ModManagement.ModInstaller.Install C# (CSharp) Method

Install() public method

Installs the mod.
public Install ( ) : void
return void
		public void Install()
		{
			TrackedThread thdWorker = new TrackedThread(RunTasks);
			thdWorker.Thread.IsBackground = false;
			thdWorker.Start();
		}

Usage Example

コード例 #1
0
        /// <summary>
        /// The method that is called to start the backgound task.
        /// </summary>
        /// <param name="p_objArgs">Arguments to for the task execution.</param>
        /// <returns>Always <c>null</c>.</returns>
        protected override object DoWork(object[] p_objArgs)
        {
            OverallMessage          = "Installing selected mods...";
            OverallProgress         = 0;
            OverallProgressStepSize = 1;
            OverallProgressMaximum  = m_lstModList.Count;
            ShowItemProgress        = false;

            ConfirmActionMethod camConfirm = (ConfirmActionMethod)p_objArgs[0];

            foreach (IMod modMod in m_lstModList)
            {
                OverallMessage = "Installing selected mods: " + modMod.ModName;

                if (m_iilInstallLog.ActiveMods.Contains(modMod))
                {
                    continue;
                }

                ModInstaller minInstaller = m_mifModInstallerFactory.CreateInstaller(modMod, m_dlgOverwriteConfirmationDelegate, null);
                minInstaller.Install();

                while (!minInstaller.IsCompleted)
                {
                }
                if (OverallProgress < OverallProgressMaximum)
                {
                    StepOverallProgress();
                }
            }
            return(null);
        }
All Usage Examples Of Nexus.Client.ModManagement.ModInstaller::Install