| | |
| | | <Reference Include="ScanSdk"> |
| | | <HintPath>..\DLL\Scan\ScanSdk.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZxingSDK"> |
| | | <HintPath>..\..\LC\Android\ZxingSDK.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Shared.Droid.LCVideoSDK"> |
| | | <HintPath>..\DLL\LC\Android\Shared.Droid.LCVideoSDK.dll</HintPath> |
| | | </Reference> |
| | |
| | | <Reference Include="LcPullToRefreshRecyclerView"> |
| | | <HintPath>..\DLL\LC\Android\LcPullToRefreshRecyclerView.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZxingSDK"> |
| | | <HintPath>..\DLL\LC\Android\ZxingSDK.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="LcVideoSdk"> |
| | | <HintPath>..\DLL\LC\Android\LcVideoSdk.dll</HintPath> |
| | | </Reference> |
| | |
| | | } |
| | | else |
| | | { |
| | | ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Percent)) }); |
| | | ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { (byte)(((int)function.bus.LoopId) + 16), Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Percent)) }); |
| | | |
| | | } |
| | | break; |
| | |
| | | if (_IpCamImou == null) |
| | | { |
| | | _IpCamImou = Functions.FindAll((obj) => obj.spk == SPK.IpCam_Imou); |
| | | if (_IpCamImou.Count > 0) |
| | | { |
| | | Com.Utils.HdlToLcUtils.Instance.InitData(Shared.Application.Activity, "HDL-HOME-APP-TEST", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", OnAppConfig.Instance.RequestHttpsHost); |
| | | } |
| | | } |
| | | return _IpCamImou; |
| | | } |
| | |
| | | { |
| | | MainPage.Log($"IniFunctionList error : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public void Clear() |
| | | { |
| | | Functions = new List<Function>(); |
| | | try |
| | | { |
| | | _IpCamImou.Clear(); |
| | | _IpCamImou = null; |
| | | _FunctionList.Clear(); |
| | | _FunctionList = null; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"清理FunctionList异常:{ex.Message}"); |
| | | _FunctionList = null; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 功能绑定房间 |
| | |
| | | doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | case SPK.IpCam_Imou: |
| | | FunctionList.List.GetIpCamImouList(); |
| | | |
| | | var waitPage = new Loading(); |
| | | MainPage.BaseView.AddChidren(waitPage); |
| | | waitPage.Start(""); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var http = new HttpServerRequest(); |
| | | var pack = http.GetLcSubAccountToken(); |
| | |
| | | new PublicAssmebly().TipMsg("", $"获取乐橙数据失败"); |
| | | }); |
| | | } |
| | | Com.Utils.HdlToLcUtils.Instance.InitData(Shared.Application.Activity, "HDL-HOME-APP-TEST", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", OnAppConfig.Instance.RequestHttpsHost); |
| | | #if __ANDROID__ |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | try |
| | | { |
| | | Com.Utils.HdlToLcUtils.Instance.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; |
| | | Com.Utils.HdlToLcUtils.Instance.Token = UserInfo.Current.AccessToken; |
| | | Com.Utils.HdlToLcUtils.Instance.SubAccessToken = pack.Data.ToString(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //Com.Utils.HdlToLcUtils.Instance.OpenActivity(); |
| | | Com.Utils.HdlToLcUtils.Instance.Play(function.extDevId,function.name); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | } |
| | | }); |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | |
| | | new PublicAssmebly().TipMsg("", $"获取乐橙数据失败({pack.Code})"); |
| | | }); |
| | | } |
| | | }catch(Exception ex) |
| | | { |
| | | MainPage.Log("加载乐橙摄像头异常"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | break; |
| | |
| | | { |
| | | Action<string, string> action = (s, a) => |
| | | { |
| | | //var page = new AddDevciePage(brand); |
| | | //MainPage.BasePageView.AddChidren(page); |
| | | //page.LoadPage(contentView); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | if (brand.productBrand == "") |
| | | { |
| | | #if __ANDROID__ |
| | | var backTemp = new AddLcCam(); |
| | | backTemp.backAction = () => { |
| | | backTemp.backAction = () => |
| | | { |
| | | Load3tyBrandDeviceList(); |
| | | }; |
| | | Com.Utils.HdlToLcUtils.Instance.AddCamera(backTemp); |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | | var page = new AddDevciePage(brand); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(contentView); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | }; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Devices)).LoadTopView_AddIcon("3ty", action); |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | |
| | | } |
| | | this.function = FunctionList.List.GetAcstParentList()[0]; |
| | | this.BackgroundColor = CSS.CSS_Color.BackgroundColor; |
| | | this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor }); |
| | | //this.AddChidren(new Button() { Height = Application.GetRealHeight(50), BackgroundColor = curColor }); |
| | | contentView = new VerticalScrolViewLayout() { |
| | | Height = Application.GetRealHeight(667 - 56), |
| | | }; |
| | |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var view = basePage.subViewList[temp.sid]; |
| | | AcstSubControlView view = null; |
| | | basePage.subViewList.TryGetValue(temp.sid,out view); |
| | | if (view != null) |
| | | { |
| | | view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%"; |