Exemplo n.º 1
0
        private void api__OnReceiveTrCondition(Api sender, string[] strCodeList, ConditionInfo info)
        {
            uint idx = 0;

            List <Item> items = new List <Item>();

            foreach (string code in strCodeList)
            {
                items.Add(new Item(code, ""));
                log.Debug("조건검색 결과, 조건식명=" + info.Name + ",[" + idx.ToString() + "], code=" + code);
                idx++;
            }

            m_grid.ItemsSource = items;

            if (api_.RequestData(strCodeList) == Api.ErrorCode.CUSTOM_ERR_REQUEST_LIMIT_EXCEEDED)
            {
                List <String> codelist = new List <String>();
                foreach (string code in strCodeList.Take(100))
                {
                    codelist.Add(code);
                }
                // 100개 초과시 일단 100개로 줄여서 요청
                api_.RequestData(codelist.ToArray());
            }
        }
Exemplo n.º 2
0
        private void M_ctrl_OnReceiveTrCondition(Api sender, string[] strCodeList, ConditionInfo info)
        {
            uint idx = 0;

            List <Item> items = new List <Item>();

            foreach (string code in strCodeList)
            {
                items.Add(new Item(code));
                log.Debug("조건검색 결과, 조건식명=" + info.Name + ",[" + idx.ToString() + "], code=" + code);
                idx++;
            }

            m_grid.ItemsSource = items;

            m_ctrl.RequestData(strCodeList);
        }