# HG changeset patch # User StephaneLenclud # Date 1453403585 -3600 # Node ID 3500fe1ad7856dd1b6f61702e7e915fc4860298b # Parent 533eb8a80d56b657f3f1695c202ca998323f6143 Recording notification icon now functional. diff -r 533eb8a80d56 -r 3500fe1ad785 Server/MainForm.cs --- a/Server/MainForm.cs Thu Jan 21 18:16:15 2016 +0100 +++ b/Server/MainForm.cs Thu Jan 21 20:13:05 2016 +0100 @@ -595,7 +595,7 @@ { iRecordingNotification.Icon = GetIcon("record.ico"); iRecordingNotification.Text = "No recording"; - iRecordingNotification.Visible = true; + iRecordingNotification.Visible = false; } /// @@ -1759,6 +1759,35 @@ } /// + /// Update our recording notification. + /// + private void UpdateRecordingNotification() + { + //Go through each + bool activeRecording = false; + string text=""; + RecordingField recField=new RecordingField(); + foreach (var client in iClients) + { + RecordingField rec=(RecordingField)client.Value.FindSameFieldAs(recField); + if (rec!=null && rec.IsActive) + { + activeRecording = true; + //Don't break cause we are collecting the names. + text += client.Value.Name + " recording\n"; + } + } + + //Change visibility of notification if needed + if (iRecordingNotification.Visible != activeRecording) + { + iRecordingNotification.Text = text; + iRecordingNotification.Visible = activeRecording; + + } + } + + /// /// /// /// @@ -1771,6 +1800,9 @@ return; } + //Hook in record icon update too + UpdateRecordingNotification(); + TreeNode node = null; //Check that our client node already exists //Get our client root node using its key which is our session ID