Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        private void btn_stopExchangeGeneration_Click(object sender, EventArgs e)
        {
            // Stop DDT for selected servers
            ExchangeGenWrapper.StopExchangeGenerator(lv_ExchangeServers, ServerWrapper.ExchangeServersList);


            // Update ListView
            ServerWrapper.UpdateExchangeListView(lv_ExchangeServers, lbl_exchangeGenerationRunningValue);
        }