public static IBuildAgent DialogShow(IBuildAgent agent, FormActionMode mode) { IBuildAgent result = null; if (form == null) { form = new FormAgentEdit(); } form.agent = agent; form.mode = mode; form.Initialize(); if (form.ShowDialog() == DialogResult.OK) { if (form.mode != FormActionMode.View) { result = new TempBuildAgent(); (result as TempBuildAgent).TeamProject = form.cmbTeamProject.SelectedItem as string; result.Name = form.edName.Text; result.Description = form.edDescription.Text; result.MachineName = form.edMachineName.Text; //result.Port = Convert.ToInt32(form.edPort.Text); result.RequireSecureChannel = form.chRequireSecureChannel.Checked; result.BuildDirectory = form.edBuildDirectory.Text; result.Status = (AgentStatus)Enum.Parse(typeof(AgentStatus), form.cmbStatus.SelectedItem as string); //result.MaxProcesses = (int) form.edMaxProcesses.Value; } } return(result); }
private void linkAgentDetails_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { IBuildAgent editedAgent = FormAgentEdit.DialogShow(this.newBuildAgent, FormActionMode.Edit); if (editedAgent != null) { TempBuildAgent.AssingTo(editedAgent, this.newBuildAgent); } }
private void linkSourceAgentDetails_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FormAgentEdit.DialogShow(this.sourceBuildAgent, FormActionMode.View); }