Audio: Taking icon statuc count into account.
Volume indicator on MDM166AA now using half brightness bar when rounding up.
1.1 --- a/Server/MainForm.cs Sun Feb 08 18:34:00 2015 +0100
1.2 +++ b/Server/MainForm.cs Sun Feb 08 18:56:43 2015 +0100
1.3 @@ -294,13 +294,25 @@
1.4 {
1.5 int volumeIconCount = iDisplay.IconCount(Display.TMiniDisplayIconType.EMiniDisplayIconVolume);
1.6 if (volumeIconCount > 0)
1.7 - {
1.8 + {
1.9 int currentVolume = Convert.ToInt32(volumeLevelScalar * volumeIconCount);
1.10 +
1.11 + bool roundedUp = currentVolume > (volumeLevelScalar * volumeIconCount);
1.12 +
1.13 for (int i = 0; i < volumeIconCount; i++)
1.14 {
1.15 if (i < currentVolume)
1.16 {
1.17 - iDisplay.SetIconStatus(Display.TMiniDisplayIconType.EMiniDisplayIconVolume, i, 10);
1.18 + if (i == currentVolume - 1 && roundedUp)
1.19 + {
1.20 + //Half brightness
1.21 + iDisplay.SetIconStatus(Display.TMiniDisplayIconType.EMiniDisplayIconVolume, i, (iDisplay.IconStatusCount(Display.TMiniDisplayIconType.EMiniDisplayIconVolume) - 1)/2);
1.22 + }
1.23 + else
1.24 + {
1.25 + //Full brightness
1.26 + iDisplay.SetIconStatus(Display.TMiniDisplayIconType.EMiniDisplayIconVolume, i, iDisplay.IconStatusCount(Display.TMiniDisplayIconType.EMiniDisplayIconVolume) - 1);
1.27 + }
1.28 }
1.29 else
1.30 {
1.31 @@ -316,7 +328,7 @@
1.32 {
1.33 if (iMultiMediaDevice.AudioEndpointVolume.Mute)
1.34 {
1.35 - iDisplay.SetIconStatus(Display.TMiniDisplayIconType.EMiniDisplayIconMute, i, 10);
1.36 + iDisplay.SetIconStatus(Display.TMiniDisplayIconType.EMiniDisplayIconMute, i, iDisplay.IconStatusCount(Display.TMiniDisplayIconType.EMiniDisplayIconMute)-1);
1.37 }
1.38 else
1.39 {