public ProjectLayoutNinja(string name) { _project = new Project(name); _name = name; }
}//SelectProjects() public Project SelectSingleProject(string name) { Project project = new Project("NULL", DateTime.Now.ToString(), DateTime.Now.ToString()); XmlDocument doc = new XmlDocument(); doc.Load(_projectsSavePath); XmlNodeList nodelist = doc.SelectNodes(DatabaseValues.PROJECT_PATH); foreach (XmlNode item in nodelist) { if(item.Attributes[DatabaseValues.NAME].InnerText ==name ) { project = new Project( item.Attributes[DatabaseValues.NAME].InnerText, item.Attributes[DatabaseValues.STARTDATE].InnerText, item.Attributes[DatabaseValues.ENDDATE].InnerText ); break; } } return project; //Ternaire }//SelectSingleProject()
//USEFUL ?????????????? RENAME !!!!!!!!!!!!!!!!!!!! /// <summary> /// Creates a new project and go straight to it /// </summary> /// <param name="name">The name of the project</param> /// <param name="startDate">the start date</param> /// <param name="endDate">the end date</param> /// <param name="home">The home window, in order to close it</param> public void InsertProject(string name, string startDate, string endDate, Home home = null) { //USEFUL ?????????? Project brandNew = new Project(name, startDate, endDate); //Going to the project window Captain captain = new Captain(); // captain.ToProject(name, home); }//InsertProject()