void MainFormLoad(object sender, EventArgs e) { if (File.Exists("db.xml")) { Model m = MySerDeser.deser <Model>(); model_to_tree(treeView1.Nodes, m.nodes); treeView1.ExpandAll(); } }
void ПрочитатьToolStripMenuItemClick(object sender, EventArgs e) { Model m = MySerDeser.deser <Model>(); model_to_tree(treeView1.Nodes, m.nodes); }