5个文件已添加
24个文件已修改
1 文件已重命名
| | |
| | | <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" /> |
| | | <MonoDevelop.Ide.Workbench> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI1-Login/LoginPage.cs"> |
| | | <Files> |
| | | <File FileName="HDL_ON/Common/HDLCommon.cs" Line="545" Column="14" /> |
| | | <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="482" Column="31" /> |
| | | <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="21" Column="89" /> |
| | | <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="1" Column="1" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="HDL_APP_Project" expanded="True"> |
| | | <Node name="HDL_ON" expanded="True" /> |
| | | <Node name="HDL-ON_iOS" expanded="True" selected="True"> |
| | | <Node name="References" expanded="True" /> |
| | | <Node name="HDL_ON" expanded="True"> |
| | | <Node name="UI" expanded="True"> |
| | | <Node name="UI1-Login" expanded="True"> |
| | | <Node name="LoginPage.cs" selected="True" /> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </Node> |
| | | </State> |
| | |
| | | <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> |
| | | <String>Shared.IOS/Shared.IOS.csproj</String> |
| | | </DisabledProjects> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> |
| | | <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore /> |
| | | <BreakpointStore> |
| | | <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" line="34" column="1" /> |
| | | </BreakpointStore> |
| | | </MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <MultiItemStartupConfigurations /> |
| | | </Properties> |
| | |
| | | using CN.Jpush.Android.Api; |
| | | using HDL_ON; |
| | | using Java.Util; |
| | | using Microsoft.AppCenter; |
| | | using Microsoft.AppCenter.Analytics; |
| | | using Microsoft.AppCenter.Crashes; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON_Android |
| | |
| | | public override void OnCreate() |
| | | { |
| | | //注册未处理异常事件 |
| | | Com.Chteam.Agent.BuglyAgentHelper.Init(this.ApplicationContext, "cb89f20750"); |
| | | AppCenter.Start("64ac5859-2cd7-4ef8-a5da-5455e29679ec", typeof(Analytics), typeof(Crashes)); |
| | | if (Shared.Application.Activity != null) |
| | | { |
| | | reStartApp(this); |
| | |
| | | { |
| | | string UserData = "user text"; |
| | | //注意:RequestAudio 请求对方音频,RequestVideo请求对方视频 SendAudio发送本地音频 SendVideo 发送本地视频 一般门口不接收到视频,所以最好设置0,减少流量消耗 |
| | | string param = string.Format("RequestAudio=1\r\n" + "RequestVideo=1\r\n" + "SendAudio=1\r\n" + "SendVideo=0r\n" + "UserData=%s\r\n", UserData); |
| | | string param = string.Format("RequestAudio=1\r\n" + "RequestVideo=1\r\n" + "SendAudio=1\r\n" + "SendVideo=1r\n" + "UserData=%s\r\n", UserData); |
| | | mPhone.AcceptRing(param); |
| | | answerLayout.Visibility = ViewStates.Gone; |
| | | PostAnswer(); |
| | |
| | | <Reference Include="videophone"> |
| | | <HintPath>..\DLL\FL\Android\videophone.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Square.OkHttp3"> |
| | | <HintPath>..\DLL\EZvizMonitor\Square.OkHttp3.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Square.OkIO"> |
| | | <HintPath>..\DLL\EZvizMonitor\Square.OkIO.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ys"> |
| | | <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="MainActivity.cs" /> |
| | |
| | | <PackageReference Include="XamarinLibrary.Xamarin.Android.Manual.JPush"> |
| | | <Version>3.7.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Bugly"> |
| | | <Version>4.3.1</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Xamarin.Android.Support.Constraint.Layout"> |
| | | <Version>1.1.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Xamarin.Android.Support.Constraint.Layout.Solver"> |
| | | <Version>1.1.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter"> |
| | | <Version>4.2.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter.Crashes"> |
| | | <Version>4.2.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter.Analytics"> |
| | | <Version>4.2.0</Version> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidAsset Include="Assets\Language.ini" /> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103302" android:versionName="1.1.202103302" package="com.hdl.onpro"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202104011" android:versionName="1.2.202104011" package="com.hdl.onpro"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" /> |
| | | <!-- 可视对讲权限--> |
| | | <uses-permission android:name="android.permission.CAMERA" /> |
| | | <uses-feature android:name="android.hardware.camera" /> |
| | | <uses-feature android:name="android.hardware.camera.autofocus" /> |
| | | <uses-permission android:name="android.permission.INTERNET" /> |
| | | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> |
| | | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| | | <uses-permission android:name="android.permission.VIBRATE" /> |
| | | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.RECORD_AUDIO" /> |
| | | <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> |
| | | <!-- 定位权限--> |
| | | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| | | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| | |
| | | mPhone.SetRemoteSurfaceHolder(mRemoteSurfaceHolder, "mRemoteSurfaceHolder!=null"); //设置来电窗口 |
| | | } |
| | | |
| | | ViewGroup v = (ViewGroup)FindViewById(Resource.Id.localVideo); |
| | | ViewGroup v = (ViewGroup)FindViewById(Resource.Id.locaVideo); |
| | | mPhone.SetLocalVideoContainer(v);//设置本地视频窗口,一定要调用,不然后会出现没声音 |
| | | } |
| | | else |
| | |
| | | <MtouchArch>ARM64</MtouchArch> |
| | | <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> |
| | | <MtouchLink>SdkOnly</MtouchLink> |
| | | <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> |
| | | <MtouchI18n>cjk</MtouchI18n> |
| | | <CodesignProvision>On+_Hoc20210401-1</CodesignProvision> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="System" /> |
| | |
| | | <key>UIStatusBarStyle</key> |
| | | <string>UIStatusBarStyleLightContent</string> |
| | | <key>CFBundleShortVersionString</key> |
| | | <string>1.1.202103301</string> |
| | | <string>1.2.202104011</string> |
| | | <key>CFBundleVersion</key> |
| | | <string>202103301</string> |
| | | <string>202104011</string> |
| | | <key>NSLocationWhenInUseUsageDescription</key> |
| | | <string>Use geographic location to provide services such as weather</string> |
| | | <key>NSAppleMusicUsageDescription</key> |
| | |
| | | "NSLocationAlwaysUsageDescription"="使用地理位置,以便提供服务,如天气"; |
| | | "NSFaceIDUsageDescription"="需要使用Face ID,用于解锁验证"; |
| | | "NSPhotoLibraryAddUsageDescription"="应用程序希望访问您的照片库,用于设置房间的背景图片"; |
| | | "NSMicrophoneUsageDescription"="应用程序希望访问您的手机麦克风,用于语音对讲"; |
| | | "NSMicrophoneUsageDescription"="应用程序希望访问您的手机麦克风,用于语音对讲"; |
| | | "NSBluetoothPeripheralUsageDescription"="此应用程序使用蓝牙与设备通信,此应用程序不收集、存储或记录通过蓝牙通信的任何数据。"; |
| | | "NSBluetoothAlwaysUsageDescription"="此应用程序使用蓝牙与设备通信,此应用程序不收集、存储或记录通过蓝牙通信的任何数据。"; |
| | |
| | | var flVideoInfo = HttpRequest.CheckFlVideo(); |
| | | if(flVideoInfo.Code == StateCode.SUCCESS) |
| | | { |
| | | FunctionList.List.videoIntercom = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoMethod.VideoClouds>(flVideoInfo.Data.ToString()); |
| | | FunctionList.List.videoIntercom = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.Video.VideoClouds>(flVideoInfo.Data.ToString()); |
| | | } |
| | | |
| | | } |
| | |
| | | Address = mHome.homeAddress, |
| | | isAllowCreateScene = mHome.isAllowCreateScene, |
| | | }; |
| | | //if (home.isBindGateway) |
| | | if (home.isBindGateway) |
| | | { |
| | | UserInfo.Current.regionList.Add(home); |
| | | } |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | // public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | /// <summary> |
| | | /// RegionMark |
| | |
| | | |
| | | |
| | | ////**************测试************** |
| | | // string requestFullUrl = GlobalRequestHttpsHost + apiPath; |
| | | //string requestFullUrl = GlobalRequestHttpsHost + apiPath; |
| | | ////**************测试************** |
| | | |
| | | RestClient client = new RestClient(requestFullUrl); |
| | |
| | | /// <summary> |
| | | /// 可视对讲列表 |
| | | /// </summary> |
| | | public UI.UI2.FuntionControlView.Video.VideoMethod.VideoClouds videoIntercom; |
| | | public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom; |
| | | |
| | | /// <summary> |
| | | /// 场景列表 |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AcControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\FhControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\TvControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\MainView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout50.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\FrameLayout60.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\ShowDialog.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\1ContorlPage\AirFreshControlPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoMethod.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoSend.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\VideoMainView.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\ObjectClass.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
|
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "1.2.0330"; |
| | | public static string VersionString = "1.2.0401"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | {
|
| | | this.ShowMassage(ShowMsgType.Error, "System Error!", () =>
|
| | | {
|
| | | string msg = ex.Message + "\r\n";
|
| | | msg += ex.StackTrace;
|
| | | //string msg = ex.Message + "\r\n";
|
| | | //msg += ex.StackTrace;
|
| | |
|
| | | var form = new HideOptionFileContentForm();
|
| | | form.AddForm(string.Empty);
|
| | | form.SetTextContent(msg);
|
| | | //var form = new HideOptionFileContentForm();
|
| | | //form.AddForm(string.Empty);
|
| | | //form.SetTextContent(msg);
|
| | |
|
| | | }, "View Log");
|
| | | }, "ok");
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | } |
| | | else |
| | | { |
| | | etAccount.Text = "BB01010101@evoyo.com";//可视对讲 |
| | | //etAccount.Text = "13168123446"; |
| | | //etAccount.Text = "BB01010101@evoyo.com";//可视对讲 |
| | | etAccount.Text = "13168123446"; |
| | | //etAccount.Text = "13602944661";//kx |
| | | //etAccount.Text = "18316120654";//凉霸"18666455392";//13375012446//13602944661//tzy 18778381374 |
| | | //15971583093 gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 国外服务器测试 |
| | |
| | | functionCount = FunctionList.List.GetElectricals().Count; |
| | | functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | #endregion |
| | | functionCount = 1; |
| | | //functionCount = 1; |
| | | break; |
| | | case ShowFunction.Environmental: |
| | | #region 环境数据 |
| | |
| | | case ShowFunction.Panel: |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | //functionCount = 1; |
| | | functionCount = 1; |
| | | break; |
| | | case ShowFunction.Sensor: |
| | | functionCount = FunctionList.List.GetArmSensorList().Count; |
| | |
| | | LoadEvent_SwitchFunction(btnLightPower, item, functionView); |
| | | }; |
| | | functionPageTitleId = StringId.Lights; |
| | | |
| | | |
| | | #endregion |
| | | break; |
| | | case ShowFunction.AC: |
| | |
| | | break; |
| | | case ShowFunction.VideoIntercom: |
| | | btnName.TextID = StringId.VideoIntercom; |
| | | |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var videoMethod = new UI2.FuntionControlView.Video.VideoMethod(); |
| | | videoMethod.MianView(this, FunctionList.List.videoIntercom); |
| | | |
| | | //var mainView = new HDL_ON.UI.UI2.FuntionControlView.Video.MainView(); |
| | | //MainPage.BasePageView.AddChidren(mainView); |
| | | //mainView.Show(); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | videoMethod.MianView(this,FunctionList.List.videoIntercom); |
| | | }; |
| | | break; |
| | | |
| | |
| | | new System.Threading.Thread(() => { |
| | | try |
| | | { |
| | | var pm = new DAL.Server.HttpServerRequest(); |
| | | var pm = new HttpServerRequest(); |
| | | var pack = pm.Get3TyBrandBindDeviceList(brand.productPlatform, brand.productBrand); |
| | | if (pack.Code == DAL.Server.StateCode.SUCCESS) |
| | | { |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | |
| | | var page = new BrandListPage();// AddThirdPartyBrandListpage(); // BrandListPage(); |
| | | var page = new BrandListPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | ////获取列表 |
| | | //HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () => |
| | | //{ |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // var page = new UI2.PersonalCenter.PirDevice.PirMain(); |
| | | // MainPage.BasePageView.AddChidren(page); |
| | | // page.Show(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | // }); |
| | | //}); |
| | | }; |
| | | btnResidenceAddFunctionIcon.MouseUpEventHandler = eventHandler; |
| | | btnResidenceAddFunctionText.MouseUpEventHandler = eventHandler; |
| | |
| | | { |
| | | btnSupportText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | //var getsupportPage = new GetSupportPage(); |
| | | //MainPage.BasePageView.AddChidren(getsupportPage); |
| | | //getsupportPage.LoadPage(); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | //throw new Exception("异常测试"); |
| | | |
| | | var getsupportPage = new FAQHelpPage(); |
| | | MainPage.BasePageView.AddChidren(getsupportPage); |
| | |
| | | //进来不允许左滑 |
| | | MainPage.BasePageView.ScrollEnabled = false; |
| | | View.Buttons buttons = new View.Buttons(); |
| | | buttons.AddFrameLayout(this, (if_value, view) => |
| | | buttons.AddFrameLayout(this, (if_value, view) => |
| | | { |
| | | //关闭允许左滑 |
| | | MainPage.BasePageView.ScrollEnabled = true; |
| | |
| | | Method method = new Method(); |
| | | method.AddControl(this, (control) => |
| | | { |
| | | //成功后移除; |
| | | view.RemoveFromParent(); |
| | | //成功后移除; |
| | | view.RemoveFromParent(); |
| | | AddButton addButton = new AddButton(); |
| | | MainPage.BasePageView.AddChidren(addButton); |
| | | addButton.Show(control); |
| | |
| | | GetDeviceTypeList(true, () => |
| | | { |
| | | DeviceTypeViewClick(if_value); |
| | | //获取成功之后移除 |
| | | view.RemoveFromParent(); |
| | | //获取成功之后移除 |
| | | view.RemoveFromParent(); |
| | | |
| | | }); |
| | | } |
| | |
| | | DeviceTypeViewClick(if_value); |
| | | view.RemoveFromParent(); |
| | | } |
| | | |
| | | } |
| | | }, 7); |
| | | }; |
| | |
| | | /// <param name="if_value">控件索引值</param> |
| | | private void DeviceTypeViewClick(int if_value) |
| | | { |
| | | |
| | | var strings = View.Buttons.GetTypeString(if_value).Split('-'); |
| | | var jobDeviceType = DeviceTypeList.Find((c) => c.deviceType == strings[0]); |
| | | if (jobDeviceType == null) |
| | |
| | | }); |
| | | |
| | | }); |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 读取红外设备类型列表 |
| | |
| | | { |
| | | PirSend.GetDeviceTypesList(this, (responsePackNew) => |
| | | { |
| | | |
| | | if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "") |
| | | { |
| | | //清空之前数据 |
| | | DeviceTypeList.Clear(); |
| | | var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); |
| | | for (int a = 0; a < jArray.Count; a++) |
| | | try |
| | | { |
| | | var jay = jArray[a]; |
| | | var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); |
| | | var objDeviceType = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceType>(str); |
| | | if (objDeviceType != null) |
| | | var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); |
| | | for (int a = 0; a < jArray.Count; a++) |
| | | { |
| | | if (null == DeviceTypeList.Find((c) => c.id == objDeviceType.id)) |
| | | var jay = jArray[a]; |
| | | var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); |
| | | var objDeviceType = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceType>(str); |
| | | if (objDeviceType != null) |
| | | { |
| | | DeviceTypeList.Add(objDeviceType); |
| | | if (null == DeviceTypeList.Find((c) => c.id == objDeviceType.id)) |
| | | { |
| | | DeviceTypeList.Add(objDeviceType); |
| | | } |
| | | } |
| | | } |
| | | action(); |
| | | } |
| | | action(); |
| | | catch |
| | | { |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | //清空之前数据 |
| | | brandList.Clear(); |
| | | var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); |
| | | for (int a = 0; a < jArray.Count; a++) |
| | | try |
| | | { |
| | | var jay = jArray[a]; |
| | | var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); |
| | | var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str); |
| | | if (brand != null) |
| | | var jArray = Newtonsoft.Json.Linq.JArray.Parse(responsePackNew.Data.ToString()); |
| | | for (int a = 0; a < jArray.Count; a++) |
| | | { |
| | | if (null == brandList.Find((c) => c.id == brand.id)) |
| | | var jay = jArray[a]; |
| | | var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); |
| | | var brand = Newtonsoft.Json.JsonConvert.DeserializeObject<Brand>(str); |
| | | if (brand != null) |
| | | { |
| | | brandList.Add(brand); |
| | | if (null == brandList.Find((c) => c.id == brand.id)) |
| | | { |
| | | brandList.Add(brand); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | actionBrand(brandList); |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | actionBrand(brandList); |
| | | }); |
| | | } |
| | | } |
| | | else |
| | | { |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video |
| | | { |
| | | public class ObjectClass |
| | | { |
| | | |
| | | } |
| | | [Serializable] |
| | | public class VideoClouds |
| | | { |
| | | /// <summary> |
| | | /// 丰林绑定id(flBindId)(userKey) |
| | | /// </summary> |
| | | public string id = string.Empty; |
| | | /// <summary> |
| | | /// 住宅id |
| | | /// </summary> |
| | | public string homeId = string.Empty; |
| | | /// <summary> |
| | | /// 虚拟手机号 |
| | | /// </summary> |
| | | public string phone = string.Empty; |
| | | /// <summary> |
| | | /// 虚拟身份证号码 |
| | | /// </summary> |
| | | public string idCard = string.Empty; |
| | | /// <summary> |
| | | /// 社区主键Id |
| | | /// </summary> |
| | | public string communtiyId = string.Empty; |
| | | /// <summary> |
| | | /// 丰林楼栋号 |
| | | /// </summary> |
| | | public string flBuildingId = string.Empty; |
| | | /// <summary> |
| | | /// 丰林楼栋名称 |
| | | /// </summary> |
| | | public string flBuildingName = string.Empty; |
| | | /// <summary> |
| | | /// 丰林房间名称 |
| | | /// </summary> |
| | | public string flRoomId = string.Empty; |
| | | /// <summary> |
| | | /// 丰林安全密钥 |
| | | /// </summary> |
| | | public string flSecretKey = string.Empty; |
| | | /// <summary> |
| | | /// 丰林的小区Id |
| | | /// </summary> |
| | | public string flCmtId = string.Empty; |
| | | |
| | | } |
| | | [Serializable] |
| | | public class Call |
| | | { |
| | | /// <summary> |
| | | ///记录主键Id |
| | | /// </summary> |
| | | public string id = string.Empty; |
| | | /// <summary> |
| | | /// 住宅id |
| | | /// </summary> |
| | | public string homeId = string.Empty; |
| | | /// <summary> |
| | | /// 呼叫时间 |
| | | /// </summary> |
| | | public string callTime = string.Empty; |
| | | /// <summary> |
| | | /// 通话时长 |
| | | /// </summary> |
| | | public string callDuration = string.Empty; |
| | | /// <summary> |
| | | /// 呼叫状态(0:未接;1:已接;2:拒接) |
| | | /// </summary> |
| | | public string callStatus = string.Empty; |
| | | /// <summary> |
| | | /// 是否开锁 |
| | | /// </summary> |
| | | public bool isUnlock; |
| | | /// <summary> |
| | | /// 截图地址 |
| | | /// </summary> |
| | | public string screenshotUrl = string.Empty; |
| | | /// <summary> |
| | | ///丰林绑定主键id(门口机主键Id) |
| | | /// </summary> |
| | | public string flBindId = string.Empty; |
| | | } |
| | | [Serializable] |
| | | public class CallView |
| | | { |
| | | /// <summary> |
| | | ///年 |
| | | /// </summary> |
| | | public string year = string.Empty; |
| | | |
| | | public List<Call> callList = new List<Call>(); |
| | | |
| | | } |
| | | [Serializable] |
| | | public class FlVideo |
| | | { |
| | | /// <summary> |
| | | /// 设备名称 |
| | | /// </summary> |
| | | public string aliasName = string.Empty; |
| | | /// <summary> |
| | | /// 设备类型:(1室内机,2室外机,3围墙机,4管理机,5二次确认机) |
| | | /// </summary> |
| | | public string devType = string.Empty; |
| | | public string uuid = string.Empty; |
| | | } |
| | | } |
File was renamed from HDL_ON/UI/UI2/FuntionControlView/Video/MainView.cs |
| | |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Video |
| | | { |
| | | public class MainView : FrameLayout |
| | | public class VideoMainView : FrameLayout |
| | | { |
| | | /// <summary> |
| | | /// 加载可视对讲UI |
| | |
| | | /// <param name="listVideo">门口机列表</param> |
| | | /// <param name="listCall">通话记录列表</param> |
| | | /// <param name="video">当前的可视对讲</param> |
| | | public void Show(List<VideoMethod.FlVideo> listVideo, List<CallView> listCall, VideoClouds video) |
| | | public void Show(List<FlVideo> listVideo, List<CallView> listCall, VideoClouds video) |
| | | { |
| | | #region 布局界面 |
| | | this.BackgroundColor = MusicColor.ViewColor; |
| | | var topView = new TopView(); |
| | | this.AddChidren(topView.TopFLayoutView()); |
| | | topView.topNameBtn.TextID = StringId.keshiduijiang; |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | |
| | | var pageView = new PageLayout() |
| | | { |
| | |
| | | |
| | | } |
| | | }; |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (pageView.PageIndex == 1) |
| | | { |
| | | pageView.PageIndex = 0; |
| | | } |
| | | else |
| | | { |
| | | RemoveFromParent(); |
| | | } |
| | | |
| | | }; |
| | | #endregion |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="view1">父控件</param> |
| | | /// <param name="list">门口机列表</param> |
| | | /// <param name="videoClouds">当前的可视对讲</param> |
| | | void View1(FrameLayout view1, List<VideoMethod.FlVideo> list, VideoClouds videoClouds) |
| | | void View1(FrameLayout view1, List<FlVideo> list, VideoClouds videoClouds) |
| | | { |
| | | #region 布局界面 |
| | | var bjFl = new FrameLayout |
| | |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(16), |
| | | Width = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(33), |
| | | TextColor = MusicColor.MusicTxet14Color, |
| | | TextSize = TextSize.Text24, |
| | |
| | | if (list.Count > 0) |
| | | { |
| | | //门禁二维码固定有的,虚拟一个出来 |
| | | list.Add(new VideoMethod.FlVideo { aliasName = Language.StringByID(StringId.menjinerweima), devType = "100" }); |
| | | list.Add(new FlVideo { aliasName = Language.StringByID(StringId.menjinerweima), devType = "100" }); |
| | | } |
| | | //数组个数 |
| | | //int value = 15; |
| | |
| | | if (string.IsNullOrEmpty(flVideo.uuid)) |
| | | { |
| | | new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.peizhicanshuyouyichang)); |
| | | return; |
| | | } |
| | | ESVideoInfo eSVideoInfo = new ESVideoInfo |
| | | { |
| | |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(16), |
| | | Width = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetRealHeight(33), |
| | | TextColor = MusicColor.MusicTxet14Color, |
| | | TextSize = TextSize.Text24, |
| | |
| | | var vv = new VerticalRefreshLayout |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(58), |
| | | Height = Application.GetRealHeight(458), |
| | | Y = Application.GetRealHeight(58 + 17), |
| | | Height = Application.GetRealHeight(458 - 17), |
| | | Width = Application.GetRealWidth(295), |
| | | }; |
| | | bjFl.AddChidren(vv); |
| | |
| | | break; |
| | | case "1": |
| | | { |
| | | Language.StringByID(StringId.yijieting); |
| | | s = Language.StringByID(StringId.yijieting); |
| | | } |
| | | break; |
| | | case "2": |
| | | { |
| | | Language.StringByID(StringId.yijujue); |
| | | s = Language.StringByID(StringId.yijujue); |
| | | } |
| | | break; |
| | | } |
| | |
| | | Loading loading = new Loading(); |
| | | frameLayout.AddChidren(loading); |
| | | loading.Start(); |
| | | List<VideoMethod.FlVideo> listESVideoInfo = new List<VideoMethod.FlVideo>(); |
| | | List<FlVideo> listESVideoInfo = new List<FlVideo>(); |
| | | List<CallView> listCall = new List<CallView>(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | var mainView = new MainView(); |
| | | var mainView = new VideoMainView(); |
| | | MainPage.BasePageView.AddChidren(mainView); |
| | | mainView.Show(listESVideoInfo, listCall, video); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | /// <param name="action">回调函数</param> |
| | | /// <param name="frame">log父控件</param> |
| | | /// <param name="tag">是否要显示log(默认显示tag=true)</param> |
| | | public void GetVideo(Action<VideoClouds> action, FrameLayout frame, bool tag) |
| | | public void GetVideo(Action<VideoClouds> action, FrameLayout frame, bool tag) |
| | | { |
| | | VideoClouds videoObj = null; |
| | | VideoClouds videoObj =null; |
| | | ThreadSend(null, (responsePackNew) => |
| | | { |
| | | try |
| | | { |
| | | var str = responsePackNew.Data.ToString(); |
| | | videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str); |
| | | action(videoObj); |
| | | } |
| | | catch |
| | | { |
| | | action(videoObj); |
| | | } |
| | | }, "获取可视对讲", "fram", frame, null, tag); |
| | | } |
| | | { |
| | | try |
| | | { |
| | | var str = responsePackNew.Data.ToString(); |
| | | videoObj = Newtonsoft.Json.JsonConvert.DeserializeObject<VideoClouds>(str); |
| | | action(videoObj); |
| | | } |
| | | catch { |
| | | action(videoObj); |
| | | } |
| | | }, "获取可视对讲", "fram", frame, null, tag); |
| | | } |
| | | /// <summary> |
| | | /// 获取历史通话记录 |
| | | /// </summary> |
| | |
| | | } |
| | | catch { } |
| | | return callViewList; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 发送命令线程 |
| | | /// </summary> |
| | |
| | | code += rand.Next(10).ToString(); |
| | | } |
| | | return code; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 获取当前时间戳 |
| | | /// </summary> |
| | |
| | | //return Convert.ToInt64(ts.TotalSeconds).ToString(); |
| | | |
| | | System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区 |
| | | |
| | | |
| | | return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 相差秒数 |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 获取当前时间戳 |
| | |
| | | System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区 |
| | | return ((long)(DateTime.Now.AddDays(1) - startTime).TotalSeconds).ToString(); // 相差秒数 |
| | | } |
| | | [Serializable] |
| | | public class VideoClouds |
| | | { |
| | | /// <summary> |
| | | /// 丰林绑定id(flBindId)(userKey) |
| | | /// </summary> |
| | | public string id = string.Empty; |
| | | /// <summary> |
| | | /// 住宅id |
| | | /// </summary> |
| | | public string homeId = string.Empty; |
| | | /// <summary> |
| | | /// 虚拟手机号 |
| | | /// </summary> |
| | | public string phone = string.Empty; |
| | | /// <summary> |
| | | /// 虚拟身份证号码 |
| | | /// </summary> |
| | | public string idCard = string.Empty; |
| | | /// <summary> |
| | | /// 社区主键Id |
| | | /// </summary> |
| | | public string communtiyId = string.Empty; |
| | | /// <summary> |
| | | /// 丰林楼栋号 |
| | | /// </summary> |
| | | public string flBuildingId = string.Empty; |
| | | /// <summary> |
| | | /// 丰林楼栋名称 |
| | | /// </summary> |
| | | public string flBuildingName = string.Empty; |
| | | /// <summary> |
| | | /// 丰林房间名称 |
| | | /// </summary> |
| | | public string flRoomId = string.Empty; |
| | | /// <summary> |
| | | /// 丰林安全密钥 |
| | | /// </summary> |
| | | public string flSecretKey = string.Empty; |
| | | /// <summary> |
| | | /// 丰林的小区Id |
| | | /// </summary> |
| | | public string flCmtId = string.Empty; |
| | | |
| | | } |
| | | [Serializable] |
| | | public class Call |
| | | { |
| | | /// <summary> |
| | | ///记录主键Id |
| | | /// </summary> |
| | | public string id = string.Empty; |
| | | /// <summary> |
| | | /// 住宅id |
| | | /// </summary> |
| | | public string homeId = string.Empty; |
| | | /// <summary> |
| | | /// 呼叫时间 |
| | | /// </summary> |
| | | public string callTime = string.Empty; |
| | | /// <summary> |
| | | /// 通话时长 |
| | | /// </summary> |
| | | public string callDuration = string.Empty; |
| | | /// <summary> |
| | | /// 呼叫状态(0:未接;1:已接;2:拒接) |
| | | /// </summary> |
| | | public string callStatus = string.Empty; |
| | | /// <summary> |
| | | /// 是否开锁 |
| | | /// </summary> |
| | | public bool isUnlock; |
| | | /// <summary> |
| | | /// 截图地址 |
| | | /// </summary> |
| | | public string screenshotUrl = string.Empty; |
| | | /// <summary> |
| | | ///丰林绑定主键id(门口机主键Id) |
| | | /// </summary> |
| | | public string flBindId = string.Empty; |
| | | } |
| | | [Serializable] |
| | | public class CallView |
| | | { |
| | | /// <summary> |
| | | ///年 |
| | | /// </summary> |
| | | public string year = string.Empty; |
| | | |
| | | public List<Call> callList = new List<Call>(); |
| | | |
| | | } |
| | | [Serializable] |
| | | public class FlVideo |
| | | { |
| | | /// <summary> |
| | | /// 设备名称 |
| | | /// </summary> |
| | | public string aliasName = string.Empty; |
| | | /// <summary> |
| | | /// 设备类型:(1室内机,2室外机,3围墙机,4管理机,5二次确认机) |
| | | /// </summary> |
| | | public string devType = string.Empty; |
| | | public string uuid = string.Empty; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | public class VideoSend |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// 检查住宅是否绑定丰林,并获取门口机列表 |
| | | /// </summary> |
| | |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_Check); |
| | | return responsePackNew; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取通话记录 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static ResponsePackNew GetCall(string flBindId) |
| | | { |
| | | var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", 100 } }; |
| | | var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", int.MaxValue } }; |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_GetCallList); |
| | | return responsePackNew; |
| | | } |
| | | /// <summary> |
| | | /// 获取门口机列表(1室内机,2室外机,3围墙机,4管理机,5二次确认机) |
| | | /// </summary> |
| | | public static List<VideoMethod.FlVideo> GetVideoInfoList(VideoMethod.VideoClouds video) |
| | | public static List<FlVideo> GetVideoInfoList(VideoClouds video) |
| | | { |
| | | List<VideoMethod.FlVideo> eSVideoInfosList = new List<VideoMethod.FlVideo>(); |
| | | List<FlVideo> eSVideoInfosList = new List<FlVideo>(); |
| | | var jobject = new JObject(); |
| | | jobject.Add("cmtID", video.flCmtId); |
| | | jobject.Add("unitno", video.flBuildingId); |
| | |
| | | { |
| | | return eSVideoInfosList; |
| | | } |
| | | eSVideoInfosList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<VideoMethod.FlVideo>>(json["list"].ToString()); |
| | | eSVideoInfosList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<FlVideo>>(json["list"].ToString()); |
| | | |
| | | } |
| | | catch { } |
| | | return eSVideoInfosList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 随机密码6位 |
| | | /// </summary> |
| | | /// <returns></returns>
public static string getCode()
{
Random rand = new Random();
string code = "";
for (int ctr = 0; ctr < 6; ctr++)
{
code += rand.Next(10).ToString();
}
return code;
} |
| | | |
| | | |
| | | /// <summary> |
| | | /// 上报动态开锁密码(注意:密码有可能延时1分钟生效) |
| | | /// </summary> |
| | | public static void GetQRcode(FrameLayout frame, VideoMethod.VideoClouds video, Action<bool, string> action) |
| | | public static void GetQRcode(FrameLayout frame, VideoClouds video, Action<bool, string> action) |
| | | { |
| | | System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区 |
| | | var timeStamp = ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 相差秒数 |
| | | var timeStamp2 = ((long)(DateTime.Now.AddDays(1) - startTime).TotalSeconds).ToString(); // 相差秒数 |
| | | |
| | | ///标记是否成功 |
| | | bool if_bool = false; |
| | | //临时密码 |
| | | string pwd = getCode(); |
| | | string pwd = VideoMethod.GetCode(); |
| | | var jobject = new JObject();
jobject.Add("communityID", video.flCmtId);//社区ID |
| | | jobject.Add("fromTime", timeStamp);//开始时间 |
| | | jobject.Add("validTime", timeStamp2);//有效时间 |
| | | jobject.Add("fromTime", VideoMethod.GetCurrentTimeStamp());//开始时间 |
| | | jobject.Add("validTime", VideoMethod.GetTomorrowTimeStamp());//有效时间 |
| | | jobject.Add("unitno", video.flBuildingId);//单元号 |
| | | jobject.Add("roomno", video.flRoomId);//房间号 |
| | | jobject.Add("code", pwd);
jobject.Add("userKey", video.id);
jobject.Add("timestamp", timeStamp);
jobject.Add("secretKey", video.flSecretKey);
jobject.Add("method", "setdynamicpwd");
jobject.Add("numTimes", "5"); |
| | | jobject.Add("code", pwd);
jobject.Add("userKey", video.id);
jobject.Add("timestamp", VideoMethod.GetCurrentTimeStamp());
jobject.Add("secretKey", video.flSecretKey);
jobject.Add("method", "setdynamicpwd");
jobject.Add("numTimes", "5"); |
| | | //加载log |
| | | Loading loading = new Loading(); |
| | | frame.AddChidren(loading); |
New file |
| | |
| | |
|
| | | Microsoft Visual Studio Solution File, Format Version 12.00
|
| | | # Visual Studio Version 16
|
| | | VisualStudioVersion = 16.0.809.3
|
| | | MinimumVisualStudioVersion = 10.0.40219.1
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ys", "ys.csproj", "{DF065E3F-C3A1-4908-9582-000974B7C290}"
|
| | | EndProject
|
| | | Global
|
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
| | | Debug|Any CPU = Debug|Any CPU
|
| | | Release|Any CPU = Release|Any CPU
|
| | | EndGlobalSection
|
| | | GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.Build.0 = Release|Any CPU
|
| | | EndGlobalSection
|
| | | GlobalSection(SolutionProperties) = preSolution
|
| | | HideSolutionNode = FALSE
|
| | | EndGlobalSection
|
| | | GlobalSection(ExtensibilityGlobals) = postSolution
|
| | | SolutionGuid = {4EB8F1AD-9FD8-462E-B612-D63F4BA29B86}
|
| | | EndGlobalSection
|
| | | EndGlobal
|