wxr
2022-06-10 cf145d2d389c9d45ec0fd8bfa853d3481c29910e
Merge remote-tracking branch 'origin/wjc' into Dev-Branch
4个文件已添加
12个文件已修改
212 ■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/MusicIcon/order.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/MusicIcon/single.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Phone/MusicIcon/single_cycle.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/MusicIcon/order.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/MusicIcon/single.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Phone/MusicIcon/single_cycle.png 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -738,7 +738,7 @@
5015=Bluetooth
5016=Line input
5017=Revise the name
5018=Single
5018=Single loop
5019=Random play
5020=List
5021=Has shifted to
@@ -768,6 +768,9 @@
5045=General volume
5046=Adjust volume
5047="QQ music" has not installed in your cell phone, please proceed in App center.
5048= Progressive cycle
5049=Single play
 
6000=normal
6001=Device status
@@ -1898,7 +1901,7 @@
5015=蓝牙
5016=线路输入
5017=修改名称
5018=单曲播放
5018=单曲循环播放
5019=随机播放
5020=列表播放
5021=已切换到
@@ -1928,6 +1931,8 @@
5045=总音量
5046=调节音量
5047=你手机暂未安装"QQ音乐"{\r\n}请前往手机商场安装
5048=循序循环
5049=单曲播放
 
 
6000=正常
HDL-ON_Android/Assets/Phone/MusicIcon/order.png
HDL-ON_Android/Assets/Phone/MusicIcon/single.png

HDL-ON_Android/Assets/Phone/MusicIcon/single_cycle.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -245,6 +245,8 @@
    <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelEnviBg.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\FloorHeating\EconomicIcon.png" />
    <AndroidAsset Include="Assets\Phone\FunctionIcon\FloorHeating\EconomicIconGray.png" />
    <AndroidAsset Include="Assets\Phone\MusicIcon\order.png" />
    <AndroidAsset Include="Assets\Phone\MusicIcon\single_cycle.png" />
  </ItemGroup>
  <ItemGroup>
    <AndroidResource Include="Resources\values\colors.xml" />
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1404,6 +1404,8 @@
      <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelHelpNormalBgIcon.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Icon\screenpanel.png" />
      <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelEnviBg.png" />
      <BundleResource Include="Resources\Phone\MusicIcon\order.png" />
      <BundleResource Include="Resources\Phone\MusicIcon\single_cycle.png" />
    </ItemGroup>
    <ItemGroup>
      <ITunesArtwork Include="iTunesArtwork" />
HDL-ON_iOS/Resources/Language.ini
@@ -738,7 +738,7 @@
5015=Bluetooth
5016=Line input
5017=Revise the name
5018=Single
5018=Single loop
5019=Random play
5020=List
5021=Has shifted to
@@ -768,6 +768,8 @@
5045=General volume
5046=Adjust volume
5047="QQ music" has not installed in your cell phone, please proceed in App center.
5048= Progressive cycle
5049=Single play
 
6000=normal
6001=Device status
@@ -1897,7 +1899,7 @@
5015=蓝牙
5016=线路输入
5017=修改名称
5018=单曲播放
5018=单曲循环播放
5019=随机播放
5020=列表播放
5021=已切换到
@@ -1927,6 +1929,8 @@
5045=总音量
5046=调节音量
5047=你手机暂未安装"QQ音乐"{\r\n}请前往手机商场安装
5048=循序循环
5049=单曲循环
 
 
6000=正常
HDL-ON_iOS/Resources/Phone/MusicIcon/order.png
HDL-ON_iOS/Resources/Phone/MusicIcon/single.png

HDL-ON_iOS/Resources/Phone/MusicIcon/single_cycle.png
HDL_ON/Common/R.cs
@@ -1632,9 +1632,9 @@
        /// </summary>
        public const int modifyName = 5017;
        /// <summary>
        /// 单曲播放
        /// 单曲循环播放
        /// </summary>
        public const int singleMode = 5018;
        public const int singleCycleMode = 5018;
        /// <summary>
        /// 随机播放
        /// </summary>
