HDL_ON/DAL/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SiriIntents/SiriIntents.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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/InpOrOutLogicMethod.cs
@@ -992,8 +992,6 @@ } break; case SPK.CurtainSwitch: case SPK.CurtainTrietex: case SPK.CurtainRoller: { foreach (var dic in dicList) { @@ -1016,6 +1014,29 @@ } break; } } } break; case SPK.CurtainTrietex: case SPK.CurtainRoller: { string on_off = GetKeyValue("on_off", dicList); string percent = GetKeyValue("percent", dicList); if (on_off == "on" && percent != "") { stateStr = Language.StringByID(StringId.onLogic) + percent + "%"; } else if (on_off == "on") { stateStr = Language.StringByID(StringId.onLogic); } else if (on_off == "off") { stateStr = Language.StringByID(StringId.offLogic); } else if (percent != "") { stateStr = percent + "%"; } } break; @@ -1455,8 +1476,6 @@ } break; case SPK.CurtainSwitch: case SPK.CurtainTrietex: case SPK.CurtainRoller: { foreach (var dic in dicList) { @@ -1480,6 +1499,52 @@ break; } } } break; case SPK.CurtainTrietex: case SPK.CurtainRoller: { foreach (var dic in dicList) { string value = dic["value"]; switch (dic["key"]) { case "on_off": { switch (value) { case "on": { button1.Text = Language.StringByID(StringId.onLogic); } break; case "off": { button1.Text = Language.StringByID(StringId.offLogic); } break; case "stop": { button1.Text = Language.StringByID(StringId.stop); } break; } } break; case "percent": { if (button2 == null) { //怕调试软件乱上东西导致抛异常 break; } button2.Text = value + "%"; } break; } } } break; case SPK.AcStandard: @@ -2147,11 +2212,11 @@ //确定点击事件 timePointView.btnConfirm.MouseUpEventHandler += (sender, e3) => { if (timepoint == 0) { //提示 return; } //if (timepoint == 0) //{ // //提示 // return; //} fLayout.RemoveFromParent(); action(timepoint); }; HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -173,6 +173,7 @@ logicIfon.Add("noticeConfig", noticeConfigJObject); logicIfon.Add("pushConfigs", pushConfigsArray); logicjArray.Add(logicIfon); //string str = logicIfon.ToString(); var jObject = new JObject { { "homeId", LogicMethod.CurrLogicMethod.HomeId }, { "logics", logicjArray } }; responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_Logic_Add, 5); //如果是token过期则刷新token HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -68,6 +68,7 @@ lightSwitchView.btnText.TextID = StringId.switchLogic; fLayout.AddChidren(lightSwitchView.FLayoutView()); ///设备延时iewv DelayView(fLayout, lightSwitchView.frameLayout.Bottom); #endregion @@ -101,7 +102,7 @@ brightnessView.frameLayout.Y = lightSwitchView.frameLayout.Bottom; brightnessView.btnText.TextID = StringId.brightnesLogic; fLayout.AddChidren(brightnessView.FLayoutView()); brightnessView.btnState.Text = "5%";//产品经理晓辉要求改的 2021-11-06 //brightnessView.btnState.Text = "5%";//产品经理晓辉要求改的 2021-11-06 ///设备延时iewv DelayView(fLayout, brightnessView.frameLayout.Bottom); #endregion @@ -127,15 +128,12 @@ break; //窗帘 case SPK.CurtainSwitch: case SPK.CurtainTrietex: case SPK.CurtainRoller: { #region 界面 ///开关 LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView(); curtainSwitchView.btnText.TextID = StringId.switchLogic; fLayout.AddChidren(curtainSwitchView.FLayoutView()); ///设备延时iewv DelayView(fLayout, curtainSwitchView.frameLayout.Bottom); #endregion #region 点击事件 @@ -148,6 +146,42 @@ { //显示编辑之前的设备状态 GetEditState(device, index, curtainSwitchView.btnState, null, null, null); } #endregion } break; case SPK.CurtainTrietex: case SPK.CurtainRoller: { #region 界面 ///开关 LogicView.FunTypeView curtainSwitchView = new LogicView.FunTypeView(); curtainSwitchView.btnText.TextID = StringId.switchLogic; fLayout.AddChidren(curtainSwitchView.FLayoutView()); ///百分比 LogicView.FunTypeView crtainPercentumView = new LogicView.FunTypeView(); crtainPercentumView.frameLayout.Y = curtainSwitchView.frameLayout.Bottom; crtainPercentumView.btnText.TextID = StringId.percentum; fLayout.AddChidren(crtainPercentumView.FLayoutView()); crtainPercentumView.btnState.Text = "5%";//产品经理晓辉要求改的 2021-11-06 ///设备延时iewv DelayView(fLayout, crtainPercentumView.frameLayout.Bottom); #endregion #region 点击事件 ///开关点击事件 curtainSwitchView.btnClick.MouseUpEventHandler += (sender, e) => { SwitchViewMethod(device, curtainSwitchView.btnState, 3); }; ///百分比点击事件 crtainPercentumView.btnClick.MouseUpEventHandler += (sender, e) => { BrightnessMethod(device, crtainPercentumView.btnState, crtainPercentumView.btnText.Text); }; if (edit) { //显示编辑之前的设备状态 GetEditState(device, index, curtainSwitchView.btnState, crtainPercentumView.btnState, null, null); } #endregion } @@ -604,8 +638,9 @@ /// <summary> /// 亮度/百分比=功能下一级界面 /// </summary> /// <param name="device"></param> /// <param name="button"></param> /// <param name="device">设备对象</param> /// <param name="button">显示状态对象</param> /// <param name="titleName">标题</param> private void BrightnessMethod(Entity.Function device, Button button, string titleName) { #region 界面 HDL_ON/UI/UI2/FuntionControlView/Music/A31MusicModel.cs
@@ -117,7 +117,7 @@ /// <summary> /// 记录时间 /// </summary> public static DateTime ProgressDateTime = DateTime.Now; public static DateTime ProgressDateTime = DateTime.MinValue; /// <summary> /// 判断是否是json数据 HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -215,6 +215,8 @@ playView.volValueBtn.Text = playView.volSeekBar.Progress + "%"; if (startVolume != e) { ///更新最新值 A31MusicModel.ProgressDateTime = DateTime.Now; startVolume = e; A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.volume, startVolume); Dictionary<string, string> dic = new Dictionary<string, string>(); @@ -247,7 +249,8 @@ if (playView.playBtn.IsSelected) { playView.playBtn.IsSelected = false; status = ValueProperty.off; status = ValueProperty.off; } else { @@ -390,8 +393,8 @@ // playView.volValueBtn.Text = A31MusicModel.Current.A31PlayStatus.vol + "%"; // } //} if (1000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds) //为了防止音量条跳动,延长更新时间(多加1s) if (2000 < (DateTime.Now - A31MusicModel.ProgressDateTime).TotalMilliseconds || A31MusicModel.ProgressDateTime==DateTime.MinValue) { //音量进度条; playView.volSeekBar.Progress = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume)); @@ -399,10 +402,23 @@ playView.volValueBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.volume) + "%"; } //更新播放器音量给系统音量 Volume.MusicVolume = playView.volSeekBar.Progress; //Volume.MusicVolume = playView.volSeekBar.Progress; //当前播放音乐时间 //按道理不会为空,GetAttrState("playing_time")值可能为空,强制转换int.Parse()会出现异常,不过也做了异常处理了 int playSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playing_time))+ (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds; int playSecond = int.Parse(A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playing_time)); //识别音乐状态是否在播放状态 if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on) { //音乐在播放时,再计算播放时间(现在时间=原来时间+1秒) playSecond +=(int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds; ///歌曲记录暂时时间写入缓存; A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.playing_time, playSecond); } if (playSecond<=0) { ///播放时间不能小于0; playSecond = 0; } if (playSecond >=totalSecond) { ///播放时间不能超过总时间; @@ -436,6 +452,9 @@ 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); playView.singerBtn.Text = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name) == null ? "Unkown" : A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.song_name); HDL_ON/UI/UI2/FuntionControlView/Music/MusicMain.cs
@@ -291,6 +291,7 @@ musicView.musicNameBtn.Text = player.functionMusic.name; if (player.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on) { musicView.playBtn.IsSelected = true; } else SiriIntents/SiriIntents.csproj
@@ -86,15 +86,15 @@ <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="Xamarin.iOS" /> <Reference Include="Shared.IOS.HDLSceneSiri"> <HintPath>..\DLL\IOS\Shared.IOS.HDLSceneSiri.dll</HintPath> </Reference> <Reference Include="Newtonsoft.Json"> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath> </Reference> <Reference Include="RestSharp"> <HintPath>..\packages\RestSharp.106.13.0\lib\netstandard2.0\RestSharp.dll</HintPath> </Reference> <Reference Include="Shared.IOS.HDLSceneSiri"> <HintPath>..\DLL\IOS\Shared.IOS.HDLSceneSiri.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> <Folder Include="Resources\" />