Exemple #1
0
 /// <summary>
 /// Checks the availability of the StopBuild command for the given SCVs.
 /// </summary>
 /// <param name="scvsToHandle">The SCVs to check.</param>
 /// <param name="fullEntitySet">The set of selected entities.</param>
 /// <returns>The availability of the StopBuild command for the given SCVs.</returns>
 private AvailabilityEnum CheckStopBuildAvailability(RCSet <SCV> scvsToHandle, RCSet <Entity> fullEntitySet)
 {
     if (scvsToHandle.Count != fullEntitySet.Count)
     {
         return(AvailabilityEnum.Unavailable);
     }
     return(scvsToHandle.All(scv => scv.IsConstructing) ? AvailabilityEnum.Enabled : AvailabilityEnum.Unavailable);
 }