@@ -1751,6 +1751,16 @@
        /// 你手机暂未安装"QQ音乐"{\r\n}请前往手机商场安装
        /// </summary>
        public const int qqMsuicTip = 5047;
        /// <summary>
        /// 循序循环
        /// </summary>
        public const int orderMode =5048;
        /// <summary>
        /// 单曲播放
        /// </summary>
        public const int single =5049;
        /// <summary>
        /// 正常
HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -9,7 +9,6 @@
        {
            Tag = "Logic";
        }
        public void Show()
        {
            LogicView.TopView topView = new LogicView.TopView();
@@ -79,6 +78,7 @@
            //时间
            timeView.btnClick.MouseUpEventHandler += (sen, e) =>
             {
          TimeTpye timeTpye = new TimeTpye();
          MainPage.BasePageView.AddChidren(timeTpye);
          timeTpye.Show();
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -251,8 +251,6 @@
            this.LoadingDeviceListView(vv, lists);
        }
        /// <summary>
        /// 显示设备的View
        /// </summary>
HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -23,7 +23,7 @@
                    bodyView.btnTemp.Text = outinTemp.ToString();
                    bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp).Replace(",", "."))) + "°C";
                    bodyView.btnMode.SelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode));
                    bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode),false);
                    bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode), false);
                    bodyView.arcBar.Progress = outinTemp;
                    //if (updateTemp.trait_on_off.curValue.ToString() == "on")
                    //{
@@ -73,15 +73,16 @@
                        bodyView.arcBar.IsClickable = false;
                        bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png";
                    }
                    //自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈
                    if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto"|| updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer")
                    {
                        bodyView.btnPlus.Enable = false;
                        bodyView.btnMinus.Enable = false;
                        bodyView.arcBar.IsClickable = false;
                        bodyView.arcBar.IsOffline = true;
                    }
                    ////自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈
                    //if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "auto" || updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "timer")
                    //{
                    //    bodyView.btnPlus.Enable = false;
                    //    bodyView.btnMinus.Enable = false;
                    //    bodyView.arcBar.IsClickable = false;
                    //    bodyView.arcBar.IsOffline = true;
                    //}
                    //更新不同界面状态 2022年06月09日19:22:55 wjc 修改
                    bodyView.updateStatusPage();
                });
            }
            catch (Exception ex)
@@ -102,14 +103,17 @@
                btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName();
                //function.SaveFunctionData(true);
            };
            //自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈
            if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer")
            {
                btnPlus.Enable = false;
                btnMinus.Enable = false;
                arcBar.IsClickable = false;
                arcBar.IsOffline = true;
            }
            ////自动模式不允许调温度 2021-10-27 09:41:35 wxr 陈琳反馈
            //if (function.GetAttrState(FunctionAttributeKey.Mode) == "auto" || function.GetAttrState(FunctionAttributeKey.Mode) == "timer")
            //{
            //    btnPlus.Enable = false;
            //    btnMinus.Enable = false;
            //    arcBar.IsClickable = false;
            //    arcBar.IsOffline = true;
            //}
            //初始化不同界面状态 2022年06月09日19:22:55 wjc 修改
            this.updateStatusPage();
        }
        /// <summary>
@@ -141,7 +145,7 @@
            //}
            btnMinus.MouseUpEventHandler = (sender, e) =>
            {
                if(function.trait_on_off.curValue.ToString() == "off")
                if (function.trait_on_off.curValue.ToString() == "off")
                {
                    return;
                }
@@ -166,7 +170,7 @@
                {
                    return;
                }
                var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
                var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", "."));
                if (temp >= Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max))
                {
                    return;
@@ -182,7 +186,7 @@
            };
            arcBar.OnStopTrackingTouchEvent = (sender, e) =>
            {
                function.SetAttrState(FunctionAttributeKey.SetTemp,arcBar.Progress);
                function.SetAttrState(FunctionAttributeKey.SetTemp, arcBar.Progress);
                btnTemp.Text = arcBar.Progress.ToString();
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.SetTemp, arcBar.Progress.ToString());
@@ -191,7 +195,7 @@
            arcBar.OnProgressChangedEvent = (sender, e) =>
            {
                function.SetAttrState(FunctionAttributeKey.SetTemp, e);
                btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString();
                btnTemp.Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp).Replace(",", ".")).ToString();
            };
        }
        /// <summary>
