private void UpdateContent(motion.MotionInfo info) { if (Dispatcher.CheckAccess()) { UpdateContentValue(info); UpdateDownloadButtonContent(); StaticMainWindow.Window.ShowContentScreen(); } else { Dispatcher.BeginInvoke((Action)(delegate { UpdateContentValue(info); UpdateDownloadButtonContent(); StaticMainWindow.Window.ShowContentScreen(); })); } UpdateNumberRating(); UpdateArtwork(info.icon_url); UpdateScreenshots(info.screenshoot_ulrs); UpdateComment(0, 20); UpdateRelatedMotions(0, 20); }
private void UpdateContentValue(motion.MotionInfo info) { ViewModel.MotionTitle = info.title; ViewModel.RatingValue = info.rating / GlobalVariables.RateValueMultiplierFactor; ViewModel.ArtistName = info.artist_name; ViewModel.MotionDescription = info.description; ViewModel.MoreByTextBlock = string.Format("More by {0}", info.artist_name); }
void Awake() { instance = this; player = transform; }