DLL/Shared.Droid.dllBinary files differ
HDL-ON_Android/Assets/Language.ini
@@ -621,6 +621,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete @@ -1914,7 +1915,7 @@ 634=推荐 635=当前颜色 636=色值号为6位(由纯数字/数字+字母组合) 637=删除组控 2532=访客邀请记录 @@ -3207,6 +3208,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete @@ -4494,6 +4496,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete @@ -5770,6 +5773,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/GroupControl_blue.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/GroupControl_white.png
HDL-ON_Android/Assets/Phone/FunctionIcon/Light/ColorfulBar.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -194,8 +194,8 @@ <Reference Include="LcVideoSdk"> <HintPath>..\DLL\LC\Android\LcVideoSdk.dll</HintPath> </Reference> <Reference Include="ys"> <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath> <Reference Include="HdlEzvizDroid"> <HintPath>..\..\..\..\Downloads\HdlEzvizDroid.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -227,6 +227,7 @@ <Compile Include="Zxing\ScanActivity.cs" /> <Compile Include="LeChengVideo\LeTest.cs" /> <Compile Include="Other\LocationUtils.cs" /> <Compile Include="Other\MyLocationListener_V2.cs" /> </ItemGroup> <ItemGroup> <AndroidAsset Include="Assets\agconnect-services.json" /> @@ -427,6 +428,9 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockClose1.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen1.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\selectlocation.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\ColorfulBar.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_white.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> @@ -753,7 +757,7 @@ <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" /> <PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" /> <PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.3" /> <PackageReference Include="Xamarin.Essentials" Version="1.7.5" /> <PackageReference Include="Xamarin.Essentials" Version="1.7.0" /> <PackageReference Include="Xamarin.Android.Support.v4"> <Version>28.0.0.3</Version> </PackageReference> HDL-ON_Android/Other/MyLocationListener_V2.cs
New file @@ -0,0 +1,60 @@ using Android.Locations; using Android.OS; using Android.App; using Android.Content; using Android.Runtime; using Android.Views; using Android.Widget; using System; // 在你的活动(Activity)或片段(Fragment)中定义一个位置监听器类 public class MyLocationListener_V2 : Java.Lang.Object, ILocationListener { public void OnLocationChanged(Location location_android) { if (location_android != null) { try { double latitude = location_android.Latitude; double longitude = location_android.Longitude; // 在这里处理获取到的经纬度信息 Console.WriteLine($"获取到的经纬度信息 : Latitude: {latitude}, Longitude: {longitude}"); try { if (location_android != null) { HDL_ON.MainPage.cityInfo.lat = location_android.Latitude.ToString(); HDL_ON.MainPage.cityInfo.lon = location_android.Longitude.ToString(); } } catch (Exception ex) { Console.WriteLine($"经纬度获取异常: {ex.Message}"); } } catch (Exception ex) { Console.WriteLine($"经纬度获取异常2: {ex.Message}"); } } } public void OnProviderDisabled(string provider) { // 当位置提供程序被禁用时的处理逻辑 } public void OnProviderEnabled(string provider) { // 当位置提供程序被启用时的处理逻辑 } public void OnStatusChanged(string provider, [GeneratedEnum] Availability status, Bundle extras) { // 当位置提供程序状态发生变化时的处理逻辑 } } HDL-ON_Android/Resources/Resource.designer.cs
Diff too large HDL-ON_Android/SplashActivity.cs
@@ -3,6 +3,7 @@ using Android.App; using Android.Content; using Android.Content.PM; using Android.Locations; using Android.Net; using Android.OS; using Android.Support.V4.App; @@ -23,6 +24,10 @@ [IntentFilter(new string[] { "com.hdl.onpro.SplashActivity", Intent.ActionView })] public class SplashActivity : Activity { protected override void OnActivityResult(int requestCode, Result resultVal, Intent data) { if (requestCode == 99) @@ -277,18 +282,18 @@ var isfirst = true; //获取经纬度 Shared.Application.LocationAction = (lon, lat) => { try { //if (isfirst) //{ // //只触发一次 // //Shared.Application.LocationAction = null; // new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", ".")); //} //isfirst = false; if (isfirst) { //只触发一次 new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", ".")); } isfirst = false; ///监听经纬度 HDL_ON.UI.UI2.Intelligence.Automation.LogicMethod.Current.AppLatAndLonEvent(lon, lat); //关闭定位服务 @@ -410,7 +415,36 @@ } // 在你的活动(Activity)或片段(Fragment)中的某个方法中,开始监听位置变化 void StartLocationUpdates() { // 创建位置管理器 var locationManager = (LocationManager)GetSystemService(Context.LocationService); // 设置位置监听器 var locationListener = new MyLocationListener_V2(); // 请求位置更新 locationManager.RequestLocationUpdates(LocationManager.GpsProvider, 0, 0, locationListener); } // 在你的活动(Activity)或片段(Fragment)中的某个方法中,停止监听位置变化 void StopLocationUpdates() { // 创建位置管理器 var locationManager = (LocationManager)GetSystemService(Context.LocationService); // 设置位置监听器 var locationListener = new MyLocationListener_V2(); // 停止位置更新 locationManager.RemoveUpdates(locationListener); } } } HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -27,7 +27,7 @@ <MtouchDebug>true</MtouchDebug> <CodesignKey>iPhone Developer</CodesignKey> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <CodesignProvision>On+Dev-20210616-1</CodesignProvision> <CodesignProvision>OnPro230605-1-Dev</CodesignProvision> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> @@ -51,7 +51,7 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <MtouchArch>ARM64</MtouchArch> <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <CodesignKey>iPhone Developer: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchDebug>true</MtouchDebug> <MtouchI18n>cjk</MtouchI18n> <MtouchLink>SdkOnly</MtouchLink> @@ -59,7 +59,7 @@ <MtouchEnableSGenConc>false</MtouchEnableSGenConc> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <CodesignProvision>OnPro230417-1-Dev</CodesignProvision> <CodesignProvision>OnPro230630-1-Dev</CodesignProvision> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> <DebugType>none</DebugType> @@ -1588,6 +1588,9 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\securitydoorezviz.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockClose1.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen1.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Light\ColorfulBar.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\GroupControl_white.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> HDL-ON_iOS/Resources/Language.ini
@@ -621,6 +621,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete @@ -1914,7 +1915,7 @@ 634=推荐 635=当前颜色 636=色值号为6位(由纯数字/数字+字母组合) 637=删除组控 2532=访客邀请记录 @@ -3207,6 +3208,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete @@ -4494,6 +4496,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete @@ -5770,6 +5773,7 @@ 634=Recommen 635=Current Color 636=Color value number is 6 digits (composed of pure numbers/numbers+letters) 637=Delete HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/GroupControl_blue.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/GroupControl_white.png
HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/ColorfulBar.png
HDL_ON/Common/ApiUtlis.cs
@@ -368,6 +368,7 @@ } //======================群控==================== if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) { var pack = Ins.HttpRequest.GetGroupControlList(); HDL_ON/Common/R.cs
@@ -5,6 +5,10 @@ public static class StringId { /// <summary> /// 删除组控 /// </summary> public const int DelGroupControl = 637; /// <summary> /// 色值号为6位(由纯数字/数字+字母组合) /// </summary> public const int CurHexTip = 636; HDL_ON/Entity/Function/Function.cs
@@ -816,11 +816,15 @@ case FunctionAttributeKey.CCT: case FunctionAttributeKey.RGB: case FunctionAttributeKey.Angle: case FunctionAttributeKey.Colorful: case FunctionAttributeKey.ColorfulBegin: case FunctionAttributeKey.ColorfulEnd: case FunctionAttributeKey.ColorfulTime: case "security": //case FunctionAttributeKey.FadeTime: if (attr.curValue.ToString() == "{}") { if (attr.key == FunctionAttributeKey.OnOff) if (attr.key == FunctionAttributeKey.OnOff || attr.key == FunctionAttributeKey.Colorful) { attr.curValue = "off"; } @@ -869,7 +873,6 @@ UintString = us, key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min }); } break; } } HDL_ON/Entity/Function/Scene.cs
@@ -751,6 +751,7 @@ text = catchString == "true" ? Language.StringByID(StringId.Defense) : Language.StringByID(StringId.Undefense); break; case FunctionAttributeKey.OnOff: case FunctionAttributeKey.Colorful: text = catchString == "on" ? Language.StringByID(StringId.On) : Language.StringByID(StringId.OFF); break; case FunctionAttributeKey.SetTemp: HDL_ON/HDL_ON.projitems
@@ -553,6 +553,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\GroupControlPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\ColorfulSettingPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\ColorfulInfoPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\GroupControlPage_V2.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" /> HDL_ON/UI/MainPage.cs
@@ -223,7 +223,7 @@ #if __ANDROID__ new System.Threading.Thread(async () => { int i = 0; int i = 10; while (i < 10) { try { HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -23,8 +23,12 @@ switch (function.spk) { case SPK.GroupControl: var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); dialog.ShowDialog(); //var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); //dialog.ShowDialog(); var groupControlPage = new GroupControlPage_V2(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); MainPage.BasePageView.AddChidren(groupControlPage); groupControlPage.LoadPage(btnCollectionIcon, btnName, btnFromFloor); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; break; case SPK.AirSwitch: var airSwitchPage = new AirSwitchPage(function); HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -225,6 +225,8 @@ }; } /// <summary> /// 房间标题区域 /// </summary> @@ -261,17 +263,17 @@ /// <param name="room"></param> /// <param name="skipAction"></param> /// <param name="text"></param> public void LoadTopView_SettingText(Action skipAction,string text) public void LoadTopView_SettingText(Action skipAction,string text,bool isDelColor = false) { LoadTopView(); var btnSetting = new Button() { X = Application.GetRealWidth(337-100), X = Application.GetRealWidth(355-100), Y = Application.GetRealHeight(29), Width = Application.GetMinRealAverage(100), Height = Application.GetMinRealAverage(28), TextColor = CSS_Color.MainColor, TextColor = isDelColor ?CSS_Color.WarningColor: CSS_Color.MainColor, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterRight, Text = text, HDL_ON/UI/UI1-Login/ForgetPasswordPage.cs
@@ -112,7 +112,7 @@ /// <summary> /// 验证码文本输入框 /// </summary> TextView etVerificationCode; EditText etVerificationCode; /// <summary> /// 获取验证码按钮 /// </summary> @@ -341,16 +341,16 @@ //}; //verificationCodeView.AddChidren(btnDividingLineVertical_VerificationCodeView1); etVerificationCode = new TextView() etVerificationCode = new EditText() { X = Application.GetRealWidth(49), Width = Application.GetRealWidth(61 + 84), //TextAlignment = TextAlignment.CenterLeft, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, //PlaceholderTextColor = CSS_Color.PromptingColor1, //PlaceholderText = Language.StringByID(StringId.PlsEntryVerificationCode), //IsNumberKeyboardType = true PlaceholderTextColor = CSS_Color.PromptingColor1, PlaceholderText = Language.StringByID(StringId.PlsEntryVerificationCode), IsNumberKeyboardType = true, }; verificationCodeView.AddChidren(etVerificationCode); HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -323,6 +323,7 @@ etAccount.Text = "18316672920"; etAccount.Text = "support7@hdlautomation.com"; etAccount.Text = "13375012446";//测试服务器 etAccount.Text = "15855403939"; } else { @@ -367,9 +368,9 @@ }else if(etAccount.Text == "18688414428") { etPassword.Text = "HDL1985000"; }else if (etAccount.Text == "13138683659") }else if (etAccount.Text == "15855403939") { etPassword.Text = "wsad123321"; etPassword.Text = "yyr123456"; } else if (etAccount.Text == "18100573477") { @@ -780,8 +781,12 @@ new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, new FunctionAttributes() { key = "brightness",value =new List<string>(){ "0","100" }, curValue="100",state = "100" }, new FunctionAttributes() { key = "rgb",value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, //new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, new FunctionAttributes() { key = "fade_time",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, new FunctionAttributes() { key = "delay",value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, new FunctionAttributes() { key = "colorful",value =new List<string>(){ "on","off" }, curValue="on",state = "on" }, new FunctionAttributes() { key = FunctionAttributeKey.ColorfulBegin,value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, new FunctionAttributes() { key = FunctionAttributeKey.ColorfulEnd,value =new List<string>(){ "0","100" }, curValue="0,0,0",state = "0,0,0" }, new FunctionAttributes() { key = FunctionAttributeKey.ColorfulTime,value =new List<string>(){ "0","100" }, curValue="0",state = "0" }, }, }; lightRgb1.SaveFunctionFile(); @@ -1338,6 +1343,36 @@ #endregion if (FunctionList.List.groupControls.Count == 0) { FunctionList.List.groupControls.Add(new GroupControl() { name = "群控测试", collect = true, uids = new List<string>() { "1405771024583090178", "9191a3a2-026f-4667-a0b1-e3af699e7295", }, roomIds = new List<string>() { "1405771024583090178", "9191a3a2-026f-4667-a0b1-e3af699e7295", }, sids = new List<GroupControlFunction>() { new GroupControlFunction(){ sid = "light1", spk = SPK.LightRGB, }, new GroupControlFunction(){ sid = "light2", spk = SPK.LightRGB, }, } }); } #region 场景 var scene1 = new Scene() { @@ -1695,29 +1730,6 @@ LoadEventList(); account = etAccount.Text.Trim(); #if DEBUG1211 //本地模式 Button btnLocalMode = new Button() { Y = Application.GetRealHeight(600), Height = Application.GetRealHeight(67), Text = "Local Mode", TextAlignment = TextAlignment.Center, BackgroundColor = CSS_Color.MainColor, TextColor = CSS_Color.TextualColor, }; bodyView.AddChidren(btnLocalMode); btnLocalMode.MouseUpEventHandler = (sender, e) => { MainPage.LocalMode = true; UserInfo.Current = new UserInfo(); MainPage.GoUserPage(); }; MainPage.Log("etAccount.TextAlignment : " + etAccount.TextAlignment.ToString()); #endif #region 隐私政策 AddServiceAgreementControl(bodyView); HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1223,11 +1223,11 @@ btnIcon.UnSelectedImagePath = UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect); //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; } else if (function.spk == SPK.GroupControl) { btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; } //else if (function.spk == SPK.GroupControl) //{ // btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; // btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; //} else { Button btnSwitch; HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -405,17 +405,17 @@ /// </summary> void LoadEvent_DivSkipEvent() { if (function.spk == SPK.GroupControl) { EventHandler<MouseEventArgs> handler = (sender, e) => { var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); dialog.ShowDialog(); }; this.MouseUpEventHandler = handler; btnName.MouseUpEventHandler = handler; btnFromFloor.MouseUpEventHandler = handler; return; } //if (function.spk == SPK.GroupControl) //{ // EventHandler<MouseEventArgs> handler = (sender, e) => { // var dialog = new GroupControlPage(FunctionList.List.groupControls.Find((obj) => obj.sid == function.sid)); // dialog.ShowDialog(); // }; // this.MouseUpEventHandler = handler; // btnName.MouseUpEventHandler = handler; // btnFromFloor.MouseUpEventHandler = handler; // return; //} var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.room,this.action); this.MouseUpEventHandler = eventHandler; btnName.MouseUpEventHandler = eventHandler; HDL_ON/UI/UI2/2-Classification/FunctionPage.cs
@@ -12,7 +12,7 @@ /// <summary> /// 当前窗体 /// </summary> static FrameLayout bodyView; public static FunctionPage bodyView; /// <summary> /// 楼层选择下拉图标 /// </summary> @@ -37,6 +37,26 @@ } /// <summary> /// 重载界面 /// </summary> public void ReLoadPage() { if (bodyView != null) { try { bodyView.RemoveAll(); LoadPage(this.titleId); functionList = new List<Function>(); } catch (Exception ex) { MainPage.Log($"FunctionPage ReloadPage error :\r\n {ex.Message}"); } } } public void LoadPage(int titleId_out) { this.titleId = titleId_out; HDL_ON/UI/UI2/2-Classification/RoomPage.cs
@@ -62,8 +62,14 @@ { if (bodyView != null) { try { bodyView.RemoveAll(); LoadPage(); }catch (Exception ex) { MainPage.Log($"RoomPage ReloadPage error :\r\n {ex.Message}"); } } } HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -18,6 +18,8 @@ Action refreshAction; SceneFunction sceneFunction; bool isColorful = false; public SceneFunctionInfoEditPage(Scene s, SceneFunction fc,Action action) { bodyView = this; @@ -33,7 +35,6 @@ } catch { } } //sceneFunction = fc; refreshAction = action; } @@ -51,8 +52,21 @@ }; bodyView.AddChidren(contentView); LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff)); var onOffStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff); LoadFunctionRow(onOffStatus); if (sceneFunction.localFunction.spk == SPK.LightRGB) { var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); if (colorfulStatus != null) { isColorful = true; LoadColorfulRow(colorfulStatus); } } if(!isColorful) { foreach (var attr in sceneFunction.status) { switch (attr.key) @@ -61,7 +75,6 @@ LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp)); break; case FunctionAttributeKey.Mode: LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Mode)); break; case FunctionAttributeKey.FanSpeed: @@ -91,41 +104,12 @@ } } //加载开关Row //LoadFunctionRow(sceneFunction.localFunction.trait_on_off); //switch (sceneFunction.localFunction.functionType) //{ // case SPK.AcStandard: // LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "set_temp")); // LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "mode")); // LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "fan")); // break; // case SPK.FloorHeatStandard: // LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "set_temp")); // LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "mode")); // break; // case SPK.CurtainSwitch: // //无操作 // break; // case SPK.CurtainTrietex: // case SPK.CurtainRoller: // LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "percent")); // break; // case SPK.LightSwitch: // //无操作 // break; // case SPK.LightDimming: // case SPK.LightRGB: // LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "brightness")); // break; //} if (DB_ResidenceData.Instance.GatewayType != 0) { //加载延时Row LoadDelayRow(); } } var bottomView = new FrameLayout() { Y = Application.GetRealHeight(591), @@ -392,6 +376,64 @@ #endregion } /// <summary> /// 加载功能Row /// </summary> void LoadColorfulRow(SceneFunctionStatus sceneStatus) { if (sceneStatus == null) return; #region Row code var row = new FrameLayout() { Height = Application.GetRealHeight(50), BackgroundColor = CSS_Color.MainBackgroundColor, }; contentView.AddChidren(row); row.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); Button btnRight = new Button() { X = Application.GetRealWidth(339), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "Public/Right.png", }; row.AddChidren(btnRight); var showCode = ""; var btnFunctionText = new Button() { Width = Application.GetRealWidth(330), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = sceneStatus.GetValueText(showCode) }; row.AddChidren(btnFunctionText); var btnFunctionName = new Button() { X = Application.GetRealWidth(16), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.SubheadingFontSize, TextID = StringId.ColorfulFunction }; row.AddChidren(btnFunctionName); btnFunctionName.MouseUpEventHandler = (sender, e) => { LoadEditDialog_OnOff(sceneStatus, btnFunctionText); }; #endregion } #region 加载功能场景数据调节界面 /// <summary> HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
@@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Threading; using HDL_ON.Common; using HDL_ON.DAL.Server; using HDL_ON.DriverLayer; using HDL_ON.Entity; @@ -50,7 +51,8 @@ /// <summary> /// 回调刷新 /// </summary> Action<GroupControl> backActon; Action<GroupControl> addActon; Action delAction; /// <summary> /// 是否新增群控 /// </summary> @@ -64,7 +66,7 @@ GroupControlType groupControlType = new GroupControlType(); public AddGroupControlPage(GroupControl groupControl, Action<GroupControl> action) public AddGroupControlPage(GroupControl groupControl, Action<GroupControl> addAction,Action delAction) { bodyView = this; if(groupControl == null) @@ -78,15 +80,81 @@ editDataString = Newtonsoft.Json.JsonConvert.SerializeObject(this.groupControl); } groupControlLightList = new List<Function>(); backActon = action; this.addActon = addAction; this.delAction = delAction; lightList = FunctionList.List.GetLightList(); } public void LoadPage() { bodyView.BackgroundColor = CSS_Color.BackgroundColor; if (isAdd) { new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView(); } else { new TopViewDiv(bodyView, "").LoadTopView_SettingText(()=> { Action action = () => { var waitPage = new Loading(); this.AddChidren(waitPage); waitPage.Start(""); new System.Threading.Thread(() => { try { var pack = ApiUtlis.Ins.HttpRequest.DelGroupControl(groupControl.userDeviceGroupControlId); if (pack != null) { Application.RunOnMainThread(() => { try { if (pack.Code == StateCode.SUCCESS) { FunctionList.List.groupControls.Remove(groupControl); //list.Remove(groupControl); this.RemoveFromParent(); delAction?.Invoke(); } else { IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); } } catch (Exception ex) { MainPage.Log($"刷新组控数据异常:{ex.Message}"); } }); } } catch (Exception ex) { MainPage.Log($"删除组控异常:{ex.Message}"); } finally { Application.RunOnMainThread(() => { if (waitPage != null) { waitPage.Hide(); waitPage.RemoveFromParent(); waitPage = null; } }); } }) { IsBackground = true }.Start(); }; new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DoYouWantDelCombinedDimming, action); }, Language.StringByID(StringId.DelGroupControl),true); } var contentView = new FrameLayout() { Y = Application.GetRealHeight(64), @@ -392,7 +460,7 @@ { MainPage.Log($"添加群控异常,转译返回数据失败:{ex.Message}"); } backActon?.Invoke(groupControl); addActon?.Invoke(groupControl); this.RemoveFromParent(); } else @@ -443,7 +511,7 @@ { temp = groupControl; } backActon?.Invoke(temp); addActon?.Invoke(temp); this.RemoveFromParent(); } else HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs
@@ -28,7 +28,7 @@ var page = new AddGroupControlPage(null, (newGC)=> { ReadGroupControlList(); }); },()=> { }); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; @@ -98,7 +98,7 @@ list.Add(new GroupControl() { name = "组合调光1", roomIds = new List<string> { Room.CurrentSpatial.RoomList[0].roomId }, roomIds = new List<string> {}, sid = "00000000000000001", type = "light", }); @@ -106,7 +106,7 @@ list.Add(new GroupControl() { name = "组合调光2", roomIds = new List<string> { Room.CurrentSpatial.RoomList[0].roomId }, roomIds = new List<string> { },//Room.CurrentSpatial.RoomList[0].roomId sid = "00000000000000002", type = "light", }); @@ -185,15 +185,20 @@ (newGC) => { try { if (newGC != null) { Application.RunOnMainThread(() => { groupControl.roomIds = newGC.uids; btnFunctionLocationInfo.Text = newGC.GetUidListName(); }); } }catch(Exception ex) { MainPage.Log($"刷新群控房间信息异常:{ex.Message}"); } },()=> { LoadGroupControlView(FunctionList.List.groupControls); }); MainPage.BasePageView.AddChidren(page); page.LoadPage(); HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
@@ -26,7 +26,7 @@ /// </summary> public string NewGroupControlSid() { string sceneId = ""; string Id = ""; try { string sOidBeginsWith = "000101";//厂商 + 通讯方式 @@ -53,23 +53,23 @@ //sTimeSpan = "00000000"; } sceneId = sOidBeginsWith + sTimeSpan; Id = sOidBeginsWith + sTimeSpan; sceneId += "AA"; sceneId += "AA01"; Id += "AA"; Id += "AA01"; int maxId = 1; Random random = new Random(Guid.NewGuid().GetHashCode()); maxId = random.Next(10); sceneId += (maxId + 1).ToString("X4"); sceneId += "0000"; Id += (maxId + 1).ToString("X4"); Id += "0000"; } catch { return sceneId; return Id; } return sceneId; return Id; } /// <summary> /// 群控名称 HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
New file @@ -0,0 +1,746 @@ using System; using System.Collections.Generic; using HDL_ON.Entity; using HDL_ON.UI.CSS; using Shared; namespace HDL_ON.UI { public partial class GroupControlPage_V2 : FrameLayout { FrameLayout bodyView; GroupControl function; FrameLayout controlView; Button btnFunctionName; Button btnFromFoorAndRoom; Button btnCollection; Button btnCollection_Out; Button btnFunctionName_Out; Button btnFromFloor_Out; public GroupControlPage_V2(GroupControl groupControl) { bodyView = this; function = groupControl; if (function == null) { function = new GroupControl(); } } public void LoadPage(Button btnCollectionIcon, Button btnFunctionNameOut, Button btnFromFloorOut) { btnCollection_Out = btnCollectionIcon; btnFunctionName_Out = btnFunctionNameOut; btnFromFloor_Out = btnFromFloorOut; bodyView.BackgroundColor = CSS_Color.BackgroundColor; controlView = new FrameLayout() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(88), Width = Application.GetRealWidth(327), Height = Application.GetRealHeight(526), BackgroundImagePath = "Public/Fragmentbg.png", }; bodyView.AddChidren(controlView); btnFunctionName = new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(14), Width = Application.GetRealWidth(270), Height = Application.GetRealHeight(37), TextColor = CSS_Color.FirstLevelTitleColor, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel, Text = function.name, }; controlView.AddChidren(btnFunctionName); btnFromFoorAndRoom = new Button() { X = Application.GetRealWidth(16), Y = btnFunctionName.Bottom, Width = Application.GetRealWidth(270), Height = Application.GetRealHeight(21), TextColor = CSS_Color.PromptingColor1, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = function.GetRoomListName() }; controlView.AddChidren(btnFromFoorAndRoom); btnCollection = new Button() { X = Application.GetRealWidth(273), Y = Application.GetRealHeight(14), Width = Application.GetMinRealAverage(40), Height = Application.GetMinRealAverage(40), SelectedImagePath = "Collection/CollectionIcon.png", UnSelectedImagePath = "Collection/CollectionGrayIcon.png", IsSelected = function.collect }; controlView.AddChidren(btnCollection); btnCollection.MouseUpEventHandler += (sender, e) => { btnCollection.IsSelected = function.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected; function.CollectFunction(); }; //回退刷新信息事件 new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView_SettingIcon( () => { var page = new AddGroupControlPage(function, (newGC) => { try { Application.RunOnMainThread(() => { if (newGC != null) { btnFunctionName.Text = btnFunctionName_Out.Text = function.name; function.roomIds = newGC.uids; btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = newGC.GetUidListName(); } }); } catch (Exception ex) { MainPage.Log($"刷新群控房间信息异常:{ex.Message}"); } },()=> { try { this.RemoveFromParent(); UI.HomePage.RefreshFunctionView(); UI.RoomPage.bodyView?.ReLoadPage(); UI.FunctionPage.bodyView?.ReLoadPage(); } catch (Exception ex) { MainPage.Log($"群控刷新界面异常:\r\n{ex.Message}"); } }); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }); ShowContentView(); } private void ShowContentView() { var hadDimming = false; var hadCCT = false; var hadRGB = false; var hadColorful = false; foreach (var temp in function.sids) { if (temp.spk == SPK.LightRGB) { if (!hadColorful) { var lightGroupControl = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid); if (lightGroupControl != null) { if (lightGroupControl.GetAttribute(FunctionAttributeKey.Colorful) != null) { hadColorful = true; } } } hadRGB = true; } else if (temp.spk == SPK.LightCCT) { hadCCT = true; } else if (temp.spk == SPK.LightDimming) { hadDimming = true; } if (hadDimming && hadCCT && hadRGB && hadColorful) { break; } } //属性设置区域 var attrView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(52), Width = Application.GetRealWidth(343), ScrollEnabled = false, }; //属性设置区域高度 int attrViewHight = Application.GetRealHeight(18 + 22); controlView.AddChidren(attrView); attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); if (hadRGB) { hadCCT = true; LoadRgbAttrView(hadCCT,hadColorful); } else if (hadCCT) { LoadCctAttrView(attrView); } else if (hadDimming) { LoadDimmingAttrView(attrView); } var btnSwitch = new Button() { Gravity = Gravity.CenterHorizontal, Y = Application.GetRealHeight(466), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), UnSelectedImagePath = "Public/PowerClose.png", SelectedImagePath = "Public/PowerOpen.png", }; controlView.AddChidren(btnSwitch); btnSwitch.MouseUpEventHandler = (sender, e) => { if (btnSwitch.IsSelected) { btnSwitch.IsSelected = false; var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, "off"); function.Control(d); } else { btnSwitch.IsSelected = true; var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, "on"); function.Control(d); } }; } /// <summary> /// 加载调光属性设置控件 /// </summary> /// <param name="attrView"></param> void LoadDimmingAttrView(VerticalScrolViewLayout attrView) { var dimmingView = new FrameLayout() { Height = Application.GetRealHeight(54 + 11) }; attrView.AddChidren(dimmingView); #region 亮度调节 var btnBrightnessText = new Button() { X = Application.GetRealWidth(35), Y = Application.GetRealHeight(1), Width = Application.GetRealWidth(224), Height = Application.GetRealHeight(25), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextID = StringId.Brightness, }; btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + function.GetAttrState(FunctionAttributeKey.Brightness) + "%"; dimmingView.AddChidren(btnBrightnessText); var btnMinValuesText = new Button() { X = Application.GetRealWidth(35), Y = btnBrightnessText.Bottom, Width = Application.GetRealWidth(40), Height = Application.GetRealHeight(21), Text = "0%", TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; dimmingView.AddChidren(btnMinValuesText); var dimmerBar = new DiyImageSeekBar() { X = Application.GetRealWidth(45 + 10), Y = Application.GetRealHeight(11), Width = Application.GetRealWidth(220), Height = Application.GetRealHeight(54), SeekBarViewHeight = Application.GetRealHeight(8), ThumbImagePath = "Public/ThumbImage.png", ThumbImageHeight = Application.GetRealHeight(54), ProgressTextColor = CSS_Color.FirstLevelTitleColor, ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel, ProgressBarColor = CSS_Color.AuxiliaryColor1, MaxValue = 100, SeekBarPadding = Application.GetRealWidth(20), IsProgressTextShow = false, ProgressChangeDelayTime = 0, }; dimmingView.AddChidren(dimmerBar); dimmerBar.OnProgressChangedEvent = (sender, e) => { btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + e + "%"; }; dimmerBar.OnStopTrackingTouchEvent = (sender, e) => { btnBrightnessText.Text = Language.StringByID(StringId.Brightness) + " " + e + "%"; var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.Brightness, e.ToString()); function.Control(d); }; var btnMaxValuesText = new Button() { X = dimmerBar.Right, Y = btnBrightnessText.Bottom, Width = Application.GetRealWidth(55), Height = Application.GetRealHeight(21), Text = "100%", TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; dimmingView.AddChidren(btnMaxValuesText); #endregion } /// <summary> /// 加载cct属性设置控件 /// </summary> /// <param name="attrView"></param> void LoadCctAttrView(VerticalScrolViewLayout attrView) { #region 色温 var cctView = new FrameLayout() { Height = Application.GetRealHeight(75 + 11) }; attrView.AddChidren(cctView); //色温 var btnTempClolor = new Button(); btnTempClolor.X = Application.GetRealWidth(35); btnTempClolor.Y = Application.GetRealHeight(1); btnTempClolor.Width = Application.GetRealWidth(224); btnTempClolor.Height = Application.GetRealHeight(42); btnTempClolor.TextAlignment = TextAlignment.CenterLeft; btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor; btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; btnTempClolor.TextID = StringId.ColorTemperature; cctView.AddChidren(btnTempClolor); //2700K var btnTempClolorMin = new Button() { X = Application.GetRealWidth(35), Y = btnTempClolor.Bottom, Width = Application.GetRealWidth(40), Height = Application.GetRealHeight(21), }; btnTempClolorMin.Width = Application.GetRealWidth(54); btnTempClolorMin.Height = Application.GetRealHeight(21); btnTempClolorMin.Text = "2700K"; btnTempClolorMin.TextAlignment = TextAlignment.CenterLeft; btnTempClolorMin.TextColor = CSS_Color.PromptingColor1; btnTempClolorMin.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; cctView.AddChidren(btnTempClolorMin); //滑动条的背景图片 var btnColorTemplatrueBack = new Button() { X = Application.GetRealWidth(55 + 22 + 15), Y = Application.GetRealHeight(11), Width = Application.GetRealWidth(180), Height = Application.GetRealHeight(54), }; btnColorTemplatrueBack.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatureBar.png"; btnColorTemplatrueBack.Height = Application.GetRealHeight(8); btnColorTemplatrueBack.Gravity = Gravity.CenterHorizontal; cctView.AddChidren(btnColorTemplatrueBack); //滑动条控件 var barColorTemplatrue = new CCTSeekBarControl() { X = Application.GetRealWidth(55 + 22), Y = Application.GetRealHeight(11), Width = Application.GetRealWidth(220), Height = Application.GetRealHeight(54), }; barColorTemplatrue.MinValue = 27; barColorTemplatrue.MaxValue = 65; barColorTemplatrue.ProgressBarColor = 0x00000000;//全部透明 barColorTemplatrue.ProgressBarUnEnableColor = 0x00000000; barColorTemplatrue.SeekBarBackgroundColor = 0x00000000; cctView.AddChidren(barColorTemplatrue); barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2; //设置初始值 btnTempClolor.Text = Language.StringByID(StringId.ColorTemperature) + " " + (barColorTemplatrue.Progress * 100 + "K"); barColorTemplatrue.OnProgressChangedEvent = (sender, e) => { btnTempClolor.Text = Language.StringByID(StringId.ColorTemperature) + " " + (barColorTemplatrue.Progress * 100 + "K"); }; barColorTemplatrue.OnStopTrackingTouchEvent = (sender, e) => { var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString()); function.Control(d); }; //变更背景图的Y轴坐标 btnColorTemplatrueBack.Y = barColorTemplatrue.Y + (barColorTemplatrue.Height - btnColorTemplatrueBack.Height) / 2; //6500K var btnTempClolorMax = new Button(); btnTempClolorMax.Y = btnTempClolorMin.Y; btnTempClolorMax.X = barColorTemplatrue.Right - Application.GetRealWidth(30); btnTempClolorMax.Width = Application.GetRealWidth(54); btnTempClolorMax.Height = Application.GetRealHeight(21); btnTempClolorMax.Text = "6500K"; btnTempClolorMax.TextAlignment = TextAlignment.CenterRight; btnTempClolorMax.TextColor = CSS_Color.PromptingColor1; btnTempClolorMax.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; cctView.AddChidren(btnTempClolorMax); #endregion } /// <summary> /// 加载rgb属性设置控件 /// </summary> /// <param name="attrView"></param> void LoadRgbAttrView(bool hadCCT,bool hadColorful) { Light lightTemp = new Light(); int magriHeight = 0; if (hadCCT && hadColorful) { magriHeight = 80; } var btnCurColor = new Button() { X = Application.GetRealWidth(16), Y = Application.GetRealHeight(74), Width = Application.GetMinRealAverage(24), Height = Application.GetMinRealAverage(24), Radius = (uint)Application.GetMinRealAverage(8), BorderColor = CSS_Color.PromptingColor2, BorderWidth = 1, BackgroundColor = (uint)(0xFF000000 + lightTemp.GetRGBcolor(function.GetAttrState(FunctionAttributeKey.RGB))) }; controlView.AddChidren(btnCurColor); //色盘的桌布控件(限制那个白色滑动球使用) var framePickerBack = new FrameLayout(); framePickerBack.Gravity = Gravity.CenterHorizontal; framePickerBack.Y = btnFromFoorAndRoom.Bottom + Application.GetRealHeight(1); framePickerBack.Width = Application.GetMinRealAverage(216 - magriHeight); framePickerBack.Height = Application.GetMinRealAverage(216 - magriHeight); //framePickerBack.BackgroundColor = 0xFFFF0000; controlView.AddChidren(framePickerBack); var colorPicker = new ColorPicker() { Gravity = Gravity.Center, ColorImagePath = "FunctionIcon/Light/ColorWheel.png", }; framePickerBack.AddChidren(colorPicker); //if (function.trait_on_off.curValue.ToString() == "off") //{ // colorPicker.ColorImagePath = "FunctionIcon/Light/ColorWheelGray.png"; //} //colorPicker.MouseDownEventHandler = (sender, e) => { // MainPage.BasePageView.ScrollEnabled = false; //}; //colorPicker.MouseUpEventHandler = (sender, e) => { // MainPage.BasePageView.ScrollEnabled = true; //}; //白点控件 var diameter = Application.GetRealWidth(12); var btnWhiteRound = new Button() { Width = diameter, Height = diameter, Radius = (uint)Application.GetRealWidth(6), BorderWidth = (uint)Application.GetRealWidth(1), BorderColor = CSS_Color.MainBackgroundColor, Enable = false, }; btnWhiteRound.Visible = false; framePickerBack.AddChidren(btnWhiteRound); #region 亮度调节 var btnBrightnessText = new Button() { X = Application.GetRealWidth(35), Y = Application.GetRealHeight(308 - magriHeight), Width = Application.GetRealWidth(224), Height = Application.GetRealHeight(21), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextID = StringId.Brightness, }; controlView.AddChidren(btnBrightnessText); var btnMinValuesText = new Button() { X = Application.GetRealWidth(35), Y = btnBrightnessText.Bottom, Width = Application.GetRealWidth(30), Height = Application.GetRealHeight(21), Text = "0%", TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; controlView.AddChidren(btnMinValuesText); var dimmerBar = new DiyImageSeekBar() { X = Application.GetRealWidth(35 + 22), Y = Application.GetRealHeight(312 - magriHeight), Width = Application.GetRealWidth(210), Height = Application.GetRealHeight(54), SeekBarViewHeight = Application.GetRealHeight(8), ThumbImagePath = "Public/ThumbImage.png", ThumbImageHeight = Application.GetRealHeight(54), ProgressTextColor = CSS_Color.FirstLevelTitleColor, ProgressTextSize = CSS_FontSize.PromptFontSize_FirstLevel, ProgressBarColor = CSS_Color.AuxiliaryColor1, MaxValue = 100, Progress = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.Brightness)), SeekBarPadding = Application.GetRealWidth(20), }; controlView.AddChidren(dimmerBar); var btnMaxValuesText = new Button() { X = dimmerBar.Right, Y = btnBrightnessText.Bottom, Width = Application.GetRealWidth(45), Height = Application.GetRealHeight(21), Text = "100%", TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, }; controlView.AddChidren(btnMaxValuesText); #endregion int heightMore = 375 - magriHeight-20; if (hadCCT) { #region 色温 var cctView = new FrameLayout() { Y = Application.GetRealHeight(heightMore), Height = Application.GetRealHeight(75 + 11) }; controlView.AddChidren(cctView); //色温 var btnTempClolor = new Button(); btnTempClolor.X = Application.GetRealWidth(35); btnTempClolor.Y = Application.GetRealHeight(1); btnTempClolor.Width = Application.GetRealWidth(224); btnTempClolor.Height = Application.GetRealHeight(42); btnTempClolor.TextAlignment = TextAlignment.CenterLeft; btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor; btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; btnTempClolor.TextID = StringId.ColorTemperature; cctView.AddChidren(btnTempClolor); //2700K var btnTempClolorMin = new Button() { X = Application.GetRealWidth(35), Y = btnTempClolor.Bottom, Width = Application.GetRealWidth(40), Height = Application.GetRealHeight(21), }; btnTempClolorMin.Width = Application.GetRealWidth(54); btnTempClolorMin.Height = Application.GetRealHeight(21); btnTempClolorMin.Text = "2700K"; btnTempClolorMin.TextAlignment = TextAlignment.CenterLeft; btnTempClolorMin.TextColor = CSS_Color.PromptingColor1; btnTempClolorMin.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; cctView.AddChidren(btnTempClolorMin); //滑动条的背景图片 var btnColorTemplatrueBack = new Button() { X = Application.GetRealWidth(55 + 22 + 15+5), Y = Application.GetRealHeight(11), Width = Application.GetRealWidth(170), Height = Application.GetRealHeight(54), }; btnColorTemplatrueBack.UnSelectedImagePath = "FunctionIcon/Light/ColorTemperatureBar.png"; btnColorTemplatrueBack.Height = Application.GetRealHeight(8); btnColorTemplatrueBack.Gravity = Gravity.CenterHorizontal; cctView.AddChidren(btnColorTemplatrueBack); //滑动条控件 var barColorTemplatrue = new CCTSeekBarControl() { X = Application.GetRealWidth(55 + 25), Y = Application.GetRealHeight(11), Width = Application.GetRealWidth(215), Height = Application.GetRealHeight(52), }; barColorTemplatrue.MinValue = 27; barColorTemplatrue.MaxValue = 65; barColorTemplatrue.ProgressBarColor = 0x00000000;//全部透明 barColorTemplatrue.ProgressBarUnEnableColor = 0x00000000; barColorTemplatrue.SeekBarBackgroundColor = 0x00000000; cctView.AddChidren(barColorTemplatrue); barColorTemplatrue.Y = btnTempClolorMin.Y - (barColorTemplatrue.Height - btnTempClolorMin.Height) / 2; //设置初始值 btnTempClolor.Text = Language.StringByID(StringId.ColorTemperature) + " " + (barColorTemplatrue.Progress * 100 + "K"); barColorTemplatrue.OnProgressChangedEvent = (sender, e) => { btnTempClolor.Text = Language.StringByID(StringId.ColorTemperature) + " " + (barColorTemplatrue.Progress * 100 + "K"); }; barColorTemplatrue.OnStopTrackingTouchEvent = (sender, e) => { var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.CCT, (barColorTemplatrue.Progress * 100).ToString()); function.Control(d); }; //变更背景图的Y轴坐标 btnColorTemplatrueBack.Y = barColorTemplatrue.Y + (barColorTemplatrue.Height - btnColorTemplatrueBack.Height) / 2; //6500K var btnTempClolorMax = new Button(); btnTempClolorMax.Y = btnTempClolorMin.Y; btnTempClolorMax.X = barColorTemplatrue.Right - Application.GetRealWidth(30); btnTempClolorMax.Width = Application.GetRealWidth(54); btnTempClolorMax.Height = Application.GetRealHeight(21); btnTempClolorMax.Text = "6500K"; btnTempClolorMax.TextAlignment = TextAlignment.CenterRight; btnTempClolorMax.TextColor = CSS_Color.PromptingColor1; btnTempClolorMax.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; cctView.AddChidren(btnTempClolorMax); #endregion heightMore = 70; } if (hadColorful) { #region 炫彩功能 var btnGradualChangeText = new Button() { X = Application.GetRealWidth(35), Y = Application.GetRealHeight(375 + heightMore - magriHeight), Width = Application.GetRealWidth(224), Height = Application.GetRealHeight(21), TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextID = StringId.ColorfulFunction, }; controlView.AddChidren(btnGradualChangeText); var btnGradualChangeMinValuesText = new Button() { X = Application.GetRealWidth(35), Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), Width = Application.GetRealWidth(22), Height = Application.GetRealHeight(21), UnSelectedImagePath = "Public/Edit.png", }; controlView.AddChidren(btnGradualChangeMinValuesText); btnGradualChangeMinValuesText.MouseUpEventHandler = (sender, e) => { var rgbView = new ColorfulInfoPage(function); MainPage.BasePageView.AddChidren(rgbView); rgbView.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; var barColorful = new FrameLayout() { X = btnGradualChangeMinValuesText.Right + Application.GetRealWidth(15+5), Y = Application.GetRealHeight(412 + heightMore - magriHeight), Width = Application.GetRealWidth(170), Height = Application.GetRealHeight(8), BackgroundImagePath = "FunctionIcon/Light/ColorfulBar.png", }; controlView.AddChidren(barColorful); var btnGradualChangeMaxValuesText = new Button() { X = barColorful.Right + Application.GetRealWidth(8), Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), Width = Application.GetRealWidth(38), Height = Application.GetRealHeight(24), UnSelectedImagePath = "Public/Switch.png" }; controlView.AddChidren(btnGradualChangeMaxValuesText); #endregion } } /// <summary> /// 检测点击点 /// </summary> /// <param name="circleR">圆的半径</param> /// <param name="circleX">圆心X轴</param> /// <param name="circleY">圆心Y轴</param> /// <param name="pointX">点击点的X轴</param> /// <param name="pointY">点击点的Y轴</param> /// <returns></returns> private bool CheckPoint(int circleR, int circleX, int circleY, int pointX, int pointY) { int dwidth = circleX - pointX; if (dwidth < 0) { dwidth *= -1; } int dHeight = circleY - pointY; if (dHeight < 0) { dHeight *= -1; } //根据三角函数,求三角形的斜边长 int dlength = dwidth * dwidth + dHeight * dHeight; //半径长度(不开方,所以是按平方算) circleR *= circleR; if (dlength < circleR) { //如果组成的三角形并没有长过半径,则代表还在圆内(不允许点边界) return true; } return false; } } } HDL_ON/UI/UI2/FuntionControlView/Light/RGBPage.cs
@@ -291,7 +291,7 @@ barFadeTime = new DiyImageSeekBar() { X = btnGradualChangeMinValuesText.Right, X = Application.GetRealWidth(35 + 22), Y = Application.GetRealHeight(412 - 21-magriHeight), Width = Application.GetRealWidth(210), Height = Application.GetRealHeight(54), @@ -371,17 +371,17 @@ X = btnGradualChangeMinValuesText.Right + Application.GetRealWidth(15), Y = Application.GetRealHeight(412 + heightMore-magriHeight), Width = Application.GetRealWidth(180), Height = Application.GetRealHeight(10), BackgroundImagePath = "FunctionIcon/Light/ColorWheel.png", Height = Application.GetRealHeight(8), BackgroundImagePath = "FunctionIcon/Light/ColorfulBar.png", }; controlView.AddChidren(barColorful); var btnGradualChangeMaxValuesText = new Button() { X = barFadeTime.Right, X = barColorful.Right + Application.GetRealWidth(8), Y = btnGradualChangeText.Bottom + Application.GetRealHeight(10), Width = Application.GetRealWidth(35), Height = Application.GetRealHeight(21), Width = Application.GetRealWidth(38), Height = Application.GetRealHeight(24), UnSelectedImagePath = "Public/Switch.png" }; controlView.AddChidren(btnGradualChangeMaxValuesText); HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -77,7 +77,8 @@ #else HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity, spk,list); HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, serials) => HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, serials) => { if (isBool) { @@ -597,6 +598,7 @@ { Action<bool,string> mAction; Action<string> mDoorlockAnswer; public AndroidIHdlInterface(Action<bool,string> action) { mAction = action; @@ -611,7 +613,10 @@ mAction?.Invoke(p0,p1); } public void DoorlockAnswer(string p0) { mDoorlockAnswer?.Invoke(p0); } } #endif HDL_ON/UI/UI2/UserPage.cs
@@ -133,10 +133,10 @@ if (DB_ResidenceData.Instance.CheckGPS_IsFirst) { DB_ResidenceData.Instance.CheckGPS_IsFirst = false; Console.WriteLine("开启定位服务111111111"); Shared.Application.StartGPSLocationService(); Console.WriteLine("开启定位服务1111111112"); (Shared.Application.Activity as BaseActivity).CheckLocationPermission(); } Shared.Application.StartGPSLocationService(); } catch(Exception ex) { SiriIntents/SiriIntents.csproj
@@ -67,7 +67,7 @@ <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <CodesignKey>iPhone Developer: xuebiao huang (4P32GXQWWK)</CodesignKey> <DeviceSpecificBuild>true</DeviceSpecificBuild> <MtouchDebug>true</MtouchDebug> <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip> @@ -79,7 +79,6 @@ <MtouchArch>ARM64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> <CodesignProvision>OnProSiri230417-1-Dev</CodesignProvision> </PropertyGroup> <ItemGroup> <Reference Include="System" /> SiriIntentsUI/SiriIntentsUI.csproj
@@ -70,7 +70,7 @@ <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <CodesignKey>iPhone Developer: xuebiao huang (4P32GXQWWK)</CodesignKey> <DeviceSpecificBuild>true</DeviceSpecificBuild> <MtouchDebug>true</MtouchDebug> <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip> @@ -83,7 +83,6 @@ <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <CodesignProvision>OnProSiriUI230417-1-Dev</CodesignProvision> </PropertyGroup> <ItemGroup> <Reference Include="System" />