| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.1.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307311"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.0.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202308021"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--友盟--> |
New file |
| | |
| | | { |
| | | "protocol_version" : "0.0.6", |
| | | "configuration" : { |
| | | "version" : "(6.12.0.182) (2020-02/6051b710727)", |
| | | "tlc" : "normal", |
| | | "sigsgev" : "altstack", |
| | | "notifications" : "kqueue", |
| | | "architecture" : "amd64", |
| | | "disabled_features" : "none", |
| | | "smallconfig" : "disabled", |
| | | "bigarrays" : "disabled", |
| | | "softdebug" : "enabled", |
| | | "interpreter" : "enabled", |
| | | "llvm_support" : "0", |
| | | "suspend" : "hybrid" |
| | | }, |
| | | "memory" : { |
| | | "Resident Size" : "213450752", |
| | | "Virtual Size" : "35264557056", |
| | | "minor_gc_time" : "4050407", |
| | | "major_gc_time" : "175543721", |
| | | "minor_gc_count" : "9", |
| | | "major_gc_count" : "1030", |
| | | "major_gc_time_concurrent" : "0" |
| | | }, |
| | | "threads" : [ |
| | | { |
| | | "is_managed" : true, |
| | | "offset_free_hash" : "0x6efc3ba32", |
| | | "offset_rich_hash" : "0x6efc3baac", |
| | | "crashed" : true, |
| | | "native_thread_id" : "0x70000d4da000", |
| | | "thread_info_addr" : "0x7fee5f808800", |
| | | "thread_name" : "Finalizer", |
| | | "ctx" : { |
| | | "IP" : "0x7ff813720189", |
| | | "SP" : "0x70000d4d9a60", |
| | | "BP" : "0x70000d4d9a60" |
| | | }, |
| | | "managed_frames" : [ |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "unregistered" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "5964C1F3-3A6B-4E45-985E-4259425270A7", |
| | | "token" : "0x00000", |
| | | "native_offset" : "0x0", |
| | | "filename" : "System.dll", |
| | | "sizeofimage" : "0x290000", |
| | | "timestamp" : "0x85731fb9", |
| | | "il_offset" : "0x0000c" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "5964C1F3-3A6B-4E45-985E-4259425270A7", |
| | | "token" : "0x600429c", |
| | | "native_offset" : "0x0", |
| | | "filename" : "System.dll", |
| | | "sizeofimage" : "0x290000", |
| | | "timestamp" : "0x85731fb9", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "B27839CC-2DBA-4804-BAAC-F2F5CCE6DE32", |
| | | "token" : "0x60040a5", |
| | | "native_offset" : "0x0", |
| | | "filename" : "mscorlib.dll", |
| | | "sizeofimage" : "0x472000", |
| | | "timestamp" : "0xe057582a", |
| | | "il_offset" : "0x00003" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "B27839CC-2DBA-4804-BAAC-F2F5CCE6DE32", |
| | | "token" : "0x60040a4", |
| | | "native_offset" : "0x0", |
| | | "filename" : "mscorlib.dll", |
| | | "sizeofimage" : "0x472000", |
| | | "timestamp" : "0xe057582a", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "5964C1F3-3A6B-4E45-985E-4259425270A7", |
| | | "token" : "0x6002f52", |
| | | "native_offset" : "0x0", |
| | | "filename" : "System.dll", |
| | | "sizeofimage" : "0x290000", |
| | | "timestamp" : "0x85731fb9", |
| | | "il_offset" : "0x00041" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "5964C1F3-3A6B-4E45-985E-4259425270A7", |
| | | "token" : "0x6002f51", |
| | | "native_offset" : "0x0", |
| | | "filename" : "System.dll", |
| | | "sizeofimage" : "0x290000", |
| | | "timestamp" : "0x85731fb9", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "B27839CC-2DBA-4804-BAAC-F2F5CCE6DE32", |
| | | "token" : "0x00000", |
| | | "native_offset" : "0x0", |
| | | "filename" : "mscorlib.dll", |
| | | "sizeofimage" : "0x472000", |
| | | "timestamp" : "0xe057582a", |
| | | "il_offset" : "0x0002a" |
| | | } |
| | | |
| | | ], |
| | | "unmanaged_frames" : [ |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x1078b2756", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a4dfd5", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a4e64a", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x10791f907", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x1078b73ee", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x1079197b6", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff813720189", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff81e42d60f", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff81e42bdcf", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff81e42ce3c", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff81e42b189", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x10ea0cdad", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "5964C1F3-3A6B-4E45-985E-4259425270A7", |
| | | "token" : "0x00000", |
| | | "native_offset" : "0x0", |
| | | "filename" : "System.dll", |
| | | "sizeofimage" : "0x290000", |
| | | "timestamp" : "0x85731fb9", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "5964C1F3-3A6B-4E45-985E-4259425270A7", |
| | | "token" : "0x600429c", |
| | | "native_offset" : "0x0", |
| | | "filename" : "System.dll", |
| | | "sizeofimage" : "0x290000", |
| | | "timestamp" : "0x85731fb9", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "(null)", |
| | | "token" : "0x00000", |
| | | "native_offset" : "0x0", |
| | | "filename" : "(null)", |
| | | "sizeofimage" : "0x0", |
| | | "timestamp" : "0x0", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "(null)", |
| | | "token" : "0x00000", |
| | | "native_offset" : "0x0", |
| | | "filename" : "(null)", |
| | | "sizeofimage" : "0x0", |
| | | "timestamp" : "0x0", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "5964C1F3-3A6B-4E45-985E-4259425270A7", |
| | | "token" : "0x6002f51", |
| | | "native_offset" : "0x0", |
| | | "filename" : "System.dll", |
| | | "sizeofimage" : "0x290000", |
| | | "timestamp" : "0x85731fb9", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "true", |
| | | "guid" : "B27839CC-2DBA-4804-BAAC-F2F5CCE6DE32", |
| | | "token" : "0x00000", |
| | | "native_offset" : "0x0", |
| | | "filename" : "mscorlib.dll", |
| | | "sizeofimage" : "0x472000", |
| | | "timestamp" : "0xe057582a", |
| | | "il_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a8e869", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107aad9ac", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a90759", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a4ec1d", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff81370d4e1", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff813708f6b", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | |
| | | ] |
| | | }, |
| | | { |
| | | "is_managed" : false, |
| | | "offset_free_hash" : "0x0", |
| | | "offset_rich_hash" : "0x0", |
| | | "crashed" : false, |
| | | "native_thread_id" : "0x111f89600", |
| | | "thread_info_addr" : "0x7fee5e008600", |
| | | "thread_name" : "tid_103", |
| | | "ctx" : { |
| | | "IP" : "0x7ff8136d09be", |
| | | "SP" : "0x7ff7b86ff168", |
| | | "BP" : "0x7ff7b86ff1e0" |
| | | }, |
| | | "unmanaged_frames" : [ |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x1078b2756", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a4dfd5", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a4dd07", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x10791e840", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff813722dfd", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x7ff7b86fedf0", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107a8ec37", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107814e1a", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107877d16", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x107803b58", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | , |
| | | { |
| | | "is_managed" : "false", |
| | | "native_address" : "0x111f0e52e", |
| | | "native_offset" : "0x00000" |
| | | } |
| | | |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 更新设备状态 |
| | | /// 更新群控设备状态 |
| | | /// A协议数据 |
| | | /// </summary> |
| | | public void UpdataGroupControlStatus(string revString, byte[] usefulBytes, bool isCloudData = false) |
| | |
| | | EnergyMainPage.UpdataStatus(localFunction); |
| | | } |
| | | break; |
| | | case SPK.AirSwitchP3: |
| | | AirSwitchP3Page.UpdataState(localFunction); |
| | | AirSwitchP3SubloopEnergyPage.UpdataStatus(localFunction); |
| | | break; |
| | | case SPK.ElectricEnergy: |
| | | EnergyMainPage.UpdataStatus(localFunction); |
| | | break; |
| | |
| | | /// </summary> |
| | | public void Start (int port = 0) |
| | | { |
| | | MainPage.Log("启动Socket接收和发送功能0"); |
| | | if (IsRunning) |
| | | { |
| | | if (port == Port) |
| | | MainPage.Log("启动Socket接收和发送功能x"); |
| | | if (port == Port) |
| | | { |
| | | MainPage.Log("启动Socket接收和发送功能s"); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | MainPage.Log("启动Socket接收和发送功能a"); |
| | | busSocket.Close(); |
| | | } |
| | | } |
| | | } |
| | | MainPage.Log("启动Socket接收和发送功能1"); |
| | | if (port != 0) |
| | | Port = port; |
| | | if (Port == 0) |
| | |
| | | busSocket.Bind(new IPEndPoint(IPAddress.Any, Port)); |
| | | |
| | | busSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(IPAddress.Parse("239.0.168.188"))); |
| | | relinkCount = 0; |
| | | } |
| | | catch (Exception ex){ |
| | | MainPage.Log ($"udp port bind error : {ex.Message}"); |
| | |
| | | /// </summary> |
| | | public void Stop() |
| | | { |
| | | if(busSocket == null) |
| | | { |
| | | return; |
| | | } |
| | | if (!IsRunning) |
| | | { |
| | | return; |
| | |
| | | try |
| | | { |
| | | busSocket.Close(); |
| | | relinkCount = 0; |
| | | } |
| | | catch { } |
| | | busSocket = null; |
| | |
| | | { |
| | | return; |
| | | } |
| | | if(busSocket == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | Packet packet = new Packet (); |
| | |
| | | } |
| | | catch (Exception e) { |
| | | System.Threading.Thread.Sleep (1); |
| | | asyncBeginReceive (); |
| | | Console.WriteLine("asyncBeginReceive " + relinkCount ); |
| | | if (relinkCount == 0) |
| | | { |
| | | asyncBeginReceive(); |
| | | } |
| | | relinkCount = 1; |
| | | Console.WriteLine($"asyncBeginReceive {e.Message}"); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 重连次数 |
| | | /// </summary> |
| | | private int relinkCount = 0; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 异步接收数据结束 |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string VersionString = "2.1.0"; |
| | | public static string VersionString = "2.0.0"; |
| | | ///// <summary> |
| | | ///// 客户端类型 |
| | | ///// </summary> |
| | |
| | | //_RoomNotSupportFunctionList.Add(SPK.MusicStandard); |
| | | //_RoomNotSupportFunctionList.Add(SPK.AvMusic); |
| | | _RoomNotSupportFunctionList.Add(SPK.AirSwitch); |
| | | _RoomNotSupportFunctionList.Add(SPK.AirSwitchP3); |
| | | //_RoomNotSupportFunctionList.Add(SPK.AirSwitchP3); |
| | | _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy); |
| | | //_RoomNotSupportFunctionList.Add(SPK.OtherCommon); |
| | | _RoomNotSupportFunctionList.Add(SPK.SensorLight); |
| | |
| | | |
| | | etParater.TextChangeEventHandler = (sender, e) => |
| | | { |
| | | if (System.Text.Encoding.UTF8.GetBytes(etParater.Text).Length > entryMaxLength) |
| | | if (System.Text.Encoding.Unicode.GetBytes(etParater.Text).Length > entryMaxLength) |
| | | { |
| | | etParater.Text = etParater.Text.Remove(etParater.Text.Length-1); |
| | | |
| | |
| | | btnTitlea.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new AirSwitchP3SubloopEnergyPage(device,FunctionAttributeKey.ElectricityA); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseA); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnTitlea.MouseUpEventHandler = (sender, e) => { |
| | | |
| | | btnTitleb.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new AirSwitchP3SubloopEnergyPage(device, FunctionAttributeKey.ElectricityB); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseB); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnTitlea.MouseUpEventHandler = (sender, e) => { |
| | | |
| | | btnTitlec.MouseUpEventHandler = (sender, e) => { |
| | | var skipView = new AirSwitchP3SubloopEnergyPage(device, FunctionAttributeKey.ElectricityC); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | skipView.LoadPage(StringId.RealTimeElectricityConsumptionDataOfPhaseC); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | |
| | | }; |
| | | controlView.AddChidren(btnSwitch); |
| | | |
| | | //回退刷新信息事件 |
| | | actionRefresh = () => { |
| | | btnFunctionName.Text = btnFunctionName_Out.Text = function.name; |
| | | btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName(); |
| | | //function.SaveFunctionData(true); |
| | | }; |
| | | |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Electric)).LoadTopView_FunctionTop(function, actionRefresh); |
| | | new System.Threading.Thread(() => |
| | | { |
| | |
| | | btnRunStatus.Text = "过压预警"; |
| | | btnRunStatus.TextColor = 0xFFFC9C04; |
| | | break; |
| | | ////* HV:过压预警 |
| | | //case "HV_A": |
| | | // btnRunStatus.Text = "A项过压预警"; |
| | | // btnRunStatus.TextColor = 0xFFFC9C04; |
| | | // break; |
| | | //* LV:欠压预警 |
| | | case "LV": |
| | | btnRunStatus.Text = "欠压预警"; |
| | |
| | | { |
| | | LoadSwitchEvent(); |
| | | LoadCollectionEvent(); |
| | | |
| | | //回退刷新信息事件 |
| | | actionRefresh = () => { |
| | | btnFunctionName.Text = btnFunctionName_Out.Text = function.name; |
| | | btnFromFloor_Out.Text = btnFromFoorAndRoom.Text = function.GetRoomListName(); |
| | | //function.SaveFunctionData(true); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | static AirSwitchP3SubloopEnergyPage bodyView; |
| | | |
| | | Button btnRighta; |
| | | |
| | | Button btnRightb; |
| | | |
| | | Button btnRightc; |
| | | |
| | | /// <summary> |
| | | /// 曲线图数据string |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void LoadPage() |
| | | public void LoadPage(int titleId) |
| | | { |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.EnergyMonitoring)).LoadTopView(0xFFF7F7F7); |
| | | new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView(0xFFF7F7F7); |
| | | bodyView.BackgroundColor = 0xFFF5F7FA; |
| | | |
| | | var contentView = new VerticalScrolViewLayout() |
| | |
| | | }; |
| | | contentView.AddChidren(viewa); |
| | | |
| | | Button btnRighta = new Button() |
| | | btnRighta = new Button() |
| | | { |
| | | X = Application.GetRealWidth(201), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | }; |
| | | contentView.AddChidren(viewb); |
| | | |
| | | Button btnRightb = new Button() |
| | | btnRightb = new Button() |
| | | { |
| | | X = Application.GetRealWidth(201), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | }; |
| | | contentView.AddChidren(viewc); |
| | | |
| | | Button btnRightc = new Button() |
| | | btnRightc = new Button() |
| | | { |
| | | X = Application.GetRealWidth(201), |
| | | Gravity = Gravity.CenterVertical, |
| | |
| | | |
| | | var btnTip = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(289), |
| | | Y = Application.GetRealWidth(289), |
| | | Height = Application.GetRealHeight(41), |
| | | Width = Application.GetRealWidth(300), |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | historyDataView.Height = Application.GetRealHeight(184); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | DriverLayer.Control.Ins.SendReadCommand(device); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | |
| | | |
| | |
| | | brokenLine.xTitle = Language.StringByID(StringId.Date); |
| | | } |
| | | |
| | | var opString = brokenLine.InitOption(50, curQueryType == "year_month"); |
| | | var opString = brokenLine.InitOption(100, curQueryType == "year_month"); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | myEchartsView_Line.ShowWithOption(opString); |
| | |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public static void UpdataStatus(Function updataTemp) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | try |
| | | { |
| | | if (bodyView != null) |
| | | { |
| | | double power = 0.00; |
| | | double voltage = 0.00; |
| | | double current = 0.00; |
| | | switch (bodyView.key) |
| | | { |
| | | case FunctionAttributeKey.ElectricityA: |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.PowerA), out power); |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.VoltageA),out voltage); |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.CurrentA),out current); |
| | | break; |
| | | case FunctionAttributeKey.ElectricityB: |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.PowerB), out power); |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.VoltageB), out voltage); |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.CurrentB), out current); |
| | | break; |
| | | case FunctionAttributeKey.ElectricityC: |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.PowerC), out power); |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.VoltageC), out voltage); |
| | | double.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.CurrentC), out current); |
| | | break; |
| | | } |
| | | bodyView.btnRighta.Text = voltage.ToString("F2") + "V"; |
| | | bodyView.btnRightb.Text = current.ToString("F2") + "A"; |
| | | bodyView.btnRightc.Text = power.ToString("F2") + "W"; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"更新三相子项异常:{ex.Message}"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | base.RemoveFromParent(); |
| | | bodyView = null; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | btnTriggerModeText.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new VideoDoorlockFaceUnlockTriggerSettingPage(device, faceUnlockSetup); |
| | | Action<int> updataAction = (faceUnlockSetupMode) => { |
| | | btnTriggerModeStateText.TextID = faceUnlockSetupMode == 0 ? StringId.AutomaticTriggering : StringId.ManualTriggering; |
| | | }; |
| | | var page = new VideoDoorlockFaceUnlockTriggerSettingPage(device, faceUnlockSetup,updataAction); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | /// 门锁状态 |
| | | /// </summary> |
| | | private Button btnDoorLockIcon; |
| | | Button btnDoorlockStatus; |
| | | /// <summary> |
| | | /// 实时视频 |
| | | /// </summary> |
| | |
| | | |
| | | this.CalculatedPosition();//重新计算宽度 |
| | | |
| | | Button btnDoorlockStatus; |
| | | btnDoorlockStatus = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(200), |
| | |
| | | CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false); |
| | | |
| | | }); |
| | | var lastClickTime = DateTime.MinValue; |
| | | //临时密码 |
| | | this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => |
| | | { |
| | | if (lastClickTime.AddSeconds(3) > DateTime.Now) |
| | | { |
| | | return; |
| | | } |
| | | lastClickTime = DateTime.Now; |
| | | CommonMethod.Current.SkipPSWActivity(this.device.deviceId); |
| | | }); |
| | | |
| | | //历史记录 |
| | | this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => |
| | | { |
| | | if (lastClickTime.AddSeconds(3) > DateTime.Now) |
| | | { |
| | | return; |
| | | } |
| | | lastClickTime = DateTime.Now; |
| | | |
| | | //VideoDoorlockHistoryPage historyPage = new VideoDoorlockHistoryPage(device); |
| | | //MainPage.BasePageView.AddChidren(historyPage); |
| | | //historyPage.LoadPage(); |
| | |
| | | //this.cellDiyArcSeekBar.Progress = i; |
| | | //更新电量值 |
| | | this.btnCell.Text = cellInfo.remain + "%"; |
| | | this.btnDoorLockIcon.IsSelected = videoDoorLockInfo.doorStatus == "open"; |
| | | if(videoDoorLockInfo.doorStatus == "open") |
| | | { |
| | | this.btnDoorLockIcon.IsSelected = true; |
| | | this.btnDoorlockStatus.TextID = StringId.DoorlockOpen; |
| | | this.btnDoorlockStatus.TextColor = CSS_Color.WarningColor; |
| | | } |
| | | else |
| | | { |
| | | this.btnDoorLockIcon.IsSelected = false; |
| | | this.btnDoorlockStatus.TextID = StringId.DoorlockClose; |
| | | this.btnDoorlockStatus.TextColor = 0xFF000000; |
| | | } |
| | | }); |
| | | } |
| | | catch { } |
| | |
| | | |
| | | Function device; |
| | | FaceUnlockSetupObj faceUnlockSetup; |
| | | public VideoDoorlockFaceUnlockTriggerSettingPage(Function function,FaceUnlockSetupObj setupObj) |
| | | Action<int> updataAction; |
| | | public VideoDoorlockFaceUnlockTriggerSettingPage(Function function,FaceUnlockSetupObj setupObj,Action<int> action) |
| | | { |
| | | updataAction = action; |
| | | bodyView = this; |
| | | device = function; |
| | | faceUnlockSetup = setupObj; |
| | |
| | | btnManualText.TextColor = CSS_Color.MainColor; |
| | | automaitcTipView.Visible = true; |
| | | manualTipView.Visible = false; |
| | | |
| | | updataAction?.Invoke(0); |
| | | }); |
| | | } |
| | | else |
| | |
| | | btnManualText.TextColor = CSS_Color.MainBackgroundColor; |
| | | automaitcTipView.Visible = false; |
| | | manualTipView.Visible = true; |
| | | updataAction?.Invoke(1); |
| | | |
| | | }); |
| | | } |
| | |
| | | userList.Remove(user); |
| | | initView(); |
| | | }; |
| | | page.updataUserNameAction = (name) => { |
| | | btnName.Text = name; |
| | | user.lockUserName = name; |
| | | }; |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | Function device; |
| | | VideoDoorlockUser doorlockUser; |
| | | public Action delCallBackAction; |
| | | public Action<string> updataUserNameAction; |
| | | Loading waitPage; |
| | | |
| | | |
| | | public VideoDoorlockUserManagerPage(Function function,VideoDoorlockUser user) |
| | |
| | | device = function; |
| | | doorlockUser = user; |
| | | BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | waitPage = new Loading(); |
| | | |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | base.RemoveFromParent(); |
| | | bodyView = null; |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | } |
| | | |
| | | public void LoadPage() |
| | | { |
| | | bodyView.AddChidren(waitPage); |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.UserManagement)).LoadTopView(); |
| | | |
| | | contentView = new VerticalScrolViewLayout() |
| | |
| | | { |
| | | return; |
| | | } |
| | | if (System.Text.Encoding.UTF8.GetBytes(str).Length > 20) |
| | | if (System.Text.Encoding.Unicode.GetBytes(str).Length > 20) |
| | | { |
| | | new Tip() |
| | | { |
| | |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | bodyView.AddChidren(waitPage); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | var pack = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId, str); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnUserName.Text = str; |
| | | updataUserNameAction?.Invoke(str); |
| | | }); |
| | | } |
| | | else |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | if(waitPage!= null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | fingerprintView.AddChidren(btnClearFingerprints); |
| | | btnClearFingerprints.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | bodyView.AddChidren(waitPage); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserFingerPassword(device.deviceId, doorlockUser.lockUserIndex); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | digitalPasswordView.AddChidren(btnClearDigitalPassword); |
| | | btnClearDigitalPassword.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | bodyView.AddChidren(waitPage); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserNumberPassword(device.deviceId, doorlockUser.lockUserIndex); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | }; |
| | | nfcView.AddChidren(btnClearNfc); |
| | | btnClearNfc.MouseUpEventHandler = (sender, e) => { |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | bodyView.AddChidren(waitPage); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserCardPassword(device.deviceId, doorlockUser.lockUserIndex); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | }; |
| | | faceView.AddChidren(btnClearFace); |
| | | btnClearFace.MouseUpEventHandler = (sender, e) => { |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | bodyView.AddChidren(waitPage); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUserFacePassword(device.deviceId, doorlockUser.lockUserIndex); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | { |
| | | new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteDoorlockUserTip, () => |
| | | { |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | var pack = ApiUtlis.Ins.HttpRequest.DeleteDoorlockUser(device.deviceId, doorlockUser.lockUserIndex); |
| | | if (pack != null && pack.Code == StateCode.SUCCESS) |
| | | { |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm |