internal bool HaveTag(Tag tag) { if (Tags.FindIndex(t => t.Text == tag.Text) >= 0) { return true; } return false; }
private void registerTag(Tag tag) { string sufix = " "; listViewTags.Items.Add(tag.Text + sufix); isSelected.Add(false); isSelectedLock.Add(false); }
private void buttonAddTagClickHandler(object sender, EventArgs e) { // TODO: remove Basic, style window string input = Interaction.InputBox("Input Tag name", "New Tag"); if (Tags.FindIndex(t => t.Text == input) > -1) { MessageBox.Show("Tag " + input + " already exist"); return; } Tag toAdd = new Tag() { Text = input }; Tags.Add(toAdd); registerTag(toAdd); }