From 7035c8cbd9f580314ec248c55d498ad4de35ba7e Mon Sep 17 00:00:00 2001 From: klavirshik Date: Tue, 13 Aug 2024 09:36:33 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=82=D1=80=D0=B5=D0=BD=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Reseter2/Form1.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Reseter2/Form1.cs b/Reseter2/Form1.cs index 545f0ff..cec843f 100644 --- a/Reseter2/Form1.cs +++ b/Reseter2/Form1.cs @@ -227,19 +227,11 @@ namespace Reseter2 private void treeView1_ChangePrentRootCheckBox(TreeNode treeNode) { - treeView1_treeViewChangeRootCheckBox(treeNode); + if (treeNode.Parent != null) - { - - - + { treeView1_treeViewChangeRootCheckBox(treeNode.Parent); - if (treeNode.Parent.Parent != null) - { - treeView1_ChangePrentRootCheckBox(treeNode.Parent); - - } - + treeView1_ChangePrentRootCheckBox(treeNode.Parent); } } @@ -288,7 +280,7 @@ namespace Reseter2 } } - + treeView1_treeViewChangeCheckBox(e.Node); treeView1_ChangePrentRootCheckBox(e.Node); // for (int i = 0; i < tree.Nodes.Count; i++)