void save() { FileLoader fl = new FileLoader(); ProjectConfig pc = new ProjectConfig(); pc.Name = txtName.Text; pc.XmlNameSpace = txtNS.Text; pc.GUID = _guid; pc.HelpFile = txtHelp.Text; pc.Icon = txtIcon.Text; if( ((Set)_project.Tag).Groups.Count > 0 ) pc.Sets.Add( _project.Tag ); if( ((Set)_file.Tag).Groups.Count > 0 ) pc.Sets.Add( _file.Tag ); if( ((Set)_folder.Tag).Groups.Count > 0 ) pc.Sets.Add( _folder.Tag ); fl.Save(_filename, pc); enableButtons(); }
private void itmOpen_Click(object sender, System.EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Project Templates (*.pnpt)|*.pnpt"; ofd.CheckFileExists = true; if(ofd.ShowDialog(this) == DialogResult.OK) { _filename = ofd.FileName; FileLoader fl = new FileLoader(); ProjectConfig theConfig = fl.Load(_filename); show(theConfig); Text = AppName + " - " + System.IO.Path.GetFileName( _filename ); } }