コード例 #1
0
 internal void OnLogItemAdded(StrategyLog log, StrategyLogItem item)
 {
     if (this.LogItemAdded == null)
     {
         return;
     }
     this.LogItemAdded((object)log, new StrategyLogItemEventArgs(item));
 }
コード例 #2
0
 internal void OnLogAdded(StrategyLogList list, StrategyLog log)
 {
     if (this.LogAdded == null)
     {
         return;
     }
     this.LogAdded((object)list, new StrategyLogEventArgs(log));
 }
コード例 #3
0
ファイル: StrategyLogList.cs プロジェクト: smther/FreeOQ
		public IStrategyLog this [string name]
		{
			get
			{
				lock (this.manager.SyncRoot)
				{
					StrategyLog local_0;
					if (!this.logs.TryGetValue(name, out local_0))
					{
						local_0 = new StrategyLog(this.manager, this, name);
						this.logs.Add(name, local_0);
						this.array.Add(local_0);
						this.manager.OnLogAdded(this, local_0);
					}
					return (IStrategyLog)local_0;
				}
			}
		}
コード例 #4
0
 public IStrategyLog this [string name]
 {
     get
     {
         lock (this.manager.SyncRoot)
         {
             StrategyLog local_0;
             if (!this.logs.TryGetValue(name, out local_0))
             {
                 local_0 = new StrategyLog(this.manager, this, name);
                 this.logs.Add(name, local_0);
                 this.array.Add(local_0);
                 this.manager.OnLogAdded(this, local_0);
             }
             return((IStrategyLog)local_0);
         }
     }
 }
コード例 #5
0
ファイル: StrategyLogManager.cs プロジェクト: smther/FreeOQ
		internal void OnLogItemAdded(StrategyLog log, StrategyLogItem item)
		{
			if (this.LogItemAdded == null)
				return;
			this.LogItemAdded((object)log, new StrategyLogItemEventArgs(item));
		}
コード例 #6
0
ファイル: StrategyLogManager.cs プロジェクト: smther/FreeOQ
		internal void OnLogAdded(StrategyLogList list, StrategyLog log)
		{
			if (this.LogAdded == null)
				return;
			this.LogAdded((object)list, new StrategyLogEventArgs(log));
		}
コード例 #7
0
ファイル: StrategyLogEventArgs.cs プロジェクト: smther/FreeOQ
		public StrategyLogEventArgs(StrategyLog log)
		{
			this.Log = log;
		}
コード例 #8
0
ファイル: StrategyLogItem.cs プロジェクト: zhuzhenping/FreeOQ
 public StrategyLogItem(StrategyLog log, DateTime datetime, object value)
 {
     this.Log      = log;
     this.DateTime = datetime;
     this.Value    = value;
 }
コード例 #9
0
 private void Add(StrategyLog log)
 {
   string strategyName = log.List.StrategyName;
   string symbol = log.List.Symbol;
   string name = log.Name;
   DataGridViewRow dataGridViewRow1;
   if (!this.strategyRows.TryGetValue(strategyName, out dataGridViewRow1))
   {
     DataGridViewRow dataGridViewRow2 = this.AddRow(this.dgvStrategies, strategyName);
     dataGridViewRow2.Cells[0].Value = (object) this.GetStrategyImage(strategyName);
     dataGridViewRow2.Cells[1].Value = (object) this.GetStrategyDisplayName(strategyName);
     this.strategyRows.Add(strategyName, dataGridViewRow2);
   }
   if (symbol == string.Empty)
   {
     if (this.dgvStrategies.Columns.Contains(name))
       return;
     this.AddColumn(this.dgvStrategies, ColumnType.Strategy, name);
   }
   else
   {
     if (!(strategyName == this.dataViewOptions.StrategyName))
       return;
     DataGridViewRow dataGridViewRow2;
     if (!this.instrumentRows.TryGetValue(symbol, out dataGridViewRow2))
     {
       dataGridViewRow2 = this.AddRow(this.dgvInstruments, symbol);
       dataGridViewRow2.Cells[1].Value = (object) symbol;
       this.instrumentRows.Add(symbol, dataGridViewRow2);
     }
     if (this.dgvInstruments.Columns.Contains(name))
       return;
     this.AddColumn(this.dgvInstruments, ColumnType.Instrument, name);
   }
 }
コード例 #10
0
ファイル: StrategyLogItem.cs プロジェクト: smther/FreeOQ
		public StrategyLogItem(StrategyLog log, DateTime datetime, object value)
		{
			this.Log = log;
			this.DateTime = datetime;
			this.Value = value;
		}
コード例 #11
0
 public StrategyLogEventArgs(StrategyLog log)
 {
     this.Log = log;
 }