From c6b9f25f8e994125b6b211372fdc3b862a436666 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 17 三月 2021 10:39:13 +0800 Subject: [PATCH] 2021-3-17-3 --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs index 626c205..446157c 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs @@ -80,15 +80,18 @@ if (Pir.pirDeviceList.Count != 0) { - if (function != null) - { - var pir = function as Pir; - Pir.currPir = pir; - } - else - { - Pir.currPir = Pir.pirDeviceList[0]; - } + //if (function != null) + //{ + // Pir pir = new Pir(); + // pir.name = function.name; + // pir.deviceId = function.deviceId; + // pir.sid = function.sid; + // Pir.currPir = pir; + //} + //else + //{ + // Pir.currPir = Pir.pirDeviceList[0]; + //} //榛樿绗竴涓孩澶栧疂 int sum = 0; for (int i = 0; i < Pir.pirDeviceList.Count; i++) @@ -96,7 +99,7 @@ //鏌ユ壘 sum += Pir.pirDeviceList[i].FunctioList.Count; } - deviceNameBtn.Text = Pir.currPir.name; + deviceNameBtn.Text = Pir.pirDeviceList[0].name; mainView.numberDeviceBtn.Text = Pir.pirDeviceList.Count.ToString() + Language.StringByID(StringId.ge); mainView.currDeviceNumberControlBtn.Text = sum.ToString() + Language.StringByID(StringId.ge); } -- Gitblit v1.8.0