private void SaveTrailerExecute(object ins) { Debug.WriteLine("In SaveTrailerExecute"); TrailerPageModel temp = ins as TrailerPageModel; if (temp != null && temp.IsValid) { Trailers.Add(temp); //Dialogs.AlertAsync("Trailer was added", "Ok"); } Back(); }
public ObservableCollection <TrailerListPageModel> GetTrailers(int count) { var tempTrailers = new ObservableCollection <TrailerPageModel>(); TrailerPageModel tempTlpm; for (int i = 0; i < 10; i++) { tempTlpm = new TrailerPageModel { Trailer = TrailerPageModel.GenarateTrailerModel() }; } return(null);//count == 0 ? new ObservableCollection<TrailerListPageModel> : ; }
private void DeleteTrailerExecute(object trailer) { Debug.WriteLine("Int DeleteTrailerMethod"); TrailerPageModel existTrailer = trailer as TrailerPageModel; if (existTrailer != null) { if (Trailers.Contains(existTrailer)) { Trailers.Remove(existTrailer); // Dialogs.AlertAsync($"Trailer {trailer.ToString()} was removed", "Ok"); } else { // Dialogs.AlertAsync($"Trailer {trailer.ToString()} is not exists", "Ok"); } } Back(); }