Jump to content
Software FX Community

Inner gauge display problem on main value


quanone

Recommended Posts

 

Hi there,


 


I have installed several gauges with Inner gauge in my program. I
need 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: this
periodic call slows down my program performance. So I tried to update
the 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 the
main value, the Inner gauge display does not got changed automatically. Only when
I 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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...