Exemplo n.º 1
0
        private void Form_Load(object sender, EventArgs e)
        {
            //在这里把本地的数据搞进去,获取所有的txt的目录加到toolstrip的combox中
            List <string> instrumenstList = TxtHolder.HoldInstruments();

            foreach (string str in instrumenstList)
            {
                string fileNameWithoutExtension = System.IO.Path.GetFileName(str);// 没有扩展名的文件名 “Default”
                this.toolStripComboBox_Instrumens.Items.Add(fileNameWithoutExtension);
            }
        }
Exemplo n.º 2
0
        private void SelIndexChanged(object sender, EventArgs e)
        {
            if (this.toolStripComboBox_Instrumens.SelectedItem == null ||
                this.toolStripComboBox_Instrumens.SelectedItem.ToString() == "")
            {
                return;
            }
            string name = this.toolStripComboBox_Instrumens.SelectedItem.ToString();

            if (name != "" || name != "null")
            {
                string insName = name;

                List <string>         stringList     = TxtHolder.ReadTxt(insName);
                List <RealMarketData> marketDataList = TxtHolder.TransToStandardInfoList(stringList);
                m_marketDataList = marketDataList;
            }
        }