.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,31 +1,54 @@ <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotHistoryPage.cs"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.26569F89-0BA9-4C06-81F2-764A3AF2E1B7" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control_Udp.cs"> <Files> <File FileName="HDL_ON/Common/HDLCommon.cs" Line="545" Column="14" /> <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="482" Column="31" /> <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="9" Column="1" /> <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="195" Column="41" /> <File FileName="HDL_ON/UI/MainPage.cs" Line="23" Column="46" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs" Line="1" Column="1" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaFanPage.cs" Line="1" Column="1" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs" Line="273" Column="38" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotHistoryPage.cs" Line="14" Column="9" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneAddPage.cs" Line="36" Column="20" /> <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" /> <File FileName="HDL-ON_Android/Application.cs" /> <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" /> <File FileName="HDL_ON/UI/MainPage.cs" /> <File FileName="HDL_ON/Common/R.cs" /> <File FileName="HDL-ON_Android/Assets/Language.ini" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs" Line="300" Column="56" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneCatchFunctionListPage.cs" Line="104" Column="56" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs" Line="634" Column="40" /> <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="300" Column="1" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" Line="147" Column="36" /> <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="159" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="DAL" expanded="True"> <Node name="DriverLayer" expanded="True"> <Node name="Control_Udp.cs" selected="True" /> </Node> </Node> <Node name="Entity" expanded="True"> <Node name="Function" expanded="True" /> </Node> <Node name="UI" expanded="True"> <Node name="UI0-Public" expanded="True" /> <Node name="UI2" expanded="True"> <Node name="FuntionControlView" expanded="True"> <Node name="Electrical" expanded="True"> <Node name="TuyaWeepRobotHistoryPage.cs" selected="True" /> <Node name="1-HomePage" expanded="True" /> <Node name="2-Classification" expanded="True" /> <Node name="3-Intelligence" expanded="True"> <Node name="Scene" expanded="True" /> </Node> <Node name="4-PersonalCenter" expanded="True"> <Node name="MemberManagement" expanded="True" /> </Node> <Node name="FuntionControlView" expanded="True" /> </Node> </Node> </Node> </Node> <Node name="HDL-ON_Android" expanded="True"> <Node name="Assets" expanded="True" /> </Node> <Node name="HDL-ON_iOS" expanded="True" /> </Node> @@ -39,11 +62,13 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" line="313" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneCatchFunctionListPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneCatchFunctionListPage.cs" line="210" column="1" /> </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> DLL/Shared.Droid.dllBinary files differ
DLL/Shared.IOS.dllBinary files differ
HDL-ON_Android/Application.cs
@@ -85,7 +85,8 @@ } catch (Exception ex) { Console.WriteLine(ex.Message); MainPage.Log(ex.Message); BaseActivity.VerifyDateTime = DateTime.MaxValue; } }; HDL-ON_Android/Assets/Language.ini
@@ -328,7 +328,7 @@ 324=Scene delay 325=Delay setting 326=Delay 327=Capture the scene 327=Catch Scene 328=Film scene 329=General 330=Automatic mode @@ -423,10 +423,13 @@ 436=Added Devices 437=Device List 438=humidity:{0}% air:{1} wind:{2} 439=Real time power consumption: {0} kw 440=Next step 441=Please select all areas of capture status 442=Generate scene 1000=Indoor Humidity 1000=Room Humidity 1001=V-chip 1002=Anion 1003=Sterilization @@ -1200,6 +1203,9 @@ 437=设备列表 438=湿度:{0}% 空气:{1} 风速:{2}级 439=实时功耗: {0}kW 440=下一步 441=请选择捕获状态的区域 442=生成场景 1000=室内湿度 1001=童锁 @@ -1290,7 +1296,6 @@ 1086=风速3档 4000=可视对讲 4001=通话记录 4002=*云端照片只保留30天 @@ -1306,7 +1311,6 @@ 4012=配置参数有异常! 4013=门禁二维码 4014=临时密码 5000=音乐 5001=组合 HDL-ON_Android/Assets/Phone/Public/RightSlideBackIcon.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -1112,6 +1112,7 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\airFreshjinmao.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\airFreshjinmao_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\airFreshjinmao_white.png" /> <AndroidAsset Include="Assets\Phone\Public\RightSlideBackIcon.png" /> </ItemGroup> <ItemGroup> <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" /> HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104011" android:versionName="1.2.202104011" package="com.hdl.onpro"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104131" android:versionName="1.2.202104131" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> <!-- 可视对讲权限--> <uses-permission android:name="android.permission.CAMERA" /> HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -78,10 +78,6 @@ <Reference Include="System.Numerics" /> <Reference Include="System.Numerics.Vectors" /> <Reference Include="System.Web.Services" /> <Reference Include="Shared.IOS"> <HintPath>..\DLL\Shared.IOS.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="Shared.IOS.TBL"> <HintPath>..\DLL\Shared.IOS.TBL.dll</HintPath> <Private>False</Private> @@ -97,6 +93,9 @@ </Reference> <Reference Include="Shared.IOS.ESVideoOnSDK"> <HintPath>..\DLL\FL\iOS\Shared.IOS.ESVideoOnSDK.dll</HintPath> </Reference> <Reference Include="Shared.IOS"> <HintPath>..\DLL\Shared.IOS.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -1219,6 +1218,7 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\airFreshjinmao.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\airFreshjinmao_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\airFreshjinmao_white.png" /> <BundleResource Include="Resources\Phone\Public\RightSlideBackIcon.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> HDL-ON_iOS/Info.plist
@@ -104,9 +104,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> <string>1.2.202104011</string> <string>1.2.202104131</string> <key>CFBundleVersion</key> <string>202104011</string> <string>202104131</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> HDL-ON_iOS/Resources/Language.ini
@@ -423,6 +423,9 @@ 436=Added Devices 437=Device List 438=humidity:{0}% air:{1} wind:{2} 439=Real time power consumption: {0} kw 440=Next step 441=Please select all areas of capture status 1000=Room Humidity 1001=V-chip @@ -1198,6 +1201,8 @@ 437=设备列表 438=湿度:{0}% 空气:{1} 风速:{2}级 439=实时功耗: {0}kW 440=下一步 441=请选择捕获状态的区域 1000=室内湿度 1001=童锁 HDL-ON_iOS/Resources/Phone/Public/RightSlideBackIcon.png
HDL_ON/Common/R.cs
@@ -4,6 +4,9 @@ { public static class StringId { public const int GenerateScene = 442; public const int ChooseCatchZone = 441; public const int NextStep = 440; public const int RealTimePowerConsumption = 439; public const int EnvirSensorValueTip = 438; public const int DeviceList = 437; HDL_ON/DAL/DriverLayer/Control.cs
@@ -336,7 +336,7 @@ } } MainPage.Log($"发送数据:{Newtonsoft.Json.JsonConvert.SerializeObject(commandDictionary)}"); //MainPage.Log($"发送数据:{Newtonsoft.Json.JsonConvert.SerializeObject(commandDictionary)}"); ///第三方涂鸦设备统一使用远程控制 switch(function.spk) HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1878,6 +1878,7 @@ d.Add("actions", actionObjs); var requestJson = HttpUtil.GetSignRequestJson(d); MainPage.Log($"{requestJson}"); return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_ControlDevice, requestJson); } /// <summary> HDL_ON/Entity/DB_ResidenceData.cs
@@ -94,7 +94,8 @@ ShowFunction.EnergyMonitoring, ShowFunction.FreshAir,ShowFunction.DoorLock, ShowFunction.Panel,ShowFunction.SecurityMonitoring, ShowFunction.Sensor,ShowFunction.VideoIntercom ShowFunction.Sensor,ShowFunction.VideoIntercom, ShowFunction.SecurityCenter }); instance.SaveResidenceData(); } HDL_ON/Entity/Enumerative/MyEnum.cs
@@ -137,20 +137,39 @@ /// </summary> Weather = 0x14, /// <summary> /// 门锁 /// </summary> DoorLock = 0x15, /// <summary> /// 电器 /// </summary> Electric = 0x16, /// <summary> /// 能源监控 /// </summary> EnergyMonitoring = 0x17, /// <summary> /// 环境数据 /// </summary> Environmental = 0x18, /// <summary> /// 面板 /// </summary> Panel = 0x19, /// <summary> /// 安防监控 /// </summary> SecurityMonitoring = 0x20, /// <summary> /// 可视对讲 /// </summary> VideoIntercom = 0x21, /// <summary> /// 安防中心 /// </summary> SecurityCenter = 0x22, } HDL_ON/Entity/Function/Light.cs
@@ -15,6 +15,10 @@ { var color = function.GetAttrState(FunctionAttributeKey.RGB).Split(","); if(color.Length!= 3) { color = new string[] {"100", "100", "100" }; } int redColor = 0; int greenColor = 0; int blueColor = 0; HDL_ON/Entity/Function/Scene.cs
@@ -2,6 +2,7 @@ using System.Collections.Generic; using HDL_ON.Common; using HDL_ON.DAL.Server; using HDL_ON.UI; using Shared; namespace HDL_ON.Entity @@ -368,6 +369,8 @@ /// 云端数据修改的最后时间 /// </summary> public string modifyTime = ""; } /// <summary> /// 场景功能对象 @@ -409,6 +412,54 @@ return localFunction; } /// <summary> /// 解析场景功能数据 /// </summary> /// <param name="sceneFunction"></param> public string GetFunctionScnenInfo() { var sceneFunctionInfo = ""; foreach (var sfs in status) { if (sfs.key == FunctionAttributeKey.OnOff) { if (sfs.value == "off") return Language.StringByID(StringId.Close); } } sceneFunctionInfo += Language.StringByID(StringId.Open) + " "; var modeState = status.Find((obj) => obj.key == FunctionAttributeKey.Mode); var tempState = status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp); var fanState = status.Find((obj) => obj.key == FunctionAttributeKey.FanSpeed); if (modeState != null) { sceneFunctionInfo += modeState.GetValueText() + " "; } if (tempState != null) { sceneFunctionInfo += tempState.GetValueText() + " "; sceneFunctionInfo += tempState.GetUintString(); } if (fanState != null) { sceneFunctionInfo += fanState.GetValueText() + " "; } var briState = status.Find((obj) => obj.key == FunctionAttributeKey.Brightness); if (briState != null) { sceneFunctionInfo += briState.value + "%"; } var perState = status.Find((obj) => obj.key == FunctionAttributeKey.Percent); if (perState != null) { sceneFunctionInfo += perState.value + "%"; } return sceneFunctionInfo; } } /// <summary> HDL_ON/HDL_ON.projitems
@@ -395,6 +395,8 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoSend.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoMainView.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneAddPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\CatchSceneCatchFunctionListPage.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)DAL\" /> @@ -438,5 +440,6 @@ <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\" /> <Folder Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Arm\" /> </ItemGroup> </Project> HDL_ON/UI/MainPage.cs
@@ -20,7 +20,7 @@ /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.2.0401"; public static string VersionString = "1.2.0413"; ///// <summary> ///// 客户端类型 ///// </summary> @@ -67,6 +67,14 @@ ///// </summary> //public static int Company = 0; /// <summary> /// 右滑后退提示按钮 /// </summary> public static Button BtnBackIcon; /// <summary> /// 后退右滑了多少距离,超过一定距离才触发后退事件 /// </summary> public static int StartX = 0; /// <summary> /// 是否全面屏手机 /// </summary> @@ -190,7 +198,7 @@ waitPage.RemoveFromParent(); BaseView.RemoveAll(); BasePageView = new PageLayout(); BasePageView.ScrollEnabled = true; BasePageView.ScrollEnabled = false; BasePageView.IsShowPoint = false; BasePageView.PageChange = (sender, e) => { @@ -212,16 +220,80 @@ // BasePageView.GetChildren(BasePageView.ChildrenCount - 1).RemoveFromParent(); //} }; BasePageView.MouseDownEventHandler += (sender, e) => { BasePageView.ScrollEnabled = true; }; BasePageView.MouseUpEventHandler += (sender, e) => { BasePageView.ScrollEnabled = false; }; BaseView.AddChidren(BasePageView); var backView = new FrameLayout() { Y = Application.GetRealHeight(100), Width = Application.GetRealWidth(10), Height = Application.GetRealHeight(440), }; BaseView.AddChidren(backView); BtnBackIcon = new Button() { X = -Application.GetRealWidth(100), Gravity = Gravity.CenterVertical, Width = Application.GetRealWidth(88/2), Height = Application.GetRealHeight(56/2), UnSelectedImagePath = "Public/RightSlideBackIcon.png" }; BaseView.AddChidren(BtnBackIcon); backView.MouseMoveEventHandler = (sender, e) => { if (BasePageView.ChildrenCount <= 1) { return; } MainPage.Log($"move:{e.X}"); if (StartX == 0 && e.X < 30) { StartX = (int)e.X; } if (StartX < 30 ) { if (e.X < Application.GetRealWidth(100)) { BtnBackIcon.X = (int)e.X - Application.GetRealWidth(100); } } }; backView.MouseDownEventHandler = (sender, e) => { if (BasePageView.ChildrenCount <= 1) { return; } MainPage.Log($"down:{e.X}"); StartX = (int)e.X; BtnBackIcon.Y = (int)e.Y + Application.GetRealHeight(50); }; backView.MouseUpEventHandler = (sender, e) => { MainPage.Log($"up{e.X}"); StartX = 0; BtnBackIcon.X = -Application.GetRealWidth(100); if (e.X > 70) { if (BasePageView.ChildrenCount > 1) { BasePageView.PageIndex = BasePageView.ChildrenCount - 2; } } }; backView.MouseUpOutsideEventHandler=(sender, e) => { MainPage.Log($"up{e.X}"); StartX = 0; BtnBackIcon.X = -Application.GetRealWidth(100); if (e.X > 70) { if (BasePageView.ChildrenCount > 1) { BasePageView.PageIndex = BasePageView.ChildrenCount - 2; } } }; //跳转页面---- var UserBasePage = new UserPage(); HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -208,7 +208,7 @@ //etAccount.Text = "13168123446"; //etAccount.Text = "13602944661";//kx etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 //15971583093 gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试 //etAccount.Text = "15971583093";// gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试 } b = !b; etPassword.Text = "123456"; HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -506,6 +506,11 @@ functionCount = 1; } break; case ShowFunction.SecurityCenter: #if DEBUG functionCount = 1; #endif break; } @@ -563,7 +568,7 @@ if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.EnergyMonitoring && item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter && functionCount != 0) { Button btnFunctionCount = new Button() @@ -815,7 +820,7 @@ } //界面跳转--音乐跳转自己的界面--环境跳转自己的界面 if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring && ShowFunction.EnergyMonitoring!= item && ShowFunction.VideoIntercom != item) && ShowFunction.EnergyMonitoring!= item && ShowFunction.VideoIntercom != item && ShowFunction.SecurityCenter != item) { btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -61,67 +61,6 @@ } LoadDiv(); //switch (function.spk) //{ // case SPK.CurtainSwitch: // btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; // break; // case SPK.CurtainTrietex: // btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/MotorCurtainIcon.png"; // break; // case SPK.CurtainRoller: // btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/RollingShutterIcon.png"; // break; // case SPK.SensorPir: // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorPirIcon.png"; // break; // case SPK.SensorWater: // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorWaterImmersionIcon.png"; // break; // case SPK.SensorSmoke: // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorSmokeIcon.png"; // break; // case SPK.SensorDoorWindow: // btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/ArmSensorDoorIcon.png"; // break; // case SPK.MusicStandard: // btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png"; // break; // case SPK.ClothesHanger: // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png"; // break; // case SPK.ElectricSocket: // btnIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketThinIcon.png"; // break; // case SPK.ElectricFan: // case SPK.ElectricTuyaFan: // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanThinIcon.png"; // break; // case SPK.ElectricTV: // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVThinIcon.png"; // break; // case SPK.ElectricTuyaAirCleaner: // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/AirCleanerThiinIcon.png"; // break; // case SPK.ElectricTuyaWeepRobot: // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobotThinIcon.png"; // break; // case SPK.ElectricTuyaWaterValve: // btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WaterValve/WaterValveIcon.png"; // break; // case SPK.AcStandard: // btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; // break; // case SPK.AcIr: // btnIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; // break; // case SPK.FloorHeatStandard: // btnIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png"; // break; // default: // btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; // break; //} btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; if (function.Spk_Prefix == FunctionCategory.Curtain//窗帘没有开关按钮 HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneAddPage.cs
New file @@ -0,0 +1,437 @@ using System; using System.Collections.Generic; using HDL_ON.Entity; using HDL_ON.UI.CSS; using Shared; namespace HDL_ON.UI { public class CatchSceneAddPage : FrameLayout { FrameLayout bodyView; private ImageView addSceneImageView; private FrameLayout sceneNameView; private Button btnEditSceneNameIcon; private Button btnSceneName; private FrameLayout belongToZoneRow; private Button btnBelongToZoneRight; private Button btnZoneName; private Scene scene; private Button btnChooseZoneViewTitle; private VerticalScrolViewLayout functionListView; private Button btnComplete; /// <summary> /// 捕捉的区域列表 /// </summary> private List<Room> catchRooms = new List<Room>(); /// <summary> /// 回调更新 /// </summary> Action backAction; public CatchSceneAddPage(Scene s,Action a) { bodyView = this; scene = s; backAction =()=>{ a(); RemoveFromParent(); }; } public void LoadPage() { new TopViewDiv(bodyView, Language.StringByID(StringId.CatchScene)).LoadTopView(); bodyView.BackgroundColor = CSS_Color.BackgroundColor; var contentView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), Height = Application.GetRealHeight(603 - 50), }; bodyView.AddChidren(contentView); contentView.AddChidren(new Button() { Height = Application.GetRealWidth(12), BackgroundColor = CSS_Color.MainBackgroundColor, }); var sceneBgView = new FrameLayout() { Height = Application.GetRealWidth(188 + 24), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(sceneBgView); addSceneImageView = new ImageView() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(252), Height = Application.GetRealWidth(184), Radius = (uint)Application.GetRealWidth(12), }; sceneBgView.AddChidren(addSceneImageView); //2020-12-03 修改图片加载方法 ImageUtlis.Current.LoadLocalOrNetworkImages(scene.ImagePath, addSceneImageView); #region 场景名称row sceneNameView = new FrameLayout() { Height = Application.GetRealWidth(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(sceneNameView); Button btnSceneTitle = new Button() { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(90), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, TextID = StringId.SceneName, }; sceneNameView.AddChidren(btnSceneTitle); btnEditSceneNameIcon = new Button() { X = Application.GetRealWidth(333), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "Public/EditIcon.png", }; sceneNameView.AddChidren(btnEditSceneNameIcon); btnSceneName = new Button() { X = Application.GetRealWidth(100), Width = Application.GetRealWidth(230), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, Text = scene.name }; sceneNameView.AddChidren(btnSceneName); Button btnSceneNameLine = new Button() { Y = Application.GetRealWidth(49), Gravity = Gravity.CenterHorizontal, Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.BackgroundColor, }; sceneNameView.AddChidren(btnSceneNameLine); #endregion #region 所属区域row belongToZoneRow = new FrameLayout() { Y = sceneNameView.Bottom, Height = Application.GetRealWidth(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(belongToZoneRow); Button btnBelongToTitle = new Button() { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(90), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, TextID = StringId.LocationManagement, }; belongToZoneRow.AddChidren(btnBelongToTitle); btnBelongToZoneRight = new Button() { X = Application.GetRealWidth(339), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "Public/Right.png", }; belongToZoneRow.AddChidren(btnBelongToZoneRight); btnZoneName = new Button() { X = Application.GetRealWidth(100), Width = Application.GetRealWidth(230), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.TextFontSize, Text = scene.GetRoomListName() == "" ? Language.StringByID(StringId.WholeZone) : scene.GetRoomListName() }; belongToZoneRow.AddChidren(btnZoneName); contentView.AddChidren(new Button() { Y = belongToZoneRow.Bottom, Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor, }); #endregion #region 场景延时row /* if (DB_ResidenceData.Instance.GatewayType == 1) { FrameLayout sceneDelayRow = new FrameLayout() { Y = sceneNameView.Bottom, Height = Application.GetRealWidth(50), }; contentView.AddChidren(sceneDelayRow); Button btnSceneDelayRight = new Button() { X = Application.GetRealWidth(339), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "Public/Right.png", }; sceneDelayRow.AddChidren(btnSceneDelayRight); var btnSceneDelayInfo = new Button() { Width = Application.GetRealWidth(327), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = scene.GetDelayText() }; sceneDelayRow.AddChidren(btnSceneDelayInfo); Button btnSceneDelayTitle = new Button() { X = Application.GetRealWidth(16), //Width = Application.GetRealWidth(90), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, TextID = StringId.SceneDelay, }; sceneDelayRow.AddChidren(btnSceneDelayTitle); btnSceneDelayTitle.MouseUpEventHandler = (sender, e) => { Action<string> action = (obj) => { scene.delay = obj; btnSceneDelayInfo.Text = scene.GetDelayText(); }; Dictionary<string, string> items = new Dictionary<string, string>(); items.Add("30", "30s"); items.Add("60", "1min"); items.Add("120", "2min"); items.Add("300", "5min"); new PublicAssmebly().SetSceneDelayDialog(items, action, scene.delay); }; contentView.AddChidren(new Button() { Y = sceneDelayRow.Bottom, Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor, }); } */ #endregion #region 选择区域 FrameLayout chooseZoneView = new FrameLayout() { Height = Application.GetRealWidth(44), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(chooseZoneView); btnChooseZoneViewTitle = new Button() { X = Application.GetRealWidth(16), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.SubheadingFontSize, TextID = StringId.ChooseCatchZone, IsBold = true, }; chooseZoneView.AddChidren(btnChooseZoneViewTitle); functionListView = new VerticalScrolViewLayout() { Height = 0, }; contentView.AddChidren(functionListView); LoadRoomRow(functionListView); Button btnLine1 = new Button() { Height = Application.GetRealHeight(8), BackgroundColor = CSS_Color.BackgroundColor, }; contentView.AddChidren(btnLine1); #endregion Button btnBottomLine = new Button() { Y = Application.GetRealHeight(667 - 50) - 1, Height = 1, BackgroundColor = CSS_Color.BackgroundColor, }; bodyView.AddChidren(btnBottomLine); btnComplete = new Button() { Y = Application.GetRealHeight(667 - 50), Height = Application.GetRealHeight(50), TextAlignment = TextAlignment.Center, SelectedTextColor = CSS_Color.MainColor, TextColor = CSS_Color.BackgroundColor, TextSize = CSS_FontSize.SubheadingFontSize, TextID = StringId.NextStep, BackgroundColor = CSS_Color.MainBackgroundColor, SelectedBackgroundColor = CSS_Color.MainBackgroundColor, }; bodyView.AddChidren(btnComplete); btnComplete.MouseUpEventHandler = (sender, e) => { if(btnComplete.IsSelected) { if (string.IsNullOrEmpty(scene.name)) { new Tip() { CloseTime = 1, Text = Language.StringByID(StringId.SceneNameCannotBeEmpty), Direction = AMPopTipDirection.None, }.Show(bodyView); return; } foreach (var tempRoom in FunctionList.List.scenes) { if (scene.name == tempRoom.name) { new PublicAssmebly().TipMsg(StringId.Tip, StringId.SceneNameAlreadyExists); return; } } var catchFunctionList = new List<Function>(); foreach(var temp in FunctionList.List.Functions) { foreach(var catchRoom in catchRooms) { if(temp.roomIds.Contains(catchRoom.roomId)) { catchFunctionList.Add(temp); } } } var view = new CatchSceneCatchFunctionListPage(scene, catchFunctionList, backAction); MainPage.BasePageView.AddChidren(view); view.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; } }; } /// <summary> /// 加载功能列表 /// </summary> void LoadRoomRow(VerticalScrolViewLayout functionListView) { functionListView.RemoveAll(); var roomCount = SpatialInfo.CurrentSpatial.RoomList.Count; functionListView.Height = Application.GetRealWidth(51 * roomCount); int i = 0; foreach(var room in SpatialInfo.CurrentSpatial.RoomList) { if (i < roomCount ) { functionListView.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(1), BackgroundColor = CSS_Color.BackgroundColor, }); } i++; var row = new FrameLayout() { Height = Application.GetRealWidth(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; functionListView.AddChidren(row); Button btnChoose = new Button() { X = Application.GetRealWidth(331), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "Public/ChooseIcon.png", SelectedImagePath = "Public/ChooseOnIcon.png", }; row.AddChidren(btnChoose); var btnRoomName = new TextButton() { X = Application.GetRealWidth(16), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, Text = room.roomName, }; row.AddChidren(btnRoomName); btnRoomName.Width = Utlis.GetRealWidthByTextButton(btnRoomName)+Application.GetRealWidth(12); var btnRoomFloor = new TextButton() { X = btnRoomName.Right, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = room.floorName, }; row.AddChidren(btnRoomFloor); btnRoomFloor.Width = Utlis.GetRealWidthByTextButton(btnRoomFloor) + Application.GetRealWidth(12); EventHandler<MouseEventArgs> eventHandler = (sender, e) => { btnChoose.IsSelected = !btnChoose.IsSelected; if (btnChoose.IsSelected) { catchRooms.Add(room); }else { catchRooms.Remove(room); } if (catchRooms.Count == 1) { btnComplete.IsSelected = true; } else if (catchRooms.Count == 0) { btnComplete.IsSelected = false; } }; btnRoomFloor.MouseUpEventHandler = eventHandler; btnRoomName.MouseUpEventHandler = eventHandler; btnChoose.MouseUpEventHandler = eventHandler; row.MouseUpEventHandler = eventHandler; } } } } HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneCatchFunctionListPage.cs
New file @@ -0,0 +1,241 @@ using System; using System.Collections.Generic; using System.Threading; using HDL_ON.DAL.Server; using HDL_ON.Entity; using HDL_ON.UI.CSS; using Shared; namespace HDL_ON.UI { public class CatchSceneCatchFunctionListPage :FrameLayout { /// <summary> /// 主控件 /// </summary> FrameLayout bodyView; /// <summary> /// 内容区域 /// </summary> VerticalScrolViewLayout contentView; /// <summary> /// 生成场景按钮 /// </summary> Button btnGenerateScene; Scene scene; /// <summary> /// 捕捉到到功能数据 /// </summary> List<Function> catchFunctionList; /// <summary> /// 回掉更新事件 /// </summary> Action backAction; public CatchSceneCatchFunctionListPage(Scene s, List<Function> list,Action action) { bodyView = this; scene = s; catchFunctionList = list; backAction = action; } public void LoadPage() { new TopViewDiv(bodyView, Language.StringByID(StringId.CatchScene)).LoadTopView(); bodyView.BackgroundColor = CSS_Color.BackgroundColor; contentView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), Height = Application.GetRealHeight(667 - 64 - 60), }; bodyView.AddChidren(contentView); LoadFunctionRow(); btnGenerateScene = new Button() { Y = Application.GetRealHeight(667 - 50), Height = Application.GetRealHeight(50), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.SubheadingFontSize, TextID = StringId.GenerateScene, BackgroundColor = CSS_Color.MainBackgroundColor, SelectedBackgroundColor = CSS_Color.MainBackgroundColor, }; bodyView.AddChidren(btnGenerateScene); LoadEvent_CompleteEvent(); } /// <summary> /// 加载功能信息行 /// </summary> private void LoadFunctionRow() { contentView.RemoveAll(); scene.functions.Clear(); bool isFrist = true; foreach (var function in catchFunctionList) { var scenefunction = function.ConvertSceneFunction(); scene.functions.Add(scenefunction); RowLayout functionRow = new RowLayout() { Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, LineColor = 0x00000000, }; contentView.AddChidren(functionRow); if (isFrist) { isFrist = false; } else { functionRow.AddChidren(new Button() { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(1), BackgroundColor = CSS_Color.DividingLineColor, }); } var btnFunctionIcon = new Button() { X = Application.GetRealWidth(12), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(28), Height = Application.GetMinRealAverage(28), }; functionRow.AddChidren(btnFunctionIcon); btnFunctionIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; var btnName = new Button() { X = Application.GetRealWidth(8 + 10 + 32), Width = Application.GetRealWidth(200), Height = Application.GetRealHeight(32), Text = function.name, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, }; functionRow.AddChidren(btnName); var btnFromFloor = new Button() { X = Application.GetRealWidth(8 + 10 + 32), Y = Application.GetRealHeight(24), Width = Application.GetRealWidth(200), Height = Application.GetRealHeight(26), Text = function.GetRoomListName(), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; functionRow.AddChidren(btnFromFloor); Button btnRight = new Button() { X = Application.GetRealWidth(339), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "Public/Right.png", }; functionRow.AddChidren(btnRight); var btnFunctionInfo = new Button() { Width = Application.GetRealWidth(327), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = scenefunction.GetFunctionScnenInfo(), }; functionRow.AddChidren(btnFunctionInfo); EventHandler<MouseEventArgs> eventHandler = (sender, e) => { Action refreshFunctionRowAction = () => { btnFunctionInfo.Text = scenefunction.GetFunctionScnenInfo(); }; var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction); MainPage.BasePageView.AddChidren(ssf); ssf.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; btnFunctionInfo.MouseUpEventHandler = eventHandler; btnRight.MouseUpEventHandler = eventHandler; Button btnDelSceneFunction = new Button() { BackgroundColor = CSS_Color.WarningColor, TextColor = CSS_Color.MainBackgroundColor, TextID = StringId.Del, }; functionRow.AddRightView(btnDelSceneFunction); btnDelSceneFunction.MouseUpEventHandler = (sender, e) => { catchFunctionList.Remove(function); LoadFunctionRow(); }; } } /// <summary> /// 完成按钮点击事件 /// </summary> void LoadEvent_CompleteEvent() { btnGenerateScene.MouseUpEventHandler += (sender, e) => { var waitPage = new Loading(); MainPage.BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); new Thread(() => { try { var serverScene = new Scene(); var result = FunctionList.List.AddScene(scene, out serverScene); Application.RunOnMainThread(() => { if (result == StateCode.SUCCESS) { scene = serverScene; FunctionList.List.scenes.Add(scene); backAction(); RemoveFromParent(); } else { IMessageCommon.Current.ShowErrorInfoAlter(result); } }); } catch { } finally { Application.RunOnMainThread(() => { waitPage.Hide(); waitPage.RemoveFromParent(); }); } }) { IsBackground = true, Priority = ThreadPriority.AboveNormal }.Start(); }; } } } HDL_ON/UI/UI2/3-Intelligence/Scene/NewSceneMenuListPage.cs
@@ -63,8 +63,6 @@ addSceneView.AddChidren(btnAddSceneText); #endregion #region F3阶段 /* #region 捕获场景 FrameLayout catchSceneView = new FrameLayout() { @@ -103,6 +101,7 @@ #endregion /* #region 电影场景 FrameLayout movieSceneView = new FrameLayout() { @@ -140,7 +139,6 @@ movieSceneView.AddChidren(btnMovieSceneText); #endregion */ #endregion LoadEventList(); } @@ -152,17 +150,16 @@ void LoadEventList() { LoadEvent_SkipAddScenePage(); LoadEvent_SkipCatchScenePage(); } /// <summary> /// 跳转创建场景界面 /// </summary> void LoadEvent_SkipAddScenePage() { btnAddSceneBg.MouseUpEventHandler = (sender, e) => { //if (DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull()) //{ // new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.UnableToCreateScenarioPleaseBindGateway), true); // return; //} Action backAction = () => { this.RemoveFromParent(); action(); @@ -176,5 +173,25 @@ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; } /// <summary> /// 跳转捕获场景界面 /// </summary> void LoadEvent_SkipCatchScenePage() { btnCatchSceneBg.MouseUpEventHandler = (sener, e) => { Action backAction = () => { this.RemoveFromParent(); action(); }; var scene = new Scene() { roomIds = new System.Collections.Generic.List<string>() { "" } }; scene.NewSid(); scene.name = Language.StringByID(StringId.Scene) + " " + (1 + FunctionList.List.scenes.Count).ToString(); var aep = new CatchSceneAddPage(scene, backAction); MainPage.BasePageView.AddChidren(aep); aep.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; } } } HDL_ON/UI/UI2/3-Intelligence/Scene/SceneAddPage.cs
@@ -81,7 +81,7 @@ /// </summary> Action refreshFunctionRowAction; /// <summary> /// 回掉更新 /// 回调更新 /// </summary> Action backAction; public SceneAddPage(Scene s, Action act) @@ -369,6 +369,8 @@ LoadEventList(); } /// <summary> /// 加载功能列表 /// </summary> @@ -457,20 +459,16 @@ }; row.AddChidren(btnFunctionFloorAndRoom); btnFunctionName.MouseUpEventHandler = (sender, e) => EventHandler<MouseEventArgs> skipEvent= (sender, e) => { var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction); MainPage.BasePageView.AddChidren(ssf); ssf.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; btnFunctionFloorAndRoom.MouseUpEventHandler = (sender, e) => { var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction); MainPage.BasePageView.AddChidren(ssf); ssf.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; btnFunctionName.MouseUpEventHandler = skipEvent; btnFunctionFloorAndRoom.MouseUpEventHandler = skipEvent; Button btnDelSceneFunction = new Button() { @@ -831,7 +829,7 @@ var waitPage = new Loading(); MainPage.BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); new System.Threading.Thread(() => new Thread(() => { try { HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -466,7 +466,7 @@ TextAlignment = TextAlignment.BottomRight, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = GetFunctionScnenInfo(scenefunction), Text = scenefunction.GetFunctionScnenInfo(), }; row.AddChidren(btnFunctionInfo); @@ -513,20 +513,15 @@ }; row.AddChidren(btnFunctionFloorAndRoom); btnFunctionName.MouseUpEventHandler = (sender, e) => EventHandler<MouseEventArgs> skipEvent = (sender, e) => { var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction); MainPage.BasePageView.AddChidren(ssf); ssf.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; btnFunctionFloorAndRoom.MouseUpEventHandler = (sender, e) => { var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction); MainPage.BasePageView.AddChidren(ssf); ssf.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; btnFunctionName.MouseUpEventHandler = skipEvent; btnFunctionFloorAndRoom.MouseUpEventHandler = skipEvent; Button btnDelSceneFunction = new Button() { @@ -540,55 +535,8 @@ scene.EditScene(); row.RemoveFromParent(); functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count); //LoadFunctionRow(functionListView); }; } } /// <summary> /// 解析场景功能数据 /// </summary> /// <param name="sceneFunction"></param> string GetFunctionScnenInfo(SceneFunction sceneFunction) { var sceneFunctionInfo = ""; foreach (var sfs in sceneFunction.status) { if (sfs.key == FunctionAttributeKey.OnOff) { if (sfs.value == "off") return Language.StringByID(StringId.Close); } } sceneFunctionInfo += Language.StringByID(StringId.Open) + " "; var modeState = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Mode); var tempState = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp); var fanState = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.FanSpeed); if (modeState != null) { sceneFunctionInfo += modeState.GetValueText() + " "; } if (tempState != null) { sceneFunctionInfo += tempState.GetValueText() + " "; sceneFunctionInfo += tempState.GetUintString(); } if (fanState != null) { sceneFunctionInfo += fanState.GetValueText() + " "; } var briState = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness); if (briState != null) { sceneFunctionInfo += briState.value + "%"; } var perState = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Percent); if (perState != null) { sceneFunctionInfo += perState.value + "%"; } return sceneFunctionInfo; } /// <summary> HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs
@@ -128,7 +128,7 @@ }; bodyView.AddChidren(functionListView); foreach (var function in FunctionList.List.GetDeviceFunctionList()) foreach (var function in FunctionList.List.Functions) { if (function == null) { @@ -210,51 +210,8 @@ Height = Application.GetMinRealAverage(28), }; functionRow.AddChidren(btnFunctionIcon); switch (function.Spk_Prefix) { case FunctionCategory.AC: switch (function.spk) { case SPK.AcStandard: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; break; } break; case FunctionCategory.FloorHeat: switch (function.spk) { case SPK.FloorHeatStandard: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png"; break; } break; case FunctionCategory.Curtain: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; break; case FunctionCategory.Light: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png"; break; case FunctionCategory.Electric: switch (function.spk) { case SPK.ElectricSocket: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketThinIcon.png"; break; case SPK.ElectricFan: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanThinIcon.png"; break; case SPK.ElectricTV: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVThinIcon.png"; break; } break; //case FunctionCategory.Scene: // btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Scene/SceneIcon.png"; //break; case FunctionCategory.Music: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png"; break; } btnFunctionIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; var btnFunctionName = new Button() { HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -182,6 +182,8 @@ BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(row); if (sceneStatus.key != FunctionAttributeKey.OnOff) { row.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
@@ -94,8 +94,6 @@ } //设置用户头像路径 CheckIfDownloadHeadImage(mInfo); } catch (Exception ex) { HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs
@@ -248,61 +248,9 @@ Height = Application.GetMinRealAverage(28), }; functionRow.AddChidren(btnFunctionIcon); switch (function.Spk_Prefix) { case FunctionCategory.AC: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png"; break; case FunctionCategory.FloorHeat: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png"; break; case FunctionCategory.Curtain: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png"; break; case FunctionCategory.Light: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png"; break; case FunctionCategory.Electric: switch (function.spk) { case SPK.ElectricSocket: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketThinIcon.png"; break; case SPK.ElectricFan: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanThinIcon.png"; break; case SPK.ElectricTV: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVThinIcon.png"; break; } break; //case FunctionCategory.Scene: // btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Scene/SceneIcon.png"; //break; case FunctionCategory.Music: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png"; break; case FunctionCategory.Sensor: switch(function.spk) { case SPK.SensorPm25: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconPm25.png"; break; case SPK.SensorCO2: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconCO2.png"; break; case SPK.SensorTVOC: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTVOC.png"; break; case SPK.SensorHumidity: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconHumidity.png"; break; case SPK.SensorTemperature: btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTemp.png"; break; } break; } btnFunctionIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png"; if (!btnAllocated.IsSelected) { HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -111,7 +111,7 @@ arcBar.IsOffline = device.GetAttrState(FunctionAttributeKey.OnOff) == "off"; arcBar.MinValue = device.GetAttribute(FunctionAttributeKey.SetTemp).min; arcBar.MaxValue = device.GetAttribute(FunctionAttributeKey.SetTemp).max; arcBar.Progress = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); arcBar.Progress = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)); btnTemp = new Button() { @@ -122,7 +122,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 50, IsBold = true, Text = device.GetAttrState(FunctionAttributeKey.SetTemp), Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(), TextAlignment = TextAlignment.Center, }; FrameWhiteCentet1.AddChidren(btnTemp); @@ -311,16 +311,18 @@ device.SetAttrState(FunctionAttributeKey.Mode, m); btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(m); System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); btnMode.UnSelectedImagePath = btnModeIcon.UnSelectedImagePath; //btnMode.UnSelectedImagePath = btnModeIcon.UnSelectedImagePath; d.Add(FunctionAttributeKey.Mode, m); Control.Ins.SendWriteCommand(device, d); dialog.Close(); if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") { arcBar.IsClickable = false; arcBar.IsOffline = true; } else { arcBar.IsOffline = false; arcBar.IsClickable = true; } }; @@ -437,7 +439,7 @@ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.FanSpeed, m); Control.Ins.SendWriteCommand(device, d); btnWindSpeed.UnSelectedImagePath = btnFanIcon.UnSelectedImagePath; //btnWindSpeed.UnSelectedImagePath = btnFanIcon.UnSelectedImagePath; dialog.Close(); }; btnFanIcon.MouseUpEventHandler = eventHandler1; @@ -675,7 +677,7 @@ { return; } var temp = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); var temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)); if (temp <= device.GetAttribute(FunctionAttributeKey.Mode).min) { return; @@ -694,7 +696,7 @@ { return; } var temp = Convert.ToInt32(device.GetAttrState(FunctionAttributeKey.SetTemp)); var temp = (int)Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.SetTemp)); if (temp >= device.GetAttribute(FunctionAttributeKey.SetTemp).max) { return; @@ -720,14 +722,14 @@ device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); btnTemp.Text = e.ToString(); }; arcBar.MouseDownEventHandler = (sender, e) => { Console.WriteLine("ddd"); MainPage.BasePageView.ScrollEnabled =false; }; arcBar.MouseUpEventHandler = (sender, e) => { Console.WriteLine("ddd2"); MainPage.BasePageView.ScrollEnabled = true; }; //arcBar.MouseDownEventHandler = (sender, e) => { // Console.WriteLine("ddd"); // MainPage.BasePageView.ScrollEnabled =false; //}; //arcBar.MouseUpEventHandler = (sender, e) => { // Console.WriteLine("ddd2"); // MainPage.BasePageView.ScrollEnabled = true; //}; } /// <summary> /// 控制模式事件 @@ -784,7 +786,7 @@ { Application.RunOnMainThread(() => { btnTemp.Text = device.GetAttrState(FunctionAttributeKey.SetTemp); btnTemp.Text = Convert.ToDouble( device.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(); btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(device.GetAttrState(FunctionAttributeKey.RoomTemp))) + "°C"; btnMode.UnSelectedImagePath = acFunction.GetModeIconPath(device.GetAttrState(FunctionAttributeKey.Mode)); btnWindSpeed.UnSelectedImagePath = acFunction.GetFanIconPath(device.GetAttrState(FunctionAttributeKey.FanSpeed)); HDL_ON/UI/UI2/FuntionControlView/AC/ACPage.cs
@@ -155,7 +155,7 @@ MaxValue = function.GetAttribute(FunctionAttributeKey.SetTemp).max, //IsClickable = function.trait_on_off.curValue.ToString() == "on", ArcColor = CSS_Color.BackgroundColor, Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.SetTemp)), Progress = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)), #if __IOS__ Y = Application.GetRealHeight(120 + 25), Width = Application.GetRealWidth(260 - 40), @@ -180,7 +180,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 50, IsBold = true, Text = function.GetAttrState(FunctionAttributeKey.SetTemp), Text = Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(), TextAlignment = TextAlignment.Center, }; controlView.AddChidren(btnTemp); HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs
@@ -25,7 +25,7 @@ } AC temp = new AC(); updataTime = DateTime.Now; bodyView.btnTemp.Text = updateTemp.GetAttrState(FunctionAttributeKey.SetTemp); bodyView.btnTemp.Text = Convert.ToDouble( updateTemp.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(); bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState((string)FunctionAttributeKey.RoomTemp))) + "°C"; bodyView.btnMode.UnSelectedImagePath = temp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); bodyView.btnWindSpeed.UnSelectedImagePath = temp.GetFanIconPath(updateTemp.GetAttrState(FunctionAttributeKey.FanSpeed)); @@ -96,7 +96,7 @@ { return; } var temp = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.SetTemp)); var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); if (temp <= function.GetAttribute(FunctionAttributeKey.Mode).min) { return; @@ -116,7 +116,7 @@ { return; } var temp = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.SetTemp)); var temp = (int)Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); if (temp >= function.GetAttribute(FunctionAttributeKey.SetTemp).max) { return; HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPageBLL.cs
@@ -23,18 +23,42 @@ bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp))) + "°C"; bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp))); //if (updateTemp.trait_on_off.curValue.ToString() == "on") //{ // bodyView.arcBar.ThumbImagePath = "FunctionIcon/FloorHeating/DiyThumbIconOn.png"; // bodyView.btnSwitch.IsSelected = true; // bodyView.arcBar.IsOffline = false; //} //else //{ // bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; // bodyView.btnSwitch.IsSelected = false; // bodyView.arcBar.IsOffline = true; //} if (updateTemp.trait_on_off.curValue.ToString() == "on") { bodyView.arcBar.ThumbImagePath = "FunctionIcon/FloorHeating/DiyThumbIconOn.png"; bodyView.btnSwitch.IsSelected = true; bodyView.arcBar.IsOffline = false; bodyView.btnSwitch.IsSelected = true; bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "fan") { bodyView.arcBar.IsClickable = false; } else { bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; bodyView.btnSwitch.IsBold = false; bodyView.arcBar.IsOffline = true; bodyView.arcBar.IsClickable = true; } } else { bodyView.arcBar.IsOffline = true; bodyView.btnSwitch.IsSelected = false; bodyView.arcBar.IsClickable = false; bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; } }); } catch (Exception ex) @@ -100,8 +124,8 @@ { return; } var temp = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.SetTemp)); if (temp > Convert.ToInt32(function.GetAttribute(FunctionAttributeKey.SetTemp).max)) var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); if (temp > Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max)) { return; } @@ -124,7 +148,7 @@ arcBar.OnProgressChangedEvent = (sender, e) => { function.SetAttrState(FunctionAttributeKey.SetTemp, e); btnTemp.Text = function.GetAttrState(FunctionAttributeKey.SetTemp); btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(); }; } /// <summary> HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
@@ -68,6 +68,7 @@ { bodyView = this; function = func; lightTemp = new Light(); } public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut) @@ -162,6 +163,12 @@ { colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheelGray.png"; } colorPicker.MouseDownEventHandler = (sender, e) => { MainPage.BasePageView.ScrollEnabled = false; }; colorPicker.MouseUpEventHandler = (sender, e) => { MainPage.BasePageView.ScrollEnabled = true; }; //白点控件 this.btnWhiteRound = new Button(); HDL_ON/UI/UI2/FuntionControlView/Light/RelayPageBLL.cs
@@ -17,7 +17,10 @@ { if (bodyView == null) return; if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid) { bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on"; } } catch (Exception ex) { @@ -78,9 +81,29 @@ System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add("on_off", function.trait_on_off.curValue.ToString()); DriverLayer.Control.Ins.SendWriteCommand(function, d); //Control.Send(CommandType_A.write, function); }) { IsBackground = true }.Start(); //new System.Threading.Thread(() => //{ // bool fff = false; // while (true) // { // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); // if (fff) // { // d.Add("on_off", "off"); // } // else // { // d.Add("on_off", "on"); // } // fff = !fff; // DriverLayer.Control.Ins.SendWriteCommand(function, d); // //System.Threading.Thread.Sleep(100); // } //}) //{ IsBackground = true }.Start(); }; } ThirdPartyIntegration/HdlBluWi/Blufi.xcodeproj/project.xcworkspace/xcuserdata/kaede.xcuserdatad/UserInterfaceState.xcuserstateBinary files differ