示例#1
0
        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);
        }
示例#2
0
        private void linkAgentDetails_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            IBuildAgent editedAgent = FormAgentEdit.DialogShow(this.newBuildAgent, FormActionMode.Edit);

            if (editedAgent != null)
            {
                TempBuildAgent.AssingTo(editedAgent, this.newBuildAgent);
            }
        }
示例#3
0
 private void linkSourceAgentDetails_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     FormAgentEdit.DialogShow(this.sourceBuildAgent, FormActionMode.View);
 }