示例#1
0
 private void ctxDataSeries_CompressBars_Click(object sender, EventArgs e)
 {
   List<IDataSeries> list = new List<IDataSeries>();
   foreach (InstrumentDataSeriesViewItem dataSeriesViewItem in this.ltvDataSeries.SelectedItems)
     list.Add(dataSeriesViewItem.Series.DataSeries);
   CompressBarsForm compressBarsForm = new CompressBarsForm();
   compressBarsForm.Init(list.ToArray(), true);
   int num = (int) compressBarsForm.ShowDialog((IWin32Window) this);
   compressBarsForm.Dispose();
 }
示例#2
0
 private void ctxDataSeries_CompressBars_Click(object sender, EventArgs e)
 {
   IDataSeries dataSeries = (this.ltvDataSeries.SelectedItems[0] as DataSeriesViewItem).DataSeries;
   DataType dataType = DataSeriesHelper.GetDataSeriesInfo(dataSeries.Name).DataType;
   switch (dataType)
   {
     case DataType.Trade:
     case DataType.Quote:
     case DataType.Bar:
       CompressBarsForm compressBarsForm = new CompressBarsForm();
       compressBarsForm.Init(new IDataSeries[1]
       {
         dataSeries
       }, 1 != 0);
       int num1 = (int) compressBarsForm.ShowDialog((IWin32Window) this);
       compressBarsForm.Dispose();
       break;
     default:
       int num2 = (int) MessageBox.Show((IWin32Window) this, string.Format("Cannot compress bars from {0} series.", (object) dataType), "Compress Bars", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
       break;
   }
 }