Exemple #1
0
 private void AddItemToListView(SmtpInfo item)
 {
     ListViewItem lvi = new ListViewItem();
     lvi.Text = item.Server;
     lvi.SubItems.Add(new ListViewItem.ListViewSubItem
     {
         Text = item.Port.ToString()
     });
     lvi.SubItems.Add(new ListViewItem.ListViewSubItem
     {
         Text = item.Login
     });
     lvi.SubItems.Add(new ListViewItem.ListViewSubItem
     {
         Text = item.LetterLimit.ToString()
     });
     lvi.SubItems.Add(new ListViewItem.ListViewSubItem
     {
         Text = item.SleepTime.ToString()
     });
     lvi.SubItems.Add(new ListViewItem.ListViewSubItem
     {
         Text = item.Password
     });
     lvSmtpList.Items.Add(lvi);
 }
Exemple #2
0
        private void GetNextSmtpServer()
        {
            bool isFindNewServer = false;
            foreach (var server in Configuration.Servers)
            {
                if (server.LetterLimit > 0)
                {
                    isFindNewServer = true;
                    CurreentServer = server;
                }
            }

            if (!isFindNewServer)
            {
                MessageBox.Show(@"Cannot found any free servers for today!\r\nMessage not send!!", @"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemple #3
0
 private void AddNewSmptServerToConfig(SmtpInfo server)
 {
     Configuration.Servers.Add(server);
 }