private void del_tag_Click(object sender, EventArgs e) { ArrayList arrayList = new ArrayList(); arrayList.AddRange(listBox_tag.SelectedItems); foreach (var item in arrayList) { sortSet.Remove(item.ToString()); } sortSet_to_listBox_tag(); }
/// <summary> /// delete a node(a PIN) from tree /// </summary> /// <param name="t">PIN</param> /// <returns>Operation is sucessful,return true otherwise false</returns> public bool Delete(int t) { bool rtn = true; try { RBTree.Remove(t); } catch (Exception ex) { rtn = false; } finally { } return(rtn); }