Ejemplo n.º 1
0
        public void EditAllAt(int index, SpamAction spamAction)
        {
            spamList[index] = spamAction;
            spamList[index].UpdateNumber();

            // destroy previous thread here
            if (threadList[index].IsAlive)
            {
                threadList[index].Resume();
                threadList[index].Abort();
            }
            threadList[index]    = new Thread(new ThreadStart(spamAction.SendMessage));
            listBox.Items[index] = CreateListBoxString(spamAction);
        }
Ejemplo n.º 2
0
        public string CreateListBoxString(SpamAction spamAction)
        {
            String[] strings    = new string[] { spamAction.Time.ToString(), spamAction.NumberMessage, spamAction.Delay.ToString() };
            string   liststring = spamAction.SpamMessage;

            foreach (String s in strings)
            {
                liststring += ", ";
                if (s == "")
                {
                    liststring += "none";
                }
                else
                {
                    liststring += s;
                }
            }
            return(liststring);
        }
Ejemplo n.º 3
0
 public void AddToAll(SpamAction spamAction)
 {
     spamList.Add(spamAction);
     threadList.Add(new Thread(new ThreadStart(spamAction.SendMessage)));
     listBox.Items.Add(CreateListBoxString(spamAction));
 }