Dennis

Dennis

  • NA
  • 1
  • 1.5k

real-time value show in the gauge

Aug 2 2013 4:38 AM

I get two real-time values through Bluetooth connection.

And then I can work every second when I use progressbar in C sharp

But I try to use gauge to show up the value, it can't smooth.

when the value show every second, the indicator show the value will be from zero to the value

It looks like not smooth. How do I add any code in this project 

I hope someone can help me solve this problem, thanks.

  code below:
         
                progressBar1.Value = ev.Attention;      //get first real-time value in progressBar
                progressBar2.Value = ev.Meditation;    //get second real-time value in progressBar

                Gauge gauge = new Gauge();
                Gauge gauge1 = new Gauge();

                NeedleIndicator indicator = new NeedleIndicator();
                indicator.Value = ev.Attention;

                NeedleIndicator indicator1 = new NeedleIndicator();
                indicator1.Value = ev.Meditation;

                gauge.Indicators.Add(indicator);
                gauge1.Indicators.Add(indicator1);

                elementHost1.Child = gauge;
                elementHost2.Child = gauge1;