private void ResetTrainGraph() { this.m_serverInfo = new ClientServerInfo(); this.m_tgd = null; this.m_needToFillTrainGraph = true; this.m_isFirstIteration = true; this.ResetTrainGraphCache(); }
private void UpdateTrainGraphCache(TrainGraphData tgd, ClientServerInfo serverInfo) { this.m_trainGraphCache.Version = this.CacheVersion; this.m_trainGraphCache.CacheTime = DateTime.Now; this.m_trainGraphCache.TimeStart = tgd.TimeStart; this.m_trainGraphCache.TimeStop = tgd.TimeStop; if (tgd.Markers.Count > 0) { this.m_trainGraphCache.Markers = tgd.Markers; } if (tgd.Curves.Count > 0) { this.m_trainGraphCache.Curves = this.MergeCachedAndRealTimesCurves(this.m_trainGraphCache.Curves, tgd.Curves); } this.m_trainGraphCache.LastTrainGraphTime = serverInfo.LastTrainGraphTime; this.m_trainGraphCache.OperationDate = serverInfo.OperationDate; this.m_trainGraphCache.ServerTime = serverInfo.ServerTime; if (!this.m_trainGraphCache.Save()) { this.AddLog("TisMonitor did not save TrainGraphCache: " + this.m_trainGraphCache.LastError); IsolatedStorageHelper.IncreaseTo(10); } }