Esempio n. 1
0
 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());
         }
     }
 }
Esempio n. 2
0
 public FinanceChart(FinanceChartData.ChartDataClass data, String title, OutputType outputType, String outputSubType, String yAxis)
 {
     chartData = data;
     chartName = title;
     chartOutputType = outputType;
     chartYAxis = yAxis;
     chartOutputSubType = outputSubType;
     InitializeComponent();
 }
Esempio n. 3
0
        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];
                }
            }
        }