Esempio n. 1
0
        /// <summary>
        /// Creates a new item that provides a new Update() functionality.
        /// </summary>
        public static Item CreateUpdate(float duration, ItemUpdateHandler updateHandler)
        {
            UpdateItem item = new UpdateItem(duration, updateHandler);

            RegisterItem(item);
            return(item);
        }
    /// <summary>
    /// Initializes the scroller.
    /// </summary>
    public void Initialize(int totalSize, ItemUpdateHandler onUpdate = null)
    {
        // Pre-evaluate relatively heavy checks.
        isNegativeSortDir = IsNegativeSortDirection();
        groupSortOffset   = GetGroupSortOffset();
        itemSizeToMoveDir = ScrollView.movement == UIScrollView.Movement.Horizontal ? ItemSize.x : ItemSize.y;

        OnItemUpdate = onUpdate;
        SetTotalSize(totalSize);
    }
Esempio n. 3
0
        public void RefreshToolTip()
        {
            if (ListView == null)
            {
                return;
            }

            if (ListView.InvokeRequired)
            {
                ItemUpdateHandler h = new ItemUpdateHandler(RefreshToolTip);
                ListView.Invoke(h, new object[] { });
            }
            else
            {
                ToolTipText = ToolTip;
            }
        }
Esempio n. 4
0
        public void RefreshDateDownloadedString()
        {
            if (ListView == null)
            {
                return;
            }

            if (ListView.InvokeRequired)
            {
                ItemUpdateHandler h = new ItemUpdateHandler(RefreshStatusString);
                ListView.Invoke(h, new object[] { });
            }
            else
            {
                SubItems[3].Text = Tools.ToSensibleTimeString(_downloadedDate);
            }
        }
Esempio n. 5
0
        public void RefreshStatusString()
        {
            if (ListView == null)
            {
                return;
            }

            if (ListView.InvokeRequired)
            {
                ItemUpdateHandler h = new ItemUpdateHandler(RefreshStatusString);
                ListView.Invoke(h, new object[] { });
            }
            else
            {
                SubItems[1].Text = StatusString;
            }
        }
Esempio n. 6
0
 public UpdateItem(float duration, ItemUpdateHandler updateHandler) : base()
 {
     Duration     = duration;
     OnItemUpdate = updateHandler;
 }