From 307e554fb2ef6491d08afc58a6c0a852f44b4f46 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 01 十二月 2020 17:04:50 +0800
Subject: [PATCH] 2020-12-01-1
---
HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs | 38 +++++++++++++++++++++++++++-----------
1 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
index bf7e4d7..f09d0b0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs
@@ -14,10 +14,15 @@
/// <summary>
/// 榛樿閫変腑鏄埧闂存椂锛氬叏閮ㄥ尯鍩�
/// </summary>
- private Entity.Room selectedRoom = new Entity.Room { name = Language.StringByID(StringId.allAreas) };
-
- public void Show()
+ private Entity.Room selectedRoom = new Entity.Room { sid = Language.StringByID(StringId.allAreas) };
+ /// <summary>
+ /// 琛ㄧず鏄�(鏉′欢/鐩爣)
+ /// </summary>
+ private string if_type;
+ public void Show(string str)
{
+
+ if_type = str;
this.BackgroundColor = CSS.CSS_Color.viewMiddle;
LogicView.TopView topView = new LogicView.TopView();
this.AddChidren(topView.FLayoutView());
@@ -76,7 +81,7 @@
Width = Application.GetRealWidth(144),
Height = Application.GetRealHeight(44 * 5),
};
- var roomList = LogicMethod.GetGatewayRoomListG(Language.StringByID(StringId.allAreas));
+ var roomList = LogicMethod.GetGatewayRoomList(Language.StringByID(StringId.allAreas));
if (roomList.Count > 5)
{
bghFrameLyout.Height = Application.GetRealHeight(21 + 44 * 5);
@@ -111,9 +116,12 @@
{
fLayout.RemoveFromParent();
funAllAreaView.btnText1.Text = (areaView.btnClick.Tag as Entity.Room).name;
+ ///鍒囨崲鎴块棿榛樿鍔熻兘绫诲瀷鍏ㄩ儴;
+ funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun);
selectedRoom = (areaView.btnClick.Tag as Entity.Room);
+ ///鑾峰彇鏄剧ず璁惧鍒楄〃
+ var list = LogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,if_type);
- var list = LogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room,LogicMethod.condition_if);
DeviceListView(vv, list);
};
@@ -159,7 +167,9 @@
Height = Application.GetRealHeight(44 * 5),
};
- var functionList = LogicMethod.GetFunctionDeviceList(selectedRoom, LogicMethod.condition_if);
+ //鑾峰彇鏈�缁堟樉绀哄垪琛�
+ var functionList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
+ //鑾峰彇璁惧鍒楄〃鐨勭被鍨嬶紙渚嬪锛氱伅鍏夌被锛岀獥甯樼被銆傘�傘�傦級
var deviceTypeList = LogicMethod.GetDeviceTypeList(functionList);
@@ -195,8 +205,10 @@
areaView.btnClick.MouseUpEventHandler += (sender, e2) =>
{
fLayout.RemoveFromParent();
- funAllAreaView.btnText1.Text = areaView.btnClick.Tag.ToString();
+ funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString();
+ ///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡傦細鐏厜绫汇�傘�傦級璁惧FunctionType鍒楄〃
var typeFunctionList = LogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString());
+ ///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡傦細鐏厜绫汇�傘�傦級鏄剧ず璁惧鍒楄〃
var lists = LogicMethod.GetShowDeviceList(typeFunctionList, functionList);
DeviceListView(vv, lists);
};
@@ -205,8 +217,8 @@
};
funAllAreaView.btnText2.MouseUpEventHandler += funClick;
funAllAreaView.btnIcon2.MouseUpEventHandler += funClick;
-
- var deviceList = LogicMethod.GetFunctionDeviceList(selectedRoom, LogicMethod.condition_if);
+ ///鑾峰彇鏄剧ず璁惧鍒楄〃
+ var deviceList = LogicMethod.GetFunctionDeviceList(selectedRoom, if_type);
DeviceListView(vv, deviceList);
}
@@ -230,8 +242,12 @@
funView.btnIcon.UnSelectedImagePath = LogicMethod.GetIconPath(dev.functionType);
funView.btnDeviceName.Text = dev.name;
funView.btnRoomName.Text = dev.GetRoomListName();
-
-
+ funView.btnClick.MouseUpEventHandler += (sen,e) => {
+ DeviceFunList deviceFunList = new DeviceFunList();
+ MainPage.BasePageView.AddChidren(deviceFunList);
+ deviceFunList.Show(dev,0,false,if_type);
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
}
}
}
--
Gitblit v1.8.0