/// <summary> /// Parse a condition's line /// </summary> private void ParseCondition(string line) { line = line.Remove(0, 10); line = line.Trim(); foreach (char op in operateurs) { if (line.IndexOf(op) != -1) { PathConditionEnum e = PathConditionEnum.Null; string b = line.Substring(0, line.IndexOf(op)); switch (b) { case "Aucune": e = PathConditionEnum.Null; break; case "LastMap": e = PathConditionEnum.LastMapId; break; case "Level": e = PathConditionEnum.Level; break; case "Pods": e = PathConditionEnum.Pods; break; case "%Pods": e = PathConditionEnum.PodsPercent; break; case "Alive": e = PathConditionEnum.Alive; break; } line = line.Remove(0, line.IndexOf(op) + 1); PathCondition c = new PathCondition(e, line, op, Account); conditions.Add(c); return; } } }
/// <summary> /// Parse a condition's line /// </summary> private void ParseCondition(string line) { line = line.Remove(0, 10); line = line.Trim(); foreach (char op in operateurs) { if (line.IndexOf(op) != -1) { PathConditionEnum e = PathConditionEnum.Null; string b = line.Substring(0, line.IndexOf(op)); switch (b) { case "Aucune": e = PathConditionEnum.Null; break; case "LastMap": e = PathConditionEnum.LastMapId; break; case "Level": e = PathConditionEnum.Level; break; case "Pods": e = PathConditionEnum.Pods; break; case "%Pods": e = PathConditionEnum.PodsPercent; break; case "Alive": e = PathConditionEnum.Alive; break; } line = line.Remove(0,line.IndexOf(op) + 1); PathCondition c = new PathCondition(e, line, op, Account); conditions.Add(c); return; } } }