@@ -229,7 +233,7 @@
                System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
                d.Add(FunctionAttributeKey.OnOff, function.trait_on_off.curValue.ToString());
                Control.Ins.SendWriteCommand(function, d);
            };
        }
@@ -246,7 +250,7 @@
            EventHandler<MouseEventArgs> eventHandler1 = (sender, e) =>
            {
                btn1.IsSelected = btn2.IsSelected = true;
                function.SetAttrState(FunctionAttributeKey.Mode,curMode);
                function.SetAttrState(FunctionAttributeKey.Mode, curMode);
                btnMode.UnSelectedImagePath = btn1.SelectedImagePath;
                //byte pro = 6;//不处理温度显示,等待回复数据再处理
                //function.Fh_Mode_Temp.TryGetValue(curMode, out pro);
@@ -260,5 +264,37 @@
            btn2.MouseUpEventHandler = eventHandler1;
            dialogView.MouseUpEventHandler = eventHandler;
        }
        /// <summary>
        /// 更新不同界面状态
        /// </summary>
       private void updateStatusPage()
        {
            btnPlus.Enable = true;
            btnMinus.Enable = true;
            arcBar.IsClickable = true;
            arcBar.IsOffline = false;
            switch (getModeValue)
            {
                case "auto"://自动
                case "timer"://
                    btnPlus.Enable = false;
                    btnMinus.Enable = false;
                    arcBar.IsClickable = false;
                    arcBar.IsOffline = true;
                    break;
            }
        }
        /// <summary>
        /// 获取模式value值
        /// </summary>
        private string getModeValue
        {
            get
            {
                return function.GetAttrState(FunctionAttributeKey.Mode);
            }
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Security;
using HDL_ON.UI.UI2.FuntionControlView.Music;
using HDL_ON.Entity;
namespace HDL_ON.UI.Music
{
@@ -90,34 +91,62 @@
            ///切换播放模式点击事件;
            playView.playOrderBtn.MouseUpEventHandler += (sender, e) =>
             {
                 string modeValueString = string.Empty;
                 string msg = Language.StringByID(StringId.switchTo);
                 string modeKeyValue = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.mode);
                 switch (modeKeyValue)
                 //获取当前播放模式
                 string currModeKeyValue = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.mode);
                 //获取音乐播放模式列表
                 var attributes = A31MusicModel.Current.functionMusic.GetAttribute(KeyProperty.mode);
                 if (attributes==null) {
                     attributes=new FunctionAttributes();
                 }
                 var attributesList = attributes.value;
                 //找到当前播放模式索引值
                 int currModeIndexe = attributesList.IndexOf(currModeKeyValue);
                 //记录选中的播放模式的索引值
                 int count = 0;
                 if (currModeIndexe >= attributesList.Count-1)
                 {
                     //重置索引值
                     count = 0;
                 }
                 else
                 {
                     count = currModeIndexe + 1;
                 }
                 //通过索引值找到模式value值
                 string modeValueString = attributesList[count];
                 switch (modeValueString)
                 {
                     //list_cycle列表循环,single_cycle单曲循环,random随机播放;
                     case ValueProperty.list_cycle:
                         modeValueString=ValueProperty.single_cycle;
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
                         msg += Language.StringByID(StringId.singleMode);
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
                         msg += Language.StringByID(StringId.listMode);
                         break;
                     case ValueProperty.single_cycle:
                         modeValueString =ValueProperty.random;
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single_cycle.png";
                         msg += Language.StringByID(StringId.singleCycleMode);
                         break;
                     case ValueProperty.random:
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/random.png";
                         msg += Language.StringByID(StringId.randomMode);
                         break;
                     case ValueProperty.random:
                         modeValueString = ValueProperty.list_cycle;
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
                         msg += Language.StringByID(StringId.listMode);
                     case ValueProperty.single:
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
                         msg += Language.StringByID(StringId.single);
                         break;
                     case ValueProperty.order:
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/order.png";
                         msg += Language.StringByID(StringId.orderMode);
                         break;
                 }
                 //写入缓存
                 A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.mode, modeValueString);
                 new PublicAssmebly().TipMsgAutoClose(msg, false,1000);
                 new PublicAssmebly().TipMsgAutoClose(msg, false, 1000);
                 Dictionary<string, string> dic = new Dictionary<string, string>();
                 dic.Add(KeyProperty.mode,modeValueString);
                 SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic,dic);
                 dic.Add(KeyProperty.mode, modeValueString);
                 //发送控制指令
                 SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
             };
            ///添加喜爱点击事件;
            playView.loveBtn.MouseUpEventHandler += (sender, e) =>
