示例#1
0
        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);
        }
示例#2
0
        // 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);
        }
示例#3
0
 public static void AddProject(Data.Project project)
 {
     Global.mainForm.Controller_AddProject(project);
 }
示例#4
0
 private void addProject(Data.Project project)
 {
     navigatePanel.AddProject(project);
     Tools.ParseProjectForm pform = new Tools.ParseProjectForm(navigatePanel.GetPeojectNode(project.Name));
     pform.ShowDialog(this);
 }