Example #1
0
        private void AddBook_Click(object sender, RoutedEventArgs e)
        {
            BM.theBook = new ViewBook()
            {
                UploaderName = "*****@*****.**"
            };

            if (bWin == null)
            {
                bWin = new BookWindow(Mode.Post, BM, this);
            }
            bWin.Show();
        }
Example #2
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            var selected = lstBooks.SelectedItem;

            if (selected == null)
            {
                setStatus("Please select a book to edit!");
            }
            else
            {
                ViewBook vBook = selected as ViewBook;
                vBook.PathUrl = "";
                BM.theBook    = vBook;
                if (bWin == null)
                {
                    bWin = new BookWindow(Mode.Put, BM, this);
                }
                bWin.Show();
            }
        }