@@ -318,22 +347,29 @@
                            int totalMusicMinute = totalSecond / 60;
                            //秒钟
                            int totalMusicSecond = totalSecond % 60;
                            //转化歌曲总时间时间格式
                            string totalTime = (totalMusicMinute.ToString().Length < 2 ? "0" + totalMusicMinute.ToString() : totalMusicMinute.ToString()) + ":" + (totalMusicSecond.ToString().Length < 2 ? "0" + totalMusicSecond.ToString() : totalMusicSecond.ToString());
                            //显示总时间
                            playView.endTimeBtn.Text = totalTime;
                            //显示播放器名称
                            topView.topNameBtn.Text = A31MusicModel.Current.functionMusic.name;
                            string s = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.mode);
                            //显示播放模式图标
                            switch (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.mode))
                            {
                                case ValueProperty.list_cycle://列表循环
                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
                                    break;
                                case ValueProperty.single_cycle://单曲循环
                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single_cycle.png";
                                    break;
                                case ValueProperty.random://随机播放
                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/random.png";
                                    break;
                                case ValueProperty.single:// 单曲<single>
                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
                                    break;
                                case ValueProperty.order://循序循环
                                    playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/order.png";
                                    break;
                            }
@@ -368,7 +404,9 @@
                            //        playView.loveBtn.IsSelected = false;
                            //    }
                            //}
                            //显示播放器区域
                            playView.regionBtn.Text = A31MusicModel.Current.functionMusic.GetRoomListName();
                            //显示播放器收藏状态图标
                            if (A31MusicModel.Current.functionMusic.collect)
                            {
                                playView.collectIconBtn.IsSelected = true;
@@ -428,21 +466,23 @@
                            int playMusicMinute = playSecond / 60;
                            //秒钟
                            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 (totalSecond == 0)
                                {
                                    //歌曲进度条
                                    //显示歌曲进度条
                                    playView.diyArcSeekBar.Progress = 0;
                                }
                                else
                                {
                                    //歌曲进度条
                                    //显示歌曲进度条
                                    playView.diyArcSeekBar.Progress = (int)(playSecond * 100.0 / totalSecond);//+1
                                }
@@ -450,6 +490,7 @@
                            }
                            else
                            {
                                //显示播放状态图标
                                playView.playBtn.IsSelected = false;
                                //停止播放
                                playView.startTimeBtn.Text =playTime;
@@ -457,7 +498,9 @@
                                ///记录歌曲暂停时间;<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);
                            //显示歌手名称
                            playView.singerBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name);
                            //更新源的界面
                           // showSourcePage();
HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs
@@ -102,7 +102,7 @@
                case ValueProperty.single_cycle:
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/single.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.singleMode);
                    orderTxetBtn.Text = Language.StringByID(StringId.singleCycleMode);
                    break;
                case ValueProperty.random: