示例#1
0
        public void UpdateGraph()
        {
            List <object[]> list = new List <object[]>();
            List <HistoricalStockObject> objects = new List <HistoricalStockObject>();


            Num.Clear();
            Task.Run(() =>
            {
                string query = String.Format("SELECT * FROM HistoricalData WHERE Ticker=\'{0}\'", Selected);
                Console.WriteLine(query);
                list    = DatabaseReader.Reader.ReadFromDatabase(query);
                objects = DataRecordToStockObject.Converter.ToHistorical(list);
            });

            LineSeries temp = new LineSeries
            {
                Values = new ChartValues <double>()
                {
                }
            };

            foreach (var l in objects)
            {
                temp.Values.Add(l.DayClose);
            }

            Num.Add(temp);
        }
示例#2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Nn.Clear();
     rez.Clear();
     Num.Clear();
     mas.Clear();
 }