Example #1
0
        public AutoDeployAgent GetSelectedAgent()
        {
            AutoDeployAgent agent = null;

            if (dataGridViewAgents.SelectedCells.Count > 0)
            {
                agent = (AutoDeployAgent)dataGridViewAgents.CurrentRow.DataBoundItem;
            }
            return(agent);
        }
Example #2
0
        private void buttonRemoteConfig_Click(object sender, EventArgs e)
        {
            AutoDeployAgent agent = GetSelectedAgent();

            if (agent != null)
            {
                RemoteConfigurationForm remoteConfigForm = new RemoteConfigurationForm(agent);
                remoteConfigForm.ShowDialog();
            }
        }
 public RemoteConfigurationForm(AutoDeployAgent i_AutoDeployAgent)
 {
     m_AutoDeployAgent = i_AutoDeployAgent;
     InitializeComponent();
     textBoxUserName.Text        = m_AutoDeployAgent.Service.GetRemotePathUserName();
     textBoxPassword.Text        = m_AutoDeployAgent.Service.GetRemotePathPassword();
     textBoxRemotePath.Text      = m_AutoDeployAgent.Service.GetRemotePath();
     textBoxExeParams.Text       = m_AutoDeployAgent.Service.GetAdditionalExeParams();
     textBoxName.Text            = m_AutoDeployAgent.Service.GetName();
     textBoxInstalltionPath.Text = m_AutoDeployAgent.Service.GetInstalltionPath();
     textBoxServiceName.Text     = m_AutoDeployAgent.Service.GetServiceName();
 }
Example #4
0
        private void dataGridViewAgents_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            AutoDeployAgent agent = GetSelectedAgent();

            agent.RefreshInfo();
            if (agent.ServiceRunning)
            {
                buttonStart.Enabled = false;
                buttonStop.Enabled  = true;
            }
            else
            {
                buttonStart.Enabled = true;
                buttonStop.Enabled  = false;
            }
        }
Example #5
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            AutoDeployAgent agent = GetSelectedAgent();

            if (agent != null)
            {
                try
                {
                    agent.Service.StartService();
                    writeToLogs("Service started.", agent.Name, false);
                }
                catch (Exception ex)
                {
                    writeToLogs(ex.Message, agent.Name, true);
                }
            }
        }
Example #6
0
        private void buttonDeploy_Click(object sender, EventArgs e)
        {
            AutoDeployAgent agent = GetSelectedAgent();

            if (agent != null)
            {
                try
                {
                    agent.Service.Deploy();
                    writeToLogs("Deploy was done successfully", agent.Name, false);
                }
                catch (Exception ex)
                {
                    writeToLogs(ex.Message, agent.Name, true);
                }
            }
        }