| | |
| | | Y = btnYear.Bottom + Application.GetRealHeight(20), |
| | | Width = Application.GetRealWidth(45), |
| | | Height = Application.GetRealHeight(43), |
| | | Text = movieLibrary.rating, |
| | | Text = movieLibraryInfo == null ? "" : movieLibraryInfo.rating, |
| | | TextSize = 32, |
| | | TextColor = MusicColor.TextColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | |
| | | TextColor = 0xffA5AEBC, |
| | | TextSize = TextSize.Text12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = movieLibraryInfo == null ? "" : movieLibraryInfo.rating, |
| | | }; |
| | | baseFramLayout.AddChidren(btnScore); |
| | | |
| | |
| | | IsSelected = movieLibraryInfo == null ? false : movieLibraryInfo.collect, |
| | | }; |
| | | baseFramLayout.AddChidren(btnCollectImage); |
| | | |
| | | |
| | | btnCollectText = new Button |
| | | { |
| | |
| | | //返回 |
| | | this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | action(isOldState != btnCollectImage.IsSelected); |
| | | action?.Invoke(isOldState != btnCollectImage.IsSelected); |
| | | this.RemoveFromParent(); |
| | | }; |
| | | //立即播放 |
| | |
| | | var isBool = SendMethod.Current.IsCollect(remoteControl.deviceId, remoteControl.rcId, movieLibrary.movieId, btnCollectImage.IsSelected); |
| | | if (isBool) |
| | | { |
| | | //更新缓存数据 |
| | | movieLibraryInfo.collect = btnCollectImage.IsSelected; |
| | | //成功后才更新缓存数据 |
| | | if (btnCollectImage.IsSelected) |
| | | { |
| | | |
| | | AksCommonMethod.Current.AddCollectMovie(movieLibrary); |
| | | } |
| | | else |
| | | { |
| | | AksCommonMethod.Current.DelCollectMovie(movieLibrary); |
| | | } |
| | | |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | CommonMethod.Current.Loading.Hide(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | btnCollectImage.MouseUpEventHandler += CollectClick; |