wxr
2022-01-23 e6156ab41aea16796798eb32fd7ce664345a8220
Merge remote-tracking branch 'origin/wjc' into release0123
12个文件已修改
150 ■■■■■ 已修改文件
HDL_ON/DAL/DriverLayer/Control.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs
@@ -26,7 +26,7 @@
    public class Control
    {
        static Control _control;
        public static Control Ins
        {
@@ -866,7 +866,7 @@
                if (receiveObj.Topic == CommunicationTopic.SearchLoaclGatewayReply || receiveObj.Topic == CommunicationTopic.GatewayBroadcast)
                {
                    var bodyJObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(res[1]);
                    if (bodyJObj == null)
                    {
@@ -980,7 +980,6 @@
                        var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
                        if (localFunction == null)
                        {
                            MainPage.Log("找不到音乐播放器添=======" + revString);
                            continue;
                        }
                        MainPage.Log(localFunction.name);
@@ -1195,7 +1194,7 @@
                            case SPK.AvMusic:
                            case SPK.MusicStandard:
                                //UI.Music.MusicMain.mMusicMain.RefreshView(updateTemp);
                                Console.WriteLine("音乐播放器显示状态======="+ revString);
                                //Console.WriteLine("音乐播放器显示状态======="+ revString);
                                //wjc
                                break;
                        }
@@ -1245,4 +1244,4 @@
        #endregion
    }
}
}
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -26,9 +26,13 @@
        /// </summary>
        public string sid = "";
        /// <summary>
        /// 是否允许删除(false=可以删除)
        /// </summary>
        public bool tag = false;
        /// <summary>
        /// 逻辑名称
        /// </summary>
        public string name = "自动化";
        public string name = "";
        /// <summary>
        /// 逻辑条件关系(与and:,或:or)
        /// </summary>
@@ -159,7 +163,7 @@
        /// <summary>
        /// 通知内容
        /// </summary>
        public string noticeContent = "自动化已经执行";//string.Empty;
        public string noticeContent = Shared.Language.StringByID(StringId.Automation)+ Shared.Language.StringByID(StringId.yizhixing); //string.Empty;
    }
    /// <summary>
    /// 推送配置
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SingleLogicView.cs
@@ -81,6 +81,19 @@
        };
        /// <summary>
        /// 显示是否删除标志
        /// </summary>
        public Button btnIsDelTag = new Button
        {
            Width = Application.GetRealWidth(10),
            Height = Application.GetRealWidth(10),
            Y = Application.GetRealHeight(12),
            X = Application.GetRealWidth(295 + 36 - 10),
            Radius = (uint)Application.GetRealHeight(5),
            BackgroundColor = 0xFFFF0000,
            Visible = false,
        };
        /// <summary>
        /// 点击事件
        /// </summary>
        public Button btnclick= new Button
@@ -101,6 +114,7 @@
            frameLayout.AddChidren(btnLienIcon);
            frameLayout.AddChidren(btnclick);
            frameLayout.AddChidren(btnSwitchIcon);
            frameLayout.AddChidren(btnIsDelTag);
            return frameLayout;
        }
    }
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -81,6 +81,8 @@
                    })
                    { IsBackground = true }.Start();
                };
                GetSelectIcon(logicView.frameLayout, currLogic);
                if (i == 0)//降序排列
                //if (Logic.LogicList.Count - 1 == i)
@@ -95,6 +97,15 @@
                else
                {
                    logicView.btnSwitchIcon.IsSelected = false;
                }
                ///显示特殊自动化标志
                if (currLogic.tag == true)
                {
                    logicView.btnIsDelTag.Visible = true;
                }
                else
                {
                    logicView.btnIsDelTag.Visible = false;
                }
            }
