陈嘉乐
2021-03-19 ba9e028d73bab5b7a0f000d11b39460d2b57707a
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -20,7 +20,13 @@
        public void LoadPage()
        {
            new TopViewDiv(bodyView, Language.StringByID(StringId.AddDevice)).LoadTopView();
            Action<string,string> action = (s,a) => {
                var page = new AddDevciePage(brand);
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            new TopViewDiv(bodyView, Language.StringByID(StringId.Devices)).LoadTopView_AddIcon("3ty",action);
            bodyView.BackgroundColor = CSS_Color.BackgroundColor;
            contentView = new VerticalRefreshLayout()
@@ -69,8 +75,6 @@
        void LoadRow(List<Function> deviceList)
        {
            deviceList.Add(new Function() { name ="测试红外宝",spk = SPK.IrModule});
            contentView.RemoveAll();
            bool isFrist = true;
            foreach (var device in deviceList)
@@ -133,16 +137,7 @@
                    switch (device.spk)
                    {
                        case SPK.IrModule:
                            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;
                                });
                            });
                            new UI2.PersonalCenter.PirDevice.Method().MainView(this, device,()=> { });
                            break;
                    }
                };