private void btn_StopDDT_Click(object sender, EventArgs e)
        {
            // Stop DDT for selected servers
            DdtWrapper.StopDdt(lv_AgentsList, ServerWrapper.ServersList);

            // Update ListView
            ServerWrapper.UpdateListView(lv_AgentsList, lbl_ChangeRateValue, lbl_totalAgentsRunningValue);
        }
 private void timer1_Tick(object sender, EventArgs e)
 {
     ServerWrapper.UpdateListView(lv_AgentsList, lbl_ChangeRateValue, lbl_totalAgentsRunningValue);
     ServerWrapper.UpdateExchangeListView(lv_ExchangeServers, lbl_exchangeGenerationRunningValue);
     ServerWrapper.UpdateSqlListView(lv_SQL, lbl_SQLGenerationRunningvalue);
     lbl_TotalAmountValue.Text         = lv_AgentsList.Items.Count.ToString();
     lbl_exchangeTotalAgentsValue.Text = lv_ExchangeServers.Items.Count.ToString();
     lbl_TotalSQLServersValue.Text     = lv_SQL.Items.Count.ToString();
 }
        private void btn_startDDT_Click(object sender, EventArgs e)
        {
            var failedValidation = false;
            var textBoxValidate  = new List <TextBox> {
                tb_Size, tb_Path, tb_Compression, tb_Interval
            };

            foreach (var textBox in textBoxValidate)
            {
                if (!string.IsNullOrWhiteSpace(textBox.Text))
                {
                    continue;
                }
                errorProvider1.SetError(textBox, "Field cannot be empty");
                failedValidation = true;
            }

            if (failedValidation)
            {
                return;
            }



            _ddtParameters = new DdtParameters()
            {
                Filesize          = Convert.ToInt32(tb_Size.Text),
                Compression       = Convert.ToInt32(tb_Compression.Text),
                Interval          = Convert.ToInt32(tb_Interval.Text),
                Filepath          = tb_Path.Text,
                FillingGeneration = cb_fillingGeneration.Checked
            };

            _ddtParameters.SerizalizeDdtParamsToFile();

            // Start DDT for selected servers with specific parameters
            if (cb_UseCustomCredentials.Checked)
            {
                DdtWrapper.StartDdt(lv_AgentsList, ServerWrapper.ServersList, _ddtParameters, tb_customUsername.Text, tb_customPassword.Text);
            }
            else
            {
                DdtWrapper.StartDdt(lv_AgentsList, ServerWrapper.ServersList, _ddtParameters);
            }

            // Update ListView
            ServerWrapper.UpdateListView(lv_AgentsList, lbl_ChangeRateValue, lbl_totalAgentsRunningValue);
        }