private void btn_startExchangeGeneration_Click(object sender, EventArgs e) { if (!ExchangeGenWrapper.DoNotShowExchangePrerequisites) { var prerequisitesForm = new ExchangePrerequisites(); prerequisitesForm.Show(); } var messageSize = _mailSizeDictionary.FirstOrDefault(x => x.Value == cb_MailSize.SelectedItem.ToString()).Key; // Start Exchange Generation for selected servers with specific parameters if (cb_ExchangeUseCustomCreds.Checked) { ExchangeGenWrapper.StartExchangeGenerator(lv_ExchangeServers, ServerWrapper.ExchangeServersList, messageSize, tb_exchangeCustomUsername.Text, tb_exchangeCustomDomain.Text, tb_exchangeCustomPassword.Text); } else { ExchangeGenWrapper.StartExchangeGenerator(lv_ExchangeServers, ServerWrapper.ExchangeServersList, messageSize); } // Update ListView ServerWrapper.UpdateExchangeListView(lv_ExchangeServers, lbl_exchangeGenerationRunningValue); var exchangeParmsToSerialize = new ExchangeGeneratorParameters() { MessageSize = messageSize }; exchangeParmsToSerialize.SerizalizeExchangeParamsToFile(); }
private void btn_startExchangeGeneration_Click(object sender, EventArgs e) { if (!ExchangeGenWrapper.DoNotShowExchangePrerequisites) { var prerequisitesForm = new ExchangePrerequisites(); prerequisitesForm.Show(); } var messageSize = _mailSizeDictionary.FirstOrDefault(x => x.Value == cb_MailSize.SelectedItem.ToString()).Key; // Start Exchange Generation for selected servers with specific parameters if (cb_ExchangeUseCustomCreds.Checked) { ExchangeGenWrapper.StartExchangeGenerator(lv_ExchangeServers, ServerWrapper.ExchangeServersList, messageSize, tb_exchangeCustomUsername.Text, tb_exchangeCustomDomain.Text, tb_exchangeCustomPassword.Text); } else { ExchangeGenWrapper.StartExchangeGenerator(lv_ExchangeServers, ServerWrapper.ExchangeServersList, messageSize); } // Update ListView ServerWrapper.UpdateExchangeListView(lv_ExchangeServers, lbl_exchangeGenerationRunningValue); var exchangeParmsToSerialize = new ExchangeGeneratorParameters() {MessageSize = messageSize}; exchangeParmsToSerialize.SerizalizeExchangeParamsToFile(); }