المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Timer tick event count



C# Programming
04-17-2010, 11:01 AM
Hi all,

I've been trying to solve this problem for over an hour and as I'm a rookie I know that what I want to do is easy to implement, but my lack of experience is preventing me from doing so. With that said, I have some code for a ZedGraph dynamically updating control. Notice that the variable double time controls the x Scale. This code is executed in a timer tick event in order to draw the line on the graph. However, as the x-scale is driven by Environment.Tickcount (which is totally independent of the timer) the graph x-axis increments regardless of whether the timer is enabled or not. I want the double time to be replaced with a double that is based upon the elapsed time of the timer and not the Environment.TickCount, but I can't figure this out. Maybe because I'm too tired... http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif Thanks in advance for any help.

//make sure curvelist has one curve
if (zedGraphControl1.GraphPane.CurveList.Count <span class="code-keyword">