.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,38 +1,34 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.94B44E9C-E1BC-4BF7-812E-FC71E9B623B2" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control_Udp.cs"> <Files> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddButton.cs" Line="133" Column="34" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" Line="427" Column="1" /> <File FileName="HDL-ON_iOS/Info.plist" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/View/BrandListView.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/BrandList.cs" /> <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" /> <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" /> <File FileName="HDL_ON/Entity/Function/Scene.cs" /> <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" /> <File FileName="HDL_ON/UI/MainPage.cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs" Line="136" Column="83" /> <File FileName="HDL_ON/UI/MainPage.cs" Line="19" Column="44" /> <File FileName="HDL_ON/Entity/Enumerative/Command.cs" Line="1864" Column="28" /> <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="303" Column="15" /> <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="195" Column="50" /> <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="95" Column="58" /> <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="556" Column="96" /> <File FileName="../../../../Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets" Line="1912" Column="3" /> <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1" 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="UI" expanded="True"> <Node name="UI2" expanded="True"> <Node name="4-PersonalCenter" expanded="True"> <Node name="PirDevice" expanded="True" /> </Node> <Node name="FuntionControlView" expanded="True"> <Node name="1ContorlPage" expanded="True"> <Node name="AcControlPage_AddIrButton.cs" selected="True" /> </Node> </Node> <Node name="DAL" expanded="True"> <Node name="DriverLayer" expanded="True"> <Node name="Control_Udp.cs" selected="True" /> </Node> <Node name="Server" expanded="True" /> </Node> <Node name="Entity" expanded="True" /> </Node> <Node name="ys" expanded="True" /> <Node name="HDL-ON_Android" expanded="True"> <Node name="Properties" expanded="True" /> </Node> <Node name="HDL-ON_iOS" expanded="True" /> </Node> </State> </Pad> @@ -44,7 +40,7 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Release" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> 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="202103241" android:versionName="1.1.202103241" package="com.hdl.onpro"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103251" android:versionName="1.1.202103251" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> <!-- 定位权限--> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -64,8 +64,7 @@ <WarningLevel>4</WarningLevel> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <MtouchArch>ARM64</MtouchArch> <CodesignKey>iPhone Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> <CodesignProvision>Automatic:AdHoc</CodesignProvision> <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> <MtouchLink>SdkOnly</MtouchLink> </PropertyGroup> <ItemGroup> HDL-ON_iOS/Info.plist
@@ -104,9 +104,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> <string>1.1.202103241</string> <string>1.1.202103252</string> <key>CFBundleVersion</key> <string>202103241</string> <string>202103252</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -288,50 +288,72 @@ case SPK.LightRGB: break; case SPK.FloorHeatStandard: byte onoff_1 = 0; byte setTemp_1 = 0; byte mode_1 = 0; foreach (var attr in f.status) if (f.status.Find((obj)=>obj.key ==FunctionAttributeKey.Mode) == null) { switch (attr.key) foreach (var dic in f.status) { case FunctionAttributeKey.OnOff: if (attr.value == "on") { onoff_1 = 1; } else { onoff_1 = 0; } break; case FunctionAttributeKey.SetTemp: setTemp_1 = Convert.ToByte(attr.value); break; case FunctionAttributeKey.Mode: switch (attr.value) { case "day": mode_1 = 2; break; case "night": mode_1 = 3; break; case "away": mode_1 = 4; break; case "normal": mode_1 = 1; break; case "timer": mode_1 = 5; break; } break; switch (dic.key) { case FunctionAttributeKey.OnOff: ControlBytesSend(Command.InstructionPanelKey, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID, new byte[] { 20, dic.value.ToString() == "on" ? (byte)1 : (byte)0, f.localFunction.bus.LoopId }); break; case "mode": ControlBytesSend(Command.InstructionPanelKey, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID, new byte[] { 21, Convert.ToByte(dic.value), f.localFunction.bus.LoopId }); break; case FunctionAttributeKey.SetTemp: ControlBytesSend(Command.InstructionPanelKey, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID, new byte[] { 25, Convert.ToByte(dic.value), f.localFunction.bus.LoopId }); break; } } } ControlBytesSend(Command.SetFloorHeat, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID, new byte[] { else { byte onoff_1 = 0; byte setTemp_1 = 0; byte mode_1 = 0; foreach (var attr in f.status) { switch (attr.key) { case FunctionAttributeKey.OnOff: if (attr.value == "on") { onoff_1 = 1; } else { onoff_1 = 0; } break; case FunctionAttributeKey.SetTemp: setTemp_1 = Convert.ToByte(attr.value); break; case FunctionAttributeKey.Mode: switch (attr.value) { case "day": mode_1 = 2; break; case "night": mode_1 = 3; break; case "away": mode_1 = 4; break; case "normal": mode_1 = 1; break; case "timer": mode_1 = 5; break; } break; } } ControlBytesSend(Command.SetFloorHeat, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID, new byte[] { f. localFunction.bus.LoopId, onoff_1, 0, setTemp_1, mode_1, setTemp_1, setTemp_1, setTemp_1, 0, 0 }); } break; case SPK.ElectricSocket: foreach (var attr in f.status) @@ -518,9 +540,9 @@ { case SPK.AcStandard: var ac = new AC(); ControlBytesSend(Command.SetACMode, subnetId, deviceId, new byte[] { function.bus.LoopId, 0, 32, 32, 32, 32, 32, 0, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, ac.GetModeIndex(function), ac.GetFanIndex(function), Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), 0 }); //ControlBytesSend(Command.SetACMode, subnetId, deviceId, new byte[] { function.bus.LoopId, 0, 32, 32, 32, 32, 32, 0, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, // ac.GetModeIndex(function), // ac.GetFanIndex(function), Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), 0 }); foreach (var dic in commandDictionary) { switch (dic.Key) @@ -534,7 +556,7 @@ case "fan": ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 5, ac.GetFanIndex(function), function.bus.LoopId }); break; case "temp": case FunctionAttributeKey.SetTemp: byte modeKey = 4; switch (ac.GetModeIndex(function)) { @@ -573,42 +595,83 @@ case SPK.FloorHeatStandard: if (function.Fh_Mode_Temp.Count == 4) { var onoffString = function.trait_on_off.curValue.ToString(); byte b1 = 1; if(onoffString == "off") if (function.GetAttribute(FunctionAttributeKey.Mode) == null) { b1 = 0; } var wm = fhTemp.GetWorkModeIndex(function); if (wm > 0) { b1 += (byte)(16 + wm); } if (commandDictionary.ContainsKey("temp")) { var dicTempString = ""; commandDictionary.TryGetValue("temp", out dicTempString); var dicTemp = Convert.ToByte(dicTempString); var mode = function.GetAttrState(FunctionAttributeKey.Mode); switch (mode) foreach (var dic in commandDictionary) { case "day": function.Fh_Mode_Temp["day"] = dicTemp; break; case "night": function.Fh_Mode_Temp["night"] = dicTemp; break; case "away": function.Fh_Mode_Temp["away"] = dicTemp; break; case "normal": function.Fh_Mode_Temp["normal"] = dicTemp; break; switch (dic.Key) { case FunctionAttributeKey.OnOff: ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 20, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId }); break; case "mode": ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 21, fhTemp.GetModeIndex(function), function.bus.LoopId }); break; case FunctionAttributeKey.SetTemp: byte modeKey = 25; switch (fhTemp.GetModeIndex(function)) { case 1: modeKey = 25; break; case 2: modeKey = 26; break; case 3: modeKey = 27; break; case 4: modeKey = 28; break; } ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { modeKey, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), function.bus.LoopId }); break; default: MainPage.Log($"功能未支持 : {dic.Key}"); break; } } } var tt = fhTemp.GetTempUintIndex(function); ControlBytesSend(Command.SetFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId, b1, else { var onoffString = function.trait_on_off.curValue.ToString(); byte b1 = 1; if (onoffString == "off") { b1 = 0; } var wm = fhTemp.GetWorkModeIndex(function); if (wm > 0) { b1 += (byte)(16 + wm); } if (commandDictionary.ContainsKey("temp")) { var dicTempString = ""; commandDictionary.TryGetValue("temp", out dicTempString); var dicTemp = Convert.ToByte(dicTempString); var mode = function.GetAttrState(FunctionAttributeKey.Mode); switch (mode) { case "day": function.Fh_Mode_Temp["day"] = dicTemp; break; case "night": function.Fh_Mode_Temp["night"] = dicTemp; break; case "away": function.Fh_Mode_Temp["away"] = dicTemp; break; case "normal": function.Fh_Mode_Temp["normal"] = dicTemp; break; } } var tt = fhTemp.GetTempUintIndex(function); ControlBytesSend(Command.SetFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId, b1, (byte)tt,fhTemp.GetModeIndex(function), function.Fh_Mode_Temp["normal"], function.Fh_Mode_Temp["day"], function.Fh_Mode_Temp["night"], function.Fh_Mode_Temp["away"], 0, 0 }); } } break; } HDL_ON/DAL/DriverLayer/Packet.cs
@@ -405,38 +405,44 @@ { function.Fh_Mode_Temp.Add("away", receiveBytes[7]); } switch (function.GetAttrState(FunctionAttributeKey.Mode)) if (function.GetAttribute(FunctionAttributeKey.Mode) == null) { case "normal": function.lastState = Language.StringByID(StringId.Normal); function.SetAttrState(FunctionAttributeKey.SetTemp,receiveBytes[4].ToString()); break; case "day": function.lastState = Language.StringByID(StringId.Day); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[5].ToString()); break; case "night": function.lastState = Language.StringByID(StringId.Night); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[6].ToString()); break; case "timer": function.lastState = Language.StringByID(StringId.Auto); if (receiveBytes[8] == 0) { function.SetAttrState(FunctionAttributeKey.TimeFlag, 0); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[4].ToString()); } else { switch (function.GetAttrState(FunctionAttributeKey.Mode)) { case "normal": function.lastState = Language.StringByID(StringId.Normal); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[4].ToString()); break; case "day": function.lastState = Language.StringByID(StringId.Day); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[5].ToString()); } else { function.SetAttrState(FunctionAttributeKey.TimeFlag, 1); break; case "night": function.lastState = Language.StringByID(StringId.Night); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[6].ToString()); } break; case "away": function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[7].ToString()); function.lastState = Language.StringByID(StringId.Away); break; break; case "timer": function.lastState = Language.StringByID(StringId.Auto); if (receiveBytes[8] == 0) { function.SetAttrState(FunctionAttributeKey.TimeFlag, 0); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[5].ToString()); } else { function.SetAttrState(FunctionAttributeKey.TimeFlag, 1); function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[6].ToString()); } break; case "away": function.SetAttrState(FunctionAttributeKey.SetTemp, receiveBytes[7].ToString()); function.lastState = Language.StringByID(StringId.Away); break; } } var indoorTemp = 0; if (receiveBytes[9] > 128) @@ -448,7 +454,14 @@ } function.SetAttrState(FunctionAttributeKey.RoomTemp, indoorTemp); function.lastState += " " + function.GetAttrState(FunctionAttributeKey.Mode) + new FloorHeating().GetTempUnitString(function); if (function.GetAttribute(FunctionAttributeKey.Mode) == null) { function.lastState = ""; } else { function.lastState += " " + function.GetAttrState(FunctionAttributeKey.Mode) + new FloorHeating().GetTempUnitString(function); } RoomPage.UpdataStates(function); FunctionPage.UpdataStates(function); HomePage.UpdataFunctionStates(function); HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -497,6 +497,10 @@ UserInfo.Current.regionList.Add(home); } } if(UserInfo.Current.regionList.Count== 0) { return "null"; } //-------如果账号是首次登录 if (DB_ResidenceData.Instance.CurrentRegion == null || string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.RegionID)) { HDL_ON/UI/MainPage.cs
@@ -20,7 +20,7 @@ /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.1.0324"; public static string VersionString = "1.1.0325"; ///// <summary> ///// 客户端类型 ///// </summary> HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -192,12 +192,12 @@ //return; if (b) { etAccount.Text = "15622703419";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; // "15622703419"lwn;// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 } else { etAccount.Text = "18316672920";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 //15971583093 gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试 } b = !b; HDL_ON/UI/UI1-Login/LoginPageBLL.cs
@@ -651,7 +651,7 @@ UserInfo.Current.LastTime = DateTime.MinValue; UserInfo.Current.SaveUserInfo(); //登录失败,请先添加住宅! Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList)); //Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList)); } } } @@ -814,8 +814,8 @@ bool LoadMethod_GetResidences() { var result = false; var responsePack = pm.GetHomePager(); if (responsePack == StateCode.SUCCESS) var code = pm.GetHomePager(); if (code == StateCode.SUCCESS) { ////2020-11-13 待确认,没有住宅,不算登录成功 //if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0) @@ -825,10 +825,17 @@ //2020-12-10 没有住宅登录成功,但是不能进入主界面 result = true; } else if( code == "null") { Application.RunOnMainThread(() => { MainPage.GoUserPage(false); }); } else { // 提示错误 IMessageCommon.Current.ShowErrorInfoAlter(responsePack); IMessageCommon.Current.ShowErrorInfoAlter(code); } return result; } HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -113,6 +113,7 @@ public void LoadPage() { MainPage.CurPageIndex = 0; try { this.BeginHeaderRefreshingAction = () => HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -76,6 +76,7 @@ public void LoadPage() { MainPage.CurPageIndex = 1; bodyView.BackgroundColor = CSS_Color.BackgroundColor; #region top FrameLayout topView = new FrameLayout() @@ -480,6 +481,7 @@ #endregion break; case ShowFunction.FreshAir: functionCount = FunctionList.List.GetAirFreshList().Count; break; case ShowFunction.Music: functionCount = Music.A31MusicModel.A31MusicModelList.Count; @@ -551,7 +553,7 @@ functionView.AddChidren(btnName); if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom && item != ShowFunction.SecurityMonitoring && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && functionCount != 0) { Button btnFunctionCount = new Button() HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -61,6 +61,7 @@ public void LoadPage() { MainPage.CurPageIndex = 2; bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; #region top topView = new FrameLayout() HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -611,8 +611,8 @@ btn.MouseUpEventHandler = (sender, e) => { System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.Key, attr.key); Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(attr.key, ""); Control.Ins.SendWriteCommand(device, d); new System.Threading.Thread(() => HDL_ON/UI/UI2/FuntionControlView/FoolHeating/FloorHeatingPage.cs
@@ -234,7 +234,10 @@ Height = Application.GetRealWidth(30), UnSelectedImagePath = fhTemp.GetModeIconPath(function.GetAttrState(FunctionAttributeKey.Mode)) }; controlView.AddChidren(btnMode); if (function.GetAttribute(FunctionAttributeKey.Mode)!=null) { controlView.AddChidren(btnMode); } btnSwitch = new Button() {