.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,31 +1,11 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" /> <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> <MonoDevelop.Ide.Workbench> <Files> <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="14" Column="1" /> <File FileName="HDL-ON_iOS/Info.plist" /> <File FileName="HDL_ON/UI/MainPage.cs" Line="28" Column="55" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs" Line="177" Column="75" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" Line="158" Column="69" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/SensorEnvironmentManagerPage.cs" Line="13" Column="18" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs" Line="116" Column="149" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="DAL" expanded="True"> <Node name="Server" expanded="True" /> </Node> <Node name="UI" expanded="True" /> </Node> <Node name="HDL-ON_Android" selected="True" /> <Node name="HDL-ON_iOS" expanded="True"> <Node name="References" expanded="True" /> <Node name="Resources" expanded="True" /> </Node> </Node> </State> </Pad> @@ -37,13 +17,14 @@ <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|iPhone" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Common/ApiUtlis.cs" relfile="HDL_ON/Common/ApiUtlis.cs" line="390" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="422" column="1" /> <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" line="747" column="1" /> </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> HDL-ON_Android/Assets/Language.ini
@@ -466,6 +466,7 @@ 478=Pattern 479=Speed 480=Environmental sensor 481=Can start using environmental sensor @@ -1542,6 +1543,7 @@ 478=模式 479=风速 480=环境传感器 481=可以开始使用环境传感器了 1000=室内湿度 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorenvironment.png
HDL-ON_Android/Assets/Phone/PersonalCenter/AddDevice/EnvironmentalSensorbg.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -427,6 +427,8 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irfan_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\irfan_white.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\irfan.png" /> <AndroidAsset Include="Assets\Phone\PersonalCenter\AddDevice\EnvironmentalSensorbg.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorenvironment.png" /> </ItemGroup> <ItemGroup> <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" /> 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="202107192" android:versionName="1.2.202107192" package="com.hdl.onpro"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202107211" android:versionName="1.2.202107211" package="com.hdl.onpro"> <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" /> <!-- 乐橙可视对讲需要的权限 --> <!--<uses-permission android:name="android.permission.INTERNET" />--> HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -55,6 +55,7 @@ <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <MtouchEnableSGenConc>false</MtouchEnableSGenConc> <CodesignProvision>On+Dev-20210616-1</CodesignProvision> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> <DebugType>none</DebugType> @@ -103,28 +104,28 @@ </ItemGroup> <ItemGroup> <PackageReference Include="Newtonsoft.Json"> <Version>12.0.3</Version> <Version>13.0.1</Version> </PackageReference> <PackageReference Include="MQTTnet"> <Version>3.0.13</Version> <Version>3.0.16</Version> </PackageReference> <PackageReference Include="Microsoft.AppCenter.Analytics"> <Version>4.1.0</Version> <Version>4.3.0</Version> </PackageReference> <PackageReference Include="Microsoft.AppCenter.Crashes"> <Version>4.1.0</Version> <Version>4.3.0</Version> </PackageReference> <PackageReference Include="ZXing.Net.Mobile"> <Version>2.4.1</Version> </PackageReference> <PackageReference Include="RestSharp"> <Version>106.11.7</Version> <Version>106.12.0</Version> </PackageReference> <PackageReference Include="Xamarin.iOS.Bugly"> <Version>1.0.4</Version> </PackageReference> <PackageReference Include="Xamarin.Essentials"> <Version>1.6.0</Version> <Version>1.7.0</Version> </PackageReference> </ItemGroup> <ItemGroup> @@ -1309,6 +1310,8 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\irfan.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irfan_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irfan_white.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorenvironment.png" /> <BundleResource Include="Resources\Phone\PersonalCenter\AddDevice\EnvironmentalSensorbg.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> <string>1.2.202107192</string> <string>1.2.202107211</string> <key>CFBundleVersion</key> <string>1.2.07192</string> <string>1.2.07211</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> HDL-ON_iOS/Resources/Language.ini
@@ -466,6 +466,7 @@ 478=Pattern 479=Speed 480=Environmental sensor 481=Can start using environmental sensor @@ -1542,6 +1543,7 @@ 478=模式 479=风速 480=环境传感器 481=可以开始使用环境传感器了 1000=室内湿度 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorenvironment.png
HDL-ON_iOS/Resources/Phone/PersonalCenter/AddDevice/EnvironmentalSensorbg.png
HDL_ON/Common/R.cs
@@ -5,6 +5,10 @@ public static class StringId { /// <summary> /// 可以开始使用环境传感器了 /// </summary> public const int CanStartUsingEnvironmentalSensor = 481; /// <summary> /// 环境传感器 /// </summary> public const int SensorEnvironment = 480; HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@ /// <summary> /// 版本号 /// </summary> public static string VersionString = "1.2.0719"; public static string VersionString = "1.2.0721"; ///// <summary> ///// 客户端类型 ///// </summary> HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -227,10 +227,10 @@ //etAccount.Text = "13168123446"; //etAccount.Text = "13676202754";//巴林服务器 //etAccount.Text = "13602944661";//kx //etAccount.Text = "551775569@qq.com";//wcf etAccount.Text = "551775569@qq.com";//wcf //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374 //etAccount.Text = "15971583093";//高胜 etAccount.Text = "15217626103";//昆明金茂项目 //etAccount.Text = "15217626103";//昆明金茂项目 } b = !b; etPassword.Text = "123456"; HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -273,15 +273,20 @@ { btnIndoorTempValues.Text = "/--°"; double tempTotalValues = 0; double tempTotalCount = 0; foreach (var temp in tempSensorList) { double tempValue = 0; double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out tempValue); tempTotalValues += tempValue; if (tempValue > 0) { tempTotalValues += tempValue; tempTotalCount++; } } if (tempTotalValues > 0) { btnIndoorTempValues.Text = "/" + tempTotalValues + "°"; btnIndoorTempValues.Text = "/" + (tempTotalValues/ tempTotalCount).ToString("0.0") + "°"; } } btnIndoorTempValues.Width = btnIndoorTempValues.GetTextWidth(); @@ -322,15 +327,20 @@ { btnIndoorHumiValues.Text = "/--%"; double humiTotalValues = 0; double humiTotalCount = 0; foreach (var humi in humiSensorList) { double humiValue = 0; double.TryParse(humi.GetAttrState(FunctionAttributeKey.Value), out humiValue); humiTotalValues += humiValue; if (humiValue > 0) { humiTotalValues += humiValue; humiTotalCount++; } } if (humiTotalValues > 0) { btnIndoorHumiValues.Text = "/" + humiTotalValues + "%"; btnIndoorHumiValues.Text = "/" + (humiTotalValues / humiTotalCount).ToString("0") + "%"; } } btnIndoorHumiValues.Width = btnIndoorHumiValues.GetTextWidth(); HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -49,15 +49,20 @@ } } double humiTotalValues = 0; int humiTotalCount = 0; foreach (var temp in humiSensorList) { double humiValue = 0; double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out humiValue); humiTotalValues += humiValue; if(humiValue > 0) { humiTotalValues += humiValue; humiTotalCount++; } } if (humiTotalValues > 0) { bodyView.btnIndoorHumiValues.Text = "/" + humiTotalValues + "%"; bodyView.btnIndoorHumiValues.Text = "/" + (humiTotalValues /humiTotalCount).ToString("0")+ "%"; } bodyView.btnIndoorHumiValues.Width = bodyView.btnIndoorHumiValues.GetTextWidth(); } @@ -91,15 +96,20 @@ } } double tempTotalValues = 0; int tempTotalCount = 0; foreach (var temp in tempSensorList) { double tempValue = 0; double.TryParse(temp.GetAttrState(FunctionAttributeKey.Value), out tempValue); tempTotalValues += tempValue; if (tempValue > 0) { tempTotalValues += tempValue; tempTotalCount++; } } if (tempTotalValues > 0) { bodyView.btnIndoorTempValues.Text = "/" + tempTotalValues + "°"; bodyView.btnIndoorTempValues.Text = "/" + (tempTotalValues /tempTotalCount).ToString("0.0")+ "°"; } bodyView.btnIndoorTempValues.Width = bodyView.btnIndoorTempValues.GetTextWidth(); } HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -702,6 +702,9 @@ break; case ShowFunction.Music: functionCount = FunctionList.List.GetMusicList().Count; #if DEBUG functionCount = 1; #endif break; case ShowFunction.Panel: break; HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
@@ -51,7 +51,7 @@ var btnPic = new PicViewControl(132, 132); btnPic.Y = Application.GetRealHeight(69); btnPic.Gravity = Gravity.CenterHorizontal; btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/SenesorMegahealthBg.png"; btnPic.UnSelectedImagePath = "PersonalCenter/AddDevice/EnvironmentalSensorbg.png"; bodyFrameLayout.AddChidren(btnPic); //请输入设备机上的sn码 @@ -121,7 +121,7 @@ { waitPage.Hide(); var tipDialog = new OperationResultDisPalyPage(); tipDialog.LoadPage(true, Language.StringByID(StringId.AddSuccess), "", Language.StringByID(StringId.CanStartUsingZhaoguanMillimeterWave), Language.StringByID(StringId.Next)); tipDialog.LoadPage(true, Language.StringByID(StringId.AddSuccess), "", Language.StringByID(StringId.CanStartUsingEnvironmentalSensor), Language.StringByID(StringId.Next)); tipDialog.Show(); AddDeviceEvent?.Invoke(new Function()); this.CloseForm(); HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -29,6 +29,8 @@ /// </summary> FrameLayout sensorListView; VerticalScrolViewLayout sensorListContentView; /// <summary> /// 天气名称文本 /// </summary> @@ -237,17 +239,18 @@ contentView.AddChidren(btnRoomClickRow); #endregion sensorListView = new FrameLayout() sensorListContentView = new VerticalScrolViewLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(50), Height = Application.GetRealHeight(456), Height = Application.GetRealHeight(400), Radius = (uint)Application.GetRealWidth(12), BorderColor = 0x00000000, BorderWidth = 0, }; contentView.AddChidren(sensorListView); contentView.AddChidren(sensorListContentView); sensorListView = new FrameLayout(); sensorListContentView.AddChidren(sensorListView); LoadSenesorList(); @@ -280,37 +283,48 @@ name = sensor.name, sid = sensor.sid, deviceId = sensor.deviceId, attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = seTemp.state, curValue = seTemp.curValue } }, roomIds = sensor.roomIds, attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = seTemp.state, curValue = seTemp.curValue } ,new FunctionAttributes { key = "spk"} } }; switch (seTemp.key) { case "co2": newTemp.spk = SPK.SensorCO2; newTemp.SetAttrState("spk", "co2"); break; case "pm25": newTemp.spk = SPK.SensorPm25; newTemp.SetAttrState("spk", "pm25"); break; case "humidity": newTemp.spk = SPK.SensorHumidity; newTemp.SetAttrState("spk", "humidity"); break; case "temperature": newTemp.spk = SPK.SensorTemperature; newTemp.SetAttrState("spk", "temperature"); break; case "tvoc": newTemp.spk = SPK.SensorTVOC; newTemp.SetAttrState("spk", "tvoc"); break; } LoadSensorDiv(newTemp, index); index++; if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) { LoadSensorDiv(newTemp, index); index++; } } } else { #if DEBUG continue; #endif LoadSensorDiv(sensor, index); index++; if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) { LoadSensorDiv(sensor, index); index++; } } new System.Threading.Thread(() => @@ -319,16 +333,16 @@ }) { IsBackground = true }.Start(); } sensorListView.Height = Application.GetRealWidth(124 * (index + 1) / 2); } /// <summary> /// 加载传感器列表 /// </summary> void LoadSensorDiv(Function sensor, int index) void LoadSensorDiv(Function sensor,int index) { var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); if (room.roomId == "" || sensor.roomIds.Contains(room.roomId)) { var sensorTag = sensor.spk + sensor.sid + sensor.deviceId; FrameLayout sensorView = new FrameLayout() HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -595,18 +595,18 @@ }; selfInfoView.AddChidren(btnSeltSensorValue); Button btnShowData; btnShowData = new Button() { X = Application.GetRealWidth(291), Y = Application.GetRealWidth(62), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png", SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png", IsSelected = true, }; selfInfoView.AddChidren(btnShowData); //Button btnShowData; //btnShowData = new Button() //{ // X = Application.GetRealWidth(291), // Y = Application.GetRealWidth(62), // Width = Application.GetMinRealAverage(32), // Height = Application.GetMinRealAverage(32), // UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png", // SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png", // IsSelected = true, //}; //selfInfoView.AddChidren(btnShowData); //btnShowData.MouseUpEventHandler = (sender, e) => { // btnShowData.IsSelected = !btnShowData.IsSelected; // if(btnShowData.IsSelected) @@ -644,7 +644,9 @@ bool initTitleButton = true; foreach (var tempSensor in FunctionList.List.GetEnvirSensorsList()) var tempList = FunctionList.List.GetEnvirSensorsList(); foreach (var tempSensor in tempList) { if (tempSensor.sid == function.sid) { @@ -675,7 +677,7 @@ #region 其它传感器信息栏 FrameLayout otherInfoView = new FrameLayout() { Gravity = Gravity.CenterVertical, Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(100), BackgroundColor = CSS_Color.MainBackgroundColor, @@ -739,7 +741,11 @@ { Action backAction = () => { btnSeltSensorName.Text = tempSensor.name; MainPage.Log("45678i"); Application.RunOnMainThread(() => { btnSeltSensorName.Text = tempSensor.name; }); }; var infoView = new FunctionBaseInfoSetPage(tempSensor, backAction); MainPage.BasePageView.AddChidren(infoView); @@ -774,21 +780,26 @@ btnShowData1.IsSelected = !btnShowData1.IsSelected; if (btnShowData1.IsSelected) { if (!showFunctions.Contains(function)) if (!showFunctions.Contains(tempSensor)) { showFunctions.Add(function); showFunctions.Add(tempSensor); } } else { if (showFunctions.Contains(function)) if (showFunctions.Contains(tempSensor)) { showFunctions.Remove(function); showFunctions.Remove(tempSensor); } } LoadMothed_GetSensorHistoryData(); }; #endregion contentView.AddChidren(new Button() { Height = Application.GetRealHeight(12), }); } #endregion @@ -826,7 +837,7 @@ string yDataString = ""; foreach (var sr in FunctionList.List.GetEnvirSensorsList()) foreach (var sr in showFunctions) { if (sr.spk != function.spk) { @@ -839,7 +850,9 @@ } var sensorType = sr.spk.Split(".")[1]; var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId,"value"); var queryType = sr.GetAttrState("spk")==null? "value": sr.GetAttrState("spk"); var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId, queryType); if (revertObj != null) { if (revertObj.Code == StateCode.SUCCESS) HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
@@ -38,6 +38,7 @@ function.name = name; btnFunctionName.Text = name; function.UpdataFuncitonInfo(); actionRefresh?.Invoke(); } }; new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, function.name, callBackAction,StringId.DeviceNameCannotBeEmpty,0,new System.Collections.Generic.List<string>());