private void btnAdd_Click(object sender, EventArgs e) { frmAddEmoji frmForm = new frmAddEmoji(); frmAddEmoji.bAdding = true; frmForm.ShowDialog(); lstEmojis.Items.Clear();//clear items foreach (string sEmote in frmMain.Emotes) { lstEmojis.Items.Add(sEmote); } }
private void btnEdit_Click(object sender, EventArgs e) { frmAddEmoji frmForm = new frmAddEmoji(); frmAddEmoji.bAdding = false; frmAddEmoji.sEditEmoji = lstEmojis.SelectedItem.ToString(); frmForm.ShowDialog(); lstEmojis.Items.Clear();//clear items foreach (string sEmote in frmMain.Emotes) { lstEmojis.Items.Add(sEmote); } }