void InputValueRqData(ITRs param) { string[] count = param.ID.Split(';'), value = param.Value.Split(';'); int i, l = count.Length; for (i = 0; i < l; i++) { API.SetInputValue(count[i], value[i]); } SendErrorMessage(API.CommRqData(param.RQName, param.TrCode, param.PrevNext, param.ScreenNo)); }
void Request(string code) { if (code != null && code.Equals(string.Empty) == false) { int param = DeadLine ? 4 : (code.Length > 6 ? (code.Substring(5, 3).Equals("000") ? 1 : 2) : 3); ITRs tr = (ITRs)catalogTR[param]; tr.Value = code; tr.RQName = string.Concat(code, ";", GetRetention(param, code)); tr.PrevNext = 0; request.RequestTrData(new Task(() => { InputValueRqData(tr); SendCount?.Invoke(this, new NotifyIconText(CodeList.Count, code)); })); return; } else if (CodeList.Count < 50) { foreach (var str in CodeList) { if (str == null || str.Equals(string.Empty)) { CodeList.Remove(str); } } } if (CodeList.Count == 0) { SendCount?.Invoke(this, new NotifyIconText(CodeList.Count, code)); CodeList = null; GC.Collect(); return; } Request(GetRandomCode(new Random().Next(0, CodeList.Count))); }