Exemplo n.º 1
0
        public override bool destroy()
        {
            if (!stopped)
                this.stop();

            this.requestThread = null;
            this.setManualStop(false);
            this.setStopped(true);
            this.tags.Clear();
            return true;
        }
Exemplo n.º 2
0
        protected void sendRequest(List<Dictionary<string, string>> data, string tagName)
        {
            Logs.request("Run request " + this.dataParse.Count.ToString());
            List<Dictionary<string, string>> dataCurrent = new List<Dictionary<string, string>>(data);
            if (requestThread == null)
            {
                requestThread = new SendRequestThread(WorkItemsPool.form.getEnableRequest());
            }

            if (WorkItemsPool.form.getEnableRequest())
            {
                Logs.request("Try send data in " + this.dataParse.Count.ToString() + " count = " + data.Count.ToString());
                requestThread.setCharset(WorkItemsPool.form.getCharset());
                requestThread.setMethod(WorkItemsPool.form.getMethod());
                requestThread.setNameArray(WorkItemsPool.form.getNameArray());
                requestThread.setNewData(dataCurrent, tagName);
                requestThread.send(tagName);
            }

            // save data to database
        }