From 7b43f0f5c5dca88576efc0bb51bf95b523de90c9 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 10 七月 2020 11:33:06 +0800 Subject: [PATCH] 2020-07-10 1.修复窗帘定时器发送控制失败问题。 --- Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs | 6 +- Crabtree/ON.Ios/Info.plist | 6 +- Crabtree/ON/Properties/AndroidManifest.xml | 2 Crabtree/.vs/SmartHome/xs/UserPrefs.xml | 20 +++++----- Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide | 0 Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs | 36 ++++++++++++----- Crabtree/SmartHome/UI/SimpleControl/MainPage.cs | 2 7 files changed, 43 insertions(+), 29 deletions(-) diff --git a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml index d72c26b..1923ce1 100644 --- a/Crabtree/.vs/SmartHome/xs/UserPrefs.xml +++ b/Crabtree/.vs/SmartHome/xs/UserPrefs.xml @@ -1,23 +1,23 @@ -锘�<Properties StartupConfiguration="{9D9EF20B-6E65-4A65-92BF-567EBF1E1443}|Default"> - <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.4b65c46595" /> - <MonoDevelop.Ide.Workbench> +锘�<Properties StartupConfiguration="{1D83BF28-BA88-4152-BA41-D7EFE90A5437}|Default"> + <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> + <MonoDevelop.Ide.Workbench ActiveDocument="SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs"> <Files> - <File FileName="SmartHome/UI/SimpleControl/MainPage.cs" Line="41" Column="55" /> + <File FileName="SmartHome/UI/SimpleControl/Phone/Scene/UserAddSceneDevice.cs" Line="1" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="SmartHome" expanded="True"> - <Node name="ON.Droid" selected="True" /> + <Node name="ON.Droid" expanded="True"> + <Node name="Properties" expanded="True" /> + </Node> <Node name="Shared" expanded="True"> - <Node name="HDL" expanded="True"> - <Node name="Operation" expanded="True" /> - </Node> <Node name="UI" expanded="True"> <Node name="SimpleControl" expanded="True"> <Node name="Phone" expanded="True"> - <Node name="Room" expanded="True" /> - <Node name="TV" expanded="True" /> + <Node name="Scene" expanded="True"> + <Node name="UserAddSceneDevice.cs" selected="True" /> + </Node> </Node> </Node> </Node> diff --git a/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide index 736a846..b271681 100644 --- a/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide +++ b/Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide Binary files differ diff --git a/Crabtree/ON.Ios/Info.plist b/Crabtree/ON.Ios/Info.plist index b430e9a..835de7c 100755 --- a/Crabtree/ON.Ios/Info.plist +++ b/Crabtree/ON.Ios/Info.plist @@ -15,11 +15,11 @@ <true/> </dict> <key>CFBundleIdentifier</key> - <string>com.hdl.SimpleControl</string> + <string>com.hdl.on</string> <key>CFBundleShortVersionString</key> - <string>2.52006221</string> + <string>2.52007091</string> <key>CFBundleVersion</key> - <string>2.52006221</string> + <string>2.52007091</string> <key>LSRequiresIPhoneOS</key> <true/> <key>MinimumOSVersion</key> diff --git a/Crabtree/ON/Properties/AndroidManifest.xml b/Crabtree/ON/Properties/AndroidManifest.xml index bde7947..de66089 100644 --- a/Crabtree/ON/Properties/AndroidManifest.xml +++ b/Crabtree/ON/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtreenew" android:versionName="2.507031" android:versionCode="202007031"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtreenew" android:versionName="2.507091" android:versionCode="202007091"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" /> <!-- 鍦ㄥ畨鍗揚鐗堟湰涔嬪悗锛屽繀椤昏鎺堜簣FOREGROUND_SERVICE鏉冮檺锛屾墠鑳藉浣跨敤鍓嶅彴鏈嶅姟 --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs index 4174085..3ced117 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs @@ -38,7 +38,7 @@ //public static Button LogoButton = new Button (); - public static string RequestVersion = "2.507031"; + public static string RequestVersion = "2.507091"; public static UserInfo LoginUser; /// <summary> /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs index 57d0c7f..ccd468f 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/AddSchedule.cs @@ -823,7 +823,7 @@ Tag = deviceCommon.CommonLoopID, }; DeviceRowView.AddChidren (tempSwitch); - + if (deviceCommon.Type == DeviceType.FanModule) { #region 椋庢墖 @@ -874,7 +874,7 @@ ProgressColor = SkinStyle.Current.SelectedColor, ThumbRadius = Application.GetRealWidth (3), Max = 8, - Progress =2,// (int)(deviceCommon.SendBytes[1]), + Progress = 2,// (int)(deviceCommon.SendBytes[1]), }; DeviceRowView.AddChidren (fanLevel); @@ -1083,12 +1083,14 @@ #endregion } else if (deviceCommon.Type == DeviceType.CurtainModel || deviceCommon.Type == DeviceType.CurtainTrietex || deviceCommon.Type == DeviceType.CurtainRoller) { #region 绐楀笜 + //2020-07-09 鍒锋柊鎺у埗鎿嶄綔鐮� + deviceCommon.Command = (int)Command.UpdataCurtainModelStutas; tempSwitch.RemoveFromParent (); - var tempSwitch1 = new Button () { - Width = Application.GetMinRealAverage (90), - Height = Application.GetMinRealAverage (53), - X = Application.GetRealWidth (640 - 90 - 20), - Radius = 5, + var tempSwitch1 = new Button () { + Width = Application.GetMinRealAverage (90), + Height = Application.GetMinRealAverage (53), + X = Application.GetRealWidth (640 - 90 - 20), + Radius = 5, BorderColor = SkinStyle.Current.Transparent, BorderWidth = 1, Gravity = Gravity.CenterVertical, @@ -1118,10 +1120,13 @@ btnChoose.IsSelected = true; } deviceCommon.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; - if (timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath) == null) { + //2020-07-09 + DeviceInfo mDeviceInfo = timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath); + if (mDeviceInfo == null) { timerControlDeviceList.Add (deviceCommon); } else { - timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath).SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; + mDeviceInfo.Command = (int)Command.UpdataCurtainModelStutas; + mDeviceInfo.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; } }; @@ -1150,10 +1155,19 @@ } deviceCommon.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; - if (timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath) == null) { + //if (timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath) == null) { + // timerControlDeviceList.Add (deviceCommon); + //} else { + // timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath).SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; + //} + + //2020-07-09 + DeviceInfo mDeviceInfo = timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath); + if (mDeviceInfo == null) { timerControlDeviceList.Add (deviceCommon); } else { - timerControlDeviceList.Find ((obj) => obj.DevicePath == deviceCommon.SavePath).SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; + mDeviceInfo.Command = (int)Command.UpdataCurtainModelStutas; + mDeviceInfo.SendBytes = new byte [] { deviceCommon.LoopID, (byte)CurrentBrightness }; } } else { timerControlDeviceList.Remove (timerControlDeviceList.Find ((obj) => obj.DeviceType == (int)deviceCommon.Type && diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs index 75f8a7a..ba2bf5d 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs @@ -361,8 +361,8 @@ //IO.FileUtils.SaveEquipmentMessage (mCurtainModel1, mCurtainModel1.LoopID.ToString ()); ////var mCurtainModel2 = new CurtainModel () { LoopID = 2, DeviceID = 9, SubnetID = 42, Name = "绐楀笜2" }; ////IO.FileUtils.SaveEquipmentMessage (mCurtainModel2, mCurtainModel2.LoopID.ToString ()); - ////var mCurtainModel3 = new CurtainModel () { LoopID = 1, DeviceID = 2, SubnetID = 42, Name = "绐楀笜3" }; - ////IO.FileUtils.SaveEquipmentMessage (mCurtainModel3, mCurtainModel3.LoopID.ToString ()); + //var mCurtainModel3 = new CurtainModel () { LoopID = 1, DeviceID = 2, SubnetID = 42, Name = "绐楀笜3" }; + //IO.FileUtils.SaveEquipmentMessage (mCurtainModel3, mCurtainModel3.LoopID.ToString ()); //var mCurtainRoller = new CurtainRoller () { LoopID = 1, DeviceID = 88, SubnetID = 42, Name = "绐楀笜CurtainRoller" }; //IO.FileUtils.SaveEquipmentMessage (mCurtainRoller, mCurtainRoller.LoopID.ToString ()); @@ -371,7 +371,7 @@ //IO.FileUtils.SaveEquipmentMessage (mCurtainTrietex, mCurtainTrietex.LoopID.ToString ()); - + //var s1 = new LightEnergySocket () { LoopID = 1, DeviceID = 1, SubnetID = 44, Name = "EnergySocket" }; //IO.FileUtils.SaveEquipmentMessage (s1, s1.LoopID.ToString ()); -- Gitblit v1.8.0