quanone Posted July 25, 2010 Report Share Posted July 25, 2010 Hi there, I have installed several gauges with Inner gauge in my program. Ineed to update the gauges periodically. The program I have is as below: // update gauges private void timer2_Tick_1(object sender, EventArgs e) { radialGauge4.BeginInvoke((MethodInvoker)delegate { radialGauge4.MainValue = ReceiveSCSStatus.SCMDUCMtrspd_val; }); radialGauge1.BeginInvoke((MethodInvoker)delegate { radialGauge1.MainValue = DynoRPM_val; }); . . . } The problem for above code is: thisperiodic call slows down my program performance. So I tried to updatethe gauges only when there is a change of the main value. The new code is as below: // update gauges private void timer2_Tick_1(object sender, EventArgs e) { if (ReceiveSCSStatus.SCMDUCMtrspd_val !=Last_SCMDUCMtrspd_val) { radialGauge4.BeginInvoke((MethodInvoker)delegate { radialGauge4.MainValue = ReceiveSCSStatus.SCMDUCMtrspd_val; }); } if (DynoRPM_val !=Last_DynoRPM_val) { radialGauge1.BeginInvoke((MethodInvoker)delegate { radialGauge1.MainValue = DynoRPM_val; }); } . . . } This way is theoretically correct. But when I run the program and change themain value, the Inner gauge display does not got changed automatically. Only whenI break inside the loop, and run program again, then the new value comes out on the Inner gauge display . Do you know why this happens? Also, when I design the gauges, the '.MainValue' is defaulted to Quote Link to comment Share on other sites More sharing options...
CarlosAC Posted July 26, 2010 Report Share Posted July 26, 2010 Hi quanone If you want to modify the main value of the gauge, you need to use the radialGauge1.MainIndicator.Value property. Now, when you mentioned you want to set the main value to NONE, do you mean to ZERO? The gauge always needs to have a valid value. Carlos Chaves Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.