private static void Events_Opened()
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            Projects projects = VSPackage.DTE.Solution.Projects;

            foreach (Project p in projects)
            {
                OnProjectOpened?.Invoke(p);
            }
        }
        public void OpenProject(string filename)
        {
            Util.LogMessage($"Opening project {filename}..");
            var p = ReadProjectFile(filename);

            // TODO
            // allow opening single projects instead of only workspaces
            if (TargetWorkspace.Projects.ContainsKey(p.ProjectGuid))
            {
                Util.LogMessage($"Project {p.ProjName} is already open!", ConsoleColor.Red);
                return;
            }
            TargetWorkspace.Projects.Add(p.ProjectGuid, p);

            // Raise OnProjectAdded event
            OnProjectOpened?.Invoke(this, new ProjectOpenedEventArgs(p));

            PopulateTreeView();
        }
 private static void Events_ProjectAdded(Project Project) => OnProjectOpened?.Invoke(Project);