コード例 #1
0
 private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.ColumnIndex == 0)
     {
         itemSign = new SignalItem();
         int temp = 0;
         foreach (DataGridViewCell cell in this.dataGridView1.Rows[e.RowIndex].Cells)
         {
             itemSign.dataGridView1.Rows[0].Cells[temp++].Value = cell.Value;
         }
         itemSign.Show();
     }
     if (e.ColumnIndex == 1)
     {
         if (this.dataGridView1.Rows.Count > 1)
         {
             string[] temp = this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString().Split();
             Bars     bars = (Bars)data.listBars.FirstOrDefault(x => x.Name == temp[0] && x.TimeFrame == Int32.Parse(temp[1]));
             if (bars.listSignal != null && bars.listSignal.Count > 0)
             {
                 SignalData signal = bars.listSignal.Last();
                 if (bars != null)
                 {
                     Chart window = new Chart(bars, signal, data);
                     window.Show();
                 }
             }
         }
     }
 }
コード例 #2
0
 private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.ColumnIndex == 0)
     {
         itemSign = new SignalItem();
         int temp = 0;
         foreach (DataGridViewCell cell in this.dataGridView1.Rows[e.RowIndex].Cells)
         {
             itemSign.dataGridView1.Rows[0].Cells[temp++].Value = cell.Value;
         }
         itemSign.Show();
     }
 }