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 +++++++++++++---------- .vs/HDL_APP_Project/xs/UserPrefs.xml | 10 +++++----- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs | 5 ++++- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index fcb33b9..c4e29cb 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,13 +1,13 @@ 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs"> <Files> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="85" Column="47" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs" Line="85" Column="46" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Pir.cs" Line="37" Column="16" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" Line="18" Column="23" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs" Line="142" Column="53" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection4Page.cs" Line="210" Column="54" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs" Line="55" Column="18" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs" Line="1" Column="1" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs" Line="7" Column="2" /> + <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/AddControlComplete.cs" Line="212" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -20,7 +20,7 @@ <Node name="AddDevice" expanded="True" /> <Node name="AddFunction" expanded="True" /> <Node name="PirDevice" expanded="True"> - <Node name="AddControlComplete.cs" selected="True" /> + <Node name="PirMain.cs" selected="True" /> </Node> </Node> </Node> diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs index 2b4880b..a992d58 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/DeviceSet.cs @@ -53,7 +53,10 @@ form.AddForm(); form.AddDeviceEvent += (device) => { - var pir = device as Pir; + Pir pir = new Pir(); + pir.name = device.name; + pir.deviceId = device.deviceId; + pir.sid = device.sid; Pir.pirDeviceList.Add(pir); UIView(vv); }; 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