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()); } } } }
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()); } } } }
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); } } } }
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); } } } }