Esempio n. 1
0
        public int RemoveFromFavorites(int threadID)
        {
            // find threadID
            // then remove it
            int removedThreadID = -1;

            foreach (int thread in FavoriteThreads)
            {
                if (thread == threadID)
                {
                    removedThreadID = thread;
                    FavoriteThreads.Remove(thread);
                    return(removedThreadID);
                }
            }
            return(removedThreadID);
        }
Esempio n. 2
0
        public Thread RemoveFromFavorites(int threadID)
        {
            // find threadID
            // then remove it
            Thread        removedThread = null;
            List <Thread> threadList    = FavoriteThreads;

            foreach (Thread thread in FavoriteThreads)
            {
                if (thread.ThreadID == threadID)
                {
                    removedThread = thread;
                    FavoriteThreads.Remove(thread);
                    return(removedThread);
                }
            }
            return(removedThread);
        }
Esempio n. 3
0
 // METHODS
 public void AddToFavorites(int threadID) => FavoriteThreads.Add(threadID);
Esempio n. 4
0
 // METHODS
 public void AddToFavorites(Thread thread) => FavoriteThreads.Add(thread);