Exemple #1
0
 private void ctxDataSeries_Export_Click(object sender, EventArgs e)
 {
   List<IDataSeries> list = new List<IDataSeries>();
   foreach (InstrumentDataSeriesViewItem dataSeriesViewItem in this.ltvDataSeries.SelectedItems)
     list.Add(dataSeriesViewItem.Series.DataSeries);
   DataSeriesExportForm seriesExportForm = new DataSeriesExportForm();
   seriesExportForm.Init(list.ToArray());
   int num = (int) seriesExportForm.ShowDialog((IWin32Window) this);
   seriesExportForm.Dispose();
 }
 private void ctxDataSeries_ExportCSV_Click(object sender, EventArgs e)
 {
   List<IDataSeries> list = new List<IDataSeries>();
   foreach (DataSeriesViewItem dataSeriesViewItem in this.ltvDataSeries.SelectedItems)
   {
     DataType dataType = DataSeriesHelper.GetDataSeriesInfo(dataSeriesViewItem.DataSeries.Name).DataType;
     switch (dataType)
     {
       case DataType.Unknown:
       case DataType.MarketDepth:
         int num = (int) MessageBox.Show((IWin32Window) this, string.Format("Cannot export {0} series to CSV format.", (object) dataType), "Export To CSV", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         continue;
       default:
         list.Add(dataSeriesViewItem.DataSeries);
         continue;
     }
   }
   if (list.Count <= 0)
     return;
   DataSeriesExportForm seriesExportForm = new DataSeriesExportForm();
   seriesExportForm.Init(list.ToArray());
   int num1 = (int) seriesExportForm.ShowDialog((IWin32Window) this);
   seriesExportForm.Dispose();
 }