private void SearchClick(object data = null) { try { Movies.Clear(); _currentNumber = default; Movies = MovieServices.GetMoviesWithName(MovieName); _isFound = true; FindLikedMovieInAllLikedMoviesAndReplaceCurrentMovie(); if (_isAliGuidedPerson == false) { _Ali.SpeakAsync($"If you want to watch {MovieName} trailer, left click to movie image please."); _isAliGuidedPerson = true; } TemplateVisibility = Visibility.Visible.ToString(); NextButtonVisibility = Movies.Count > 1 ? Visibility.Visible.ToString() : Visibility.Collapsed.ToString(); BackButtonVisibility = Visibility.Collapsed.ToString(); } catch (Exception) { MessageBox.Show("Movie did not exist or some problem happened while finding the movie.", "Mosaviena"); MovieName = default; _isFound = false; if (_isGuestEntered) { (ViewModel as MovieTemplateViewModel).Movie = null; } else { (ViewModel as CinemaTemplateViewModel).Movie = null; } BackButtonVisibility = NextButtonVisibility = TemplateVisibility = Visibility.Collapsed.ToString(); } }