Exemple #1
0
        private void appStkDetails(ListView lv, string str)
        {
            string[] info  = str.Split(new char[] { '|' });
            var      query = info.OrderBy(o => o).Distinct();

            foreach (string itm in query)
            {
                if (!items.Contains(StkTools.reString(itm)))
                {
                    items.Add(StkTools.reString(itm));
                    string[] rt = itm.Split(new char[] { '/' });
                    StkTools.addListItemByThread(lv, new ListViewItem(new string[] { rt[0], rt[1], rt[2], rt[3] }));
                }
            }
        }
Exemple #2
0
        private void tm1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            string txt = Invoke(new Func <string>(() => { return(comboBox1.Text); })).ToString();
            var    rtn = StkTools.getStockInfo(preURL + txt);

            if (rtn != null)
            {
                string info = "";
                info = "[" + rtn[0].Name + "][" + rtn[0].zde + "][" + rtn[0].zdf + "%]";
                appSumInfo(label1, info);
                listView2.Invoke(new MethodInvoker(() => listView2.Items.Clear()));
                StkTools.appStkBid(listView2, rtn[0].bids);
                appStkDetails(listView1, rtn[0].TradeDetails);
            }
            else
            {
                //label21.Text = "未取得数据";
                return;
            }
        }