Merge branch 'WJC' into temp-wxr
| | |
| | | application.StartActivity(intent); |
| | | Android.OS.Process.KillProcess(Android.OS.Process.MyPid()); |
| | | } |
| | | |
| | | |
| | | public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { } |
| | | public override void OnCreate() |
| | | { |
| | |
| | | initAll(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 所有初始化全部在这个方法实现 |
| | |
| | | { |
| | | checkSomeInfo(); |
| | | |
| | | |
| | | }; |
| | | BaseActivity.OnDestroyAction += (activity) => |
| | | { |
| | |
| | | /// <param name="activity"></param> |
| | | void GetJPushRegistrationID(BaseActivity activity) |
| | | { |
| | | |
| | | |
| | | try |
| | | { |
| | | |
| | | //保存获取的极光服务器上的注册ID到本地文件 |
| | | var tokenID = JPushInterface.GetRegistrationID(activity); |
| | | Console.WriteLine("RegistrationID: " + tokenID); |
| | |
| | | //进入后台mqtt正在连接重置状态 |
| | | HDL_ON.DAL.Mqtt.MqttClient.RemoteMqttIsConnecting = false; |
| | | HDL_ON.DriverLayer.UdpSocket._BusSocket.Stop(); |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | 6071=修改名字 |
| | | 6072=确认删除 |
| | | 6073=取消 |
| | | 6074=遥控器不能超过10个? |
| | | 6074=遥控器不能超过10个 |
| | | 6075=遥控器所属区域: |
| | | 6076=编辑信息 |
| | | 6077=版本升级 |
| | | 6078=系统维护中~请稍后再试~ |
| | | 6079=获取数据失败 |
| | | |
| | | |
| | | |
| | | |
| | | 6015=在线 |
| | |
| | | public override void OnRegister(Context context, string p1) |
| | | { |
| | | base.OnRegister(context, p1); |
| | | |
| | | Utlis.WriteLine("JPushOnRegister: " + p1); |
| | | } |
| | | |
| | |
| | | //{ |
| | | // try |
| | | // { |
| | | |
| | | |
| | | // if (JPushMessageInfo.Extras.Contains("Offline") == true) |
| | | // { |
| | | // Shared.Application.RunOnMainThread(() => |
| | |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 打开消息显示界面 |
| | | /// 打开消息显示界面.010000 |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <param name="notificationMessage"></param> |
| | |
| | | 6071=修改名字 |
| | | 6072=确认删除 |
| | | 6073=取消 |
| | | 6074=遥控器不能超过10个? |
| | | 6074=遥控器不能超过10个 |
| | | 6075=遥控器所属区域: |
| | | 6076=编辑信息 |
| | | 6077=版本升级 |
| | | 6078=系统维护中~请稍后再试~ |
| | | 6079=获取数据失败 |
| | | |
| | | 6015=在线 |
| | | 6016=离线 |
| | |
| | | public const int yaokongqiquyu = 6075; |
| | | public const int bianjixinxi = 6076; |
| | | public const int banbenshengji = 6077; |
| | | public const int xitongweihuzhong = 6078; |
| | | public const int huoqushujushibao = 6079; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | public void Show(Control control) |
| | | { |
| | | |
| | | #region 界面布局 |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | PirDevice.View.TopView topView = new View.TopView(); |
| | |
| | | } |
| | | //new引导界面 |
| | | View.ReplicationView replication = new View.ReplicationView(); |
| | | // MainPage.BasePageView.AddChidren(replication); |
| | | replication.Show(this); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | |
| | | //添加数据对象 |
| | | Entity.AttributesStatus buttonObj = new Entity.AttributesStatus(); |
| | |
| | | }; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | public class Method |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 红外宝程序主入口 |
| | | /// </summary> |
| | |
| | | /// <param name="function"></param> |
| | | public void MainView(FrameLayout frame, Entity.Function function,Action action) |
| | | { |
| | | |
| | | Pir pirDevice = new Pir(); |
| | | if (function != null) |
| | | {//数据转换 |
| | |
| | | pirDevice.deviceId = function.deviceId; |
| | | pirDevice.sid = function.sid; |
| | | pirDevice.online = function.online; |
| | | pirDevice.versions = function.versions; |
| | | } |
| | | Pir.currPir = pirDevice; |
| | | GetControlList(frame, () => |
| | |
| | | } |
| | | else if (text == "读取红外宝列表失败") |
| | | { |
| | | str = "读取红外宝列表失败"; //Language.StringByID(StringId.delFail); |
| | | str = Language.StringByID(StringId.huoqushujushibao); |
| | | } |
| | | else |
| | | { |
| | |
| | | break; |
| | | case "10807": |
| | | { |
| | | str = "红外宝下遥控器超过最大(10个)数量限制";// Language.StringByID(StringId.gatewayNotOnline); |
| | | str = Language.StringByID(StringId.bunengchaoguo10); |
| | | |
| | | |
| | | } |
| | | break; |
| | | case "2": |
| | | { |
| | | str = "系统维护中~请稍后再试~"; |
| | | str = Language.StringByID(StringId.xitongweihuzhong); |
| | | } |
| | | break; |
| | | default: |
| | | { |
| | | str ="获取数据失败" ;// Language.StringByID(StringId.saveFail); |
| | | str = Language.StringByID(StringId.huoqushujushibao); |
| | | } |
| | | break; |
| | | |
| | |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | BackAction(); |
| | | BackAction = null; |
| | | this.RemoveFromParent(); |
| | | |
| | | RemoveFromParent(); |
| | | }; |
| | | |
| | | FrameLayout middFLayout = new FrameLayout(); |
| | |
| | | } |
| | | }, id, "品牌列表"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 移除界面 |
| | | /// </summary> |
| | | public override void RemoveFromParent() |
| | | { |
| | | BackAction(); |
| | | BackAction = null; |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | /// 红外码学习 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static void CodeStudy(string deviceId,AttributesStatus buttonObj,Action<ResponsePackNew> action) |
| | | public static void CodeStudy(string deviceId, AttributesStatus buttonObj,Action<ResponsePackNew> action) |
| | | { |
| | | var job = new JObject { }; |
| | | job.Add("key", buttonObj.key); |
| | |
| | | { |
| | | Tag = "PirMain"; |
| | | } |
| | | |
| | | Action backAction; |
| | | public void Show(Action action) |
| | | { |
| | | backAction = action; |
| | | #region 界面布局 |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | Intelligence.Automation.LogicView.TopView topView = new Intelligence.Automation.LogicView.TopView(); |
| | | this.AddChidren(topView.FLayoutView()); |
| | | topView.clickBackBtn.MouseUpEventHandler += (e, sen) => |
| | | { |
| | | action(); |
| | | //action(); |
| | | RemoveFromParent(); |
| | | }; |
| | | topView.topNameBtn.TextID = StringId.setlogic; |
| | |
| | | banbenshengjiFL.btnText.Text = Language.StringByID(StringId.banbenshengji); |
| | | banbenshengjiFL.frameLayout.Y = editNameFLayout.frameLayout.Bottom; |
| | | viewLayout.AddChidren(banbenshengjiFL.FLayoutView()); |
| | | |
| | | var versions = Pir.currPir.versions.Find((c)=>c.module== "fw_version"); |
| | | if (versions == null) |
| | | { |
| | | versions = new Entity.VersionInfo(); |
| | | } |
| | | ///版本号:v1.3.5 |
| | | FrameLayout50 banbenhaoFLayout = new FrameLayout50(); |
| | | banbenhaoFLayout.btnNextIcon.Visible = false; |
| | | banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":v1.3.5"; |
| | | banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":"+ versions.version; |
| | | banbenhaoFLayout.frameLayout.Y = banbenshengjiFL.frameLayout.Bottom; |
| | | viewLayout.AddChidren(banbenhaoFLayout.FLayoutView()); |
| | | //删除 |
| | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 移除界面 |
| | | /// </summary> |
| | | public override void RemoveFromParent() |
| | | { |
| | | backAction(); |
| | | base.RemoveFromParent(); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <param name="buttonList">数据列表</param> |
| | | /// <param name="action">回调</param> |
| | | /// <param name="line">表示多少行</param> |
| | | /// <param name="line">表示一行加载多少个按钮</param> |
| | | /// <param name="sum">表示一行加载多少个按钮</param> |
| | | public void AddButton(FrameLayout buttonFLayout, List<string> buttonList, Action<string> action, int line = 7, int sum = 3) |
| | | { |
| | | VerticalScrolViewLayout vv = new VerticalScrolViewLayout(); |
| | |
| | | IsBold = true, |
| | | }; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public Button versionBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(40), |
| | | X = Application.GetRealWidth(72), |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(17), |
| | | Text = "版本号v1.3.5", |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = TextSize.text12, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | }; |
| | | |
| | | /// <summary> |
| | | /// 当前个数 |
| | | /// </summary> |
| | | public Button geBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(59), |
| | | Y = Application.GetRealHeight(40), |
| | | X = Application.GetRealWidth(72), |
| | | Width = Application.GetRealWidth(120), |
| | | Height = Application.GetRealHeight(17), |
| | |
| | | /// </summary> |
| | | public Button sumBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(59), |
| | | Y = Application.GetRealHeight(40), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealHeight(17), |
| | | Text = "/10", |
| | |
| | | devfLayout.Height = Application.GetRealHeight(92 + (50 * i)); |
| | | devfLayout.AddChidren(priequipmentBtn); |
| | | devfLayout.AddChidren(deviceNameBtn); |
| | | devfLayout.AddChidren(versionBtn); |
| | | devfLayout.AddChidren(geBtn); |
| | | geBtn.Width = geBtn.GetTextWidth(); |
| | | devfLayout.AddChidren(sumBtn); |