public InfoTablePopUp(String time, String popupLabel, FinanceChartData.ChartDetailDataClass data) { InitializeComponent(); this.Text = popupLabel; try { double xLabelTime = (Double.Parse(time) / ChartExplorer.TimeIncrementsPerHour); // pop-ups expect hours, but time is in time increments, convert this.timelabel.Text = ChartExplorer.BeginDate.AddHours(xLabelTime).ToString("MM/dd/yyyy HH:mm"); } catch (Exception e) { MessageBox.Show(e.Message); // parse could fail or something } if (data != null) { for (int i = 0; i < data.Name.Count; i++) { dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = data.Name[i]; double d = Convert.ToDouble(data.Value[i]) * 100; String format = Math.Round(d,0) + " %"; dataGridView1.Rows[i].Cells[1].Value = format; } for (int j = 0; j < data.Nameupdated.Count; j++) { dataGridView2.Rows.Add(); dataGridView2.Rows[j].Cells[0].Value = data.Nameupdated[j]; dataGridView2.Rows[j].Cells[1].Value = formatLastUpdatedString(data.Valueupdated[j].ToString()); } } }
public FinanceChart(FinanceChartData.ChartDataClass data, String title, OutputType outputType, String outputSubType, String yAxis) { chartData = data; chartName = title; chartOutputType = outputType; chartYAxis = yAxis; chartOutputSubType = outputSubType; InitializeComponent(); }
public TablePopUp(String time, String popupLabel, FinanceChartData.ChartDetailDataClass data) { InitializeComponent(); this.Text = popupLabel; try { double xLabelTime = (Double.Parse(time) / ChartExplorer.TimeIncrementsPerHour); // pop-ups expect hours, but time is in time increments, convert this.timelabel.Text = ChartExplorer.BeginDate.AddHours(xLabelTime).ToString("MM/dd/yyyy HH:mm"); } catch (Exception e) { MessageBox.Show(e.Message); // parse could fail or something } if (data != null) { for (int i = 0; i < data.Name.Count; i++) { dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = data.Name[i]; } } }