| | |
| | | 573=At home |
| | | 574=Heating and dehumidification |
| | | 575=Select Mode |
| | | |
| | | 576=Open |
| | | 577=Close |
| | | 578=Mechanical Arm |
| | | |
| | | |
| | | |
| | |
| | | 573=在家 |
| | | 574=制热除湿 |
| | | 575=选择模式 |
| | | 576=阀门已关闭 |
| | | 577=阀门已打开 |
| | | 578=机械手 |
| | | |
| | | |
| | | |
| | |
| | | 573=At home |
| | | 574=Heating and dehumidification |
| | | 575=Select Mode |
| | | 576=Открыть |
| | | 577=Закрыть |
| | | 578=Mechanical Arm |
| | | |
| | | |
| | | |
| | |
| | | 115=Electrodomésticos |
| | | 116=Bloqueo inteligente |
| | | 117=Calefacción |
| | | 118=Abrir |
| | | 118=Abrir |
| | | 119=Refrigeración |
| | | 120=Calefacción |
| | | 121=Deshumidificar |
| | |
| | | 573=At home |
| | | 574=Heating and dehumidification |
| | | 575=Select Mode |
| | | |
| | | |
| | | 576=Abrir |
| | | 577=Cerrar |
| | | 578=Mechanical Arm |
| | | |
| | | |
| | | 2532=Visitor Invitation Record |
| | |
| | | 573=At home |
| | | 574=Heating and dehumidification |
| | | 575=Select Mode |
| | | 576=Отворено |
| | | 577=Затвори |
| | | |
| | | |
| | | |
| | |
| | | 1011=Синхронизация |
| | | 1012=Изберете скорост на вятъра |
| | | 1013=степен |
| | | 1014=1014=Моля, потвърдете дали филтърният елемент действително е бил нулиран и работете с оборудването съгласно инструкциите на {0}, за да пренастроите живота на филтърния елемент {0} |
| | | 1014=Моля, потвърдете дали филтърният елемент действително е бил нулиран и работете с оборудването съгласно инструкциите на {0}, за да пренастроите живота на филтърния елемент {0} |
| | | 1015=Ниска степен |
| | | 1016=Средна степен |
| | | 1017=Висока степен |
| | |
| | | <AndroidAsset Include="Assets\h5\static\img\co2-reduction-ic.9c75228c.png" /> |
| | | <AndroidAsset Include="Assets\h5\static\img\equal-plant-ic.7ef6befa.png" /> |
| | | <AndroidAsset Include="Assets\h5\static\img\coal-save-ic.6c5fd125.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensormmv_pose.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\MechanicalArm\MechanicalArmBg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\MechanicalArm\MechanicalArmOnBg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\FunctionBg\MechanicalArmFunctionBg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricalmechanical_arm.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalmechanical_arm_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalmechanical_arm_white.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidResource Include="Resources\values\colors.xml" /> |
| | |
| | | <Folder Include="Assets\Phone\FunctionIcon\CAC\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Panel\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Inverter\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Electrical\MechanicalArm\" /> |
| | | </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" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202211041"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202211081"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <!--友盟--> |
| | | <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> |
| | |
| | | <Folder Include="Resources\Phone\FunctionIcon\CAC\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\Panel\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\Inverter\" /> |
| | | <Folder Include="Resources\Phone\FunctionIcon\Electrical\MechanicalArm\" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <InterfaceDefinition Include="LaunchScreen.storyboard" /> |
| | |
| | | <BundleResource Include="Resources\h5\static\img\co2-reduction-ic.9c75228c.png" /> |
| | | <BundleResource Include="Resources\h5\static\img\equal-plant-ic.7ef6befa.png" /> |
| | | <BundleResource Include="Resources\h5\static\img\coal-save-ic.6c5fd125.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensormmv_pose.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\MechanicalArm\MechanicalArmBg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\MechanicalArm\MechanicalArmOnBg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\FunctionBg\MechanicalArmFunctionBg.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\electricalmechanical_arm.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalmechanical_arm_blue.png" /> |
| | | <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalmechanical_arm_white.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ITunesArtwork Include="iTunesArtwork" /> |
| | |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Video; |
| | | using HDL_ON.UI.UI2.Intelligence.Automation; |
| | | using Newtonsoft.Json; |
| | | using Shared; |
| | | |
| | |
| | | { IsBackground = true }.Start(); |
| | | |
| | | //===================读取逻辑列表========================== |
| | | UI.UI2.Intelligence.Automation.MainView.GetLogicList(true); |
| | | Logic.LogicList.Clear();//主页下拉强制刷新自动化列表 |
| | | //UI.UI2.Intelligence.Automation.MainView.GetLogicList(); |
| | | |
| | | //===================读取可视对讲数据========================== |
| | | //判断是否有可视对讲数据,有则显示可视对讲icon |
| | |
| | | DB_ResidenceData.Instance.SaveResidenceData(); |
| | | |
| | | Entity.DB_ResidenceData.Instance.SupportFVDevice = true; |
| | | |
| | | } |
| | | else if (video.interphoneType == InterphoneType.FREEVIEW.ToString()) |
| | | {//为全视通可视对讲 |
| | | { |
| | | //为全视通可视对讲 |
| | | DB_ResidenceData.Instance.SupportFacePass = true; |
| | | Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; |
| | | Entity.DB_ResidenceData.Instance.SupportFVDevice = true; |
| | |
| | | public static class StringId |
| | | { |
| | | /// <summary> |
| | | /// 机械臂 |
| | | /// </summary> |
| | | public const int MechanicalArm = 578; |
| | | /// <summary> |
| | | /// 阀门已打开 |
| | | /// </summary> |
| | | public const int ValveOpened = 577; |
| | | /// <summary> |
| | | /// 阀门已关闭 |
| | | /// </summary> |
| | | public const int ValveClosed = 576; |
| | | /// <summary> |
| | | /// 选择模式 |
| | | /// </summary> |
| | | public const int SelectMode = 575; |
| | |
| | | case SPK.SensorGas: |
| | | case SPK.HvacCac: |
| | | case SPK.SensorHelp: |
| | | case SPK.MechanicalArm: |
| | | //设备状态推送 |
| | | //状态更新 |
| | | Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status); |
| | | break; |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SenesorMegahealth2: |
| | | case SPK.SensorMmvPose: |
| | | |
| | | var tempStatus = localFunction.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus); |
| | | if (tempStatus != null) |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </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> |
| | | public string version = MainPage.VersionString; |
| | | ///// <summary> |
| | | ///// 软件来源,Evoyo、ON、ON_Plus |
| | | ///// </summary> |
| | | //public string appName = SoftwareType.ON_Plus.ToString(); |
| | | |
| | | public string appCode = "1588071238036582401"; |
| | | /// <summary> |
| | | /// 软件来源,Evoyo、ON、ON_Plus |
| | | /// IOS、Android |
| | | /// </summary> |
| | | public string appName = SoftwareType.ON_Plus.ToString(); |
| | | public string releaseSystem = ""; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | private List<ShowFunction> showFunctions; |
| | | |
| | | /// <summary> |
| | | /// 功能类型列表 |
| | | /// </summary> |
| | | [Newtonsoft.Json.JsonIgnore] |
| | | public List<ShowFunction> functionTypeList = new List<ShowFunction>(); |
| | | public List<ShowFunction> functionTypeList |
| | | { |
| | | get |
| | | { |
| | | if (showFunctions == null) |
| | | { |
| | | showFunctions = new List<ShowFunction> { |
| | | ShowFunction.Light,ShowFunction.AC,ShowFunction.Curtain, |
| | | ShowFunction.FloorHeating,ShowFunction.Music, |
| | | ShowFunction.Electric,ShowFunction.Environmental, |
| | | ShowFunction.EnergyMonitoring, |
| | | ShowFunction.FreshAir,ShowFunction.DoorLock, |
| | | ShowFunction.Panel,ShowFunction.SecurityMonitoring, |
| | | ShowFunction.Sensor,ShowFunction.VideoIntercom, |
| | | ShowFunction.SecurityCenter,ShowFunction.Acst, |
| | | ShowFunction.MechanicalArm }; |
| | | } |
| | | return showFunctions; |
| | | } |
| | | } |
| | | |
| | | static DB_ResidenceData instance; |
| | | public static DB_ResidenceData Instance |
| | |
| | | if(MainPage.NoLoginMode) |
| | | { |
| | | instance = new DB_ResidenceData(); |
| | | instance.functionTypeList.AddRange(new List<ShowFunction> { |
| | | ShowFunction.Light,ShowFunction.AC,ShowFunction.Curtain, |
| | | ShowFunction.FloorHeating,ShowFunction.Music, |
| | | ShowFunction.Electric,ShowFunction.Environmental, |
| | | ShowFunction.EnergyMonitoring, |
| | | ShowFunction.FreshAir,ShowFunction.DoorLock, |
| | | ShowFunction.Panel,ShowFunction.SecurityMonitoring, |
| | | ShowFunction.Sensor,ShowFunction.VideoIntercom, |
| | | ShowFunction.SecurityCenter,ShowFunction.Acst, |
| | | }); |
| | | instance.SaveResidenceData(); |
| | | instance.residenceImage = "Classification/Room/Roombg.png"; |
| | | instance.HomeGateway = new HomeGatewayInfo() |
| | |
| | | ShowFunction.Panel,ShowFunction.SecurityMonitoring, |
| | | ShowFunction.Sensor,ShowFunction.VideoIntercom, |
| | | ShowFunction.SecurityCenter,ShowFunction.Acst, |
| | | ShowFunction.MechanicalArm |
| | | }); |
| | | instance.SupportFacePass = false; |
| | | instance.SaveResidenceData(); |
| | |
| | | /// 绿建科技系统 |
| | | /// </summary> |
| | | Acst = 0x23, |
| | | /// <summary> |
| | | /// 机械臂 |
| | | /// </summary> |
| | | MechanicalArm=0x24, |
| | | |
| | | |
| | | } |
| | |
| | | /// 通用开关 |
| | | /// </summary> |
| | | public const string OtherCommon = "other.common"; |
| | | /// <summary> |
| | | /// 机械手、机械臂 |
| | | /// </summary> |
| | | public const string MechanicalArm = "electrical.mechanical_arm"; |
| | | /// <summary> |
| | | /// 机械手spk列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static List<string> GetMechanicalArmList() |
| | | { |
| | | var list = new List<string>(); |
| | | list.Add(MechanicalArm); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空调科技系统(绿建) |
| | |
| | | public const string SenesorMegahealth = "sensor.megahealth"; |
| | | public const string SenesorMegahealth2 = "sensor.megahealth.zg"; |
| | | /// <summary> |
| | | /// 毫米波传感器(姿态版) |
| | | /// </summary> |
| | | public const string SensorMmvPose = "sensor.mmv_pose"; |
| | | /// <summary> |
| | | /// 紧急呼叫 |
| | | /// </summary> |
| | | public const string SensorHelp = "sensor.help"; |
| | |
| | | spkList.Add(SensorDryContact2); |
| | | spkList.Add(SenesorMegahealth); |
| | | spkList.Add(SenesorMegahealth2); |
| | | spkList.Add(SensorMmvPose); |
| | | return spkList; |
| | | } |
| | | #endregion |
| | |
| | | spkList.Add(ElectricTuyaWaterValve2); |
| | | spkList.Add(ElectricTuyaWeepRobot); |
| | | spkList.Add(ElectricTuyaWeepRobot2); |
| | | spkList.Add(SensorMmvPose); |
| | | spkList.Add(SenesorMegahealth); |
| | | spkList.Add(SenesorMegahealth2); |
| | | return spkList; |
| | |
| | | list.Add(ElectricTuyaWeepRobot2); |
| | | break; |
| | | case BrandType.All3tyBrand: |
| | | list.Add(SenesorMegahealth);//兆观 |
| | | list.Add(SenesorMegahealth2);//兆观 |
| | | break; |
| | | } |
| | | return list; |
| | |
| | | /// 功能列表 |
| | | /// </summary> |
| | | public List<Function> Functions = new List<Function>(); |
| | | /// <summary> |
| | | /// 机械臂列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetMechanicalArmList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.MechanicalArm); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绿建科技系统 |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Curtain\VenetianBlindsPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Curtain\VenetianBlindsPageBLL.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\ChooseIocate.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\MechanicalArmPage.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
|
| | |
| | | SPK.AirFreshStandard,SPK.HvacAirFresh, |
| | | SPK.AirSwitch, |
| | | SPK.PanelSocket,SPK.ElectricSocket, |
| | | SPK.MechanicalArm, |
| | | }; |
| | | |
| | | |
| | |
| | | case SPK.ElectricTuyaWaterValve2:
|
| | | var tyWaterValve = new TuyaWaterValvePage();
|
| | | tyWaterValve.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
|
| | | break; |
| | | case SPK.MechanicalArm:
|
| | | var mechanicalArmPage = new MechanicalArmPage();
|
| | | mechanicalArmPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
|
| | | break;
|
| | | case SPK.ElectricTuyaWeepRobot: |
| | | case SPK.ElectricTuyaWeepRobot2: |
| | |
| | | doorwindowPage.ShowColltionButton = false; |
| | | doorwindowPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | break; |
| | | case SPK.SensorMmvPose: |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SenesorMegahealth2: |
| | | var smPage = new SenesorMegahealthPage(); |
| | |
| | | Y = Application.GetRealHeight(10), |
| | | Width = Application.GetMinRealAverage(28+37), |
| | | Height = Application.GetMinRealAverage(28+19), |
| | | Text = "组合调光", |
| | | TextID = StringId.CombinedDimming, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextColor = CSS_Color.MainColor, |
| | | IsMoreLines = true |
| | |
| | | etAccount.Text = "tf@smarttech.com.ua"; |
| | | etAccount.Text = "13288623489"; |
| | | etAccount.Text = "455740454@qq.com"; |
| | | etAccount.Text = "13799777637"; |
| | | etAccount.Text = "13335135632"; |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | b = !b; |
| | | etPassword.Text = "123456"; |
| | | if(etAccount.Text == "13799777637") |
| | | if(etAccount.Text == "13335135632") |
| | | { |
| | | etPassword.Text = "xiamen1990"; |
| | | etPassword.Text = "borui1123"; |
| | | } |
| | | //etPassword.Text = "Hdl85521566"; |
| | | btnLogin.IsSelected = true; |
| | |
| | | |
| | | |
| | | #if DEBUG |
| | | var mechanicalArm = new Function() |
| | | { |
| | | sid = "mechanicalArm1", |
| | | deviceId = "mechanicalArm1", |
| | | name = Language.CurrentLanguage == "Chinese" ? "机械手" : "Mechanical Arm", |
| | | spk = SPK.MechanicalArm, |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, |
| | | }, |
| | | }; |
| | | mechanicalArm.SaveFunctionFile(); |
| | | |
| | | |
| | | var lightRgbw1 = new Function() |
| | | { |
| | | sid = "light11", |
| | |
| | | }; |
| | | |
| | | |
| | | if (function.spk == SPK.SenesorMegahealth) |
| | | if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png"; |
| | | btnIcon.SelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png"; |
| | |
| | | |
| | | } |
| | | |
| | | else if (function.spk == SPK.SenesorMegahealth) |
| | | else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) |
| | | { |
| | | //btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}.png"; |
| | | //btnIcon.SelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png"; |
| | |
| | | state = function.trait_on_off.curValue.ToString() == "on"; |
| | | } |
| | | } |
| | | else if (function.spk == SPK.SenesorMegahealth) |
| | | else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) |
| | | { |
| | | |
| | | var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus); |
| | |
| | | #endregion |
| | | } |
| | | //更新毫米波传感器状态 |
| | | else if(SPK.SenesorMegahealth == updataFunction.spk) |
| | | else if(SPK.SenesorMegahealth == updataFunction.spk || SPK.SensorMmvPose == updataFunction.spk) |
| | | { |
| | | if (cTag == updataFunction.sid + "_SenesorMegahealth_Status") |
| | | { |
| | |
| | | int functionOnCount = 0; |
| | | switch (item) |
| | | { |
| | | case ShowFunction.MechanicalArm: |
| | | functionCount = FunctionList.List.GetMechanicalArmList().Count; |
| | | functionOnCount = FunctionList.List.GetMechanicalArmList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.Light: |
| | | #region Light |
| | | functionCount = FunctionList.List.GetLightList().Count; |
| | |
| | | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.MechanicalArm: |
| | | btnName.TextID = StringId.MechanicalArm; |
| | | Button btnMaPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(120), |
| | | Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | SelectedImagePath = "Public/PowerOpen.png", |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | IsSelected = functionOnCount > 0, |
| | | Tag = item + "_AllControl", |
| | | }; |
| | | functionView.AddChidren(btnMaPower); |
| | | |
| | | btnMaPower.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadEvent_SwitchFunction(btnMaPower, item, functionView); |
| | | }; |
| | | functionPageTitleId = StringId.MechanicalArm; |
| | | |
| | | break; |
| | | case ShowFunction.AC: |
| | | #region AC |
| | | btnName.TextID = StringId.AC; |
| | |
| | | |
| | | |
| | | |
| | | else if (function.spk == SPK.SenesorMegahealth) |
| | | else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose ) |
| | | { |
| | | var btnStatus = new Button() |
| | | { |
| | |
| | | bodyDiv.AddChidren(btnCollectionIcon); |
| | | } |
| | | |
| | | if(function.spk == SPK.SenesorMegahealth) |
| | | if(function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) |
| | | { |
| | | bodyDiv.AddChidren(btnCollectionIcon); |
| | | } |
| | |
| | | { |
| | | functionList.AddRange(FunctionList.List.GetAirFreshList()); |
| | | } |
| | | functionList.OrderByDescending(o => o.controlCounter).ToList(); |
| | | else if(titleId == StringId.MechanicalArm) |
| | | { |
| | | functionList.AddRange(FunctionList.List.GetMechanicalArmList()); |
| | | } |
| | | functionList = functionList.OrderByDescending(o => o.controlCounter).ToList(); |
| | | |
| | | ShowFunctionRow(functionList); |
| | | |
| | |
| | | break; |
| | | //毫米波传感器(自研北邮) |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SensorMmvPose: |
| | | { |
| | | |
| | | LogicView.FunTypeView view1 = new LogicView.FunTypeView(); |
| | |
| | | } |
| | | break; |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SensorMmvPose: |
| | | { |
| | | string key = this.GetKey(dicList); |
| | | string value = this.GetValue(dicList); |
| | |
| | | } |
| | | break; |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SensorMmvPose: |
| | | { |
| | | foreach (var dic in dicList) |
| | | { |
| | |
| | | var list2 = this.GetVideoDeviceList(); |
| | | list.AddRange(list1); |
| | | list.AddRange(list2); |
| | | GetTestDevice(ref list, true); |
| | | GetTestDevice(ref list, false); |
| | | return list; |
| | | } |
| | | /// <summary> |
| | |
| | | case SPK.SensorPir: |
| | | case SPK.SensorDoorWindow: |
| | | case SPK.SensorUtrasonic: |
| | | case SPK.SensorMmvPose: |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SenesorMegahealth2: |
| | | case SPK.SensorEnvironment: |
| | |
| | | || device.spk == SPK.SensorPir |
| | | || device.spk == SPK.SensorDoorWindow |
| | | || device.spk == SPK.SensorUtrasonic |
| | | || device.spk == SPK.SensorMmvPose |
| | | || device.spk == SPK.SenesorMegahealth |
| | | || device.spk == SPK.SenesorMegahealth2 |
| | | || device.spk == SPK.SensorEnvironment |
| | |
| | | functionTypeList.Add(SPK.SensorPir); |
| | | functionTypeList.Add(SPK.SensorDoorWindow); |
| | | functionTypeList.Add(SPK.SensorUtrasonic); |
| | | functionTypeList.Add(SPK.SensorMmvPose); |
| | | functionTypeList.Add(SPK.SenesorMegahealth); |
| | | functionTypeList.Add(SPK.SenesorMegahealth2); |
| | | functionTypeList.Add(SPK.SensorEnvironment); |
| | |
| | | functionTypeList.Add(SPK.SensorPir); |
| | | functionTypeList.Add(SPK.SensorDoorWindow); |
| | | functionTypeList.Add(SPK.SensorUtrasonic); |
| | | functionTypeList.Add(SPK.SensorMmvPose); |
| | | functionTypeList.Add(SPK.SenesorMegahealth); |
| | | functionTypeList.Add(SPK.SenesorMegahealth2); |
| | | functionTypeList.Add(SPK.SensorEnvironment); |
| | |
| | | deviceTypeList.Add(SPK.SensorPir); |
| | | deviceTypeList.Add(SPK.SensorDoorWindow); |
| | | deviceTypeList.Add(SPK.SensorUtrasonic); |
| | | deviceTypeList.Add(SPK.SensorMmvPose); |
| | | deviceTypeList.Add(SPK.SenesorMegahealth); |
| | | deviceTypeList.Add(SPK.SenesorMegahealth2); |
| | | deviceTypeList.Add(SPK.SensorEnvironment); |
| | |
| | | /// <summary> |
| | | /// 获取逻辑列表 |
| | | /// </summary> |
| | | public static void GetLogicList(bool needRefresh = false)//增加强制刷新 |
| | | public static void GetLogicList() |
| | | { |
| | | if (Logic.LogicList.Count != 0 || !needRefresh) |
| | | if (Logic.LogicList.Count != 0) |
| | | { |
| | | //自动化列表为0才去获取自动化列表; |
| | | return; |
| | |
| | | break; |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SenesorMegahealth2: |
| | | case SPK.SensorMmvPose: |
| | | var form1 = new AddSenesorMegahealthDirection1Page(); |
| | | form1.AddForm(device); |
| | | form1.AddDeviceEvent = (functionObj) => { |
| | |
| | | contentView.BeginHeaderRefreshing(); |
| | | }); |
| | | break; |
| | | case SPK.SensorMmvPose: |
| | | case SPK.SenesorMegahealth: |
| | | case SPK.SenesorMegahealth2: |
| | | var smPage = new SenesorMegahealthManagerPage(); |
| | |
| | | Utlis.ShowTip(text + "\n" + Language.StringByID(StringId.CopySuccess)); |
| | | } |
| | | |
| | | |
| | | bool isPublishingMode() |
| | | { |
| | | DAL.Server.HttpServerRequest http = new DAL.Server.HttpServerRequest(); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.Stan; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// 机械手控制页面 |
| | | /// </summary> |
| | | public class MechanicalArmPage : DeviceFunctionCardCommonForm |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | | /// <summary> |
| | | /// 图片控件 |
| | | /// </summary> |
| | | private PicViewControl btnPictrue = null; |
| | | /// <summary> |
| | | /// 开关状态提示控件 |
| | | /// </summary> |
| | | private Button btnTipStatus = null; |
| | | |
| | | /// <summary> |
| | | /// 开关控件 |
| | | /// </summary> |
| | | private IconViewControl btnSwitch = null; |
| | | #endregion |
| | | |
| | | #region ■ 初始化_____________________________ |
| | | |
| | | /// <summary> |
| | | /// 初始化白色区域的内容 |
| | | /// </summary> |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | base.SetTitleText(Language.StringByID(StringId.WaterValve)); |
| | | |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent1(); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Control.Ins.ReadFunctionsInfo(new List<string>() { device.deviceId }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化第一个索引页的内容 |
| | | /// </summary> |
| | | private void InitFrameWhiteContent1() |
| | | { |
| | | btnTipStatus = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Y = Application.GetRealHeight(79), |
| | | Width = Application.GetRealWidth(100), |
| | | Height = Application.GetRealHeight(34), |
| | | BackgroundColor = 0x171B2D4D, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Radius = (uint)Application.GetRealHeight(17), |
| | | TextID = StringId.ValveClosed, |
| | | }; |
| | | FrameWhiteCentet1.AddChidren(btnTipStatus); |
| | | |
| | | //图片控件 |
| | | this.btnPictrue = new PicViewControl(327, 327); |
| | | btnPictrue.Y = Application.GetRealHeight(127); |
| | | btnPictrue.Gravity = Gravity.CenterHorizontal; |
| | | btnPictrue.UnSelectedImagePath = "FunctionIcon/Electrical/MechanicalArm/MechanicalArmBg.png"; |
| | | btnPictrue.SelectedImagePath = "FunctionIcon/Electrical/MechanicalArm/MechanicalArmOnBg.png"; |
| | | FrameWhiteCentet1.AddChidren(btnPictrue); |
| | | btnPictrue.ButtonClickEvent += (sender, e) => |
| | | { |
| | | //发送开关命令 |
| | | this.SendSwitchComand(); |
| | | }; |
| | | |
| | | //开关图标 |
| | | this.btnSwitch = new IconViewControl(40); |
| | | btnSwitch.Gravity = Gravity.CenterHorizontal; |
| | | btnSwitch.Y = Application.GetRealHeight(468); |
| | | btnSwitch.UnSelectedImagePath = "Public/PowerClose.png"; |
| | | btnSwitch.SelectedImagePath = "Public/PowerOpen.png"; |
| | | FrameWhiteCentet1.AddChidren(btnSwitch); |
| | | btnSwitch.ButtonClickEvent += (sender, e) => |
| | | { |
| | | //发送开关命令 |
| | | this.SendSwitchComand(); |
| | | }; |
| | | |
| | | var pack = new DAL.Server.HttpServerRequest().GetDeviceInfoList(new List<string>() { base.device.deviceId }); |
| | | } |
| | | #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 ■ 发送各种命令_______________________ |
| | | |
| | | /// <summary> |
| | | /// 发送开关命令 |
| | | /// </summary> |
| | | private void SendSwitchComand() |
| | | { |
| | | //if (!device.online) |
| | | //{ |
| | | // new Tip() |
| | | // { |
| | | // CloseTime = 1, |
| | | // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), |
| | | // Direction = AMPopTipDirection.None, |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //} |
| | | this.btnPictrue.CanClick = false; |
| | | this.btnSwitch.CanClick = false; |
| | | |
| | | string statu = this.btnSwitch.IsSelected == true ? "off" : "on"; |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | { |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add(FunctionAttributeKey.OnOff, statu); |
| | | Control.Ins.SendWriteCommand(this.device, dic, true); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | this.btnPictrue.CanClick = true; |
| | | this.btnSwitch.CanClick = true; |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ 刷新界面状态_______________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新界面状态 |
| | | /// </summary> |
| | | private void RefreshFormStatu() |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var onoffStatu = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.OnOff); |
| | | |
| | | if (onoffStatu != null) |
| | | { |
| | | if (onoffStatu.state == "on") |
| | | { |
| | | btnTipStatus.TextID = StringId.ValveOpened; |
| | | btnTipStatus.TextColor = 0xFF4BC803; |
| | | btnTipStatus.BackgroundColor = 0x174BC803; |
| | | } |
| | | else |
| | | { |
| | | btnTipStatus.TextID = StringId.ValveClosed; |
| | | btnTipStatus.TextColor = CSS_Color.FirstLevelTitleColor; |
| | | btnTipStatus.BackgroundColor = 0x171B2D4D; |
| | | } |
| | | this.btnSwitch.IsSelected = this.btnPictrue.IsSelected = onoffStatu.state.ToString() == "on"; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (basePage.sensorDiyView_Temp != null) |
| | | basePage.sensorDiyView_Temp.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.room_temp.ToString()).state); |
| | | basePage.sensorDiyView_Temp.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.room_temp.ToString()).state,true); |
| | | if (basePage.sensorDiyView_Humi != null) |
| | | basePage.sensorDiyView_Humi.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.room_humidity.ToString()).state); |
| | | basePage.sensorDiyView_Humi.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.room_humidity.ToString()).state, true); |
| | | if (basePage.sensorDiyView_Pm25 != null) |
| | | basePage.sensorDiyView_Pm25.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.pm25.ToString()).state); |
| | | basePage.sensorDiyView_Pm25.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.pm25.ToString()).state,false); |
| | | if (basePage.sensorDiyView_Co2 != null) |
| | | basePage.sensorDiyView_Co2.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.co2.ToString()).state); |
| | | basePage.sensorDiyView_Co2.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.co2.ToString()).state, false); |
| | | if (basePage.sensorDiyView_Tvoc != null) |
| | | basePage.sensorDiyView_Tvoc.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.tvoc.ToString()).state); |
| | | basePage.sensorDiyView_Tvoc.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.tvoc.ToString()).state, false); |
| | | if (basePage.sensorDiyView_EleDay != null) |
| | | basePage.sensorDiyView_EleDay.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.day_electricity.ToString()).state); |
| | | basePage.sensorDiyView_EleDay.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.day_electricity.ToString()).state, false); |
| | | if (basePage.sensorDiyView_EleMonth != null) |
| | | basePage.sensorDiyView_EleMonth.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.month_electricity.ToString()).state); |
| | | basePage.sensorDiyView_EleMonth.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.month_electricity.ToString()).state, false); |
| | | if (basePage.sensorDiyView_EleActivePower != null) |
| | | basePage.sensorDiyView_EleActivePower.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.active_power.ToString()).state); |
| | | basePage.sensorDiyView_EleActivePower.UpdateValue(temp.GetAttribute(AcstParent_AttrEnum.active_power.ToString()).state, false); |
| | | |
| | | |
| | | |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = color, |
| | | TextSize = 20, |
| | | Text = value + unitString, |
| | | Text = value, |
| | | }; |
| | | contentView.AddChidren(btnValue); |
| | | |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = 0xFF949AA5, |
| | | TextSize = 12, |
| | | Text = text, |
| | | Text = text + "(" + unitString+")", |
| | | }; |
| | | contentView.AddChidren(btnText); |
| | | |
| | | |
| | | if (btnValue.Text.Length > 7) |
| | | { |
| | | btnValue.TextSize = 16; |
| | | } |
| | | else if (btnValue.Text.Length > 9) |
| | | { |
| | | btnValue.TextSize = 12; |
| | | } |
| | | |
| | | } |
| | | |
| | | public void UpdateValue(string value) |
| | | public void UpdateValue(string value,bool isInt) |
| | | { |
| | | if (value.Contains(".")) |
| | | if (value.Contains(".") && isInt) |
| | | { |
| | | value = value.Remove(value.IndexOf('.'), value.Length - value.IndexOf('.')); |
| | | } |
| | | if (btnValue.Text.Length > 8) |
| | | { |
| | | btnValue.TextSize = 16; |
| | | }else if (btnValue.Text.Length > 10) |
| | | { |
| | | btnValue.TextSize = 12; |
| | | } |
| | | btnValue.Text = value + unitString; |
| | | } |
| | |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | if (device.spk == SPK.SenesorMegahealth|| device.spk == SPK.SenesorMegahealth2) |
| | | if (device.spk == SPK.SenesorMegahealth || device.spk == SPK.SensorMmvPose || device.spk == SPK.SenesorMegahealth2) |
| | | { |
| | | DriverLayer.Control.Ins.SendReadCommand(device, true); |
| | | } |
| | |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | if (device.spk == SPK.SenesorMegahealth|| device.spk == SPK.SenesorMegahealth2) |
| | | { |
| | | DriverLayer.Control.Ins.SendReadCommand(device, true); |
| | | } |
| | | DriverLayer.Control.Ins.SendReadCommand(device, true); |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | else if(function.spk == SPK.SenesorMegahealth) |
| | | else if(function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) |
| | | { |
| | | contentView.AddChidren(new Button |
| | | { |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </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> |