Beispiel #1
0
 private void addModeratorToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (PromptStringBox pfs = new PromptStringBox("Username of moderator: ", "Add new moderator"))
     {
         if (pfs.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             if (!modList.Items.Contains(pfs.InputText.ToLower()))
             {
                 modList.Items.Add(pfs.InputText.ToLower());
             }
         }
     }
 }
Beispiel #2
0
 private void addNewWordToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (PromptStringBox psb = new PromptStringBox("Enter a word to blacklist", "Blacklist"))
     {
         if (psb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             if (psb.InputText != string.Empty && !blacklistedWords.Items.Contains(psb.InputText))
             {
                 blacklistedWords.Items.Add(psb.InputText);
             }
         }
     }
 }
Beispiel #3
0
 private void addModeratorToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using(PromptStringBox pfs = new PromptStringBox("Username of moderator: ", "Add new moderator"))
     {
         if(pfs.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             if(!modList.Items.Contains(pfs.InputText.ToLower()))
             {
                 modList.Items.Add(pfs.InputText.ToLower());
             }
         }
     }
 }
Beispiel #4
0
 private void addNewWordToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using(PromptStringBox psb = new PromptStringBox("Enter a word to blacklist", "Blacklist"))
     {
         if(psb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             if (psb.InputText != string.Empty && !blacklistedWords.Items.Contains(psb.InputText))
             {
                 blacklistedWords.Items.Add(psb.InputText);
             }
         }
     }
 }