private void tRemoteList_AfterCheck(object sender, TreeViewEventArgs e) { if (_checkingNodes) { return; } // If this is a folder node: uncheck all child nodes in the GUI // but only put this node (parent folder) in the ignored list. _checkingNodes = true; UIHelpers.CheckUncheckChildNodes(e.Node, e.Node.Checked); if (e.Node.Checked && e.Node.Parent != null && !e.Node.Parent.Checked) { e.Node.Parent.Checked = true; UIHelpers.CheckSingleRoute(e.Node.Parent); } _checkingNodes = false; Program.Account.IgnoreList.Items = UIHelpers.GetUncheckedItems(tRemoteList.Nodes).ToList(); }