public static void PublishChangedToRealTimeEvent(object sender, ShowModeChangedEventArgs e) { if (ChangedToRealTimeEvent != null) { ChangedToRealTimeEvent.Invoke(sender, e); } }
/// <summary> /// Gets the data. /// </summary> /// <param name="startTime">The start time.</param> /// <param name="endTime">The end time.</param> /// <param name="beginIndex">Index of the begin.</param> private void GetData(long startTime, long endTime, int beginIndex) { if (gcRealData.InvokeRequired) { gcRealData.Invoke(new Action(delegate { gcRealData.DataSource = null; gcRealData.RefreshDataSource(); })); } else { gcRealData.DataSource = null; gcRealData.RefreshDataSource(); } //查询历史数据 //控制播放进度---吐数据速度 //对吐出的数据进行处理 ShowModeChangedEventArgs showModeChangeEventArgs = new ShowModeChangedEventArgs() { Mode = ShowMode.HISTORY }; TSDataEventArgs _TSDataEventArgs = new TSDataEventArgs() { Data = null }; string sql = string.Format("select * from RealData where PositionDate between {0} and {1} order by PositionDate limit {2},100", startTime, endTime, beginIndex); EventPublisher.PublishSendSearchDataToStoreEvent(this, new SendSearchDataToStoreEventArgs() { SqlStr = sql }); EventPublisher.RecvSearchDataEvent += new EventHandler <RecvSearchDataEventArgs>(EventPublisher_RecvSearchDataEvent11); }