private void saveState() { stgList = new ArrayListStg(); stgList.Reset(); // Save trv state foreach (TreeNode tn in trvObGroups.Nodes) { stgList.pdArray.Add(new System.Collections.DictionaryEntry(tn.Name /* ID */, tn.Checked)); foreach (TreeNode tn_child in tn.Nodes) { stgList.pdArray.Add(new System.Collections.DictionaryEntry(tn_child.Name /* ID */, tn_child.Checked)); } } //************************************************************************************************ stgList.Save(); }