public async Task DeleteVideoAsync(CTDbContext context) { if (Video1 != null) { await Video1.DeleteFileRecordAsync(context); } if (Video2 != null) { await Video2.DeleteFileRecordAsync(context); } if (ProcessedVideo1 != null) { await ProcessedVideo1.DeleteFileRecordAsync(context); } if (ProcessedVideo2 != null) { await ProcessedVideo2.DeleteFileRecordAsync(context); } if (Audio != null) { await Audio.DeleteFileRecordAsync(context); } var dbVideoRow = await context.Videos.FindAsync(Id); if (dbVideoRow != null) { context.Videos.Remove(dbVideoRow); await context.SaveChangesAsync(); } }
private void Image2FadeOut_Completed(object sender, EventArgs e) { AnimatedImage2.Source = null; AnimatedImage2.UpdateLayout(); Video2.Source = null; Video2.UpdateLayout(); }
// activates the third puzzle to play public void activateThirdPuzzle() { // Turn off the second clue video Video2.SetActive(false); // Switch out the material on the screen to Clue3 and activate the Clue video GetComponent <Renderer>().material = Clue3; // Set the video to active Video3.SetActive(true); }
public List <Video2> GetVideos() { var videos = new List <Video2>(); var json = ""; try { using (var client = new WebClient()) { json = client.DownloadString( "http://gdata.youtube.com/feeds/api/videos?author=officialgaa&max-results=20&v=2&alt=jsonc&orderby=published"); } var obj = JsonConvert.DeserializeObject <Youtube>(json); foreach (var vid in obj.Data.Items) { if (vid.Id != "UKY3scPIMd8") { var video2 = new Video2 { Id = vid.Id, Description = Encode(vid.Description), Duration = vid.Duration.ToString(), Thumbnail = vid.Thumbnail.sqDefault, Title = Encode(vid.Title) }; videos.Add(video2); } } } catch (Exception ex) { var sf = new StackFrame(); var methodBase = sf.GetMethod(); Database.InsertErrorToDb(methodBase.Name, ex.Message, ex.ToString()); } return(videos); }