wjc
2022-03-23 d22864834edebb8215886f2286b028fcdd00d6b0
2022-01-23-01
5个文件已修改
43 ■■■■■ 已修改文件
HDL-ON_iOS/HDL-ON_iOS.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -109,7 +109,7 @@
          <HintPath>..\DLL\Linphone\iOS\Shared.IOS.HDLLinphoneSDK.dll</HintPath>
        </Reference>
        <Reference Include="Shared.IOS.HDLSceneSiri">
          <HintPath>..\..\HDLXamarinSceneSiri\Shared.IOS.HDLSceneSiri\Shared.IOS.HDLSceneSiri\bin\Release\Shared.IOS.HDLSceneSiri.dll</HintPath>
          <HintPath>..\DLL\IOS\Shared.IOS.HDLSceneSiri.dll</HintPath>
        </Reference>
    </ItemGroup>
    <ItemGroup>
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -221,9 +221,9 @@
                        funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
                        UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString();
                        ///获取单个类型(例如:灯光类。。)设备FunctionType列表<简称:spk列表>
                        var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
                        var typeFunctionList1 = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction);
                        ///获取单个灯光类型(例如:灯光1,灯光2。。)设备列表
                        var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList);
                        var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList1, functionList);
                        DeviceListView(vv, lists2);
                    };
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -111,11 +111,7 @@
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
                         msg += Language.StringByID(StringId.listMode);
                         break;
                    default:
                         modeValueString = ValueProperty.list_cycle;
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/list.png";
                         msg += Language.StringByID(StringId.listMode);
                         break;
                 }
                 A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.mode, modeValueString);
                 new PublicAssmebly().TipMsgAutoClose(msg, false,1000);
@@ -407,11 +403,14 @@
                            //当前播放音乐时间
                            //按道理不会为空,GetAttrState("playing_time")值可能为空,强制转换int.Parse()会出现异常,不过也做了异常处理了
                            int playSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playing_time))+ (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds;
                            if (playSecond >=totalSecond)
                            {
                                ///播放时间不能超过总时间;
                                playSecond = totalSecond;
                            }
                            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)
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -167,6 +167,7 @@
                    {
                        try
                        {
                            SendMethod.mMethod.RefreshDeviceStatus(new List<string> { a31player.functionMusic.deviceId });
                            System.Threading.Thread.Sleep(500);
                        }
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -12,7 +12,7 @@
{
    public class SendMethod
    {
        private static SendMethod sMethod=null;
        private static SendMethod sMethod = null;
        public static SendMethod mMethod
        {
            get
@@ -48,7 +48,8 @@
            })
            { IsBackground = true }.Start();
        }
        //记录歌曲播放时间
        private int songPlayTime = -1;
        /// <summary>
        /// 获取设备最新的状态
        /// </summary>
@@ -58,7 +59,7 @@
            try
            {
                //RefreshDeviceStatus(functionIds);
                a31Music.LastDateTime = DateTime.Now;
                //a31Music.LastDateTime = DateTime.Now;
                ///从缓存里面查找音乐播放器对象<缓存数据收到推送过来的状态会更新缓存数据>
                var allLocalFuntion = FunctionList.List.GetDeviceFunctionList();
                var localFunction = allLocalFuntion.Find((obj) => obj.sid == sid);
@@ -68,6 +69,13 @@
                }
                ///更新的数据
                a31Music.functionMusic = localFunction;
                if (int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(UI2.FuntionControlView.Music.KeyProperty.playing_time)) != songPlayTime)
                {
                    ///歌曲记录时间和当前时间不一样,立即更新数据反馈时间
                    a31Music.LastDateTime = DateTime.Now;
                    ///歌曲记录时间和当前时间不一样,立即更新歌曲播放时间
                    songPlayTime = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(UI2.FuntionControlView.Music.KeyProperty.playing_time));
                }
            }
            catch { }
@@ -89,6 +97,7 @@
                {
                    return;
                }
            }
            catch { }
        }
@@ -121,7 +130,7 @@
                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
                d.Add("deviceIds", new List<string> { music.deviceId });
                var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList);
                if (responsePackNew.Code != "0"||responsePackNew.Data == null ||responsePackNew.Data.ToString() == "")
                if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "")
                {
                    return;
                }
@@ -130,7 +139,7 @@
                var palyLists = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PalyListInfo>>(str);
                if (palyLists == null)
                {
                    palyLists =new List<PalyListInfo>();
                    palyLists = new List<PalyListInfo>();
                }
                if (palyLists.Count > 0)
                {
@@ -143,12 +152,12 @@
            }
        }
        /// <summary>
        ///请求服务器(与住宅有关:例如;homeId) 
        /// </summary>
        /// <returns></returns>
        public  ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 5)
        public ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 5)
        {
            var requestJson = HttpUtil.GetSignRequestJson(o);
            return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);