예제 #1
0
파일: MainForm.cs 프로젝트: ALPHAMARIOX/pn
		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();
		}
예제 #2
0
파일: MainForm.cs 프로젝트: ALPHAMARIOX/pn
		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 );
			}
		}