HDL-ON_Android/HDL-ON_Android.csproj
@@ -169,9 +169,6 @@ <Reference Include="Square.OkIO"> <HintPath>..\DLL\EZvizMonitor\Square.OkIO.dll</HintPath> </Reference> <Reference Include="Shared.Droid.HDLLinphone"> <HintPath>..\DLL\Linphone\Android\Shared.Droid.HDLLinphone.dll</HintPath> </Reference> <Reference Include="Shared.Droid.LCVideoSDK"> <HintPath>..\DLL\LC\Android\Shared.Droid.LCVideoSDK.dll</HintPath> </Reference> @@ -1434,6 +1431,12 @@ <Folder Include="libs\arm64-v8a\" /> <Folder Include="Zxing\" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\HDLLinphoneSDK_AndroidNew\Shared.Droid.HDLLinphone\Shared.Droid.HDLLinphone\Shared.Droid.HDLLinphone.csproj"> <Project>{703D29ED-674F-44A8-8AAD-863035899D4B}</Project> <Name>Shared.Droid.HDLLinphone</Name> </ProjectReference> </ItemGroup> <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. HDL-ON_Android/Resources/Resource.designer.cs
Diff too large HDL-ON_Android/VideoActivity.cs
@@ -96,7 +96,7 @@ /// </summary> private void Permissions() { String[] mPermissionList = new String[] string[] mPermissionList = new string[] { Manifest.Permission.WriteExternalStorage, Manifest.Permission.ReadExternalStorage, @@ -104,7 +104,7 @@ Manifest.Permission.RecordAudio }; foreach (String permissions in mPermissionList) foreach (string permissions in mPermissionList) { if (ContextCompat.CheckSelfPermission(this, permissions) != 0) { HDL_APP_Project.sln
@@ -6,17 +6,19 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HDL-ON_Android", "HDL-ON_Android\HDL-ON_Android.csproj", "{09712674-2A38-407B-B1E2-560B2C352F9A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HDL-ON_iOS", "HDL-ON_iOS\HDL-ON_iOS.csproj", "{D998E133-F0DD-4760-BE3C-461632F54DA4}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Droid.HDLLinphone", "..\HDLLinphoneSDK_AndroidNew\Shared.Droid.HDLLinphone\Shared.Droid.HDLLinphone\Shared.Droid.HDLLinphone.csproj", "{703D29ED-674F-44A8-8AAD-863035899D4B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}" Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "HDL-ON_iOS", "HDL-ON_iOS\HDL-ON_iOS.csproj", "{A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriIntentsUI", "SiriIntentsUI\SiriIntentsUI.csproj", "{ACC48A7F-250B-4915-A250-9BC399DBD6B3}" Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Blufi", "HdlBluWi\Blufi.csproj", "{4B2F495E-0CA8-4654-8B95-39FCA775BE62}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriKit", "SiriKit\SiriKit.csproj", "{8B1652FA-5158-4D57-B90D-07BB91766625}" Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "SiriIntentsUI", "SiriIntentsUI\SiriIntentsUI.csproj", "{E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriIntents", "SiriIntents\SiriIntents.csproj", "{760980F5-1CD3-4F4F-9134-34D87BECD790}" Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "SiriKit", "SiriKit\SiriKit.csproj", "{3DA557EC-FA50-47F6-B60C-8606605C2399}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UMSdk", "UMSdk\UMSdk.csproj", "{5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}" Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "SiriIntents", "SiriIntents\SiriIntents.csproj", "{933FF3C8-6848-4615-B67A-8919E4290E45}" EndProject Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "UMSdk", "UMSdk\UMSdk.csproj", "{8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution @@ -47,78 +49,90 @@ {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhone.Build.0 = Release|Any CPU {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {09712674-2A38-407B-B1E2-560B2C352F9A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|Any CPU.ActiveCfg = Debug|iPhone {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhone.ActiveCfg = Debug|iPhone {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhone.Build.0 = Debug|iPhone {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|Any CPU.Build.0 = Release|iPhoneSimulator {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhone.ActiveCfg = Release|iPhone {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhone.Build.0 = Release|iPhone {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {D998E133-F0DD-4760-BE3C-461632F54DA4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {D998E133-F0DD-4760-BE3C-461632F54DA4}.Debug|Any CPU.Build.0 = Debug|iPhone {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.ActiveCfg = Debug|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.Build.0 = Debug|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|Any CPU.ActiveCfg = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|Any CPU.Build.0 = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.ActiveCfg = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.Build.0 = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|Any CPU.Build.0 = Debug|Any CPU {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Debug|Any CPU.ActiveCfg = Debug|iPhone {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Debug|Any CPU.Build.0 = Debug|iPhone {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Debug|iPhone.ActiveCfg = Debug|iPhone {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Debug|iPhone.Build.0 = Debug|iPhone {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Release|Any CPU.Build.0 = Release|iPhoneSimulator {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Release|iPhone.ActiveCfg = Release|iPhone {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Release|iPhone.Build.0 = Release|iPhone {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {ACC48A7F-250B-4915-A250-9BC399DBD6B3}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {8B1652FA-5158-4D57-B90D-07BB91766625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Debug|iPhone.ActiveCfg = Debug|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Debug|iPhone.Build.0 = Debug|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Release|Any CPU.ActiveCfg = Release|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Release|Any CPU.Build.0 = Release|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Release|iPhone.ActiveCfg = Release|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Release|iPhone.Build.0 = Release|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {8B1652FA-5158-4D57-B90D-07BB91766625}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {760980F5-1CD3-4F4F-9134-34D87BECD790}.Debug|Any CPU.ActiveCfg = Debug|iPhone {760980F5-1CD3-4F4F-9134-34D87BECD790}.Debug|Any CPU.Build.0 = Debug|iPhone {760980F5-1CD3-4F4F-9134-34D87BECD790}.Debug|iPhone.ActiveCfg = Debug|iPhone {760980F5-1CD3-4F4F-9134-34D87BECD790}.Debug|iPhone.Build.0 = Debug|iPhone {760980F5-1CD3-4F4F-9134-34D87BECD790}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {760980F5-1CD3-4F4F-9134-34D87BECD790}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {760980F5-1CD3-4F4F-9134-34D87BECD790}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator {760980F5-1CD3-4F4F-9134-34D87BECD790}.Release|Any CPU.Build.0 = Release|iPhoneSimulator {760980F5-1CD3-4F4F-9134-34D87BECD790}.Release|iPhone.ActiveCfg = Release|iPhone {760980F5-1CD3-4F4F-9134-34D87BECD790}.Release|iPhone.Build.0 = Release|iPhone {760980F5-1CD3-4F4F-9134-34D87BECD790}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {760980F5-1CD3-4F4F-9134-34D87BECD790}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Debug|Any CPU.Build.0 = Debug|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Debug|iPhone.ActiveCfg = Debug|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Debug|iPhone.Build.0 = Debug|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|Any CPU.Build.0 = Release|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhone.ActiveCfg = Release|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhone.Build.0 = Release|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|iPhone.ActiveCfg = Debug|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|iPhone.Build.0 = Debug|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|Any CPU.Build.0 = Release|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|iPhone.ActiveCfg = Release|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|iPhone.Build.0 = Release|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Debug|Any CPU.ActiveCfg = Debug|iPhone {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Debug|Any CPU.Build.0 = Debug|iPhone {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Debug|iPhone.ActiveCfg = Debug|iPhone {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Debug|iPhone.Build.0 = Debug|iPhone {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Release|Any CPU.Build.0 = Release|iPhoneSimulator {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Release|iPhone.ActiveCfg = Release|iPhone {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Release|iPhone.Build.0 = Release|iPhone {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {A50A33C1-EC91-4BCE-B87A-8C85E73CE15D}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Debug|Any CPU.Build.0 = Debug|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Debug|iPhone.ActiveCfg = Debug|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Debug|iPhone.Build.0 = Debug|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Release|Any CPU.Build.0 = Release|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Release|iPhone.ActiveCfg = Release|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Release|iPhone.Build.0 = Release|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {4B2F495E-0CA8-4654-8B95-39FCA775BE62}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Debug|Any CPU.ActiveCfg = Debug|iPhone {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Debug|Any CPU.Build.0 = Debug|iPhone {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Debug|iPhone.ActiveCfg = Debug|iPhone {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Debug|iPhone.Build.0 = Debug|iPhone {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Release|iPhone.ActiveCfg = Release|iPhone {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Release|iPhone.Build.0 = Release|iPhone {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {E0F35B75-7B99-4B00-9ECD-AA8470E6AC4B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {3DA557EC-FA50-47F6-B60C-8606605C2399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Debug|Any CPU.Build.0 = Debug|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Debug|iPhone.ActiveCfg = Debug|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Debug|iPhone.Build.0 = Debug|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Release|Any CPU.ActiveCfg = Release|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Release|Any CPU.Build.0 = Release|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Release|iPhone.ActiveCfg = Release|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Release|iPhone.Build.0 = Release|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {3DA557EC-FA50-47F6-B60C-8606605C2399}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {933FF3C8-6848-4615-B67A-8919E4290E45}.Debug|Any CPU.ActiveCfg = Debug|iPhone {933FF3C8-6848-4615-B67A-8919E4290E45}.Debug|Any CPU.Build.0 = Debug|iPhone {933FF3C8-6848-4615-B67A-8919E4290E45}.Debug|iPhone.ActiveCfg = Debug|iPhone {933FF3C8-6848-4615-B67A-8919E4290E45}.Debug|iPhone.Build.0 = Debug|iPhone {933FF3C8-6848-4615-B67A-8919E4290E45}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {933FF3C8-6848-4615-B67A-8919E4290E45}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {933FF3C8-6848-4615-B67A-8919E4290E45}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator {933FF3C8-6848-4615-B67A-8919E4290E45}.Release|Any CPU.Build.0 = Release|iPhoneSimulator {933FF3C8-6848-4615-B67A-8919E4290E45}.Release|iPhone.ActiveCfg = Release|iPhone {933FF3C8-6848-4615-B67A-8919E4290E45}.Release|iPhone.Build.0 = Release|iPhone {933FF3C8-6848-4615-B67A-8919E4290E45}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {933FF3C8-6848-4615-B67A-8919E4290E45}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Debug|iPhone.ActiveCfg = Debug|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Debug|iPhone.Build.0 = Debug|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Release|Any CPU.Build.0 = Release|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Release|iPhone.ActiveCfg = Release|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Release|iPhone.Build.0 = Release|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {8E7D755A-8FE2-4A89-9ECB-A3D05A4ABE95}.Release|iPhoneSimulator.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE HDL_ON/Common/ApiUtlis.cs
@@ -306,9 +306,11 @@ } else if (video.interphoneType == InterphoneType.FREEVIEW.ToString()) {//为全视通可视对讲 DB_ResidenceData.Instance.SupportFacePass = true; Entity.DB_ResidenceData.Instance.SupportVisitorManage = true; Entity.DB_ResidenceData.Instance.SupportFVDevice = true; //isInterphoneType_HDL = true; isInterphoneType_FREEVIEW = true; } @@ -322,15 +324,24 @@ if (isInterphoneType_HDL) { //HDLLinphone可视对讲,获取Sip账号并初始化SDK HDLLinphone.Current.GetHDLSipInfoAndInitSDK(DB_ResidenceData.Instance.CurrentRegion.id); HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo(); callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; callVideoInfo.InterphoneType = InterphoneType.HDL.ToString(); HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo); } else if (isInterphoneType_FREEVIEW) { //HDLLinphone可视对讲,获取Sip账号并初始化SDK HDLCallVideoInfo callVideoInfo = new HDLCallVideoInfo(); callVideoInfo.HomeId = DB_ResidenceData.Instance.CurrentRegion.id; callVideoInfo.InterphoneType = InterphoneType.FREEVIEW.ToString(); HDLLinphone.Current.GetHDLSipInfoAndInitSDK(callVideoInfo); } else { Utlis.WriteLine("当前住宅不支持HDL可视对讲,退出登录所有账号"); //当前住宅不支持HDL可视对讲 HDLLinphone.Current.LogoutAllAccount(); } } HDL_ON/Common/HDLCommon.cs
@@ -330,7 +330,6 @@ } else if (interphoneTypeEnum == InterphoneType.HDL.ToString()) { //HDL Linphone 狄耐克 eSVideoInfo.HomeId = jpushMessageInfo.HomeId; eSVideoInfo.callId = json["callId"].ToString(); @@ -341,7 +340,22 @@ //ShowAlert("狄耐克门口机呼叫"); //打开呼叫页面 HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo); HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.HDL.ToString()); return; } else if (interphoneTypeEnum == InterphoneType.FREEVIEW.ToString()) { //全视通 Linphone 狄耐克 eSVideoInfo.HomeId = jpushMessageInfo.HomeId; eSVideoInfo.callId = json["callId"].ToString(); eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString(); eSVideoInfo.DeviceName = json["deviceName"].ToString(); eSVideoInfo.deviceSipAccount = json["deviceSipAccount"].ToString(); eSVideoInfo.spk = json["spk"].ToString(); //ShowAlert("狄耐克门口机呼叫"); //打开呼叫页面 HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.FREEVIEW.ToString()); return; } HDL_ON/DAL/Server/NewAPI.cs
@@ -17,7 +17,22 @@ /// 获取全球区域列表 免登录 /// </summary> public const string API_POST_GlobalRegionList = "/smart-footstone/region/globalRegionList"; #endregion #endregion #region 访客 /// <summary> /// 生成临时密码 /// </summary> public const string API_POST_ADD_TEMP_PASSWORD = "/community-wisdom/app/visitor/freeview/add"; /// <summary> /// 删除临时密码 /// </summary> public const string API_POST_DEL_TEMP_PASSWORD = "/community-wisdom/app/visitor/freeview/delete"; /// <summary> /// 获取临时密码 /// </summary> public const string API_POST_GET_TEMP_PASSWORD_LIST = "/community-wisdom/app/visitor/freeview/page"; #endregion #region ■ AcCluster -- 登录和注册部分___________________________ /// <summary> HDL_ON/DAL/Server/NewApiRes.cs
@@ -62,6 +62,36 @@ #endregion #region =============访客管理============= /// <summary> /// 访客临时密码 /// </summary> [System.Serializable] public class VisitorTempPassword { public string id; public string homeId; public string phone;//":"13355558888", public string tempPwd;//":"123456", public string validBeginTime;//":"2022-05-06 13:00:00", public string validEndTime;//":"2022-05-09 13:00:00", public int useCount;//":1, public bool status = true;//:true } /// <summary> /// 获取临时密码列表 /// </summary> public class GetTempPasswordList { public string pageNo;//": 0, public string pageSize;//": 0, public string totalCount;//": 0, public string totalPage;//": 0 public List<VisitorTempPassword> list; } #endregion #region ■ 登录 ____________________________ [System.Serializable] public class LoginObj HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -129,7 +129,7 @@ if (interphoneType == InterphoneType.IMOUVISIAL.ToString()) { intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity)); //=========乐橙========== intent.PutExtra("Type", 0); intent.PutExtra("callId", mESVideoInfo.callId); @@ -156,22 +156,25 @@ intent.PutExtra("callId", mESVideoInfo.callId); intent.PutExtra("Type", 0); Shared.Application.Activity.StartActivity(intent); } else if (interphoneType == InterphoneType.HDL.ToString()) { //HDLLinphone 狄耐克 HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo); HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.HDL.ToString()); } else if (interphoneType == InterphoneType.FREEVIEW.ToString()) { string sip_account = "sip:D" + mESVideoInfo.deviceCode + "@139.159.157.75:46000"; mESVideoInfo.deviceSipAccount = sip_account; HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo, InterphoneType.FREEVIEW.ToString()); } else { HDLUtils.WriteLine("未对接,不支持监视"); } #endif } HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -108,12 +108,11 @@ #endif } /// <summary> /// 设置sip登录账号 /// </summary> /// <param name="mHDLSipInfo"></param> public void SetAccountAndLogin(HDLSipInfo mHDLSipInfo) public void SetAccountAndLogin(HDLSipInfo mHDLSipInfo, string mInterphoneType) { this.currentHDLSipInfo = mHDLSipInfo; @@ -124,9 +123,28 @@ //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login("6666", "85521566", "116.62.26.215:5060"); Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); #else HDLLinphoneKit.Instance.SetAccountAndLogin(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); #endif if (mInterphoneType == InterphoneType.FREEVIEW.ToString()) { //HDLLinphoneKit.Instance.SetAccountAndLogin( // mHDLSipInfo.sipAccount, // mHDLSipInfo.sipPasswd, // mHDLSipInfo.realm, // HDLLinphoneKit.InterPhoneTypeFreeview // ); HDLLinphoneKit.Instance.SetAccountAndLogin("A583853817423247", "763548", "139.159.157.75:46000", HDLLinphoneKit.InterPhoneTypeFreeview); } else { HDLLinphoneKit.Instance.SetAccountAndLogin( mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, HDLLinphoneKit.InterPhoneTypeHdl ); } // "A583853817423247","763548","139.159.157.75:46000", #endif } /// <summary> @@ -197,26 +215,24 @@ /// 请求服务器获取当前住宅Sip账号信息并初始化LinphoneSDK和登录 /// </summary> /// <param name="homeId"></param> public void GetHDLSipInfoAndInitSDK(string homeId, bool clearCallInfo = true) public void GetHDLSipInfoAndInitSDK(HDLCallVideoInfo mHDLCallVideoInfo, bool clearCallInfo = true) { try { //先清空呼叫和监视设备信息 if (clearCallInfo) { InitCallInfo(null); } HDLSipInfo mHDLSipInfo = GetHDLSipInfo(homeId); HDLSipInfo mHDLSipInfo = GetHDLSipInfo(mHDLCallVideoInfo.HomeId); if (mHDLSipInfo != null) { Application.RunOnMainThread(() => { InitLinphone(); mHDLSipInfo.homeId = homeId; SetAccountAndLogin(mHDLSipInfo); mHDLSipInfo.homeId = mHDLCallVideoInfo.HomeId; SetAccountAndLogin(mHDLSipInfo, mHDLCallVideoInfo.InterphoneType); Utlis.WriteLine("CALL 获取SIP账号成功:" + mHDLSipInfo.sipAccount); }); } @@ -382,7 +398,7 @@ /// 跳转监控页面 /// </summary> /// <param name="mESVideoInfo"></param> public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo) public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo,string mInterphoneType) { InitLinphone(); //sip账号为空 @@ -396,7 +412,7 @@ mHDLCallVideoInfo.HomeId = mESVideoInfo.HomeId; mHDLCallVideoInfo.DeviceId = mESVideoInfo.Lc_DeviceId; mHDLCallVideoInfo.DeviceName = mESVideoInfo.DeviceName; mHDLCallVideoInfo.InterphoneType = InterphoneType.HDL.ToString(); mHDLCallVideoInfo.InterphoneType = mInterphoneType; mHDLCallVideoInfo.DeviceSipAccount = mESVideoInfo.deviceSipAccount;//监视主动呼叫门口机时用到 InitCallInfo(mHDLCallVideoInfo); @@ -422,7 +438,7 @@ /// 收到推送,后判断呼叫住宅是否为当前住宅,不是的话重新获取SIP账号并登录 /// </summary> /// <param name="mESVideoInfo"></param> public void ShowESVideoIntercom(ESVideoInfo mESVideoInfo) public void ShowESVideoIntercom(ESVideoInfo mESVideoInfo,string mInterphoneType) { InitLinphone(); @@ -431,7 +447,7 @@ mHDLCallVideoInfo.HomeId = mESVideoInfo.HomeId; mHDLCallVideoInfo.DeviceId = mESVideoInfo.Lc_DeviceId; mHDLCallVideoInfo.DeviceName = mESVideoInfo.DeviceName; mHDLCallVideoInfo.InterphoneType = InterphoneType.HDL.ToString(); mHDLCallVideoInfo.InterphoneType = mInterphoneType; mHDLCallVideoInfo.DeviceSipAccount = mESVideoInfo.deviceSipAccount; mHDLCallVideoInfo.spk = mESVideoInfo.spk; InitCallInfo(mHDLCallVideoInfo); @@ -449,7 +465,7 @@ Utlis.WriteLine("CALL 收到推送 其他住宅,重新获取呼叫住宅的SIP账号并登录"); new Thread(() => { GetHDLSipInfoAndInitSDK(mESVideoInfo.HomeId, false); GetHDLSipInfoAndInitSDK(mHDLCallVideoInfo, false); }) { IsBackground = false }.Start(); HDL_ON/Entity/DB_ResidenceData.cs
@@ -156,11 +156,12 @@ HDL_ON.UI.UI2.Intelligence.Automation.Logic.LogicList.Clear(); DAL.Mqtt.MqttClient.DisConnectRemote("退出登录,或者切换住宅"); #if IOS //退出全视通登录 Shared.IOS.HDLFVSDK.Video.Logout(); //重置默认不支持全视通 Entity.DB_ResidenceData.Instance.SupportFVDevice = false; #endif } /// <summary> /// 是否支持人脸通行 @@ -415,7 +416,7 @@ } #region oid列表 a协议转bus协议控制使用 #region oid列表 a协议转bus协议控制使用 /// <summary> /// oid数据保存的文件名 /// </summary> @@ -467,7 +468,7 @@ Common.FileUtlis.Files.WriteFileByBytes(OidSavePathName, oidBytes); } #endregion #endregion HDL_ON/HDL_ON.projitems
@@ -489,6 +489,11 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\SupportHomeKitNotesPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\FirmwareUpdateView.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockUnlockPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Visitor\VisitorHistoryPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Visitor\VisitorQRCodePage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Visitor\TempPasswordInfo.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Visitor\LpTimeDialogCallBak.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Visitor\LpTipDialogCallBack.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" /> HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -250,6 +250,35 @@ } /// <summary> /// 房间标题区域 /// </summary> /// <param name="room"></param> /// <param name="skipAction"></param> /// <param name="text"></param> public void LoadTopView_SettingText(Action skipAction,string text) { LoadTopView(); var btnSetting = new Button() { X = Application.GetRealWidth(337-100), Y = Application.GetRealHeight(29), Width = Application.GetMinRealAverage(100), Height = Application.GetMinRealAverage(28), TextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.TextFontSize, TextAlignment = TextAlignment.CenterRight, Text = text, }; contentView.AddChidren(btnSetting); btnSetting.MouseUpEventHandler += (sender, e) => { skipAction(); }; } /// <summary> /// 向framelayout添加顶部区域,拥有添加图标的按钮 /// </summary> /// <param name="frame"></param> HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
@@ -128,7 +128,6 @@ }; communityRow.AddChidren(btnCommunityTitle); btnCommunityAccessControlIcon = new Button() { X = Application.GetRealWidth(314), @@ -158,7 +157,6 @@ }; #endregion var btnTip = new Button() { @@ -338,9 +336,6 @@ btnEraseData.RemoveFromParent(); btnSetFaceId.TextID = StringId.SetFace; } /// <summary> /// 加载图标选择选项 HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -1,15 +1,17 @@ using System; using System; using HDL_ON.DAL.Server; using HDL_ON.UI; using HDL_ON.UI.CSS; using Shared; using HDL_ON.UI.UI2.PersonalCenter.Visitor; #if IOS using Foundation; #endif namespace HDL_ON.UI { public partial class PersonalDataPage : FrameLayout { #region 控件列表 #region 控件列表 /// <summary> /// 当前 /// </summary> @@ -28,7 +30,7 @@ /// </summary> ImageView userHeadImageView; #region 图标选择部分图标 #region 图标选择部分图标 /// <summary> /// 背景图选项区域 /// </summary> @@ -49,14 +51,14 @@ /// 取消按钮 /// </summary> Button btnCancel; #endregion #endregion #region 个人信息选项区域 #region 个人信息选项区域 /// <summary> /// 个人信息选项区域 /// </summary> VerticalScrolViewLayout optionListView; #region 个人选项-名字区域 #region 个人选项-名字区域 /// <summary> /// 个人选项-名字区域 /// </summary> @@ -73,8 +75,8 @@ /// 修改用户名称按钮 /// </summary> Button btnEditUserNameIcon; #endregion #region 个人选项-二维码区域 #endregion #region 个人选项-二维码区域 /// <summary> /// 个人选项-二维码区域 /// </summary> @@ -91,8 +93,8 @@ /// 二维码前进图标 /// </summary> Button btnQRcodeRight; #endregion #region 个人选项-邮箱信息区域 #endregion #region 个人选项-邮箱信息区域 /// <summary> /// 个人选项-邮箱信息区域 /// </summary> @@ -109,8 +111,8 @@ /// 用户邮箱信息前进图标 /// </summary> Button btnUserEmailRight; #endregion #region 个人选项-手机信息区域 #endregion #region 个人选项-手机信息区域 /// <summary> /// 个人选项-手机信息区域 /// </summary> @@ -127,8 +129,8 @@ /// 用户手机信息前进图标 /// </summary> Button btnUserPhoneRight; #endregion #region 个人选项-第三方授权区域 #endregion #region 个人选项-第三方授权区域 /// <summary> /// 个人选项-第三方授权区域 /// </summary> @@ -138,7 +140,7 @@ /// </summary> Button btnThirdPartyAuthorizationTitle; Button btnThirdPartyAuthorizationRight; #region 个人选项-修改登录密码区域 #region 个人选项-修改登录密码区域 /// <summary> /// 个人选项-修改登录密码区域 /// </summary> @@ -148,10 +150,10 @@ /// </summary> Button btnResetPasswordText; Button btnResetPasswordRight; #endregion #endregion #region 个人选项-新增住宅 #region 个人选项-新增住宅 /// <summary> /// 个人选项-新增住宅区域 /// </summary> @@ -161,10 +163,10 @@ /// </summary> Button btnAddResidenceText; Button btnAddResidenceScan; #endregion #endregion #region 个人选项-人脸通讯管理 #region 个人选项-人脸通讯管理 /// <summary> /// 个人选项-人脸通行管理行 /// </summary> @@ -173,9 +175,9 @@ /// 人脸通行管理文本 /// </summary> Button btnFaceManagementText; #endregion #endregion #region 个人选项-访客管理 #region 个人选项-访客管理 /// <summary> /// 个人选项-访客管理 /// @@ -185,13 +187,13 @@ /// 人脸通行管理文本isitor /// </summary> Button btnisitorVManagementText; #endregion #endregion #endregion #endregion #endregion #endregion #region 解锁设置区域 #region 解锁设置区域 /// <summary> /// 解锁设置区域 /// </summary> @@ -199,14 +201,14 @@ //Button btnInterpretationSettingsTitle; //Button btnInterpretationSettingsTip; //Button btnInterpretationSettingsRight; #endregion #endregion /// <summary> /// 退出登录按钮 /// </summary> Button btnLogout; #endregion #endregion /// <summary> /// 更新头像的回调函数 /// </summary> @@ -260,7 +262,7 @@ }; headPortraitView.AddChidren(userHeadImageView); #region 个人信息选项区域 #region 个人信息选项区域 var topPaddingView = new FrameLayout() { Height = Application.GetRealHeight(8) @@ -294,7 +296,7 @@ optionListView.Height = Application.GetRealHeight(51 * (6 + addRow)); #region 个人选项-名字区域 #region 个人选项-名字区域 /// <summary> /// 个人选项-名字区域 /// </summary> @@ -342,8 +344,8 @@ }; userNameView.AddChidren(btnEditUserNameIcon); optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); #endregion #region 个人选项-二维码区域 #endregion #region 个人选项-二维码区域 /// <summary> /// 个人选项-二维码区域 /// </summary> @@ -390,8 +392,8 @@ UnSelectedImagePath = "Public/Right.png", }; _QRcodeView.AddChidren(btnQRcodeRight); #endregion #region 个人选项-邮箱信息区域 #endregion #region 个人选项-邮箱信息区域 /// <summary> /// 个人选项-邮箱信息区域 /// </summary> @@ -439,8 +441,8 @@ }; userEmailInfoView.AddChidren(btnUserEmailRight); optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); #endregion #region 个人选项-手机信息区域 #endregion #region 个人选项-手机信息区域 /// <summary> /// 个人选项-手机信息区域 /// </summary> @@ -488,8 +490,8 @@ }; userPhoneInfoView.AddChidren(btnUserPhoneRight); optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); #endregion #region 个人选项-第三方授权区域 #endregion #region 个人选项-第三方授权区域 //2020-12-08 暂时隐藏第三方授权功能 /// <summary> /// 个人选项-第三方授权区域 @@ -521,8 +523,8 @@ UnSelectedImagePath = "Public/Right.png", }; thirdPartyAuthorizationView.AddChidren(btnThirdPartyAuthorizationRight); #endregion #region 个人选项-修改登录密码区域 #endregion #region 个人选项-修改登录密码区域 /// <summary> /// 个人选项-修改登录密码区域 /// </summary> @@ -554,9 +556,9 @@ }; resetPasswordView.AddChidren(btnResetPasswordRight); optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); #endregion #endregion #region 个人选项-添加住宅 #region 个人选项-添加住宅 addResidenceView = new FrameLayout() { Height = Application.GetRealHeight(50), @@ -656,11 +658,11 @@ }); }; #endregion #endregion if (Entity.DB_ResidenceData.Instance.SupportFacePass) { #region 个人选项-人脸通行管理 #region 个人选项-人脸通行管理 optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); faceManagementView = new FrameLayout() @@ -697,13 +699,13 @@ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; #endregion #endregion } //访客管理 #region 个人选项-访客管理 if (!Entity.DB_ResidenceData.Instance.SupportVisitorManage)//判断是否支持访客管理 #region 个人选项-访客管理 if (Entity.DB_ResidenceData.Instance.SupportVisitorManage)//判断是否支持访客管理 { optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); @@ -736,6 +738,11 @@ btnisitorVManagementText.MouseUpEventHandler = (sender, e) => { var page = new VisitorQRCodePage(); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; #if __IOS__ //刷新接口请求所需要的参数 NSDictionary info = new NSDictionary("regionUrl", HttpUtil.GlobalRequestHttpsHost, "token", UserInfo.Current.LoginTokenString, "appkey", "HDL-HOME-APP-TEST", "secret", "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss", "refreshToken", UserInfo.Current.RefreshToken); HDL_ON/UI/UI2/4-PersonalCenter/Visitor/LpTimeDialogCallBak.cs
New file @@ -0,0 +1,28 @@ using System; using Com.Hdl.Hdllinphonesdk.Dialog; using Java.Interop; namespace HDL_ON.UI.UI2.PersonalCenter.Visitor { public class LpTimeDialogCallBak : Java.Lang.Object, LpTimeDialog.IClickListenerInterface { public string Time; private Action<string> action; public LpTimeDialogCallBak(Action<string> _action) { this.action = _action; } public void OnCancelClick(LpTimeDialog dialog) { dialog.Dismiss(); } public void OnConfirmClick(LpTimeDialog dialog, string time) { dialog.Dismiss(); action.Invoke(time); } } } HDL_ON/UI/UI2/4-PersonalCenter/Visitor/LpTipDialogCallBack.cs
New file @@ -0,0 +1,24 @@ using System; using Com.Hdl.Hdllinphonesdk.Dialog; namespace HDL_ON.UI.UI2.PersonalCenter.Visitor { public class LpTipDialogCallBack : Java.Lang.Object, LpTipDialog.IClickListenerInterface { Action action; public LpTipDialogCallBack(Action _action) { this.action = _action; } public void CancelClick(LpTipDialog dialog) { dialog.Dismiss(); } public void SureClick(LpTipDialog dialog) { dialog.Dismiss(); action.Invoke(); } } } HDL_ON/UI/UI2/4-PersonalCenter/Visitor/TempPasswordInfo.cs
New file @@ -0,0 +1,18 @@ using System; namespace HDL_ON.UI.UI2.PersonalCenter.Visitor { public class TempPasswordInfo { public int homeId; public String phone; public int deviceId; public String tempPwd; public String validBeginTime; public String validEndTime;//":"2022-05-09 13:00:00", public int useCount;//":1, public TempPasswordInfo() { } } } HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs
@@ -1,18 +1,209 @@ using System; using System.Collections.Generic; using HDL_ON.DAL.Server; using HDL_ON.UI.CSS; using Shared; namespace HDL_ON.UI.UI2.PersonalCenter.Visitor { public class VisitorHistoryPage : FrameLayout { FrameLayout bodyView; private FrameLayout bodyView; private VerticalScrolViewLayout bodyScrolView; private List<VisitorTempPassword> pwdList; public VisitorHistoryPage() { bodyView = this; } public void LoadPage() { pwdList = getVisitorPasswordData(); #region 访客记录按钮 Action click = () => { VisitorHistoryPage page = new VisitorHistoryPage(); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, "访客记录").LoadTopView(click); #endregion bodyScrolView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), VerticalScrollBarEnabled = false, BackgroundColor = CSS_Color.MainBackgroundColor, }; bodyView.AddChidren(bodyScrolView); foreach (VisitorTempPassword temPwd in pwdList) { FrameLayout itemLayout = new FrameLayout() { X = Application.GetRealWidth(16), Height = Application.GetRealWidth(50), Width = Application.GetRealWidth(343), }; // 访客二维码Text itemLayout.AddChidren(new Button() { Height = Application.GetRealWidth(20), Y = Application.GetRealWidth(6), Text = "访客二维码", TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.text1Color, TextSize = CSS_FontSize.TextFontSize, }); // 时间Btn string startTime = temPwd.validBeginTime.Replace("-", "/"); string endTime = temPwd.validEndTime.Replace("-", "/"); itemLayout.AddChidren(new Button() { Height = Application.GetRealWidth(14), Y = Application.GetRealWidth(30), Text = "时间:" + startTime + " - " + endTime, TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, }); // 后退 itemLayout.AddChidren(new ImageView() { Width = Application.GetRealWidth(16), Height = Application.GetRealWidth(16), Gravity = Gravity.CenterRight, ImagePath = "Public/Right.png", }); itemLayout.AddChidren(new Button() { Height = Application.GetRealWidth(1), Y = Application.GetRealWidth(49), BackgroundColor = CSS_Color.DividingLineColor, }); Button btn = new Button(); itemLayout.AddChidren(btn);//+= (sender, e) btn.MouseUpEventHandler += (sender, e) => { VisitorQRCodePage page = new VisitorQRCodePage(temPwd); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; bodyScrolView.AddChidren(itemLayout); } } /// <summary> /// 获取访客临时密码列表 /// </summary> private List<VisitorTempPassword> getVisitorPasswordData() { List<VisitorTempPassword> dataList = new List<VisitorTempPassword>(); Dictionary<string, object> dictionary = new Dictionary<string, object>(); dictionary.Add("homeId", Entity.DB_ResidenceData.Instance.CurrentRegion.id); dictionary.Add("pageNo", 1); dictionary.Add("pageSize", 100); dictionary.Add("order", "descending"); dictionary.Add("sort", "id"); var requestJson = HttpUtil.GetSignRequestJson(dictionary); ResponsePackNew pack = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GET_TEMP_PASSWORD_LIST, requestJson); if (pack != null) { if (pack.Code == StateCode.SUCCESS) { string json = pack.Data.ToString(); var o = Newtonsoft.Json.JsonConvert.DeserializeObject<GetTempPasswordList>(json); dataList = o.list; } } return dataList; } private List<TempPasswordInfo> infoList; private void getTestData() { infoList = new List<TempPasswordInfo>(); TempPasswordInfo info = new TempPasswordInfo(); info.homeId = 11111; info.deviceId = 11111; info.phone = "1234567890"; info.tempPwd = "134234"; info.useCount = 10; info.validBeginTime = "2022/5/10 14:21:00"; info.validEndTime = "2022/5/12 14:21:00"; infoList.Add(info); info = new TempPasswordInfo(); info.homeId = 11111; info.deviceId = 11111; info.phone = "1234567890"; info.tempPwd = "134234"; info.useCount = 10; info.validBeginTime = "2022/5/10 14:21:00"; info.validEndTime = "2022/5/12 14:21:00"; infoList.Add(info); info = new TempPasswordInfo(); info.homeId = 11111; info.deviceId = 11111; info.phone = "1234567890"; info.tempPwd = "134234"; info.useCount = 10; info.validBeginTime = "2022/5/10 14:21:00"; info.validEndTime = "2022/5/12 14:21:00"; infoList.Add(info); info = new TempPasswordInfo(); info.homeId = 11111; info.deviceId = 11111; info.phone = "1234567890"; info.tempPwd = "134234"; info.useCount = 10; info.validBeginTime = "2022/5/10 14:21:00"; info.validEndTime = "2022/5/12 14:21:00"; infoList.Add(info); info = new TempPasswordInfo(); info.homeId = 11111; info.deviceId = 11111; info.phone = "1234567890"; info.tempPwd = "134234"; info.useCount = 10; info.validBeginTime = "2022/5/10 14:21:00"; info.validEndTime = "2022/5/12 14:21:00"; infoList.Add(info); info = new TempPasswordInfo(); info.homeId = 11111; info.deviceId = 11111; info.phone = "1234567890"; info.tempPwd = "134234"; info.useCount = 10; info.validBeginTime = "2022/5/10 14:21:00"; info.validEndTime = "2022/5/12 14:21:00"; infoList.Add(info); info = new TempPasswordInfo(); info.homeId = 11111; info.deviceId = 11111; info.phone = "1234567890"; info.tempPwd = "134234"; info.useCount = 10; info.validBeginTime = "2022/5/10 14:21:00"; info.validEndTime = "2022/5/12 14:21:00"; infoList.Add(info); } } } } HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs
@@ -1,31 +1,537 @@ using System; using HDL_ON.UI.CSS; using Shared; using Com.Hdl.Hdllinphonesdk.Dialog; using HDL_ON.DAL.Server; using System.Collections.Generic; using Com.Hdl.Hdllinphonesdk.Utils; namespace HDL_ON.UI.UI2.PersonalCenter.Visitor { public class VisitorQRCodePage : FrameLayout { /// <summary> /// 顶部title /// </summary> FrameLayout topView; FrameLayout bodyView; VerticalScrolViewLayout bodyScrolView; private EditText phoneNumberEditText;// 电话号码EditText private EditText pwdEditText;// 密码EditText private Button randomBtn;//随机密码Btn private FrameLayout codeLayout; private ImageView codeIV;// 二维码 private Button codeTip;//二维码有效期提示 private Button visitorVoucherBtn; private VisitorTempPassword tempPassword; public VisitorQRCodePage() { Action click = () => bodyView = this; } public VisitorQRCodePage(VisitorTempPassword pwd) { bodyView = this; this.tempPassword = pwd; } public void LoadPage() { #region 顶部导航栏 if (tempPassword == null) { VisitorHistoryPage page = new VisitorHistoryPage(); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; tempPassword = new VisitorTempPassword(); Action click = () => { VisitorHistoryPage page = new VisitorHistoryPage(); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, "访客邀请").LoadTopView_SettingText(click, "测试记录"); } else { bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, "访客邀请").LoadTopView(); } #endregion bodyScrolView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), VerticalScrollBarEnabled = false, BackgroundColor = CSS_Color.MainBackgroundColor, }; bodyView.AddChidren(bodyScrolView); // 提示文字 bodyScrolView.AddChidren(new Button() { Text = "*您发起访客二维码后,该二维码将在您设置的有效期内,可自由刷码进行进出,请谨慎分享该二维码。", IsMoreLines = true, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextColor = CSS_Color.PromptingColor1, TextAlignment = TextAlignment.Center, Padding = new Padding(0, Application.GetRealWidth(20), 0, Application.GetRealWidth(20)), Height = Application.GetRealHeight(60), }); #region 手机号 bodyScrolView.AddChidren(new Button() { Text = "手机号", Y = Application.GetRealWidth(10), TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.FirstLevelTitleColor, Height = Application.GetRealHeight(20), Padding = new Padding(0, Application.GetRealWidth(20), 0, Application.GetRealWidth(20)), TextAlignment = TextAlignment.CenterLeft, }); phoneNumberEditText = new EditText() { Height = Application.GetRealHeight(45), X = Application.GetRealWidth(20), Width = Application.GetRealWidth(335), TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.FirstLevelTitleColor, PlaceholderText = "输入访客手机号", Text = tempPassword.phone, IsNumberKeyboardType = true, PlaceholderTextColor = CSS_Color.PromptingColor1, }; bodyScrolView.AddChidren(phoneNumberEditText); // 分割线 bodyScrolView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(335), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor, }); #endregion #region 动态密码 bodyScrolView.AddChidren(new Button() { Height = Application.GetRealWidth(10), }); bodyScrolView.AddChidren(new Button() { Text = "动态密码", TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.FirstLevelTitleColor, Height = Application.GetRealHeight(20), Padding = new Padding(0, Application.GetRealWidth(20), 0, Application.GetRealWidth(20)), TextAlignment = TextAlignment.CenterLeft, }); FrameLayout pwdLayout = new FrameLayout() { Height = Application.GetRealHeight(40), }; bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, Language.StringByID(StringId.MemberPermissionManagement)).LoadTopView_SettingText(click, ""); // 密码输入框 pwdEditText = new EditText() { X = Application.GetRealWidth(20), TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.FirstLevelTitleColor, Width = Application.GetRealWidth(335), PlaceholderText = "输入访6位密码", Text = tempPassword.tempPwd, PlaceholderTextColor = CSS_Color.PromptingColor1, }; pwdLayout.AddChidren(pwdEditText); //随机密码Btn randomBtn = new Button() { X = Application.GetRealWidth(275), Width = Application.GetRealWidth(80), Text = "随机生成", TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.TextFontSize, }; pwdLayout.AddChidren(randomBtn); bodyScrolView.AddChidren(pwdLayout); randomBtn.MouseUpEventHandler += (sender, e) => { string tPwd = getRandomPwd(); pwdEditText.Text = tPwd; }; // 分割线 bodyScrolView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(335), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor, }); #endregion #region 二维码生效时间 FrameLayout startLayout = new FrameLayout() { Height = Application.GetRealHeight(40), Y = Application.GetRealWidth(10), BackgroundColor = CSS_Color.BackgroundColor, }; startLayout.AddChidren(new Button() { Text = "二维码生效时间", X = Application.GetRealWidth(20), Width = Application.GetRealWidth(130), TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.FirstLevelTitleColor, TextAlignment = TextAlignment.CenterLeft, Enable = false, }); Button startTimeText = new Button() { X = Application.GetRealWidth(159), Width = Application.GetRealWidth(150), TextAlignment = TextAlignment.CenterRight, TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.FirstLevelTitleColor, }; if (tempPassword.tempPwd == null || tempPassword.tempPwd == "") { startTimeText.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } else { startTimeText.Text = tempPassword.validBeginTime; } startLayout.AddChidren(startTimeText); startLayout.AddChidren(new Button() { X = Application.GetRealWidth(339), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "Public/Right.png", Enable = false, }); Button startTimeBtn = new Button(); startLayout.AddChidren(startTimeBtn); // dialog回调 Action<string> startTimeAction = (str) => { startTimeText.Text = str +":00"; }; startTimeBtn.MouseUpEventHandler += (sender, e) => { try { new LpTimeDialog(Application.Activity, new LpTimeDialogCallBak(startTimeAction)).Show(); } catch (Exception ex) { string error = ex.Message; } }; bodyScrolView.AddChidren(startLayout); // 分割线 bodyScrolView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(335), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor, }); #endregion #region 二维码失效时间 FrameLayout endLayout = new FrameLayout() { Height = Application.GetRealHeight(40), Y = Application.GetRealWidth(10), }; endLayout.AddChidren(new Button() { Text = "二维码失效时间", X = Application.GetRealWidth(20), Width = Application.GetRealWidth(130), TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.FirstLevelTitleColor, TextAlignment = TextAlignment.CenterLeft, Enable = false, }); Button endTimeText = new Button() { X = Application.GetRealWidth(159), Width = Application.GetRealWidth(150), TextAlignment = TextAlignment.CenterRight, TextSize = CSS_FontSize.TextFontSize, TextColor = CSS_Color.FirstLevelTitleColor, Enable = false, }; if (tempPassword.tempPwd == null || tempPassword.tempPwd == "") { endTimeText.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } else { endTimeText.Text = tempPassword.validEndTime; } endLayout.AddChidren(endTimeText); endLayout.AddChidren(new Button() { X = Application.GetRealWidth(339), Gravity = Gravity.CenterVertical, Width = Application.GetMinRealAverage(16), Height = Application.GetMinRealAverage(16), UnSelectedImagePath = "Public/Right.png", Enable = false, }); Button endTimeBtn = new Button(); endLayout.AddChidren(endTimeBtn); bodyScrolView.AddChidren(endLayout); // 分割线 bodyScrolView.AddChidren(new Button() { X = Application.GetRealWidth(20), Width = Application.GetRealWidth(335), Height = Application.GetRealHeight(1), BackgroundColor = CSS_Color.DividingLineColor, }); // dialog回调 Action<string> endTimeAction = (str) => { endTimeText.Text = str + ":00"; }; endTimeBtn.MouseUpEventHandler += (sender, e) => { try { new LpTimeDialog(Application.Activity, new LpTimeDialogCallBak(endTimeAction)).Show(); } catch (Exception ex) { string error = ex.Message; } }; #endregion #region 二维码 bodyScrolView.AddChidren(new Button() { Height = Application.GetRealWidth(33), }); codeLayout = new FrameLayout() { X = Application.GetRealWidth(117), Width = Application.GetRealWidth(142), Height = Application.GetRealWidth(142), }; bodyScrolView.AddChidren(codeLayout); // 二维码ImagView codeIV = new ImageView() { BackgroundColor = CSS_Color.BackgroundColor, }; codeLayout.AddChidren(codeIV); bodyScrolView.AddChidren(new Button() { Height = Application.GetRealWidth(20), }); bodyScrolView.AddChidren(new Button() { X = Application.GetRealWidth(16), Width = Application.GetRealWidth(343), Height = Application.GetRealWidth(20), Text = "长按可以把二维码保存到相册", TextAlignment = TextAlignment.Center, TextColor = CSS_Color.FirstLevelTitleColor, }); #endregion bodyScrolView.AddChidren(new Button() { Height = Application.GetRealWidth(28), }); visitorVoucherBtn = new Button() { X = Application.GetRealWidth(78), Width = Application.GetRealWidth(220), Height = Application.GetRealWidth(44), BackgroundColor = CSS_Color.MainColor, Radius = (uint)Application.GetRealWidth(44), TextSize = CSS_FontSize.SubheadingFontSize, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.textWhiteColor, }; bodyScrolView.AddChidren(visitorVoucherBtn); // Action voucher_action = () => { if (codeIV.ImageBytes == null) { // 请求服务端,生成临时密码 tempPassword.homeId = Entity.DB_ResidenceData.Instance.CurrentRegion.id; tempPassword.phone = phoneNumberEditText.Text; tempPassword.tempPwd = pwdEditText.Text; tempPassword.validBeginTime = startTimeText.Text; tempPassword.validEndTime = endTimeText.Text; tempPassword.useCount = 1000; CreateVisitorPassword(tempPassword); } else { // 删除访客临时密码 DelVisitorPassword(tempPassword); } }; visitorVoucherBtn.MouseUpEventHandler += (sender, e) => { if (phoneNumberEditText.Text == "" || pwdEditText.Text == "") { return; } string tip = ""; string message = ""; if (codeIV.ImageBytes == null) { tip = "访客凭证"; message = "生成访客二维码并将临时密码发送至访客手机."; } else { tip = "访客凭证"; message = "确定删除访客凭证?"; } new LpTipDialog(Application.Activity, tip, message, new LpTipDialogCallBack(voucher_action)).Show(); }; //将二维码保存到本地相册 codeIV.MouseLongEventHandler += (sender, e) => { #if __Android__ bool bol = HDLImageUtils.SaveImageToGallery(Application.Activity, Scan.BytesFromText(tempPassword.tempPwd, codeIV.Width, codeIV.Height)); string msg = ""; if (bol) { msg = "保存成功!"; } else { msg = "保存失败!"; } EmptyTipView tipView = new EmptyTipView(msg, 160); tipView.Gravity = Gravity.CenterHorizontal; bodyView.AddChidren(tipView); #endif }; RefreshVisitorVoucherBtn(); } /// <summary> /// 刷新VisitorVoucherBtn状态 /// </summary> private void RefreshVisitorVoucherBtn() { if (tempPassword.tempPwd != null && tempPassword.tempPwd != "") { codeIV.ImageBytes = Scan.BytesFromText(pwdEditText.Text, codeIV.Width, codeIV.Height); //判断二维码是否失效 DateTime endTime = DateTime.Parse(tempPassword.validEndTime); DateTime currentTime = DateTime.Now; if (currentTime > endTime || !tempPassword.status) { // 二维码有效期提示 codeTip = new Button() { TextAlignment = TextAlignment.Center, TextColor = CSS_Color.textWhiteColor, BackgroundColor = CSS_Color.DialogTransparentColor1, Text = "二维码已失效", }; codeLayout.AddChidren(codeTip); } visitorVoucherBtn.Text = "删除访客凭证"; } else { visitorVoucherBtn.Text = "生成访客凭证"; } } /// <summary> /// 添加临时密码(访客凭证) /// </summary> /// <param name="homeId">住宅id</param> /// <param name="phone">访客手机号</param> /// <param name="tempPwd">临时密码</param> /// <param name="validBeginTime">开始时间</param> /// <param name="validEndTime">结束时间</param> /// <param name="useCount">使用次数,默认一个数值大一些的</param> /// <returns></returns> private bool CreateVisitorPassword(VisitorTempPassword pwd) { var result = false; Dictionary<string, object> dictionary = new Dictionary<string, object>(); dictionary.Add("homeId", pwd.homeId); dictionary.Add("phone", pwd.phone); dictionary.Add("tempPwd", pwd.tempPwd); dictionary.Add("validBeginTime", pwd.validBeginTime); dictionary.Add("validEndTime", pwd.validEndTime); dictionary.Add("useCount", pwd.useCount); var requestJson = HttpUtil.GetSignRequestJson(dictionary); var pack = HttpUtil.RequestHttpsPost(NewAPI.API_POST_ADD_TEMP_PASSWORD, requestJson); if (pack != null) { if (pack.Code == StateCode.SUCCESS) { pwd.id = pack.Data.ToString(); codeIV.ImageBytes = Scan.BytesFromText(pwdEditText.Text, codeIV.Width, codeIV.Height); } } RefreshVisitorVoucherBtn(); return result; } /// <summary> /// 删除临时密码(访客凭证) /// </summary> /// <param name="home_id">住宅id</param> /// <param name="pwd_id">临时密码id</param> private bool DelVisitorPassword(VisitorTempPassword pwd) { Dictionary<string, object> dictionary = new Dictionary<string, object>(); dictionary.Add("homeId", pwd.homeId); dictionary.Add("id", pwd.id); var result = false; var requestJson = HttpUtil.GetSignRequestJson(dictionary); var pack = HttpUtil.RequestHttpsPost(NewAPI.API_POST_DEL_TEMP_PASSWORD, requestJson); if (pack != null) { if (pack.Code == StateCode.SUCCESS) { // 关闭当前界面 RemoveFromParent(); } } RefreshVisitorVoucherBtn(); return result; } /// <summary> /// 生成6位随机密码 /// </summary> /// <returns></returns> private string getRandomPwd() { string pwd = ""; for (int i = 0; i < 6; i++) { int math = new Random().Next(0, 9); pwd += math; } return pwd; } } } }