private void OnLoad(object sender, EventArgs e) { treeView1.Nodes["root"].Expand(); content = new ContentWindow(this); scenes = new SceneWindow(this); plugins = new ComponentPluginManager(renderControl1.X); //add the different component plugins to the component list box! foreach (ComponentPlugin plugin in plugins.Plugins) { treeView1.Nodes[0].Nodes.Add(plugin.type.ToString()); } open = new OpenPopup(this); open.Show(); open.Select(); open.Focus(); open.Location = new Point(Location.X + Width / 2 - open.Width / 2, Location.Y + Height / 2 - open.Height / 2); Timer tim = new Timer(); tim.Interval = 100; tim.Tick += new EventHandler(tim_Tick); tim.Start(); }
public void LoadProjectFile(string Filename, ComponentPluginManager plugins) { XmlDocument doc = new XmlDocument(); doc.Load(Filename); editor.content.LoadFromXML(doc); editor.scenes.LoadFromXML(doc.DocumentElement.ChildNodes[1].ChildNodes); }
public void SaveProjectFile(string Filename, ComponentPluginManager plugins) { XmlTextWriter writer = new XmlTextWriter(Filename, Encoding.UTF8); writer.Formatting = Formatting.Indented; writer.WriteStartDocument(); writer.WriteStartElement("Project"); editor.content.WriteToXML(writer); editor.scenes.WriteToXML(writer); writer.WriteEndElement(); writer.WriteEndDocument(); writer.Flush(); writer.Close(); }