Exemplo n.º 1
0
        /// <summary>
        /// Creates a new message cell.
        /// </summary>
        private NotificationCell CreateCell()
        {
            var cell = CreateChild <NotificationCell>("cell", ChildCount);

            cell.Anchor     = AnchorType.Top;
            cell.Pivot      = PivotType.Top;
            cell.Width      = this.Width;
            cell.OnDismiss += (c) => {
                // Remove from notifications automatically if hidden.
                OnDismiss?.Invoke(cell.Notification);
                cellRecycler.Return(cell);
                AdjustCellPos();
            };
            return(cell);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Event called on key stroke release state.
        /// </summary>
        protected virtual void OnKeyStateRelease(BeatsKey key)
        {
            InvokeKeyRelease(key);

            keyRecycler.Return(key);
        }