| | |
| | | /// <summary>
|
| | | /// 全部的数据(keys1:房间ID Keys2:R文件的数值)
|
| | | /// </summary>
|
| | | private Dictionary<string, Dictionary<int, uRowInformation>> dicAllData = new Dictionary<string, Dictionary<int, uRowInformation>>();
|
| | | private Dictionary<string, Dictionary<string, uRowInformation>> dicAllData = new Dictionary<string, Dictionary<string, uRowInformation>>();
|
| | | /// <summary>
|
| | | /// 当前选择的楼层ID
|
| | | /// </summary>
|
| | |
| | | /// 初始化行控件
|
| | | /// </summary>
|
| | | /// <param name="dicRowData"></param>
|
| | | private void InitRowControl(Dictionary<int, uRowInformation> dicRowData)
|
| | | private void InitRowControl(Dictionary<string, uRowInformation> dicRowData)
|
| | | {
|
| | | this.listView.RemoveAll();
|
| | | HdlThreadLogic.Current.RunMainInThread(() =>
|
| | | {
|
| | | int count = 0;
|
| | | foreach (var textId in dicRowData.Keys)
|
| | | foreach (var strText in dicRowData.Keys)
|
| | | {
|
| | | count++;
|
| | | var rowData = dicRowData[textId];
|
| | | var rowData = dicRowData[strText];
|
| | |
|
| | | var rowlayout = new FrameRowControl(listView.rowSpace / 2);
|
| | | listView.AddChidren(rowlayout);
|
| | |
| | | btnIcon.UnSelectedImagePath = rowData.IconPath;
|
| | |
|
| | | //设备名
|
| | | var txtDevice = rowlayout.AddLeftCaption(Language.StringByID(textId), 750);
|
| | | var txtDevice = rowlayout.AddLeftCaption(strText, 750);
|
| | | txtDevice.TextSize = 15;
|
| | | //向右图标
|
| | | rowlayout.AddRightArrow();
|
| | |
| | | /// 获取设备的所有类型,并整理成每一行的数据(keys1:房间ID Keys2:R文件的数值)
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | private Dictionary<string, Dictionary<int, uRowInformation>> GetAllListData()
|
| | | private Dictionary<string, Dictionary<string, uRowInformation>> GetAllListData()
|
| | | {
|
| | | var dicData = new Dictionary<string, Dictionary<int, uRowInformation>>();
|
| | | var dicData = new Dictionary<string, Dictionary<string, uRowInformation>>();
|
| | | //获取本地安防的场景
|
| | | Dictionary<int, string> dicScene = HdlSafeguardLogic.Current.GetLocalSceneByZoneID(this.zoonID);
|
| | | var listRoom = HdlRoomLogic.Current.GetFloorSortRoom(this.nowSelectFloorId);
|
| | |
| | | /// <param name="i_room"></param>
|
| | | /// <param name="dicScene"></param>
|
| | | /// <returns></returns>
|
| | | private Dictionary<int, uRowInformation> GetRoomDeviceAndSceneData(Common.Room i_room, Dictionary<int, string> dicScene)
|
| | | private Dictionary<string, uRowInformation> GetRoomDeviceAndSceneData(Common.Room i_room, Dictionary<int, string> dicScene)
|
| | | {
|
| | | if (dicScene == null)
|
| | | {
|
| | | //获取本地安防的场景
|
| | | dicScene = HdlSafeguardLogic.Current.GetLocalSceneByZoneID(this.zoonID);
|
| | | }
|
| | | var dicRoomData = new Dictionary<int, uRowInformation>();
|
| | | var dicRoomData = new Dictionary<string, uRowInformation>();
|
| | |
|
| | | for (int j = 0; j < i_room.ListDevice.Count; j++)
|
| | | {
|
| | |
| | | var typeInfo = Common.LocalDevice.Current.GetDeviceBelongEnumInfo(device);
|
| | | //获取图片
|
| | | Common.LocalDevice.Current.GetDeviceFunctionTypeMenuIcon(typeInfo.ConcreteType, ref unSelectPath, ref selectPath);
|
| | | if (dicRoomData.ContainsKey(typeInfo.BeloneTextId) == false)
|
| | | if (dicRoomData.ContainsKey(typeInfo.BeloneText) == false)
|
| | | {
|
| | | dicRoomData[typeInfo.BeloneTextId] = new uRowInformation();
|
| | | dicRoomData[typeInfo.BeloneTextId].IconPath = unSelectPath;
|
| | | dicRoomData[typeInfo.BeloneText] = new uRowInformation();
|
| | | dicRoomData[typeInfo.BeloneText].IconPath = unSelectPath;
|
| | | }
|
| | | dicRoomData[typeInfo.BeloneTextId].listDevice.Add(device);
|
| | | dicRoomData[typeInfo.BeloneText].listDevice.Add(device);
|
| | | }
|
| | | }
|
| | | string strSceneText = Language.StringByID(R.MyInternationalizationString.uScence);
|
| | | for (int j = 0; j < i_room.ListSceneId.Count; j++)
|
| | | {
|
| | | //如果那个场景已经添加了,则不再显示
|
| | |
| | | {
|
| | | continue;
|
| | | }
|
| | | if (dicRoomData.ContainsKey(R.MyInternationalizationString.uScence) == false)
|
| | | if (dicRoomData.ContainsKey(strSceneText) == false)
|
| | | {
|
| | | dicRoomData[R.MyInternationalizationString.uScence] = new uRowInformation();
|
| | | dicRoomData[R.MyInternationalizationString.uScence].IconPath = "Scene/SceneIcon.png";
|
| | | dicRoomData[R.MyInternationalizationString.uScence].listScene = new List<Common.SceneUI>();
|
| | | dicRoomData[strSceneText] = new uRowInformation();
|
| | | dicRoomData[strSceneText].IconPath = "Scene/SceneIcon.png";
|
| | | dicRoomData[strSceneText].listScene = new List<Common.SceneUI>();
|
| | | }
|
| | | dicRoomData[R.MyInternationalizationString.uScence].listScene.Add(sceneUi);
|
| | | dicRoomData[strSceneText].listScene.Add(sceneUi);
|
| | | }
|
| | | return dicRoomData;
|
| | | }
|