void handler(DataNode item) { string result = ""; result = item.time.ToString() + " " + item.price.ToString() + " " + item.volume.ToString() + "\r\n"; var signals = _method.Update(item); _painter.DrawItem(item); foreach (var signal in signals) { if (signal.actInfo != Actions.Null) { result += Common.Translate(signal.actInfo) + " " + signal.time + " " + signal.price + "\r\n"; _painter.DrawSignal(signal); _target.Execute(signal); _method.Feedback(_target.Query()); } } _callback(_painter.GetImage(), result); }
void handler(DataNode item) { var signals = _method.Update(item); foreach (var signal in signals) { if (signal.actInfo != Actions.Null) { _target.Execute(signal); _method.Feedback(_target.Query()); Console.WriteLine( signal.code + " " + _source.Name + " " + Common.Translate(signal.actInfo) + " " + signal.time + " " + signal.price); Console.Beep(800, 1000); DBService service = new DBService(); service.Add(signal); } } }