public static TclFile Create(string relativePath, codeEditor.Data.Project project) { //string id = GetID(relativePath, project); //if (project.IsRegistered(id)) //{ // TclFile item = project.GetRegisterdItem(id) as TclFile; // project.RegisterProjectItem(item); // return item; //} TclFile fileItem = new TclFile(); fileItem.Project = project; fileItem.RelativePath = relativePath; if (relativePath.Contains('\\')) { fileItem.Name = relativePath.Substring(relativePath.LastIndexOf('\\') + 1); } else { fileItem.Name = relativePath; } // fileItem.ParseRequested = true; //project.RegisterProjectItem(fileItem); return(fileItem); }
// View controller interface ////////////////////////////////////////// internal void Controller_AddProject(Data.Project project) { if (Global.Projects.ContainsKey(project.Name)) { System.Diagnostics.Debugger.Break(); return; } Global.Projects.Add(project.Name, project); addProject(project); }
public static void AddProject(Data.Project project) { Global.mainForm.Controller_AddProject(project); }
private void addProject(Data.Project project) { navigatePanel.AddProject(project); Tools.ParseProjectForm pform = new Tools.ParseProjectForm(navigatePanel.GetPeojectNode(project.Name)); pform.ShowDialog(this); }