Beispiel #1
0
 internal void OnLogItemAdded(StrategyLog log, StrategyLogItem item)
 {
     if (this.LogItemAdded == null)
     {
         return;
     }
     this.LogItemAdded((object)log, new StrategyLogItemEventArgs(item));
 }
Beispiel #2
0
		internal void OnLogItemAdded(StrategyLog log, StrategyLogItem item)
		{
			if (this.LogItemAdded == null)
				return;
			this.LogItemAdded((object)log, new StrategyLogItemEventArgs(item));
		}
Beispiel #3
0
 public StrategyLogItemEventArgs(StrategyLogItem item)
 {
     this.Item = item;
 }
		public StrategyLogItemEventArgs(StrategyLogItem item)
		{
			this.Item = item;
		}
 private void Add(StrategyLogItem item)
 {
   string strategyName = item.Log.List.StrategyName;
   string symbol = item.Log.List.Symbol;
   string name = item.Log.Name;
   if (symbol == string.Empty)
   {
     this.strategyRows[strategyName].Cells[name].Value = item.Value;
     switch (this.dataViewOptions.Mode)
     {
       case DataViewMode.RowHistory:
         if (!(strategyName == this.dataViewOptions.StrategyName) || this.dataViewOptions.Symbol != null || this.logDataSource == null)
           break;
         this.logDataSource.Add((object) item.DateTime, name, item.Value);
         break;
       case DataViewMode.ColumnHistory:
         ColumnItem columnItem = this.dataViewOptions.ColumnItem;
         if (columnItem == null || columnItem.Type != ColumnType.Strategy || (!(columnItem.Name == name) || this.logDataSource == null))
           break;
         this.logDataSource.Add((object) item.DateTime, strategyName, item.Value);
         break;
     }
   }
   else
   {
     if (strategyName == this.dataViewOptions.StrategyName)
       this.instrumentRows[symbol].Cells[name].Value = item.Value;
     switch (this.dataViewOptions.Mode)
     {
       case DataViewMode.RowHistory:
         if (!(strategyName == this.dataViewOptions.StrategyName) || !(symbol == this.dataViewOptions.Symbol) || this.logDataSource == null)
           break;
         this.logDataSource.Add((object) item.DateTime, name, item.Value);
         break;
       case DataViewMode.ColumnHistory:
         ColumnItem columnItem1 = this.dataViewOptions.ColumnItem;
         if (columnItem1 == null || columnItem1.Type != ColumnType.Instrument || (!(columnItem1.Name == name) || this.logDataSource == null))
           break;
         this.logDataSource.Add((object) item.DateTime, symbol, item.Value);
         break;
       case DataViewMode.CrossMonitor:
         ColumnItem columnItem2 = this.dataViewOptions.ColumnItem;
         if (columnItem2 == null || columnItem2.Type != ColumnType.Instrument || (!(columnItem2.Name == name) || this.logDataSource == null))
           break;
         this.logDataSource.Add((object) symbol, strategyName, item.Value);
         break;
     }
   }
 }