/// <summary> /// /// </summary> /// <param name="Value"></param> /// <param name="Format"></param> /// <returns></returns> private string ParseValue(string Value, ProgressMatchFormat Format, float NormalizeValue) { string Result = Value; switch (Format) { case ProgressMatchFormat.StringLength: { Result = Value.Length.ToString(); break; } } if (NormalizeValue > 0.0f) { float FloatValue = 0.0f; if (float.TryParse(Result, out FloatValue)) { if (Format == ProgressMatchFormat.Integer) { Result = ((int)(FloatValue / NormalizeValue)).ToString(); } else { Result = (FloatValue / NormalizeValue).ToString(); } } } return(Result); }
/// <summary> /// /// </summary> /// <param name="InType"></param> /// <param name="InFormat"></param> /// <param name="InNormalizeValue"></param> public ProgressMatch(ProgressMatchType InType, ProgressMatchFormat InFormat, float InNormalizeValue = 0.0f) { Type = InType; Format = InFormat; NormalizeValue = InNormalizeValue; }