private void DeleteButton_Click(object sender, RoutedEventArgs e)
        {
            user.userLibraris[UserLibrari.currentUserLibrariIndex].filmsInLibrari.RemoveAt(Film.CurrentFilmIndex);
            var page = new LibraryFilms();

            NavigationService.Navigate(page);
        }
Esempio n. 2
0
        private void SortByNameDown_Click(object sender, RoutedEventArgs e)
        {
            UserLibrari.currentUserLibrari.filmsInLibrari = UserLibrari.currentUserLibrari.filmsInLibrari.OrderByDescending(film => film.Name).ToList();
            var page = new LibraryFilms();

            NavigationService.Navigate(page);
        }
Esempio n. 3
0
        private void YourButtonClick(object sender, EventArgs e)
        {
            int indexOfLibrari = LibrariWrapPannel.Children.IndexOf(sender as UIElement) - 1;

            UserLibrari.currentUserLibrari      = user.userLibraris[indexOfLibrari];
            UserLibrari.currentUserLibrariIndex = indexOfLibrari;
            var page = new LibraryFilms();

            NavigationService.Navigate(page);
            //MessageBox.Show("Номер" + indexOfLibrari);
        }
        private void AddSelectedFilmsToLibrary_Click(object sender, RoutedEventArgs e)
        {
            foreach (var element in IndexOfSelectedFilms)
            {
                if (user.userLibraris[UserLibrari.currentUserLibrariIndex].filmsInLibrari.Any(film => film.Name == user.films[element].Name) != true)
                {
                    user.userLibraris[UserLibrari.currentUserLibrariIndex].filmsInLibrari.Add(user.films[element]);
                }
            }
            IndexOfSelectedFilms.Clear();
            var page = new LibraryFilms();

            NavigationService.Navigate(page);
        }
Esempio n. 5
0
        private void ChangePhoto_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openDialog = new OpenFileDialog();

            openDialog.Filter = "Image files (*.BMP, *.JPG, *.GIF, *.TIF, *.PNG, *.ICO, *.EMF, *.WMF)|*.bmp;*.jpg;*.gif; *.tif; *.png; *.ico; *.emf; *.wmf";

            if (openDialog.ShowDialog() == true)
            {
                PhotoLinkString = openDialog.FileName;
            }
            UserLibrari.currentUserLibrari.Link = PhotoLinkString;
            user.userLibraris[UserLibrari.currentUserLibrariIndex].Link = PhotoLinkString;

            var CurrentLibraryPage = new LibraryFilms();

            NavigationService.Navigate(CurrentLibraryPage);
        }