Exemple #1
0
 private void saveProjectAsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var newProjectDialog = new NewProjectForm(this);
     newProjectDialog.StartPosition = FormStartPosition.CenterParent;
     var result = newProjectDialog.ShowDialog(this);
     if (result.Equals(DialogResult.OK))
     {
         ProjectName = newProjectDialog.ProjectName;
         XElement element = new XElement("Project",
             new XElement("Name", ProjectName),
             new XElement("Resources",
                 new XElement("eMotion",
                     new XElement("Files",
                         new XElement("File",
                             new XElement("FileName", _classificationFiles.First().Value.First().FileInfo.Name),
                             new XElement("Path", _classificationFiles.First().Value.First().FileInfo.FullName)),
                         new XElement("File",
                             new XElement("FileName", _mvfeaturesFiles.First().Value.First().FileInfo.Name),
                             new XElement("Path", _mvfeaturesFiles.First().Value.First().FileInfo.FullName))),
                     new XElement("Videos",
                         new XElement("File",
                             new XElement("FileName", _videoFiles.First().Value.Name),
                             new XElement("Path", _videoFiles.First().Value.FullName)))
                 )
             )
         );
         if (!Directory.Exists("Proyectos"))
         {
             Directory.CreateDirectory("Proyectos");
         }
         element.Save(@"Proyectos\" + ProjectName + ".eboxprj");
         this.Text = string.Format("EBox - {0}", ProjectName);
         saveProjectToolStripMenuItem.Enabled = true;
     }
     if (result.Equals(DialogResult.Cancel))
     {
         newProjectDialog.Close();
     }
 }
Exemple #2
0
 private void newProjectToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var newProjectDialog = new NewProjectForm(this);
     newProjectDialog.StartPosition = FormStartPosition.CenterParent;
     newProjectDialog.ShowDialog(this);
 }