Esempio n. 1
0
        private void ComboBoxPlate_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.ComboBoxVariety.Items.Clear();
            this.ComboBoxVariety.Items.Add("所有的股票");

            foreach (var item in GlobalStockManager.ToArrayVarietyByPlate((string)this.ComboBoxPlate.Items[this.ComboBoxPlate.SelectedIndex]))
            {
                this.ComboBoxVariety.Items.Add(item);
            }

            this.ComboBoxVariety.SelectedIndex = 0;
        }
Esempio n. 2
0
        private void ButtonGetStock_Click(object sender, EventArgs e)
        {
            this.CheckedListBox.Items.Clear();

            if (RadioButtonALL.Checked == true)
            {
                foreach (var item in GlobalStockManager.ToArray())
                {
                    foreach (var item2 in item.ToArray())
                    {
                        string strStockCode = Demo.Stock.X.U50.Common.U50StockInfo.GetStockInfo(item.StockPlate, item.StockVariety, item2.StockName, item2.StockSymbol);
                        this.CheckedListBox.Items.Add(strStockCode);
                    }
                }
            }
            else if (RadioButtonSelect.Checked == true)
            {
                if (this.ComboBoxVariety.Text == "所有的股票")
                {
                    foreach (string item in GlobalStockManager.ToArrayVarietyByPlate(this.ComboBoxPlate.Text))
                    {
                        StockManager stockManager = GlobalStockManager.GetStockManagerByPlateAndVariety(this.ComboBoxPlate.Text, item);
                        if (stockManager == null)
                        {
                            continue;
                        }

                        foreach (var item2 in stockManager.ToArray())
                        {
                            string strStockCode = Demo.Stock.X.U50.Common.U50StockInfo.GetStockInfo(this.ComboBoxPlate.Text, item, item2.StockName, item2.StockSymbol);
                            this.CheckedListBox.Items.Add(strStockCode);
                        }
                    }
                }
                else
                {
                    StockManager stockManager = GlobalStockManager.GetStockManagerByPlateAndVariety(this.ComboBoxPlate.Text, this.ComboBoxVariety.Text);
                    if (stockManager == null)
                    {
                        return;
                    }

                    foreach (var item2 in stockManager.ToArray())
                    {
                        string strStockCode = Demo.Stock.X.U50.Common.U50StockInfo.GetStockInfo(this.ComboBoxPlate.Text, this.ComboBoxVariety.Text, item2.StockName, item2.StockSymbol);
                        this.CheckedListBox.Items.Add(strStockCode);
                    }
                }
            }
        }