/// <summary> /// Drawing the series axis annotation and ... /// </summary> internal void Draw() { if (IsInRunMode) { if (!stopWatch.IsRunning) { stopWatch.Start(); } //! If the chart area dont in real time mode redraw series layer and present device. //! or if last series draw method isn't called in last 1000/refreshRate mili secconde. if (!isRealTimeChart || stopWatch.ElapsedMilliseconds > 1000 / refreshRate) { lock (objLock) { DrawSeries(); device.Present(); } stopWatch.Reset(); stopWatch.Start(); } if (isRealTimeChart) { device.Present(); } } }
/// <summary> /// change the object style and location according to the new values. /// </summary> /// <param name="values"></param> public void NewSample(float values) { try { if (ChildAnimationMovingAveEnable) { values = MovingAvrage.Clock(values, ChildAnimationMovingAveLength); } if (values > 0.9f) { values = 1; } device.BeginLayerDraw(0); //! Select the scenario. curScenario.NewSample(values); } catch (Exception ex) { xPFT.Exceptions.ExceptionHandler.LogError(ex); } finally { if (device != null) { device.EndLayerDraw(0); device.Present(); } } }