void RemoveProject(SmartCodeProject p)
 {
     var child = from c in _solutionRoot.Children
                 where c.Item.Equals(p)
                 select c;
     if(child.Any()) {
         _solutionRoot.Children.Remove(child.First());
     }
 }
Esempio n. 2
0
        public ASTManager(SmartCodeProject project) { 
            _project = project;

            _project.StartUpdate += (s, e) => {
                UpdateAtWill = false;
            };

            _project.UpdateDone += (s, e) => {
                UpdateFullASTAndReleaseUpdateLock();
            };
        }
        public TreeViewProjectItemProject(SmartCodeProject project, TreeViewProjectItem parent)
            : base(project, parent)
        {
            ImageSource = @"../Images/project-folder.ico";
                _project = project;

                _project.RequestShowDocument += (s, e) => {
                        if(e.Value is ProjectItemCodeDocument) {
                            var codeVM = CodeFileViewModel.Create(e.Value as ProjectItemCodeDocument);
                            var showcmd = codeVM.ShowCommand;
                            if(showcmd.CanExecute(null))
                                showcmd.Execute(null);
                        }
                    };
        }
Esempio n. 4
0
 public IEnumerable<ErrorItem> GetErrorsFromProject(SmartCodeProject codeProject)
 {
     return _errors.FindAll(x => x.CodeItem.Project.Equals(codeProject));
 }
 public override ASTManager CreateASTManager(SmartCodeProject project)
 {
     return new ASTManagerAHK(project);
 }
Esempio n. 6
0
 public ProjectEventArgs(SmartCodeProject p)
 {
     _p = p;
 }
Esempio n. 7
0
 public void Remove(SmartCodeProject p)
 {
     _projects.Remove(p);
     p.Solution = null;
     if(ProjectAdded != null)
         ProjectRemoved(this, new ProjectEventArgs(p));
 }
Esempio n. 8
0
        //public virtual void DocumentLostFocus(ProjectItemCodeDocument doc) {
        //}
        public void Add(SmartCodeProject p)
        {
            _projects.Add(p);
            p.Solution = this;
            if(ProjectAdded != null)
                ProjectAdded(this, new ProjectEventArgs(p));

            if(_current == null)
                ActiveProject = p;
        }
 void AddProject(SmartCodeProject p)
 {
     _solutionRoot.Children.Add(TreeViewProjectItem.Build(p, _solutionRoot));
 }
Esempio n. 10
0
 public ASTManagerAHK(SmartCodeProject project)
     : base(project)
 {
 }