public TreeNode AddProjectNode(TreeNode motherNode, IProject project) { ProjectNode projectNode = new ProjectNode(project); projectNode.AddTo(motherNode); if (project is MissingProject) { CustomNode missingNode = new CustomNode(); missingNode.SetIcon("Icons.16x16.Warning"); missingNode.Text = ResourceService.GetString("ICSharpCode.SharpDevelop.Commands.ProjectBrowser.ProjectFileNotFound"); missingNode.AddTo(projectNode); } else if (project is UnknownProject) { string ext = Path.GetExtension(project.FileName); if (".proj".Equals(ext, StringComparison.OrdinalIgnoreCase) || ".build".Equals(ext, StringComparison.OrdinalIgnoreCase)) { projectNode.OpenedImage = projectNode.ClosedImage = "Icons.16x16.XMLFileIcon"; projectNode.Nodes.Clear(); } else { CustomNode unknownNode = new CustomNode(); unknownNode.SetIcon("Icons.16x16.Warning"); unknownNode.Text = StringParser.Parse(((UnknownProject)project).WarningText); unknownNode.AddTo(projectNode); } } else { new ReferenceFolder(project).AddTo(projectNode); } return projectNode; }
public TreeNode AddProjectNode(TreeNode motherNode, IProject project) { ProjectNode projectNode = new ProjectNode(project); projectNode.InsertSorted(motherNode); if (project is MissingProject) { CustomNode missingNode = new CustomNode(); missingNode.SetIcon("Icons.16x16.Warning"); missingNode.Text = ResourceService.GetString("ICSharpCode.SharpDevelop.Commands.ProjectBrowser.ProjectFileNotFound"); missingNode.AddTo(projectNode); } else if (project is UnknownProject) { CustomNode unknownNode = new CustomNode(); unknownNode.SetIcon("Icons.16x16.Warning"); unknownNode.Text = StringParser.Parse(((UnknownProject)project).WarningText); unknownNode.AddTo(projectNode); } else if (project is MSBuildFileProject) { projectNode.OpenedImage = projectNode.ClosedImage = "Icons.16x16.XMLFileIcon"; projectNode.Nodes.Clear(); } else { new ReferenceFolder(project).AddTo(projectNode); } return(projectNode); }
public TreeNode AddProjectNode(TreeNode motherNode, IProject project) { ProjectNode projectNode = new ProjectNode(project); projectNode.InsertSorted(motherNode); if (project is MissingProject) { CustomNode missingNode = new CustomNode(); missingNode.SetIcon("Icons.16x16.Warning"); missingNode.Text = ResourceService.GetString("ICSharpCode.SharpDevelop.Commands.ProjectBrowser.ProjectFileNotFound"); missingNode.AddTo(projectNode); } else if (project is ErrorProject) { CustomNode unknownNode = new CustomNode(); unknownNode.SetIcon("Icons.16x16.Warning"); unknownNode.Text = ((ErrorProject)project).Exception.Message; unknownNode.AddTo(projectNode); } else if (project is MSBuildFileProject) { projectNode.OpenedImage = projectNode.ClosedImage = "Icons.16x16.XMLFileIcon"; projectNode.Nodes.Clear(); } else { new ReferenceFolder(project).AddTo(projectNode); } return projectNode; }
public TreeNode AddProjectNode(TreeNode motherNode, IProject project) { ProjectNode projectNode = new ProjectNode(project); projectNode.AddTo(motherNode); if (project is MissingProject) { CustomNode missingNode = new CustomNode(); missingNode.SetIcon("Icons.16x16.Warning"); missingNode.Text = ResourceService.GetString("ICSharpCode.SharpDevelop.Commands.ProjectBrowser.ProjectFileNotFound"); missingNode.AddTo(projectNode); } else if (project is UnknownProject) { string ext = Path.GetExtension(project.FileName); if (".proj".Equals(ext, StringComparison.OrdinalIgnoreCase) || ".build".Equals(ext, StringComparison.OrdinalIgnoreCase)) { projectNode.OpenedImage = projectNode.ClosedImage = "Icons.16x16.XMLFileIcon"; projectNode.Nodes.Clear(); } else { CustomNode unknownNode = new CustomNode(); unknownNode.SetIcon("Icons.16x16.Warning"); unknownNode.Text = StringParser.Parse(((UnknownProject)project).WarningText); unknownNode.AddTo(projectNode); } } else { new ReferenceFolder(project).AddTo(projectNode); } return(projectNode); }