public ProjectConfiguration( Guid?serverTypeToCreate, JiraServerModel jiraServerModel, BambooServerModel bambooServerModel, AbstractJiraServerFacade jiraFacade, BambooServerFacade bambooFacade) { InitializeComponent(); this.jiraServerModel = jiraServerModel; this.bambooServerModel = bambooServerModel; this.jiraFacade = jiraFacade; this.bambooFacade = bambooFacade; var jiraServers = jiraServerModel.getAllServers(); var bambooServers = bambooServerModel.getAllServers(); imageList = new ImageList(); imageList.Images.Add(Resources.folder_jira); imageList.Images.Add(Resources.folder_bamboo); imageList.Images.Add(Resources.tab_jira); imageList.Images.Add(Resources.tab_jira_grey); imageList.Images.Add(Resources.tab_bamboo); imageList.Images.Add(Resources.tab_bamboo_grey); serverTree.ImageList = imageList; serverTree.Nodes.Add(jiraRoot); serverTree.Nodes.Add(bambooRoot); // serverTree.Nodes.Add(crucibleRoot); // serverTree.Nodes.Add(fisheyeRoot); foreach (var server in jiraServers) { jiraRoot.Nodes.Add(new JiraServerTreeNode(jiraServerModel, server, server.Enabled ? JIRA_ENABLED : JIRA_DISABLED)); } foreach (var server in bambooServers) { bambooRoot.Nodes.Add(new BambooServerTreeNode(bambooServerModel, server, server.Enabled ? BAMBOO_ENABLED : BAMBOO_DISABLED)); } StartPosition = FormStartPosition.CenterParent; serverTree.ExpandAll(); if (serverTypeToCreate != null) { if (serverTypeToCreate.Value.Equals(Server.JiraServerTypeGuid)) { serverTree.SelectedNode = jiraRoot; } else if (serverTypeToCreate.Value.Equals(Server.BambooServerTypeGuid)) { serverTree.SelectedNode = bambooRoot; } } }
public ProjectConfiguration(JiraServerModel jiraServerModel, JiraServerFacade facade) { InitializeComponent(); this.jiraServerModel = jiraServerModel; this.facade = facade; ICollection <JiraServer> jiraServers = jiraServerModel.getAllServers(); serverTree.Nodes.Add(jiraRoot); // serverTree.Nodes.Add(bambooRoot); // serverTree.Nodes.Add(crucibleRoot); // serverTree.Nodes.Add(fisheyeRoot); foreach (JiraServer server in jiraServers) { jiraRoot.Nodes.Add(new JiraServerTreeNode(server, 0)); } StartPosition = FormStartPosition.CenterParent; serverTree.ExpandAll(); }