/// <summary> /// when the user clicked "Start/Stop" from the TrendViewer main form, real time district(top left). /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void RealTimeExecuteCmd_Click(object sender, EventArgs e) { string Function_Name = "RealTimeExecuteCmd_Click"; LogHelper.Info(CLASS_NAME, Function_Name, "Function_Entered"); m_trendCache.ClearHistLogForMixedMode(); //if it's a "start" button. if (!m_View.GetRealTimeStartFlag()) { //for realtime dp, there are checkbox: "Enable datapoint" and "Display" , //if "Enabled dp"==true && Display==true: display properly //if Display == false : not display this series. //if Display == true && Enable DP==false : will display the series name ,but without value. List <EtyDataPoint> realTimeDPList = m_trendCache.GetVisibleOrEnabledDPList(); List <EtyFormula> formulaList = m_trendCache.GetEnabledFormulaList(); List <EtyMarker> markerList = m_trendCache.GetEnabledMarkerList(); //if there is no enabled datapoint configured for plotting. if (realTimeDPList == null || realTimeDPList.Count < 1) { //MessageBoxDialog.Show("Please Select a Configuration to Plot"); MessageBoxDialog.Show(StringHelper.GetInstance().getStringValue(LanguageHelper.TrendViewer_Msg_SelectConfirm, LanguageHelper.TrendViewer_Msg_SelectConfirm_EN)); LogHelper.Info(CLASS_NAME, Function_Name, "Function_Exited"); return; } else { Dictionary <EtyHistDataPoint, List <EtyDataLogDPLogTrend> > histDPLogMap = null; if (m_View.IsMixMode() == true) { DateTime startTime = m_View.GetStartTime(); DateTime endTime = m_View.GetEndTime(); histDPLogMap = GetHistDPLogMap(startTime, endTime); m_trendCache.SetHistLogForMixedMode(histDPLogMap); } m_View.StartRealTimeOrMixedModeCharting(realTimeDPList, formulaList, markerList, m_trendCache.GetHistLogForMixedMode()); } } // If user click "stop" else { m_View.StopRealTimeCharting(); } LogHelper.Info(CLASS_NAME, Function_Name, "Function_Exited"); }
public void TestGetEnabledMarkerList() { TrendCache trendCache = new TrendCache(); trendCache.m_markerList = new List <EtyMarker>(); EtyMarker marker = new EtyMarker(); marker.MarkerEnabled = true; trendCache.m_markerList.Add(marker); trendCache.GetEnabledMarkerList(); }