Crabtree/.vs/SmartHome/xs/UserPrefs.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/.vs/SmartHome/xs/sqlite3/storage.ide | 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/ON.Ios/AppDelegate.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/ON/Properties/AndroidManifest.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/SmartHome/UI/SimpleControl/MainPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/HelpView.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Crabtree/.vs/SmartHome/xs/UserPrefs.xml
@@ -1,24 +1,26 @@ <Properties StartupConfiguration="{1D83BF28-BA88-4152-BA41-D7EFE90A5437}|Default"> <MonoDevelop.Ide.ItemProperties.ON.Droid PreferredExecutionTarget="Android.364c4b3158493098" /> <MonoDevelop.Ide.Workbench ActiveDocument="SmartHome/UI/SimpleControl/MqttCommon.cs"> <Files> <File FileName="SmartHome/UI/SimpleControl/MainPage.cs" Line="40" Column="56" /> <File FileName="SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs" Line="84" Column="41" /> <File FileName="SmartHome/UI/SimpleControl/MqttCommon.cs" Line="225" Column="27" /> <File FileName="SmartHome/UI/SimpleControl/Phone/Register/AccountLogin.cs" Line="84" Column="50" IsPinned="True" /> <File FileName="../../../2020/测试/SmartHome/SmartHome/UI/SimpleControl/Phone/Room/UserRoom.cs" /> <File FileName="SmartHome/UI/SimpleControl/EquipmentPublicClass.cs" Line="35" Column="33" /> <File FileName="SmartHome/UI/SimpleControl/MainPage.cs" /> <File FileName="SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs" /> <File FileName="SmartHome/UI/SimpleControl/MqttCommon.cs" Line="1" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="SmartHome" expanded="True"> <Node name="ON.Droid" expanded="True"> <Node name="Packages" expanded="True" selected="True" /> <Node name="Properties" expanded="True" /> </Node> <Node name="ON.Droid" expanded="True" /> <Node name="Shared" expanded="True"> <Node name="UI" expanded="True"> <Node name="SimpleControl" expanded="True"> <Node name="Phone" expanded="True"> <Node name="Register" expanded="True" /> </Node> <Node name="MqttCommon.cs" selected="True" /> </Node> </Node> </Node> Crabtree/.vs/SmartHome/xs/sqlite3/storage.ideBinary files differ
Crabtree/ON.Ios/AppDelegate.cs
@@ -191,13 +191,15 @@ public override void OnResignActivation (UIApplication application) { Utlis.WriteLine ("OnResignActivation"); Shared.BusSocket.Stop (); //Shared.BusSocket.Stop (); BusSocketStop (); } public override void DidEnterBackground (UIApplication application) { SharedMethod.SharedMethod.IsBackground = true; Utlis.WriteLine ("DidEnterBackground"); //BusSocketStop (); } public override void WillEnterForeground (UIApplication application) @@ -209,6 +211,7 @@ UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0; // Called as part of the transiton from background to active state. // Here you can undo many of the changes made on entering the background. //BusSocketStart (); } public override void WillTerminate (UIApplication application) @@ -222,6 +225,61 @@ Utlis.WriteLine ("OnActivated"); base.OnActivated (application); BusSocketStart (); ////有些系统版本这里启动比视图控制器快 //if (!Shared.SimpleControl.MainPage.Showed) { // System.Threading.Tasks.Task.Run (() => { // while (true) { // System.Threading.Thread.Sleep (10); // if (Shared.SimpleControl.MainPage.Showed) { // break; // } // } // Shared.Application.RunOnMainThread (() => { // Shared.BusSocket.Start (6000); // Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote ((int)Reachability.InternetConnectionStatus (),false); // //RemoteInfo.Current.ReadMsgList (NSUserDefaults.StandardUserDefaults.StringForKey ("PushDeviceToken"), true); // if (SmartHome.WiFiSet.refreshView != null) { // SmartHome.WiFiSet.refreshView (); // } // }); // }); // return; //} //Shared.BusSocket.Start (6000); //Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote ((int)Reachability.InternetConnectionStatus (), false); //if (SmartHome.WiFiSet.refreshView != null) { // SmartHome.WiFiSet.refreshView (); //} //com.freeview.global.Video.FVapplicationDidBecomeActive (application); } //DateTime closeTime = DateTime.MinValue; /// <summary> /// BusSocketStop /// </summary> void BusSocketStop () { Shared.BusSocket.Stop (); //closeTime = DateTime.Now; } /// <summary> /// BusSocketStart /// </summary> void BusSocketStart () { //if (closeTime == DateTime.MinValue) { // closeTime = DateTime.Now; //} else if (closeTime.AddMinutes (2) > DateTime.Now) { // // MqttCommon.DisConnectRemoteMqttClient (); //} var netStatus = (int)Reachability.InternetConnectionStatus (); //有些系统版本这里启动比视图控制器快 if (!Shared.SimpleControl.MainPage.Showed) { System.Threading.Tasks.Task.Run (() => { @@ -233,23 +291,23 @@ } Shared.Application.RunOnMainThread (() => { Shared.BusSocket.Start (6000); Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote ((int)Reachability.InternetConnectionStatus (),false); //RemoteInfo.Current.ReadMsgList (NSUserDefaults.StandardUserDefaults.StringForKey ("PushDeviceToken"), true); Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote (netStatus, false); //RemoteInfo.Current.ReadMsgList (true); if (SmartHome.WiFiSet.refreshView != null) { SmartHome.WiFiSet.refreshView (); } }); }); return; } } else { Shared.BusSocket.Start (6000); Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote ((int)Reachability.InternetConnectionStatus (), false); Shared.SimpleControl.EquipmentPublicClass.CheckLinkRemote (netStatus, false); //RemoteInfo.Current.ReadMsgList (true); } if (SmartHome.WiFiSet.refreshView != null) { SmartHome.WiFiSet.refreshView (); } //com.freeview.global.Video.FVapplicationDidBecomeActive (application); } } } 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.504221" android:versionCode="202004221"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.crabtreenew" android:versionName="2.504232" android:versionCode="202004232"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" /> <!-- 在安卓P版本之后,必须要授予FOREGROUND_SERVICE权限,才能够使用前台服务 --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs
@@ -147,7 +147,7 @@ } } else { //搜索失败,启用远程连接 MainPage.AddTip ("Gateway not found, enable remote connection."); MainPage.AddTip ("Gateway cannot be searched locally."); } } else { @@ -165,12 +165,13 @@ if (UserConfig.Instance.CheckHomeGateways ()) { if (!string.IsNullOrEmpty (UserConfig.Instance.CurrentRegion.HomeGateways [0].GatewayUniqueId)) { // 5.1能远程,显示CloudUnlink状态,IsRemote设为true开始远程 MainPage.AddTip ("Starting remote connection mode..."); MainPage.AddTip ("Please wait, starting remote connection..."); Utlis.ShowAppLinkStatus (AppLinkStatus.CloudUnlink); CommonPage.IsRemote = true; SmartHome.MqttCommon.IsGatewayOnline = false; //await SmartHome.MqttCommon.StartCloudMqtt (); //重置参数状态 SmartHome.MqttCommon.InitState (); } } } Crabtree/SmartHome/UI/SimpleControl/MainPage.cs
@@ -37,7 +37,8 @@ //public static Button LogoButton = new Button (); public static string RequestVersion = "20200422"; public static string RequestVersion = "20200423"; public static UserInfo LoginUser; /// <summary> /// 是否是管理员权限(变更了,成员的时候,这个也为ture。为什么会声明这样变量,因为有些接口必须使用原来的Token) @@ -219,9 +220,9 @@ try { bytes = webClient.UploadData (url, Encoding.UTF8.GetBytes (dataStringJson)); } catch (System.Net.WebException webEx) { Application.RunOnMainThread (() => { MainPage.Loading.Hide (); }); //Application.RunOnMainThread (() => { // MainPage.Loading.Hide (); //}); return new ResponsePack () { StateCode = ErrorCode.NetworkError }; } string responseString = Encoding.UTF8.GetString (bytes); @@ -326,6 +327,13 @@ }); } public static void LoadingSetText (string showString = "") { Application.RunOnMainThread (() => { MainPage.Loading.Text = showString; }); } public static void LoadingHide () { Application.RunOnMainThread (() => { Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs
@@ -17,6 +17,11 @@ { public static class MqttCommon { /// <summary> /// 是否提示 远程连接的错误信息 /// </summary> public static bool IfDEBUG = false; static string mqttEncryptKey = ""; static string checkGatewayTopicBase64 = ""; static RemoteMACInfo CurRemoteMACInfo = null; @@ -57,7 +62,7 @@ new System.Threading.Thread (async () => { while (true) { try { System.Threading.Thread.Sleep (100); System.Threading.Thread.Sleep (200); if (!CommonPage.IsRemote) continue; await StartCloudMqtt (); @@ -67,6 +72,15 @@ } }) { IsBackground = true }.Start (); } public static void InitState () { IfNeedReadAllDeviceStatus = true; bNeedStartTip = true; IsGatewayOnline = false; } /// <summary> /// 是否订阅成功 @@ -135,7 +149,7 @@ if (CommonPage.IsRemote) { Utlis.ShowAppLinkStatus (AppLinkStatus.CloudUnlink); } Utlis.WriteLine ($"============>MqttRemoteDisConnectRemoteMqttClient"); //Utlis.WriteLine ($"============>MqttRemoteDisConnectRemoteMqttClient"); } } catch (Exception e) { @@ -153,7 +167,7 @@ /// <summary> /// 外网的MQTT是否正在连接 /// </summary> static bool remoteMqttIsConnecting; public static bool remoteMqttIsConnecting; static bool remoteIsConnected; /// <summary> /// 启动远程Mqtt @@ -224,7 +238,7 @@ } if (RemoteMqttClient.ConnectedHandler == null) { RemoteMqttClient.UseConnectedHandler (async (e) => { IfNeedReadAllDeviceStatus = true; //IfNeedReadAllDeviceStatus = true; mCheckGatewayTime = DateTime.Now; CheckGatewayCount = 0; bNeedStartTip = true; @@ -273,10 +287,19 @@ } } catch (Exception ex) { Utlis.WriteLine ($"============>Mqtt 远程连接通讯连接出异常:{ex.Message}"); //Utlis.WriteLine ($"============>Mqtt 远程连接通讯连接出异常:{ex.Message}"); MainPage.LoadingSetText ("Connect error, trying to reconnect."); if (IfDEBUG) { MainPage.ShowAlertOnMainThread ("error: " + ex.Message); } } finally { //最终要释放连接状态 remoteMqttIsConnecting = false; MainPage.LoadingHide (); } }); } @@ -315,16 +338,25 @@ //----第三步 开始连接 await MQTTConnectAsync (); } else { Utlis.WriteLine ("============>Mqtt CurRemoteMACInfo null"); //Utlis.WriteLine ("============>Mqtt CurRemoteMACInfo null"); MainPage.LoadingSetText ("Please wait, failed to get gateway parameters."); } } } else { Utlis.WriteLine ("============>Mqtt mqttInfoRequestResult_Obj null"); //Utlis.WriteLine ("============>Mqtt mqttInfoRequestResult_Obj null"); MainPage.LoadingSetText ("Please wait, failed to get user parameters."); //MainPage.LoadingSetText ("Please wait, failed to get parameters."); } } catch { } } catch { } } else { Utlis.WriteLine ("============>Mqtt GetInfo 失败"); //Utlis.WriteLine ("============>Mqtt GetInfo 失败"); MainPage.AddTip ("Please wait, failed to get parameters."); //MainPage.LoadingSetText ("Please wait, failed to get parameters."); } } @@ -350,6 +382,8 @@ mMqttInfo = mqttInfoRequestResult_info; //--第二步:获取当前住分享宅网关信息并连接MQTT await GetSingleHomeGatewayPaggerAndMQTTConnectAsync (); } else { MainPage.LoadingSetText ("Please wait, failed to get user parameters."); } } } @@ -363,7 +397,10 @@ //获取参数成功,开始连接... MainPage.AddTip ("Successfully obtained parameters, starting to connect..."); //MainPage.AddTip ("Successfully obtained parameters, starting to connect..."); MainPage.LoadingStart ("Please wait, connecting remotely..."); //try { // var url = mMqttInfo.connEmqDomainPort; // var clientId = mMqttInfo.connEmqClientId; @@ -389,7 +426,7 @@ // Console.WriteLine ("Connect error: " + ex.Message); //} string mes = ""; //string mes = ""; try { var url = mMqttInfo.connEmqDomainPort; @@ -397,7 +434,7 @@ var username = mMqttInfo.connEmqUserName; var passwordRemote = mMqttInfo.connEmqPwd; mes = "step1.Set Data"; //mes = "step1.Set Data"; CurRemoteMACInfo.LoginAccessToken = MainPage.LoginUser.LoginTokenString; mqttEncryptKey = CurRemoteMACInfo.aesKey; var options1 = new MQTTnet.Client.Options.MqttClientOptionsBuilder () @@ -408,14 +445,16 @@ // .WithCommunicationTimeout (new TimeSpan (0, 0, 20)) .Build (); mes = "step2.DisConnect"; //mes = "step2.DisConnect"; await DisConnectRemoteMqttClient ("StartRemoteMqtt"); //MainPage.AddTip ("Start to connect..."); mes = "step3.Start to connect"; //mes = "step3.Start to connect"; await RemoteMqttClient.ConnectAsync (options1); mes = "step4.Connected Success"; //mes = "step4.Connected Success"; remoteIsConnected = true; IsDisConnectingWithSendCatch = false; MainPage.LoadingSetText ("Remote connection succeeded."); //MainPage.AddTip ("Connection succeeded!"); //await MqttRemoteSend (new byte [] { 0 }, 1); @@ -423,12 +462,17 @@ //await MqttRemoteSend (new byte [] { 0 }, 4); } catch (Exception ex) { mes = ex.Message; //mes = ex.Message; //options1 异常提示 //Console.WriteLine("Connect error: " + ex.Message); //MainPage.ShowAlertOnMainThread ("Connect error: " + ex.Message); MainPage.LoadingSetText ("Connect error."); if (IfDEBUG) { MainPage.ShowAlertOnMainThread ("Connect error: " + ex.Message); } } finally { MainPage.ShowAlertOnMainThread ("finally: " + mes); //MainPage.ShowAlertOnMainThread ("finally: " + mes); //MainPage.AddTip ("finally: " + mes); } @@ -447,7 +491,8 @@ if (bNeedStartTip) { bNeedStartTip = false; if (CommonPage.IsRemote) { MainPage.AddTip ("Getting remote connection parameters..."); //MainPage.AddTip ("Getting remote connection parameters..."); MainPage.LoadingStart ("Please wait, getting connection parameters..."); } } } @@ -545,6 +590,8 @@ if (mGatewayRes != null) { CurRemoteMACInfo.aesKey = mGatewayRes.AesKey; mqttEncryptKey = CurRemoteMACInfo.aesKey; } else { MainPage.LoadingSetText ("Please wait, failed to get gateway parameters."); } } Crabtree/SmartHome/UI/SimpleControl/Phone/Schedule/HelpView.cs
@@ -32,8 +32,15 @@ title.MouseLongEventHandler += (sd, ds) => { //#if DEBUG try { //2020-01-15 长按显示当前住宅ID new Alert ("", UserConfig.Instance.CurrentRegion.Id, "close").Show (); ////2020-01-15 长按显示当前住宅ID //new Alert ("", UserConfig.Instance.CurrentRegion.Id, "close").Show (); //2020-04-23 长按启用 Remote DEBUG Tip SmartHome.MqttCommon.IfDEBUG = !SmartHome.MqttCommon.IfDEBUG; string mes = "Remote DEBUG Tip" + (SmartHome.MqttCommon.IfDEBUG ? "Open" : "Close"); new Alert ("", mes, "close").Show (); } catch { } //#endif Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserMiddle.cs
@@ -75,7 +75,7 @@ Width = Application.GetRealWidth (640), Height = Application.GetRealHeight (1136 - 126 - 90 - 90), BackgroundColor = SkinStyle.Current.ViewColor, ScrollEnabled = false //ScrollEnabled = true }; public static Button btnVersion = new Button () { Y = Application.GetRealHeight (1136 - 90 - 90), @@ -284,9 +284,38 @@ } } UserConfig.Instance.SaveUserConfig (); btnLinkStatus.MouseUpEventHandler += (dd, ff) => { EventHandler<MouseEventArgs> btnLinkEvent = (sender, e) => { try { if (SmartHome.MqttCommon.remoteMqttIsConnecting && CommonPage.IsRemote) { Alert alert = new Alert ("", "Being connected remotely, do you still want to cancel and re-detect?", Language.StringByID (R.MyInternationalizationString.Cancel), Language.StringByID (R.MyInternationalizationString.Confrim)); alert.ResultEventHandler += (sender2, e2) => { if (e2) { EquipmentPublicClass.CheckLinkRemote (UserConfig.Instance.internetStatus); } }; alert.Show (); //MainPage.ShowAlertOnMainThread ("Please wait, connecting remotely..."); } else { EquipmentPublicClass.CheckLinkRemote (UserConfig.Instance.internetStatus); } } catch { } }; try { //2020-04-23 解决安卓重复弹窗问题 if (btnLinkStatus.MouseUpEventHandler == null) { btnLinkStatus.MouseUpEventHandler += btnLinkEvent; } else { btnLinkStatus.MouseUpEventHandler -= btnLinkEvent; btnLinkStatus.MouseUpEventHandler += btnLinkEvent; } } catch { //Utlis.WriteLine ("ccc"); } } @@ -311,31 +340,33 @@ return; } Language.CurrentLanguage = "English"; #if DEBUG //UserConfig.Instance.SkinCode = 1; Language.CurrentLanguage = "English"; var lii = new LightLogic () { Type = DeviceType.LightRGB, LoopID = 1, DeviceID = 4, SubnetID = 42, Name = "RGB" }; IO.FileUtils.SaveEquipmentMessage (lii, lii.LoopID.ToString ()); var lii1 = new LightSwitch () { LoopID = 1, DeviceID = 2, SubnetID = 232, Name = "继电器" }; IO.FileUtils.SaveEquipmentMessage (lii1, lii1.LoopID.ToString ()); //var lii11 = new LightDimming () { LoopID = 1, DeviceID = 1, SubnetID = 232, Name = "调光器" }; //IO.FileUtils.SaveEquipmentMessage (lii11, lii11.LoopID.ToString ()); //var lii111 = new LightDimming () { LoopID = 1, DeviceID = 8, SubnetID = 232, Name = "调光器2" }; //IO.FileUtils.SaveEquipmentMessage (lii111, lii111.LoopID.ToString ()); //var lii = new LightLogic () { Type = DeviceType.LightRGB, LoopID = 1, DeviceID = 4, SubnetID = 42, Name = "RGB" }; //IO.FileUtils.SaveEquipmentMessage (lii, lii.LoopID.ToString ()); //var lii1 = new LightSwitch () { LoopID = 1, DeviceID = 2, SubnetID = 232, Name = "继电器" }; //IO.FileUtils.SaveEquipmentMessage (lii1, lii1.LoopID.ToString ()); ////var lii11 = new LightDimming () { LoopID = 1, DeviceID = 1, SubnetID = 232, Name = "调光器" }; ////IO.FileUtils.SaveEquipmentMessage (lii11, lii11.LoopID.ToString ()); ////var lii111 = new LightDimming () { LoopID = 1, DeviceID = 8, SubnetID = 232, Name = "调光器2" }; ////IO.FileUtils.SaveEquipmentMessage (lii111, lii111.LoopID.ToString ()); var mCurtainModel1 = new CurtainModel () { LoopID = 1, DeviceID = 9, SubnetID = 42, Name = "窗帘" }; 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 mCurtainModel1 = new CurtainModel () { LoopID = 1, DeviceID = 9, SubnetID = 42, Name = "窗帘" }; //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 mCurtainRoller = new CurtainRoller () { LoopID = 1, DeviceID = 88, SubnetID = 42, Name = "窗帘CurtainRoller" }; IO.FileUtils.SaveEquipmentMessage (mCurtainRoller, mCurtainRoller.LoopID.ToString ()); //var mCurtainRoller = new CurtainRoller () { LoopID = 1, DeviceID = 88, SubnetID = 42, Name = "窗帘CurtainRoller" }; //IO.FileUtils.SaveEquipmentMessage (mCurtainRoller, mCurtainRoller.LoopID.ToString ()); var mCurtainTrietex = new CurtainTrietex () { LoopID = 1, DeviceID = 87, SubnetID = 42, Name = "窗帘CurtainTrietex" }; IO.FileUtils.SaveEquipmentMessage (mCurtainTrietex, mCurtainTrietex.LoopID.ToString ()); //var mCurtainTrietex = new CurtainTrietex () { LoopID = 1, DeviceID = 87, SubnetID = 42, Name = "窗帘CurtainTrietex" }; //IO.FileUtils.SaveEquipmentMessage (mCurtainTrietex, mCurtainTrietex.LoopID.ToString ()); @@ -346,20 +377,20 @@ //var s2 = new LightEnergySwitch () { LoopID = 11, DeviceID = 1, SubnetID = 44, Name = "EnergySwitch" }; //IO.FileUtils.SaveEquipmentMessage (s2, s2.LoopID.ToString ()); InfraredMode infraredMode = new InfraredMode () { LoopID = 1, SubnetID = 100, DeviceID = 12, InfraredType = InfraredType.TV, Name = "测试电视" }; IO.FileUtils.SaveEquipmentMessage (infraredMode, "1"); ACInfrared aCInfrared = new ACInfrared () { LoopID = 1, SubnetID = 100, DeviceID = 112, Name = "空调ACInfrared" }; IO.FileUtils.SaveEquipmentMessage (aCInfrared, "1"); //InfraredMode infraredMode = new InfraredMode () { LoopID = 1, SubnetID = 100, DeviceID = 12, InfraredType = InfraredType.TV, Name = "测试电视" }; //IO.FileUtils.SaveEquipmentMessage (infraredMode, "1"); //ACInfrared aCInfrared = new ACInfrared () { LoopID = 1, SubnetID = 100, DeviceID = 112, Name = "空调ACInfrared" }; //IO.FileUtils.SaveEquipmentMessage (aCInfrared, "1"); ACPanel mACPanel = new ACPanel () { LoopID = 1, SubnetID = 100, DeviceID = 42, Name = "空调面板ACPanel" }; IO.FileUtils.SaveEquipmentMessage (mACPanel, "1"); //ACPanel mACPanel = new ACPanel () { LoopID = 1, SubnetID = 100, DeviceID = 42, Name = "空调面板ACPanel" }; //IO.FileUtils.SaveEquipmentMessage (mACPanel, "1"); CustomAC mCustomAC = new CustomAC () { LoopID = 1, SubnetID = 99, DeviceID = 42, Name = "空调CustomAC" }; IO.FileUtils.SaveEquipmentMessage (mCustomAC, "1"); //CustomAC mCustomAC = new CustomAC () { LoopID = 1, SubnetID = 99, DeviceID = 42, Name = "空调CustomAC" }; //IO.FileUtils.SaveEquipmentMessage (mCustomAC, "1"); HVAC mHVAC = new HVAC () { LoopID = 1, SubnetID = 98, DeviceID = 42, Name = "空调HVAC" }; IO.FileUtils.SaveEquipmentMessage (mHVAC, "1"); //HVAC mHVAC = new HVAC () { LoopID = 1, SubnetID = 98, DeviceID = 42, Name = "空调HVAC" }; //IO.FileUtils.SaveEquipmentMessage (mHVAC, "1"); //var fanM = new FanModule () { Name = "Fan Module",SubnetID = 2,DeviceID = 1,LoopID = 1}; @@ -368,8 +399,8 @@ //IO.FileUtils.SaveEquipmentMessage (fanLoop1, "1"); //var fanLoop2 = new FanModule () { Name = "Fan 2", SubnetID = 2, DeviceID = 1, LoopID = 2 }; //IO.FileUtils.SaveEquipmentMessage (fanLoop2, "2"); LightEnergySocket sddd = new LightEnergySocket () { LoopID = 1, SubnetID = 100, DeviceID = 122, Name = "测试插座" }; IO.FileUtils.SaveEquipmentMessage (sddd, "1"); //LightEnergySocket sddd = new LightEnergySocket () { LoopID = 1, SubnetID = 100, DeviceID = 122, Name = "测试插座" }; //IO.FileUtils.SaveEquipmentMessage (sddd, "1"); //var ud = new UniversalDevice () { LoopID = 1,SubnetID = 42,DeviceID = 6,ActionType = 2,Name = "Universal-1",obj1 = 1,TargetType = 0}; //ud.SendBytes = new List<byte> () { 1 ,0}; Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs
@@ -234,6 +234,7 @@ }; DataReceptionView.AddChidren (btnDataReceptionTitle); EventHandler<MouseEventArgs> DataReceptionEventHandler = (sender, e) => { GoData (); }; DataReceptionView.MouseUpEventHandler += DataReceptionEventHandler;