public bool Load(string path) { this._filePath = path; try { System.IO.FileStream fs = new System.IO.FileStream(path, System.IO.FileMode.Open); System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(Project)); Project xml = (Project)serializer.Deserialize(fs); this._ProjectHeader = xml._ProjectHeader; this.tree.Add(this._ProjectHeader); fs.Close(); } catch ( FileNotFoundException e ) { MessageBox.Show(e.FileName + "が見つかりません。", "ファイル読み込みエラー"); } return true; }
public void Add(ProjectHeader ph) { Tree tree = ph.getTree(); this.child.Add(tree); }