| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorhelp.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_white.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelHelpAlarmBgIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Panel\PanelHelpNormalBgIcon.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidResource Include="Resources\values\colors.xml" /> |
| | |
| | | <Folder Include="libs\arm64-v8a\" /> |
| | | <Folder Include="Zxing\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\CAC\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Panel\" /> |
| | | </ItemGroup> |
| | | <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> |
| | |
| | | //UserInfo.Current.pushMesExpantContent = pushMes.expantContent;
|
| | | //UserInfo.Current.PushMesHomeId = pushMes.HomeId;
|
| | | UserInfo.Current.pushMessageInfo = pushMes;
|
| | | UserInfo.Current.inCall = DateTime.Now;
|
| | | if (!string.IsNullOrEmpty(pushMes.spk))//自研可视对讲需要记录时间反呼 |
| | | UserInfo.Current.inCall = DateTime.Now;
|
| | |
|
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202204081" android:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202204201"> |
| | | <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="30" /> |
| | | <!--友盟--> |
| | | <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> |
| | |
| | | <Folder Include="Resources\Phone\FunctionIcon\Electrical\AirSwitch\" /> |
| | | <Folder Include="Base.lproj\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\CAC\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\Panel\" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <InterfaceDefinition Include="LaunchScreen.storyboard" /> |
| | |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorhelp.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensorhelp_white.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelHelpAlarmBgIcon.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Panel\PanelHelpNormalBgIcon.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.5.502204081</string> |
| | | <string>1.5.502204201</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>1.5.504081</string> |
| | | <string>1.5.504201</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | /// <summary> |
| | | /// 更新设备状态 |
| | | /// A协议数据 |
| | | /// Tag Link状态处理 |
| | | /// </summary> |
| | | /// <param name="updateBytes"></param> |
| | | public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false) |
| | |
| | | } |
| | | #endregion |
| | | //A网关设备状态-包含涂鸦设备 |
| | | //Tag 网络状态解析 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send") |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | |
| | | spkList.Add(SensorDryContact2); |
| | | spkList.Add(SenesorMegahealth); |
| | | spkList.Add(SenesorMegahealth2); |
| | | spkList.Add(SensorHelp); |
| | | return spkList; |
| | | } |
| | | |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacDayHistoryPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\CacHistoryChoosePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicMethod.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Panel\PanelHelpPage.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | |
| | | var doorLockPage = new DoorLockPage(); |
| | | doorLockPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | case SPK.SensorHelp: |
| | | var panelHelpPage = new HDL_ON.UI.UI2.FuntionControlView.Panel.PanelHelpPage(); |
| | | panelHelpPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | |
| | | } |
| | | }; |
| | | return eventHandler; |
| | |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes(){ key = "status",curValue= "on",state = "on" }, |
| | | new FunctionAttributes(){ key = "battery_value",curValue= "2000",state = "2000" }, |
| | | new FunctionAttributes(){ key = "battery_percentage",curValue= "80",state = "80" }, |
| | | new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" }, |
| | | new FunctionAttributes(){ key = "alarm_status",curValue= "alarm",state = "alarm" }, |
| | | new FunctionAttributes(){ key = "battery_value",curValue= "200",state = "200" }, |
| | | new FunctionAttributes(){ key = "battery_percentage",curValue= "10",state = "10" }, |
| | | new FunctionAttributes(){ key = "battery_state",curValue= "low",state = "low" }, |
| | | }, |
| | | }); |
| | | |
| | |
| | | |
| | | /// <summary> |
| | | /// 加载设备功能显示区域 |
| | | /// Tag 收藏卡片 |
| | | /// </summary> |
| | | void LoadDeviceFunctionControlZone() |
| | | { |
| | |
| | | |
| | | /// <summary> |
| | | /// 加载功能控制卡片 |
| | | /// Tag 卡片自定义 |
| | | /// </summary> |
| | | void LoadDeviceFunctionDiv(FrameLayout view, Function function) |
| | | { |
| | |
| | | LoadEvent_ControlClothesHanger(function, btnUp, btnDown); |
| | | |
| | | } |
| | | //紧急求助 |
| | | else if (function.spk == SPK.SensorHelp) |
| | | { |
| | | |
| | | } |
| | | |
| | | else |
| | | { |
| | |
| | | |
| | | var functionCategoryCount = 0; |
| | | |
| | | //Tag 分类卡片显示 |
| | | foreach (var item in DB_ResidenceData.Instance.functionTypeList) |
| | | { |
| | | int functionCount = 0; |
| | |
| | | #endif |
| | | break; |
| | | case ShowFunction.Panel: |
| | | |
| | | |
| | | functionCount = FunctionList.List.GetPanelList().Count; |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | if (!MainPage.NoLoginMode) |
| | |
| | | }; |
| | | functionView.AddChidren(btnName); |
| | | |
| | | //Tag 数量显示 |
| | | if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.Music |
| | | && item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter |
| | | && functionCount != 0) |
| | | { |
| | | Button btnFunctionCount = new Button() |
| | | if (item == ShowFunction.Panel) |
| | | { |
| | | X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * functionCount.ToString().Length), |
| | | Y = btnName.Bottom, |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "/" + functionCount, |
| | | }; |
| | | functionView.AddChidren(btnFunctionCount); |
| | | Button btnOpenCount = new Button() |
| | | Button btnFunctionCount = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnName.Bottom, |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = functionCount.ToString(), |
| | | }; |
| | | functionView.AddChidren(btnFunctionCount); |
| | | } |
| | | else |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnName.Bottom, |
| | | Width = Application.GetRealWidth(14 * functionCount.ToString().Length), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = functionOnCount.ToString(), |
| | | Tag = item + "_onCount", |
| | | BorderWidth = 0, |
| | | }; |
| | | functionView.AddChidren(btnOpenCount); |
| | | Button btnFunctionCount = new Button() |
| | | { |
| | | X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * functionCount.ToString().Length), |
| | | Y = btnName.Bottom, |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "/" + functionCount, |
| | | }; |
| | | functionView.AddChidren(btnFunctionCount); |
| | | Button btnOpenCount = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = btnName.Bottom, |
| | | Width = Application.GetRealWidth(14 * functionCount.ToString().Length), |
| | | Height = Application.GetRealHeight(24), |
| | | TextColor = CSS_Color.MainColor, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = functionOnCount.ToString(), |
| | | Tag = item + "_onCount", |
| | | BorderWidth = 0, |
| | | }; |
| | | functionView.AddChidren(btnOpenCount); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | }; |
| | | functionView.AddChidren(btnFunctionViewBg); |
| | | |
| | | //Tag 调试事件判断 |
| | | int functionPageTitleId = 0; |
| | | switch (item) |
| | | { |
| | |
| | | }; |
| | | break; |
| | | case ShowFunction.Panel: |
| | | btnName.TextID = StringId.Panel; |
| | | btnName.TextID = StringId.SmartPanel; |
| | | functionPageTitleId = StringId.SmartPanel; |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | btnName.TextID = StringId.SecurityMonitoring; |
| | |
| | | |
| | | /// <summary> |
| | | /// 加载功能类型控制卡片 |
| | | /// Tag 功能属性显示 |
| | | /// </summary> |
| | | public void LoadFunctionDiv() |
| | | { |
| | |
| | | {//音乐没有开关按钮 |
| | | MusicFragment(); |
| | | } |
| | | else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk) |
| | | || SPK.PanelSpkList().Contains(function.spk)) //传感器没有开关按钮) |
| | | else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)) //传感器没有开关按钮) |
| | | { |
| | | var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState); |
| | | if (powerLowTipAttr != null) |
| | |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | | else if(SPK.PanelSpkList().Contains(function.spk))//智能面板设备 |
| | | { |
| | | var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState); |
| | | if (powerLowTipAttr != null) |
| | | { |
| | | if (powerLowTipAttr.state.ToLower() == "low") |
| | | { |
| | | Button btnTipPowerLow = new Button() |
| | | { |
| | | X = Application.GetRealWidth(307), |
| | | Y = Application.GetRealHeight(70), |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealWidth(24), |
| | | UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png", |
| | | SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png", |
| | | }; |
| | | this.AddChidren(btnTipPowerLow); |
| | | } |
| | | } |
| | | var alarmStatusAttr = function.GetAttribute("alarm_status"); |
| | | if(alarmStatusAttr !=null) |
| | | { |
| | | var btnAlarmStatus = new Button() |
| | | { |
| | | X = Application.GetRealWidth(8 + 10 + 32), |
| | | Y = Application.GetRealHeight(53), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(24), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | Tag = "AlarmStatus" |
| | | }; |
| | | if(alarmStatusAttr.state == "alarm") |
| | | { |
| | | btnAlarmStatus.TextID = StringId.InAlarm; |
| | | btnAlarmStatus.TextColor = CSS_Color.WarningColor; |
| | | } |
| | | bodyDiv.AddChidren(btnAlarmStatus); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (function.spk == SPK.ClothesHanger)//晾衣架 |
| | |
| | | }; |
| | | bodyView.AddChidren(functionListView); |
| | | |
| | | //Tag 显示列表 |
| | | if (titleId == StringId.Lights) |
| | | { |
| | | functionList.AddRange(FunctionList.List.GetLightList()); |
New file |
| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.Stan; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Panel |
| | | { |
| | | public class PanelHelpPage : DeviceFunctionCardCommonForm |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | | |
| | | /// <summary> |
| | | /// 图标 |
| | | /// </summary> |
| | | private IconViewControl btnIcon = null; |
| | | /// <summary> |
| | | /// 文本控件 |
| | | /// </summary> |
| | | private NormalViewControl btnSuctionView = null; |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 初始化_____________________________ |
| | | |
| | | /// <summary> |
| | | /// 初始化白色区域的内容 |
| | | /// </summary> |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | base.ShowColltionButton = false; |
| | | base.SetTitleText(Language.StringByID(StringId.SmartPanel)); |
| | | |
| | | //添加第二索引页 |
| | | this.AddSecondPage(); |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent1(); |
| | | //初始化第二个索引页的内容 |
| | | this.InitFrameWhiteContent2(); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | DriverLayer.Control.Ins.SendReadCommand(device); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化第一个索引页的内容 |
| | | /// </summary> |
| | | private void InitFrameWhiteContent1() |
| | | { |
| | | btnIcon = new IconViewControl(198) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealWidth(146), |
| | | UnSelectedImagePath = "FunctionIcon/Panel/PanelHelpNormalBgIcon.png", |
| | | SelectedImagePath = "FunctionIcon/Panel/PanelHelpAlarmBgIcon.png", |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnIcon); |
| | | |
| | | btnSuctionView = new NormalViewControl(300, 84, true) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = btnIcon.Bottom, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.MainColor, |
| | | SelectedTextColor = CSS_Color.AuxiliaryColor2, |
| | | //BackgroundColor = 0xFFFF0000 |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnSuctionView); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化第二个索引页的内容 |
| | | /// </summary> |
| | | private void InitFrameWhiteContent2() |
| | | { |
| | | var paging = new ArmSensorHistroyPaging(device); |
| | | paging.InitFrame(FrameWhiteCentet2); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 设备状态反馈_______________________ |
| | | |
| | | /// <summary> |
| | | /// 设备状态反馈 |
| | | /// </summary> |
| | | /// <param name="i_LocalDevice"></param> |
| | | public override void DeviceStatuPush(Function i_LocalDevice) |
| | | { |
| | | //不是同一个东西 |
| | | if (this.device.sid != i_LocalDevice.sid) { return; } |
| | | |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 发送各种命令_______________________ |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 刷新界面状态_______________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新界面状态 |
| | | /// </summary> |
| | | private void RefreshFormStatu() |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | var temp = device.attributes.Find((sta) => sta.key == "alarm_status"); |
| | | if (temp != null) |
| | | { |
| | | if (temp.state == "alarm") |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnSuctionView.TextID = StringId.InAlarm; |
| | | btnSuctionView.IsSelected = true; |
| | | } |
| | | else |
| | | { |
| | | btnIcon.IsSelected = false; |
| | | btnSuctionView.TextID = StringId.SensorNormalState; |
| | | btnSuctionView.IsSelected = false; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 一般方法___________________________ |
| | | |
| | | #endregion |
| | | } |
| | | } |