diff -r f590956d3234 -r 06369ace500d GUI/SoundGraphDisplay.cs --- a/GUI/SoundGraphDisplay.cs Sat Apr 13 00:43:25 2013 +0200 +++ b/GUI/SoundGraphDisplay.cs Sun Apr 14 22:38:41 2013 +0200 @@ -36,7 +36,8 @@ private List list = new List(); private SoundGraph.Server iServer; - private int nextSensorToDisplay=0; + private int iNextSensorToDisplay=0; + private int iTickCounter=0; public SoundGraphDisplay(IComputer computer, PersistentSettings settings, @@ -112,7 +113,7 @@ public void Redraw() { - //TODO: construct our two lines of texts, scroll or alternate sensors + //Update all sensors from our front view foreach (SensorFrontView sensor in list) { sensor.Update(); @@ -122,18 +123,22 @@ //Alternate between sensors if (list.Count > 0) { - SetText(list[nextSensorToDisplay].iFirstLine, list[nextSensorToDisplay].iSecondLine); - nextSensorToDisplay++; + //Display current sensor on our FrontView display + SetText(list[iNextSensorToDisplay].iFirstLine, list[iNextSensorToDisplay].iSecondLine); + iTickCounter++; + if (iTickCounter==2) //Move to the next sensor only every second tick + { + iTickCounter = 0; + iNextSensorToDisplay++; + } } - if (nextSensorToDisplay == list.Count) + if (iNextSensorToDisplay == list.Count) { //Go back to first sensor - nextSensorToDisplay = 0; + iNextSensorToDisplay = 0; } - - // } @@ -157,7 +162,7 @@ list.Add(new SensorFrontView(this, sensor, balloonTip, settings, unitManager)); //UpdateMainIconVisibilty(); settings.SetValue(new Identifier(sensor.Identifier, "FrontView").ToString(), true); - nextSensorToDisplay = 0; + iNextSensorToDisplay = 0; } } @@ -165,7 +170,7 @@ public void Remove(ISensor sensor) { Remove(sensor, true); - nextSensorToDisplay = 0; + iNextSensorToDisplay = 0; } private void Remove(ISensor sensor, bool deleteConfig)