protected override void HandleCheckedChange() { if (IsCategoryNode(ClickedNode)) { foreach (var fileNode in ClickedNode.GetTreeNodes()) { fileNode.SetCheckedIfVisible(ClickedNode.Checked); foreach (var modNode in fileNode.GetTreeNodes()) { modNode.SetCheckedIfVisible(ClickedNode.Checked); } } } else if (IsFileNode(ClickedNode)) { foreach (var modNode in ClickedNode.GetTreeNodes()) { modNode.SetCheckedIfVisible(ClickedNode.Checked); } var catNode = ClickedNode.Parent; catNode.Checked = catNode.AreAllVisibleCheckboxesChecked(); } else if (IsModNode(ClickedNode)) { var fileNode = ClickedNode.Parent; fileNode.Checked = fileNode.AreAllVisibleCheckboxesChecked(); var catNode = fileNode.Parent; catNode.Checked = catNode.AreAllVisibleCheckboxesChecked(); } Program.MainForm.EnableMergeIfValidSelection(); }
protected override void HandleCheckedChange() { if (IsCategoryNode(ClickedNode)) { foreach (var fileNode in ClickedNode.GetTreeNodes()) { fileNode.Checked = ClickedNode.Checked; } } else if (IsFileNode(ClickedNode)) { var catNode = ClickedNode.Parent; catNode.Checked = catNode.GetTreeNodes().All(node => node.Checked); } Program.MainForm.EnableUnmergeIfValidSelection(); }