public SmsServiceControl(ISmsServices smsServices) { InitializeComponent(); _smsServices = smsServices; cmbCountry.DataSource = CountryItem.GetCountryItems(); cmbCountry.DisplayMember = "Text"; cmbCountry.SelectedIndex = 0; var smsServiceItems = SmsServiceItem.GetSmsServiceItems(); cmbSmsService.DataSource = smsServiceItems; cmbSmsService.DisplayMember = "Text"; cmbSmsService.SelectedIndex = 0; _requestsBindingSource.DataSource = _phoneNumberRequestItems; dgvRequests.DataSource = _requestsBindingSource; btnExecute.Click += BtnExecute_Click; btnSave.Click += BtnSave_Click; _bw.WorkerSupportsCancellation = false; _bw.WorkerReportsProgress = true; _bw.DoWork += bw_DoWork; _bw.ProgressChanged += bw_ProgressChanged; _bw.RunWorkerAsync(); }
public RegBotControl(ISmsServices smsServices, IOneProxyControl oneProxyControl, IBrowserProfileService browserProfileService) { InitializeComponent(); _smsServices = smsServices; _oneProxyControl = oneProxyControl; _browserProfileService = browserProfileService; GetRandomAccountData(CountryCode.RU); cmbCountry.DataSource = CountryItem.GetCountryItems(); cmbCountry.DisplayMember = "Text"; cmbCountry.SelectedIndex = 0; connectionString = Path.Combine(Application.StartupPath, ConfigurationManager.AppSettings["DbPath"]); Load += Form1_Load; tabPage2.Enter += TabPage2_Enter; btnMailRuEmail.Click += BtnMailRuEmail_Click; btnMailRuPhone.Click += BtnMailRuPhone_Click; btnYandexEmail.Click += BtnYandexEmail_Click; btnYandexPhone.Click += BtnYandexPhone_Click; btnGmail.Click += BtnGmail_Click; btnFacebook.Click += BtnFacebook_Click; btnVk.Click += BtnVk_Click; btnOk.Click += BtnOk_Click; btnInstagram.Click += BtnInstagram_Click; btnTwitter.Click += BtnTwitter_Click; btnGenerateEn.Click += BtnGenerateEn_Click; btnGenerateRu.Click += BtnGenerateRu_Click; dgvItems.FilterStringChanged += DgvItems_FilterStringChanged; dgvItems.SortStringChanged += DgvItems_SortStringChanged; dgvItems.UserDeletingRow += DgvItems_UserDeletingRow; var control = (Control)_oneProxyControl; control.Dock = DockStyle.Fill; pnlOneProxy.Controls.Clear(); pnlOneProxy.Controls.Add(control); }
private void FillCountryList(ComboBox cmbCountry) { cmbCountry.DataSource = CountryItem.GetCountryItems(); cmbCountry.DisplayMember = nameof(CountryItem.Text); cmbCountry.SelectedIndex = 0; }