예제 #1
0
 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");
         }
     }
 }
예제 #2
0
        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);
            }
        }