/// <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);
}