예제 #1
0
파일: Form1.cs 프로젝트: admirall32/Library
        private void ListLibraryBooks_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (mode != 0)
            {
                mode = 0;
                TransferBooks.Clear();
                StringsToSearch.Clear();
            }

            if (ListLibraryBooks.SelectedIndex != -1)
            {
                Book book = library.GetBookByIndex(ListLibraryBooks.SelectedIndex);
                if (book != null && !TransferBooks.Contains(book))
                {
                    TransferBooks.Add(book);
                    TransferBooksList.Items.Add(book.Name + " " + book.Author);
                }
            }

            RefreshForm();
        }