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); }
private void button2_Click(object sender, EventArgs e) { Nn.Clear(); rez.Clear(); Num.Clear(); mas.Clear(); }