@@ -288,6 +299,7 @@
                        {
                            Logic newlogic = new Logic();
                            newlogic.tag = logic.tag;
                            newlogic.name = logic.name;
                            newlogic.userLogicId = logic.userLogicId;
                            newlogic.sid = logic.sid;
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -163,6 +163,7 @@
        var logicIfon = new JObject { };
        logicIfon.Add("sid", logic.sid);
        logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
        logicIfon.Add("tag", logic.tag);
        logicIfon.Add("name", logic.name);
        logicIfon.Add("relation", logic.relation);
        logicIfon.Add("enable", logic.enable);
@@ -287,6 +288,7 @@
        logicIfon.Add("userLogicId", logic.userLogicId);
        logicIfon.Add("sid", logic.sid);
        logicIfon.Add("gatewayId", LogicMethod.CurrLogicMethod.GatewayId);
        logicIfon.Add("tag", logic.tag);
        logicIfon.Add("name", logic.name);
        logicIfon.Add("relation", logic.relation);
        logicIfon.Add("enable", logic.enable);
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -81,7 +81,11 @@
                BackgroundColor = CSS.CSS_Color.view,
                Gravity = Gravity.BottomCenter,//置底的属性
            };
            this.AddChidren(frameLayout);
            ///可以显示删除控件
            if (Logic.currlogic.tag == false)
            {
                this.AddChidren(frameLayout);
            }
            Button btnDel = new Button
            {
                TextSize = LogicView.TextSize.text16,
@@ -94,6 +98,7 @@
            frameLayout.AddChidren(btnDel);
            EventHandler<MouseEventArgs> delClick = (sender, e) =>
            {
                Loading loading = new Loading();
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -70,7 +70,8 @@
            ///加载播放音乐界面的控件方法
            playView.viewFrameLayout(middLayout);
            #endregion
            #region   ---控件的点击事件---
            #region   ---界面点击事件---
            //收藏图标事件
            playView.collectIconBtn.MouseUpEventHandler += (sender, e) =>
            {
@@ -98,7 +99,6 @@
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/single.png";
                         msg += Language.StringByID(StringId.singleMode);
                         break;
                     case ValueProperty.single_cycle:
                         modeValueString =ValueProperty.random;
                         playView.playOrderBtn.UnSelectedImagePath = "MusicIcon/random.png";
@@ -154,8 +154,34 @@
                ///下拉刷新
                myListView.verticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
                {
                    System.Threading.Tasks.Task.Run(() =>
                    {
                        try
                        {
                            A31MusicModel.Current.palyLists.Clear();
                            if (A31MusicModel.Current.palyLists.Count == 0)
                            {
                                SendMethod.mMethod.GetPalyList(A31MusicModel.Current.functionMusic);
                            }
                        }
                        catch
                        {
                        }
                        finally
                        {
                            Application.RunOnMainThread(() =>
                            {
                                myListView.verticalScrolViewLayout.EndHeaderRefreshing();
                                myListView.verticalScrolViewLayout.RemoveAll();
                                var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name);
                                var musicList = A31MusicModel.Current.GetSongList(listName);
                                A31SongPlay.SongListView(myListView.verticalScrolViewLayout, musicList, listName, myListView.popFra);
                            });
                        }
                    });
                    //结束刷新
                    myListView.verticalScrolViewLayout.EndHeaderRefreshing();
                };
                ///移除界面
                EventHandler<MouseEventArgs> removeFromParentView = (sen, e1) =>
@@ -243,25 +269,23 @@
            {
                playView.nextBtn.IsSelected = false;
            };
            ///物理按键的点击事件
            Volume.VolumeChange = (volume) =>
            {
                if (Application.DeviceType == Device.Ios && A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source) == "bluetooth")
                {
                    return;
                }
                playView.volSeekBar.Progress = volume;
                if (startVolume != volume)
                {
                    startVolume = volume;
                    A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume);
                    Dictionary<string, string> dic = new Dictionary<string, string>();
                    dic.Add(KeyProperty.volume, startVolume.ToString());
                    SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
                }
            };
            /////物理按键的点击事件
            //Volume.VolumeChange = (volume) =>
            //{
            //    if (Application.DeviceType == Device.Ios && A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source) == "bluetooth")
            //    {
            //        return;
            //    }
            //    playView.volSeekBar.Progress = volume;
            //    if (startVolume != volume)
            //    {
            //        startVolume = volume;
            //        A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume);
            //        Dictionary<string, string> dic = new Dictionary<string, string>();
            //        dic.Add(KeyProperty.volume, startVolume.ToString());
            //        SendMethod.mMethod.SendControlCommand(A31MusicModel.Current.functionMusic, dic);
            //    }
            //};
            #endregion
        }
        /// <summary>
@@ -283,7 +307,7 @@
                        {
                            //更新总时间                            
                            //总共有多少秒
                            int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time))/1000;
                            int totalSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_time));
                            //分钟
                            int totalMusicMinute = totalSecond / 60;
                            //秒钟
@@ -448,16 +472,7 @@
            switch (A31MusicModel.Current.functionMusic.GetAttrState("source"))
            {
                case "QPLAY"://QQ音乐
                    playView.loveBtn.Alpha = 0.5f;
                    playView.loveBtn.Enable = false;
                    break;
                case "AIRPLAY"://酷狗音乐
                    playView.loveBtn.Alpha = 0.5f;
                    playView.loveBtn.Enable = false;
                    playView.diyArcSeekBar.IsClickable = false;
                    break;
                //sdcard/audio_in/ftp/radio/bluetooth
                case "SONGLIST-NETWORK"://本地音乐
                    break;
                case "SONGLIST-LOCAL"://USB
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -102,9 +102,10 @@
            verticalRefresh.BeginHeaderRefreshingAction += () =>
            {
                verticalRefresh.EndHeaderRefreshing();
                ////发送读取音乐播放器状态线程
                SeachMusic();
                verticalRefresh.EndHeaderRefreshing();
            };
            this.AddChidren(loading);
            SeachMusic();
HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -57,7 +57,7 @@
        {
            try
            {
               // RefreshDeviceStatus(functionIds);
                //RefreshDeviceStatus(functionIds);
                a31Music.LastDateTime = DateTime.Now;
                ///从缓存里面查找音乐播放器对象<缓存数据收到推送过来的状态会更新缓存数据>
                var allLocalFuntion = FunctionList.List.GetDeviceFunctionList();
HDL_ON/UI/UI2/FuntionControlView/Music/View/MyListView.cs
@@ -95,17 +95,17 @@
            switch (mode)
            {
                //0列表循环,1单曲循环,2随机播放;
                case "list_cycle":
                case ValueProperty.list_cycle:
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/list.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.listMode);
                    break;
                case "single_cycle/order":
                case ValueProperty.single_cycle:
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/single.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.singleMode);
                    break;
                case "random":
                case ValueProperty.random:
                    orderIconBtn.UnSelectedImagePath = "MusicIcon/random.png";
                    orderTxetBtn.Text = Language.StringByID(StringId.randomMode);
                    break;
HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
@@ -285,7 +285,7 @@
            musicBjFl.AddChidren(songNameTextView);
            musicBjFl.AddChidren(singerBtn);
            musicBjFl.AddChidren(playOrderBtn);
            musicBjFl.AddChidren(loveBtn);
            //musicBjFl.AddChidren(loveBtn);
            musicBjFl.AddChidren(playlistBtn);
            musicBjFl.AddChidren(volIconBtn);
            musicBjFl.AddChidren(volSeekBar);