For Each elem In dicGroup.Keys prbCurrent.Value = 0 prbCurrent.Maximum = dicGroup(elem).Quantit For nS = 0 To dicGroup(elem).Quantit - 1 For nQ = 0 To QCount - 1 Dim colPL As New List(Of Integer) For nA = 0 To ACount(nQ) colPL.Add(Weight(nQ, nA)) For Each elem1 In colRules With elem1 If .IsApplayable(elem) Then Dim nEffect As Integer = .CanAffect(QIndexToQkey(nQ)) If nEffect > -1 Then colPL(colPL.Count - 1) = CInt(colPL.Last * .Effect(nEffect).GetWeight(.Effect(nEffect).Designator, AIndexToAKey(nQ, nA)) / 100) End If End With Next Next mtxData(elem)(nS)(nQ) = RSelection(colPL) If prbCurrent.Value < prbCurrent.Maximum Then prbCurrent.Value += 1 If prbTotal.Value < prbTotal.Maximum Then prbTotal.Value += 1 Application.DoEvents() Next Next Next