private void toolStripButtonNew_Click(object sender, EventArgs e) { NewProjectDialog dialog = new NewProjectDialog(m_DefaultLocation); if (dialog.ShowDialog() == DialogResult.OK) { string location = dialog.GetProjectLocation(); Directory.CreateDirectory(location); string projectFile = location + @"\" + dialog.GetProjectName() + @".fxsproj"; string assetFile = location + @"\" + dialog.GetProjectName() + @".asset"; File.WriteAllText(projectFile, XmlUtility.DefaultProjectXml); File.WriteAllText(assetFile, XmlUtility.DefaultAssetXml); string sourcePath = Directory.GetCurrentDirectory() + @"\Data"; StartPageDialog.CopyDefaultData(sourcePath, location); OpenProject(projectFile); } }
private void linkLabelNewProject_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { NewProjectDialog dialog = new NewProjectDialog(m_DefaultLocation); if (dialog.ShowDialog() == DialogResult.OK) { string location = dialog.GetProjectLocation(); Directory.CreateDirectory(location); m_ProjectPath = location + @"\" + dialog.GetProjectName() + @".fxsproj"; string assetFile = location + @"\" + dialog.GetProjectName() + @".asset"; File.WriteAllText(m_ProjectPath, XmlUtility.DefaultProjectXml); File.WriteAllText(assetFile, XmlUtility.DefaultAssetXml); string sourcePath = Directory.GetCurrentDirectory() + @"\Data"; CopyDefaultData(sourcePath, location); this.DialogResult = DialogResult.OK; this.Close(); } }