| | |
| | | using HDL_ON.UI.CSS; |
| | | #if __Android__ |
| | | using Java.Interop; |
| | | using Android.Content; |
| | | using Hdl.Onpro; |
| | | #endif |
| | | using Shared; |
| | | namespace HDL_ON.UI |
| | |
| | | { |
| | | Action<string, string> action = (s, a) => |
| | | { |
| | | //var page = new AddDevciePage(brand); |
| | | //MainPage.BasePageView.AddChidren(page); |
| | | //page.LoadPage(contentView); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | var backTemp = new AddLcCam(); |
| | | backTemp.backAction = () => { |
| | | Load3tyBrandDeviceList(); |
| | | }; |
| | | Com.Utils.HdlToLcUtils.Instance.AddCamera(backTemp); |
| | | var page = new AddDevciePage(brand); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(contentView); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.Devices)).LoadTopView_AddIcon("3ty", action); |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | |
| | | contentView.BeginHeaderRefreshing(); |
| | | }; |
| | | break; |
| | | case SPK.SensorEnvironment: |
| | | case SPK.SensorEnvironment:case SPK.SensorEnvironmentHailin: |
| | | case SPK.SensorEnvironment2: |
| | | case SPK.SensorEnvironment3: |
| | | var smPage1 = new SensorEnvironmentManagerPage(); |
| | |
| | | |
| | | |
| | | #if __Android__ |
| | | |
| | | //[Android.Content.BroadcastReceiver(Enabled = true, Exported = false)] |
| | | //public class ImouReceiver : Android.Content.BroadcastReceiver |
| | | //{ |
| | | // public override void OnReceive(Context context, Intent intent) |
| | | // { |
| | | // if (intent != null) |
| | | // { |
| | | // string action = intent.Action; |
| | | // if (action == "hdlUserDeviceBind") |
| | | // { |
| | | // string value = intent.GetStringExtra("data"); |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | public class AddLcCam : Java.Lang.Object, Com.CallBack.IAddCamera |
| | | { |
| | | |
| | |
| | | { |
| | | } |
| | | } |
| | | |
| | | public class BindDeviceFeedback : Java.Lang.Object, Hdl.Onpro.IRegisterDeviceFeedback |
| | | { |
| | | public Action<string,string> tipAction; |
| | | |
| | | public void Feedback(string method, string msg) |
| | | { |
| | | tipAction?.Invoke(method, msg); |
| | | } |
| | | } |
| | | |
| | | #else |
| | | public class AddLcCam |
| | | { |
| | |
| | | } |
| | | } |
| | | #endif |
| | | |
| | | |
| | | |
| | | |
| | | } |