public void AddUsedTags() { if (Used) { if (TagsList.Contains("FreeToUse")) { TagsList.Remove("FreeToUse"); } if (!TagsList.Contains("Used")) { TagsList.Insert(0, "Used"); } } else { if (TagsList.Contains("Used")) { TagsList.Remove("Used"); } if (!TagsList.Contains("FreeToUse")) { TagsList.Insert(0, "FreeToUse"); } } }
public void DragItemFromIndexToIndex(NSTableView tableView, int dragRow, int toRow) { IsDraggedTag = true; //Console.WriteLine("from:{0} to:{1}", dragRow, toRow); AnnotationTag dragItem = TagsList [dragRow]; if (dragRow < toRow) { TagsList.Insert(toRow, dragItem); TagsList.RemoveAt(dragRow); } else { TagsList.RemoveAt(dragRow); TagsList.Insert(toRow, dragItem); } }