# HG changeset patch # User StephaneLenclud # Date 1454435985 -3600 # Node ID 12372d6d7a47d03f72889b8f93a29cadaabf3192 # Parent 549e7d88727188c2f4b711a8a6401930f9bb1a67 Renamed client treeview control and fix issue with recording icon remaining after recording client was closed. diff -r 549e7d887271 -r 12372d6d7a47 Server/MainForm.Designer.cs --- a/Server/MainForm.Designer.cs Tue Jan 26 18:51:36 2016 +0100 +++ b/Server/MainForm.Designer.cs Tue Feb 02 18:59:45 2016 +0100 @@ -53,7 +53,7 @@ this.tabPageClients = new System.Windows.Forms.TabPage(); this.buttonCloseClients = new System.Windows.Forms.Button(); this.buttonStartClient = new System.Windows.Forms.Button(); - this.treeViewClients = new System.Windows.Forms.TreeView(); + this.iTreeViewClients = new System.Windows.Forms.TreeView(); this.tabPageDisplay = new System.Windows.Forms.TabPage(); this.buttonShowClock = new System.Windows.Forms.Button(); this.buttonHideClock = new System.Windows.Forms.Button(); @@ -246,7 +246,7 @@ // this.tabPageClients.Controls.Add(this.buttonCloseClients); this.tabPageClients.Controls.Add(this.buttonStartClient); - this.tabPageClients.Controls.Add(this.treeViewClients); + this.tabPageClients.Controls.Add(this.iTreeViewClients); this.tabPageClients.Location = new System.Drawing.Point(4, 22); this.tabPageClients.Name = "tabPageClients"; this.tabPageClients.Padding = new System.Windows.Forms.Padding(3); @@ -275,16 +275,16 @@ this.buttonStartClient.UseVisualStyleBackColor = true; this.buttonStartClient.Click += new System.EventHandler(this.buttonStartClient_Click); // - // treeViewClients + // iTreeViewClients // - this.treeViewClients.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.iTreeViewClients.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.treeViewClients.Location = new System.Drawing.Point(87, 6); - this.treeViewClients.Name = "treeViewClients"; - this.treeViewClients.Size = new System.Drawing.Size(499, 233); - this.treeViewClients.TabIndex = 0; - this.treeViewClients.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViewClients_AfterSelect); + this.iTreeViewClients.Location = new System.Drawing.Point(87, 6); + this.iTreeViewClients.Name = "iTreeViewClients"; + this.iTreeViewClients.Size = new System.Drawing.Size(499, 233); + this.iTreeViewClients.TabIndex = 0; + this.iTreeViewClients.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViewClients_AfterSelect); // // tabPageDisplay // @@ -993,7 +993,7 @@ private MarqueeLabel marqueeLabelTop; private MarqueeLabel marqueeLabelBottom; private System.Windows.Forms.TabPage tabPageClients; - private System.Windows.Forms.TreeView treeViewClients; + private System.Windows.Forms.TreeView iTreeViewClients; private System.Windows.Forms.TabPage tabPageDisplay; private System.Windows.Forms.CheckBox checkBoxFixedPitchFontOnly; private System.Windows.Forms.Button buttonSuspend; diff -r 549e7d887271 -r 12372d6d7a47 Server/MainForm.cs --- a/Server/MainForm.cs Tue Jan 26 18:51:36 2016 +0100 +++ b/Server/MainForm.cs Tue Feb 02 18:59:45 2016 +0100 @@ -1403,7 +1403,7 @@ foreach (var client in inactiveClients) { iClients.Remove(client); - Program.iMainForm.treeViewClients.Nodes.Remove(Program.iMainForm.treeViewClients.Nodes.Find(client, false)[0]); + Program.iMainForm.iTreeViewClients.Nodes.Remove(Program.iMainForm.iTreeViewClients.Nodes.Find(client, false)[0]); } } @@ -1565,7 +1565,9 @@ if (Program.iMainForm.iClients.Keys.Contains(aSessionId)) { Program.iMainForm.iClients.Remove(aSessionId); - Program.iMainForm.treeViewClients.Nodes.Remove(Program.iMainForm.treeViewClients.Nodes.Find(aSessionId, false)[0]); + Program.iMainForm.iTreeViewClients.Nodes.Remove(Program.iMainForm.iTreeViewClients.Nodes.Find(aSessionId, false)[0]); + //Update recording status too whenever a client is removed + UpdateRecordingNotification(); } if (iCurrentClientSessionId == aSessionId) @@ -1938,7 +1940,7 @@ TreeNode node = null; //Check that our client node already exists //Get our client root node using its key which is our session ID - TreeNode[] nodes = treeViewClients.Nodes.Find(aClient.SessionId, false); + TreeNode[] nodes = iTreeViewClients.Nodes.Find(aClient.SessionId, false); if (nodes.Count()>0) { //We already have a node for that client @@ -1949,8 +1951,8 @@ else { //Client node does not exists create a new one - treeViewClients.Nodes.Add(aClient.SessionId, aClient.SessionId); - node = treeViewClients.Nodes.Find(aClient.SessionId, false)[0]; + iTreeViewClients.Nodes.Add(aClient.SessionId, aClient.SessionId); + node = iTreeViewClients.Nodes.Find(aClient.SessionId, false)[0]; } if (node != null)