public IBackgroundTask AsyncAddMod(Uri p_uriPath, ConfirmOverwriteCallback p_cocConfirmOverwrite) { IBackgroundTask tskAddModTask = ModAdditionQueue.AddMod(p_uriPath, p_cocConfirmOverwrite); AsyncAddModTask(tskAddModTask); return(tskAddModTask); }
/// <summary> /// Installs the specified mod. /// </summary> /// <param name="p_strPath">The path to the mod to install.</param> /// <param name="p_cocConfirmOverwrite">The delegate to call to resolve conflicts with existing files.</param> /// <returns>A background task set allowing the caller to track the progress of the operation.</returns> public IBackgroundTask AddMod(string p_strPath, ConfirmOverwriteCallback p_cocConfirmOverwrite) { Uri uriPath = new Uri(p_strPath); if (uriPath.Scheme.ToLowerInvariant().ToString() == "nxm") { if (!ModRepository.IsOffline) { return(ModAdditionQueue.AddMod(uriPath, p_cocConfirmOverwrite)); } else { Login(); return(AsyncAddMod(uriPath, p_cocConfirmOverwrite)); } } else { return(ModAdditionQueue.AddMod(uriPath, p_cocConfirmOverwrite)); } }