Ejemplo n.º 1
0
        public async Task Open(MouseEventArgs e, IClientPlanetListItem item)
        {
            Component.SetPosition(e.ClientX, e.ClientY);
            Component.SetVisibility(true);
            SelectedItem = item;

            if (OpenEvent != null)
            {
                await OpenEvent.Invoke();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Prepares drag system by setting initial drag object values
        /// </summary>
        /// <param name="item">The item</param>
        /// <param name="parent">The parent category</param>
        public void SetTargetInCategory(IClientPlanetListItem item,
                                        ChannelListCategoryComponent parent)
        {
            currentDragIndex = 0;

            if (parent != null)
            {
                currentDragIndex = parent.GetIndex(item);
            }

            currentDragParentPlanet   = null;
            currentDragParentCategory = parent;
            currentDragItem           = item;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Run when an item is dragged within a category
 /// </summary>
 /// <param name="item">The item that was clicked</param>
 /// <param name="parent">The parent category of the item that was clicked</param>
 public void OnItemStartDragInCategory(IClientPlanetListItem item,
                                       ChannelListCategoryComponent parent)
 {
     SetTargetInCategory(item, parent);
     Console.WriteLine($"Starting drag for {item.GetItemTypeName()} {item.Name} at position {currentDragIndex}");
 }