private void buttonAdd_Click(object sender, EventArgs e) { AddOrEditJiraServer dialog = new AddOrEditJiraServer(jiraServerModel, null); DialogResult result = dialog.ShowDialog(); if (result != DialogResult.OK) { return; } jiraServerModel.addServer(dialog.Server); JiraServerTreeNode newNode = new JiraServerTreeNode(dialog.Server, 0); jiraRoot.Nodes.Add(newNode); serverTree.ExpandAll(); serverTree.SelectedNode = newNode; SomethingChanged = true; }
private void addNewJiraServer() { var dialog = new AddOrEditJiraServer(null, jiraFacade); var result = dialog.ShowDialog(); if (result != DialogResult.OK) { return; } jiraServerModel.addServer(dialog.Server); var newNode = new JiraServerTreeNode(jiraServerModel, dialog.Server, dialog.Server.Enabled ? JIRA_ENABLED : JIRA_DISABLED); jiraRoot.Nodes.Add(newNode); serverTree.ExpandAll(); serverTree.SelectedNode = newNode; SomethingChanged = true; }