Пример #1
0
 public void refresh_cleaners(TreeView treeView1, string settingsfile)
 {
     for (int i = 0; i < treeView1.Nodes.Count; i++)
     {
         treeView1.Nodes[i].Checked = DiskCleaner.secselection(treeView1.Nodes[i].Name, settingsfile);
         for (int j = 0; j < treeView1.Nodes[i].Nodes.Count; j++)
         {
             treeView1.Nodes[i].Nodes[j].Checked = DiskCleaner.selection(treeView1.Nodes[i].Nodes[j].Tag.ToString(), settingsfile);
         }
     }
 }
Пример #2
0
 public void refresh_cleaners(TreeView treeView1, string settingsfile)
 {
     for (int i = 0; i < treeView1.Nodes.Count; i++)
     {
         treeView1.Nodes[i].Checked = DiskCleaner.secselection(treeView1.Nodes[i].Name, settingsfile);
         for (int j = 0; j < treeView1.Nodes[i].Nodes.Count; j++)
         {
             if (treeView1.Nodes[i].Nodes[j].Tag.ToString() == "chromium.cache")
             {
                 MessageBox.Show(DiskCleaner.selection(treeView1.Nodes[i].Nodes[j].Tag.ToString(), settingsfile).ToString());
             }
             treeView1.Nodes[i].Nodes[j].Checked = DiskCleaner.selection(treeView1.Nodes[i].Nodes[j].Tag.ToString(), settingsfile);
         }
     }
 }
Пример #3
0
        public static void selectionload(TreeView treeView1, string settingsfile)
        {
            for (int i = 0; i < treeView1.Nodes.Count; i++)
            {
                treeView1.Nodes[i].Checked = DiskCleaner.secselection(treeView1.Nodes[i].Name, settingsfile);
                for (int j = 0; j < treeView1.Nodes[i].Nodes.Count; j++)
                {
                    treeView1.Nodes[i].Nodes[j].Checked = DiskCleaner.selection(treeView1.Nodes[i].Nodes[j].Tag.ToString(), settingsfile);
                }
            }

            for (int i = 0; i < treeView1.Nodes.Count; i++)
            {
                for (int j = 0; j < treeView1.Nodes[i].Nodes.Count; j++)
                {
                    if (treeView1.Nodes[i].Nodes[j].Checked == false)
                    {
                        treeView1.Nodes[i].Expand();
                        break;
                    }
                }
            }
            treeView1.Nodes[0].EnsureVisible();
        }