Beispiel #1
0
 private void RemoveInviteLinkItem(int Index)
 {
     if (InviteLinks.InvokeRequired)
     {
         SafeCallDelegateRemoveAt removeAt = new SafeCallDelegateRemoveAt(RemoveInviteLinkItem);
         InviteLinks.Invoke(removeAt, new object[] { Index });
     }
     else
     {
         InviteLinks.Items.RemoveAt(Index);
     }
 }
Beispiel #2
0
        private int AddInviteLinkItem(object Item)
        {
            if (Item == null || string.IsNullOrEmpty((string)Item))
            {
                return(-1);
            }

            if (InviteLinks.InvokeRequired)
            {
                SafeCallDelegateInvite addItem = new SafeCallDelegateInvite(AddInviteLinkItem);
                return((int)InviteLinks.Invoke(addItem, new object[] { Item }));
            }
            else
            {
                return(InviteLinks.Items.Add(Item));
            }
        }