| | |
| | | <WarningLevel>4</WarningLevel> |
| | | <MtouchLink>SdkOnly</MtouchLink> |
| | | <MtouchArch>x86_64</MtouchArch> |
| | | <CodesignKey>iPhone Developer</CodesignKey> |
| | | <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> |
| | | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
| | | <CodesignProvision>ComHdlOnProAdHoc20220117-1</CodesignProvision> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | |
| | | <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> |
| | | <MtouchI18n>cjk</MtouchI18n> |
| | | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
| | | <CodesignProvision>ComHdlOnProAdHoc20220117-1</CodesignProvision> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="System" /> |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.5.402101241</string> |
| | | <string>1.5.402202171</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.5.401241</string> |
| | | <string>1.5.402171</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | <key>UIBackgroundModes</key> |
| | | <array> |
| | | <string>audio</string> |
| | | <string>location</string> |
| | | <string>voip</string> |
| | | <string>remote-notification</string> |
| | | </array> |
| | |
| | | 524=Bypass |
| | | 525=Enable |
| | | 526=Cancel account |
| | | 527=Homekit support notes |
| | | 528=Firmware update |
| | | |
| | | 1000=Room Humidity |
| | | 1001=V-chip |
| | |
| | | 524=停用 |
| | | 525=启用 |
| | | 526=注销账号 |
| | | 527=支持HomeKit说明 |
| | | 528=固件更新 |
| | | |
| | | 1000=室内湿度 |
| | | 1001=童锁 |
| | |
| | | MainPage.Log($"读取房间数据失败:Code:{roomResult.Code}; msg:{roomResult.message}"); |
| | | } |
| | | //===================设备======================= |
| | | var deviceResult = Ins.HttpRequest.GetDeviceList(); |
| | | var deviceResult = Ins.HttpRequest.GetDeviceList("30","1"); |
| | | if (deviceResult.Code == StateCode.SUCCESS) |
| | | { |
| | | endTime = DateTime.Now.AddSeconds(100); |
| | | endTime = DateTime.Now.AddSeconds(5); |
| | | |
| | | MainPage.Log($"读取设备信息成功"); |
| | | var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); |
| | |
| | | { |
| | | deviceList = new DevcieApiPack(); |
| | | } |
| | | try |
| | | { |
| | | while (deviceList.totalPage != deviceList.pageNo) |
| | | { |
| | | var deviceResult2 = Ins.HttpRequest.GetDeviceList("30", Convert.ToInt32(deviceList.pageNo) + 1 + ""); |
| | | if (deviceResult2.Code == StateCode.SUCCESS) |
| | | { |
| | | var deviceList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); |
| | | deviceList.pageNo = deviceList2.pageNo; |
| | | deviceList.list.AddRange(deviceList2.list); |
| | | } |
| | | } |
| | | }catch(Exception ex) |
| | | { |
| | | |
| | | } |
| | | |
| | | string delFile = ""; |
| | | if (FunctionList.List.GetDeviceFunctionList().Count > 0) |
| | | { |
| | |
| | | { |
| | | public static class StringId |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 固件更新 |
| | | /// </summary> |
| | | public const int FirmwareUpdate = 528; |
| | | /// <summary> |
| | | /// 支持HomeKit说明 |
| | | /// </summary> |
| | | public const int SupportHomeKitNotes = 527; |
| | | /// <summary> |
| | | /// 注销账号 |
| | | /// </summary> |
| | |
| | | /// 获取设备列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public ResponsePackNew GetDeviceList() |
| | | public ResponsePackNew GetDeviceList(string pageSize="",string pageNo ="") |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | //d.Add("gatewayId", DB_ResidenceData.residenceData.HomeGateway.gatewayId); |
| | | //d.Add("roomId", DB_ResidenceData.residenceData.residecenInfo.RegionID);//可控参数,当需要分页获取,怎么知道分页总数 |
| | | //d.Add("searchType", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | //d.Add("pageSize", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | //d.Add("pageNo", DB_ResidenceData.residenceData.residecenInfo.RegionID); |
| | | if (!string.IsNullOrEmpty(pageSize)) |
| | | { |
| | | d.Add("pageSize", pageSize); |
| | | d.Add("pageNo", pageNo); |
| | | } |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetDevcieList, requestJson); |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </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> |
| | |
| | | { |
| | | /// <summary> |
| | | /// 控制目标类型 |
| | | /// 0:设备 |
| | | /// 1:场景 |
| | | /// 2:自动化 |
| | | /// 1:设备 |
| | | /// 2:场景 |
| | | /// 3:自动化 |
| | | /// </summary> |
| | | public string target_type = "0"; |
| | | public string target_type = "1"; |
| | | /// <summary> |
| | | /// 输出目标的sid |
| | | /// </summary> |
| | |
| | | public string StateText() |
| | | { |
| | | string text = ""; |
| | | if (target_type == "0") |
| | | if (target_type == "1") |
| | | { |
| | | switch (spk) |
| | | { |
| | |
| | | } |
| | | break; |
| | | } |
| | | }else if(target_type == "1") |
| | | }else if(target_type == "2") |
| | | { |
| | | text = Language.StringByID(StringId.Open); |
| | | } |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\A31MusicFileList.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\A31SongPlay.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\MusicProperty.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\SupportHomeKitNotesPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\FirmwareUpdateView.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | |
| | | |
| | | btnLinkStateTip = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(46), |
| | | Width = Application.GetRealWidth(6), |
| | | Height = Application.GetRealWidth(6), |
| | | Y = Application.GetRealHeight(16), |
| | | Height = Application.GetRealWidth(14), |
| | | BackgroundColor = CSS_Color.LinkTipFail, |
| | | Radius = (uint)Application.GetRealWidth(3), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | topView.AddChidren(btnLinkStateTip); |
| | | //更新链接状态icon颜色 |
| | |
| | | |
| | | btnResidenceName = new Button() |
| | | { |
| | | X = Application.GetRealWidth(26), |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(32), |
| | | Width = Application.GetRealWidth(300), |
| | | Height = Application.GetRealHeight(33), |
| | |
| | | //Dome模式 |
| | | if (MainPage.NoLoginMode) |
| | | { |
| | | bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor; |
| | | return; |
| | | } |
| | | |
| | | if (!Control.Ins.GatewayOnline_Local && !Control.Ins.GatewayOnline_Cloud) |
| | | { |
| | | bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipFail; |
| | | bodyView.btnLinkStateTip.TextID = StringId.NetworkAnomaly; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor; |
| | | bodyView.btnLinkStateTip.BackgroundColor = 0x00000000; |
| | | bodyView.btnLinkStateTip.Text = ""; |
| | | } |
| | | } |
| | | } |
| | |
| | | #endregion |
| | | privacyPolicyView.GoAction = privacyPolicyAction; |
| | | CheckIfNeedUpdateAsync(); |
| | | |
| | | #if __IOS__ |
| | | #region 固件升级 |
| | | var firUpdateView = new ListCellView() |
| | | { |
| | | Y = privacyPolicyView.Bottom, |
| | | }; |
| | | firUpdateView.BtnTilte.TextID = StringId.FirmwareUpdate; |
| | | bodyView.AddChidren(firUpdateView); |
| | | Action firmwareUpdateAction = () => |
| | | { |
| | | var mPage = new HDL_ON.UI.UI2.PersonalCenter.AboutOn.FirmwareUpdateView(); |
| | | MainPage.BasePageView.AddChidren(mPage); |
| | | mPage.ShowPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | firUpdateView.GoAction = firmwareUpdateAction; |
| | | #endregion |
| | | |
| | | |
| | | #region HomeKit支持说明 |
| | | var homeKitView = new ListCellView() |
| | | { |
| | | Y = firUpdateView.Bottom, |
| | | }; |
| | | bodyView.AddChidren(homeKitView); |
| | | homeKitView.BtnTilte.TextID = StringId.SupportHomeKitNotes; |
| | | Action homeKitSupportViewAction = () => { |
| | | var mPage = new HDL_ON.UI.UI2.PersonalCenter.AboutOn.SupportHomeKitNotesPage(); |
| | | MainPage.BasePageView.AddChidren(mPage); |
| | | mPage.ShowPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | homeKitView.GoAction = homeKitSupportViewAction; |
| | | #endregion |
| | | #endif |
| | | |
| | | } |
| | | |
| | | |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI.UI2.PersonalCenter.AboutOn |
| | | { |
| | | public class FirmwareUpdateView : FrameLayout |
| | | { |
| | | FirmwareUpdateView bodyView; |
| | | public FirmwareUpdateView() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void ShowPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.FirmwareUpdate)).LoadTopView(); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealHeight(90), |
| | | Height = bodyView.Height, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | string msg = ""; |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | msg = "当前所有设备已经是最新固件版本。"; |
| | | } |
| | | else |
| | | { |
| | | msg = "Currently, all devices have the latest firmware version."; |
| | | } |
| | | var msgTv = new Button() |
| | | { |
| | | Text = msg, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | IsMoreLines = true, |
| | | TextAlignment = TextAlignment.TopLeft |
| | | }; |
| | | contentView.AddChidren(msgTv); |
| | | waitPage.Hide(); |
| | | waitPage.RemoveFromParent(); |
| | | }); |
| | | }).Start(); |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI.UI2.PersonalCenter.AboutOn |
| | | { |
| | | public class SupportHomeKitNotesPage : FrameLayout |
| | | { |
| | | SupportHomeKitNotesPage bodyView; |
| | | |
| | | public SupportHomeKitNotesPage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | public void ShowPage() |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.SupportHomeKitNotes)).LoadTopView(); |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = Application.GetRealHeight(90), |
| | | Height = bodyView.Height , |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | string msg = ""; |
| | | if (Language.CurrentLanguage == "Chinese") |
| | | { |
| | | msg = "目前HDL平台已支持向苹果应用“家庭”App 添加 HomeKit 配件。" + "\r\n" + |
| | | "目前支持添加到“家庭”的配件有HDL gateway、HDL light等。" + "\r\n" + |
| | | "您可以使用 iPhone、iPad 或 iPod touch,按照以下步骤操作,向“家庭”App 添加配件:" + "\r\n" + |
| | | "1、打开“家庭”App,然后轻点“添加配件” 或“添加”。" + "\r\n" + |
| | | "2、轻点“添加配件”。" + "\r\n" + |
| | | "3、使用 iPhone、iPad 或 iPod touch 上的摄像头扫描配件或配件文稿中的八位 HomeKit 代码或二维码。如果您使用的是 iPhone 7 或更新机型,并在您的配件上看到了 NFC 兼容符号,请将您的 iPhone 靠近这个配件以进行添加。" + "\r\n" + |
| | | "4、在配件出现时轻点它。如果系统询问您要不要“将配件添加到网络”,请轻点“允许”。" + "\r\n" + |
| | | "5、为配件命名并将配件分配给某个房间,以协助您在“家庭”App 中识别它和使用 Siri 对它进行控制。" + "\r\n" + |
| | | "6、轻点“下一步”,然后轻点“完成”。"; |
| | | } |
| | | else |
| | | { |
| | | msg = "At present, the HDL platform has supported adding homekit accessories to Apple's \"home\" app." + "\r\n" + |
| | | "At present, HDL gateway, HDL light and other accessories can be added to \"home\"." + "\r\n" + |
| | | "You can use iPhone, iPad or iPod touch to add accessories to the home app by following these steps: " + "\r\n" + |
| | | "1.Open the home app and tap add accessories or add." + "\r\n" + |
| | | "2.Tap add fitting." + "\r\n" + |
| | | "3.Use the camera on iPhone, iPad or iPod touch to scan the eight digit homekit code or QR code in the accessory or accessory manuscript.If you are using iPhone 7 or later and see the NFC compatibility symbol on your accessory, please put your iPhone close to this accessory to add it." + "\r\n" + |
| | | "4.Tap the accessory when it appears.If the system asks you whether you want to \"add accessories to the network\", tap \"allow\"." + "\r\n" + |
| | | "5.Name the accessory and assign it to a room to help you identify it in the home app and use Siri to control it." + "\r\n" + |
| | | "6.Tap next, then finish."; |
| | | } |
| | | var msgTv = new Button() |
| | | { |
| | | X = Application.GetRealWidth(35), |
| | | Y = Application.GetRealHeight(12), |
| | | Width = Application.GetRealWidth(300), |
| | | IsMoreLines = true, |
| | | Text = msg, |
| | | TextAlignment = TextAlignment.TopLeft, |
| | | TextColor = CSS_Color.TextualColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | }; |
| | | contentView.AddChidren(msgTv); |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | tempStatus.Add(new SecurityOutputStatus() { key = FunctionAttributeKey.OnOff, value = "on" }); |
| | | allocatedList.Add(new SecurityOutput |
| | | { |
| | | target_type = "0", |
| | | target_type = "1", |
| | | sid = function.sid, |
| | | status = tempStatus, |
| | | name = function.name, |
| | |
| | | tempStatus.Add(new SecurityOutputStatus() { key = "value", value = "0" }); |
| | | allocatedList.Add(new SecurityOutput |
| | | { |
| | | target_type = "1", |
| | | target_type = "2", |
| | | sid = scene.sid, |
| | | status = tempStatus, |
| | | name = scene.name, |
| | |
| | | Text = function.GetAttrState("total_electricity"), |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | btnTotalElectricity.Width = btnTotalElectricity.GetTextWidth(); |
| | | btnTotalElectricity.Width = btnTotalElectricity.GetTextWidth()+ Application.GetRealWidth(5); |
| | | controlView.AddChidren(btnTotalElectricity); |
| | | var btnTotalElectricityUnit = new Button() |
| | | { |
| | |
| | | |
| | | public static void UpdataView(Function updata) |
| | | { |
| | | if(bodyView!=null) |
| | | if (bodyView != null) |
| | | { |
| | | for (int i = 0; i < bodyView.instantaneousValueView.ChildrenCount; i++) |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var view = bodyView.instantaneousValueView.GetChildren(i); |
| | | if(null != view.Tag ) |
| | | for (int i = 0; i < bodyView.instantaneousValueView.ChildrenCount; i++) |
| | | { |
| | | if (view.GetType() == typeof(InstantaneousValueView)) |
| | | var view = bodyView.instantaneousValueView.GetChildren(i); |
| | | if (null != view.Tag) |
| | | { |
| | | var view2 = view as InstantaneousValueView; |
| | | switch (view.Tag.ToString()) |
| | | if (view.GetType() == typeof(InstantaneousValueView)) |
| | | { |
| | | case "active_power": |
| | | var attr = updata.GetAttribute("active_power"); |
| | | if (attr != null) |
| | | { |
| | | view2.btnValue.Text = attr.curValue.ToString(); |
| | | } |
| | | break; |
| | | case "voltage": |
| | | var attr1 = updata.GetAttribute("voltage"); |
| | | if (attr1 != null) |
| | | { |
| | | view2.btnValue.Text = attr1.curValue.ToString(); |
| | | } |
| | | break; |
| | | case "current": |
| | | var attr2 = updata.GetAttribute("current"); |
| | | if (attr2 != null) |
| | | { |
| | | view2.btnValue.Text = attr2.curValue.ToString(); |
| | | } |
| | | break; |
| | | var view2 = view as InstantaneousValueView; |
| | | switch (view.Tag.ToString()) |
| | | { |
| | | case "active_power": |
| | | var attr = updata.GetAttribute("active_power"); |
| | | if (attr != null) |
| | | { |
| | | view2.btnValue.Text = attr.curValue.ToString(); |
| | | } |
| | | break; |
| | | case "voltage": |
| | | var attr1 = updata.GetAttribute("voltage"); |
| | | if (attr1 != null) |
| | | { |
| | | view2.btnValue.Text = attr1.curValue.ToString(); |
| | | } |
| | | break; |
| | | case "current": |
| | | var attr2 = updata.GetAttribute("current"); |
| | | if (attr2 != null) |
| | | { |
| | | view2.btnValue.Text = attr2.curValue.ToString(); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </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> |
| | |
| | | <DefineConstants></DefineConstants>
|
| | | <ErrorReport>prompt</ErrorReport>
|
| | | <WarningLevel>4</WarningLevel>
|
| | | <CodesignKey>iPhone Developer</CodesignKey>
|
| | | <CodesignKey>iPhone Distribution</CodesignKey>
|
| | | <MtouchUseLlvm>true</MtouchUseLlvm>
|
| | | <MtouchFloat32>true</MtouchFloat32>
|
| | | <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
| | |
| | | <DefineConstants></DefineConstants>
|
| | | <ErrorReport>prompt</ErrorReport>
|
| | | <WarningLevel>4</WarningLevel>
|
| | | <CodesignKey>iPhone Developer</CodesignKey>
|
| | | <CodesignKey>iPhone Distribution</CodesignKey>
|
| | | <MtouchUseLlvm>true</MtouchUseLlvm>
|
| | | <MtouchFloat32>true</MtouchFloat32>
|
| | | <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|