Server/MainForm.cs
changeset 118 606c22398045
parent 117 9e48cc704a69
child 119 bf99a9f669d9
     1.1 --- a/Server/MainForm.cs	Mon Feb 09 18:25:14 2015 +0100
     1.2 +++ b/Server/MainForm.cs	Mon Feb 09 20:06:30 2015 +0100
     1.3 @@ -226,11 +226,44 @@
     1.4  		{
     1.5  			if (iDisplay.IsOpen())
     1.6  			{
     1.7 -				iDisplay.SetIconOnOff(Display.TMiniDisplayIconType.EMiniDisplayIconNetwork, iNetworkManager.NetworkListManager.IsConnectedToInternet);
     1.8 +				iDisplay.SetIconOnOff(Display.TMiniDisplayIconType.EMiniDisplayIconInternet, iNetworkManager.NetworkListManager.IsConnectedToInternet);
     1.9 +				iDisplay.SetIconOnOff(Display.TMiniDisplayIconType.EMiniDisplayIconNetworkSignal, iNetworkManager.NetworkListManager.IsConnected);
    1.10  			}
    1.11  		}
    1.12  
    1.13  
    1.14 +		int iLastNetworkIconIndex = 0;
    1.15 +		int iUpdateCountSinceLastNetworkAnimation = 0;
    1.16 +
    1.17 +		/// <summary>
    1.18 +		/// 
    1.19 +		/// </summary>
    1.20 +		private void UpdateNetworkSignal(DateTime aLastTickTime, DateTime aNewTickTime)
    1.21 +		{
    1.22 +			iUpdateCountSinceLastNetworkAnimation++;
    1.23 +			iUpdateCountSinceLastNetworkAnimation = iUpdateCountSinceLastNetworkAnimation % 4;
    1.24 +
    1.25 +			if (iDisplay.IsOpen() && iNetworkManager.NetworkListManager.IsConnected && iUpdateCountSinceLastNetworkAnimation==0)
    1.26 +			{				
    1.27 +				int iconCount=iDisplay.IconCount(Display.TMiniDisplayIconType.EMiniDisplayIconNetworkSignal);
    1.28 +				iLastNetworkIconIndex++;
    1.29 +				iLastNetworkIconIndex = iLastNetworkIconIndex % (iconCount+1);
    1.30 +				for (int i=0;i<iconCount;i++)
    1.31 +				{
    1.32 +					if (i < iLastNetworkIconIndex)
    1.33 +					{
    1.34 +						iDisplay.SetIconOn(Display.TMiniDisplayIconType.EMiniDisplayIconNetworkSignal,i);
    1.35 +					}
    1.36 +					else
    1.37 +					{
    1.38 +						iDisplay.SetIconOff(Display.TMiniDisplayIconType.EMiniDisplayIconNetworkSignal,i);
    1.39 +					}
    1.40 +				}				
    1.41 +			}
    1.42 +		}
    1.43 +
    1.44 +
    1.45 +
    1.46          /// <summary>
    1.47          /// Receive volume change notification and reflect changes on our slider.
    1.48          /// </summary>
    1.49 @@ -730,6 +763,8 @@
    1.50              //Update our animations
    1.51              DateTime NewTickTime = DateTime.Now;
    1.52  
    1.53 +			UpdateNetworkSignal(LastTickTime, NewTickTime);
    1.54 +
    1.55              //Update animation for all our marquees
    1.56              foreach (Control ctrl in tableLayoutPanel.Controls)
    1.57              {