Merge remote-tracking branch 'origin/wjc' into Dev-Branch
| | |
| | | /// </summary> |
| | | private void InitFrameWhiteContent1() |
| | | { |
| | | //获取温度值 |
| | | temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | if (temp <= 0) |
| | | { |
| | | //默认值改成16,2022年06月10日10:03:19 成甫要求的 |
| | | temp = 16; |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | } |
| | | |
| | | arcBar = new DiyArcSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; |
| | | arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; |
| | | arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; |
| | | arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | arcBar.Progress = temp; |
| | | |
| | | btnTemp = new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 50, |
| | | IsBold = true, |
| | | Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(), |
| | | Text = Convert.ToDouble(temp).ToString(), |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnTemp); |
| | |
| | | |
| | | |
| | | temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | if (temp <= 0) |
| | | { |
| | | //默认值改成16,2022年06月10日10:03:19 成甫要求的 |
| | | temp = 16; |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, temp.ToString()); |
| | | } |
| | | arcBar = new DiyArcSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; |
| | | arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; |
| | | arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; |
| | | arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | arcBar.Progress =temp; |
| | | |
| | | btnTemp = new Button() |
| | | { |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 50, |
| | | IsBold = true, |
| | | Text = Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(), |
| | | Text = Convert.ToDouble(temp).ToString(), |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnTemp); |
| | |
| | | //{ |
| | | // controlView.AddChidren(btnCollection); |
| | | //} |
| | | |
| | | //获取温度值 |
| | | var tempValue = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")); |
| | | if (tempValue<=0) { |
| | | //默认值改成16,2022年06月10日10:03:19 成甫要求的 |
| | | tempValue = 16; |
| | | function.SetAttrState(FunctionAttributeKey.SetTemp, tempValue.ToString()); |
| | | } |
| | | arcBar = new DiyArcSeekBar() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | |
| | | MaxValue = function.GetAttribute(FunctionAttributeKey.SetTemp).max, |
| | | //IsClickable = function.trait_on_off.curValue.ToString() == "on", |
| | | ArcColor = CSS_Color.BackgroundColor, |
| | | Progress = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",",".")), |
| | | Progress = tempValue, |
| | | #if __IOS__ |
| | | Y = Application.GetRealHeight(120 + 25), |
| | | Width = Application.GetRealWidth(260 - 40), |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 50, |
| | | IsBold = true, |
| | | Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString(), |
| | | Text = Convert.ToDouble(tempValue).ToString(), |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | controlView.AddChidren(btnTemp); |
| | |
| | | /// </summary> |
| | | View.PlayView playView = new View.PlayView(); |
| | | TopView topView; |
| | | |
| | | |
| | | public void Show() |
| | | { |
| | | |
| | |
| | | string currModeKeyValue = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.mode); |
| | | //获取音乐播放模式列表 |
| | | var attributes = A31MusicModel.Current.functionMusic.GetAttribute(KeyProperty.mode); |
| | | if (attributes==null) { |
| | | if (attributes == null) |
| | | { |
| | | attributes=new FunctionAttributes(); |
| | | } |
| | | var attributesList = attributes.value; |
| | |
| | | //} |
| | | //显示播放器区域 |
| | | playView.regionBtn.Text = A31MusicModel.Current.functionMusic.GetRoomListName(); |
| | | //显示播放器收藏状态图标 |
| | | //显示播放器收藏状态 |
| | | if (A31MusicModel.Current.functionMusic.collect) |
| | | { |
| | | //收藏 |
| | | playView.collectIconBtn.IsSelected = true; |
| | | } |
| | | else |
| | | { |
| | | //不收藏 |
| | | playView.collectIconBtn.IsSelected = false; |
| | | } |
| | | //if (A31MusicModel.Current.A31PlayStatus.IsMute) |
| | |
| | | //为了防止音量条跳动,延长更新时间(多加1s) |
| | | if (2000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds || A31MusicModel.ProgressDateTime==DateTime.MinValue) |
| | | { |
| | | //音量进度条; |
| | | //显示音量进度条值; |
| | | playView.volSeekBar.Progress = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume)); |
| | | //显示当前音量值; |
| | | playView.volValueBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume) + "%"; |
| | |
| | | int playMusicSecond = playSecond % 60; |
| | | //转化播放时间时间格式 |
| | | string playTime = (playMusicMinute.ToString().Length < 2 ? "0" + playMusicMinute.ToString() : playMusicMinute.ToString()) + ":" + (playMusicSecond.ToString().Length < 2 ? "0" + playMusicSecond.ToString() : playMusicSecond.ToString()); |
| | | |
| | | if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on) |
| | | { |
| | | //显示播放状态图标 |
| | | playView.playBtn.IsSelected = true; |
| | | //显示播放时间 |
| | | playView.startTimeBtn.Text = playTime; |
| | | //显示播放状态 |
| | | if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on) |
| | | { |
| | | //播放 |
| | | playView.playBtn.IsSelected = true; |
| | | } |
| | | else |
| | | { |
| | | //暂停 |
| | | playView.playBtn.IsSelected = false; |
| | | ///记录歌曲暂停时间;<LastDateTime 计算播放时间有用到> |
| | | A31MusicModel.Current.LastDateTime = DateTime.Now; |
| | | } |
| | | //显示进度条值 |
| | | if (totalSecond == 0) |
| | | { |
| | | //显示歌曲进度条 |
| | | //歌曲播放进度 |
| | | playView.diyArcSeekBar.Progress = 0; |
| | | } |
| | | else |
| | | { |
| | | //显示歌曲进度条 |
| | | //歌曲播放进度 |
| | | playView.diyArcSeekBar.Progress = (int)(playSecond * 100.0 / totalSecond);//+1 |
| | | } |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | //显示播放状态图标 |
| | | playView.playBtn.IsSelected = false; |
| | | //停止播放 |
| | | playView.startTimeBtn.Text =playTime; |
| | | //playView.startTimeBtn.Text ="00:00"; |
| | | ///记录歌曲暂停时间;<LastDateTime 计算播放时间有用到> |
| | | A31MusicModel.Current.LastDateTime = DateTime.Now; |
| | | } |
| | | //显示歌曲名称 |
| | | playView.songNameTextView.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name); |
| | |
| | | void PlayListView(FrameLayout frameLayout, VerticalRefreshLayout verticalScrolViewLayout) |
| | | { |
| | | verticalScrolViewLayout.RemoveAll(); |
| | | //获取播放器名称 |
| | | var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name); |
| | | //获取缓存歌曲列表 |
| | | var musicList = A31MusicModel.Current.GetSongList(listName); |
| | | if (musicList.Count == 0) |
| | | { |
| | |
| | | A31MusicModel.Current.palyLists.Clear(); |
| | | if (A31MusicModel.Current.palyLists.Count == 0) |
| | | { |
| | | //获取歌曲列表 |
| | | SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic); |
| | | |
| | | } |
| | |
| | | { |
| | | UpdateThread.updateCurrMusicThread(frameLayout, middViewLayout, A31MusicModel.Current); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |