old mode 100644
new mode 100755
| | |
| | | private VerticalListControl listView = null; |
| | | |
| | | private FrameLayout contentLayout = null; |
| | | /// <summary>
|
| | | /// 当前楼层的索引
|
| | | /// <summary> |
| | | /// 当前楼层的索引 |
| | | /// </summary> |
| | | public int CurrentIndex = 0;
|
| | | public int CurrentIndex = 0; |
| | | private BottomClickButton bottomClickButton = null; |
| | | /// <summary>
|
| | | /// 当前楼层的名称
|
| | | /// <summary> |
| | | /// 当前楼层的名称 |
| | | /// </summary> |
| | | private static NormalViewControl pullLayoutText = null; |
| | | |
| | |
| | | if (device == null) |
| | | continue; |
| | | |
| | | //判断该设备是否可以显示在主页 |
| | | if (LocalDevice.Current.CanShowInHomeHomeMainPage(device) == false) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | SmartSound.Device smartDevice = new SmartSound.Device(); |
| | | smartDevice.DeviceAddress = device.DeviceAddr;//设备 MAC |
| | | smartDevice.Epoint = device.DeviceEpoint;//设备端口 |
| | |
| | | if (smartDevice.DeviceType == 0) |
| | | continue; |
| | | |
| | | if(ZbGateway.GateWayBaseInfomations.ContainsKey(device.CurrentGateWayId) ==true)
|
| | | {
|
| | | smartDevice.GatewayID = ZbGateway.GateWayBaseInfomations[device.CurrentGateWayId].MacMark;//网关 Id
|
| | | if(ZbGateway.GateWayBaseInfomations.ContainsKey(device.CurrentGateWayId) ==true) |
| | | { |
| | | smartDevice.GatewayID = ZbGateway.GateWayBaseInfomations[device.CurrentGateWayId].MacMark;//网关 Id |
| | | } |
| | | else
|
| | | {
|
| | | smartDevice.GatewayID = device.CurrentGateWayId;//网关 Id
|
| | | else |
| | | { |
| | | smartDevice.GatewayID = device.CurrentGateWayId;//网关 Id |
| | | } |
| | | |
| | | if (smartDevice.DeviceName == "" || smartDevice.DeviceName == string.Empty) |
| | |
| | | return TempDatas; |
| | | } |
| | | |
| | | #region ■ 自定义楼层选择控件_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 房间列表行
|
| | | /// </summary>
|
| | | private class MyPullControl : FrameRowControl
|
| | | #region ■ 自定义楼层选择控件_____________________ |
| | | |
| | | /// <summary> |
| | | /// 房间列表行 |
| | | /// </summary> |
| | | private class MyPullControl : FrameRowControl |
| | | { |
| | | |
| | | private SmartSoundControlContentForm smartSoundDataAdd = null; |
| | | private List<SmartSound.Layer> Layers = null; |
| | | /// <summary>
|
| | | /// 房间列表
|
| | | /// </summary>
|
| | | private NormalViewControl btnName = null;
|
| | |
|
| | | /// <summary>
|
| | | /// 房间列表行
|
| | | /// </summary>
|
| | | public MyPullControl(SmartSoundControlContentForm _SmartSoundDataAdd,List<SmartSound.Layer> _layers)
|
| | | {
|
| | | this.smartSoundDataAdd = _SmartSoundDataAdd;
|
| | | this.Layers = _layers;
|
| | | /// <summary> |
| | | /// 房间列表 |
| | | /// </summary> |
| | | private NormalViewControl btnName = null; |
| | | |
| | | /// <summary> |
| | | /// 房间列表行 |
| | | /// </summary> |
| | | public MyPullControl(SmartSoundControlContentForm _SmartSoundDataAdd,List<SmartSound.Layer> _layers) |
| | | { |
| | | this.smartSoundDataAdd = _SmartSoundDataAdd; |
| | | this.Layers = _layers; |
| | | this.UseClickStatu = false; |
| | | this.BackgroundColor = UserCenterColor.Current.White;
|
| | | this.Height = Application.GetRealHeight(173);
|
| | | this.BackgroundColor = UserCenterColor.Current.White; |
| | | this.Height = Application.GetRealHeight(173); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 初始化控件
|
| | | /// </summary>
|
| | | public void InitControl()
|
| | | /// <summary> |
| | | /// 初始化控件 |
| | | /// </summary> |
| | | public void InitControl() |
| | | { |
| | | //显示文本 |
| | | btnName = this.AddLeftCaption(string.Empty, 700);
|
| | | btnName.Height = Application.GetRealHeight(60);
|
| | | btnName.TextSize = 17;
|
| | | btnName.Y = Application.GetRealHeight(57);
|
| | | btnName = this.AddLeftCaption(string.Empty, 700); |
| | | btnName.Height = Application.GetRealHeight(60); |
| | | btnName.TextSize = 17; |
| | | btnName.Y = Application.GetRealHeight(57); |
| | | btnName.Text = "房间列表"; |
| | | |
| | | var right_icon=this.AddRightArrow();
|
| | | right_icon.SelectedImagePath = "SmartSound/PullDown.png";
|
| | | right_icon.UnSelectedImagePath = "SmartSound/PullDown.png";
|
| | | right_icon.ButtonClickEvent += (sender, e) =>
|
| | | var right_icon=this.AddRightArrow(); |
| | | right_icon.SelectedImagePath = "SmartSound/PullDown.png"; |
| | | right_icon.UnSelectedImagePath = "SmartSound/PullDown.png"; |
| | | right_icon.ButtonClickEvent += (sender, e) => |
| | | { |
| | | ShowPullList(); |
| | | };
|
| | |
|
| | | pullLayoutText = this.AddMostRightView(Layers[smartSoundDataAdd.CurrentIndex].LayerName, 300, false);
|
| | | }; |
| | | |
| | | pullLayoutText = this.AddMostRightView(Layers[smartSoundDataAdd.CurrentIndex].LayerName, 300, false); |
| | | pullLayoutText.Name = "pullLayout"; |
| | | pullLayoutText.ButtonClickEvent += (sender, e) =>
|
| | | pullLayoutText.ButtonClickEvent += (sender, e) => |
| | | { |
| | | ShowPullList(); |
| | | };
|
| | | }; |
| | | pullLayoutText.Text = Layers[smartSoundDataAdd.CurrentIndex].LayerName; |
| | |
|
| | | |
| | | if (Layers.Count == 1) |
| | | {
|
| | | right_icon.Visible = false;
|
| | | pullLayoutText.Visible = false;
|
| | | } |
| | | }
|
| | |
|
| | | { |
| | | right_icon.Visible = false; |
| | | pullLayoutText.Visible = false; |
| | | } |
| | | } |
| | | |
| | | private void ShowPullList() |
| | | { |
| | | //房间列表行{房间列表 textView,楼层下拉窗} |
| | |
| | | smartSoundDataAdd.LoadAllRoomListView(); |
| | | }); |
| | | } |
| | | }
|
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ■ 自定义房间选择控件_____________________
|
| | | #region ■ 自定义房间选择控件_____________________ |
| | | |
| | | /// <summary>
|
| | | /// 房间列表行
|
| | | /// </summary>
|
| | | private class RoomRowLayout : FrameRowControl
|
| | | /// <summary> |
| | | /// 房间列表行 |
| | | /// </summary> |
| | | private class RoomRowLayout : FrameRowControl |
| | | { |
| | | private SmartSoundControlContentForm smartSoundControlContentForm = null; |
| | | |
| | | private SmartSound.Room mRoom = null; |
| | | /// <summary>
|
| | | /// 房间名称
|
| | | /// </summary>
|
| | | private NormalViewControl btnName = null;
|
| | |
|
| | | private MostRightIconControl Right_icon = null; |
| | |
|
| | | /// <summary>
|
| | | /// 房间列表行
|
| | | /// </summary>
|
| | | public RoomRowLayout(SmartSoundControlContentForm _smartSoundControlContentForm,SmartSound.Room _room)
|
| | | {
|
| | | this.smartSoundControlContentForm = _smartSoundControlContentForm;
|
| | | this.mRoom = _room;
|
| | | /// <summary> |
| | | /// 房间名称 |
| | | /// </summary> |
| | | private NormalViewControl btnName = null; |
| | | |
| | | private MostRightIconControl Right_icon = null; |
| | | |
| | | /// <summary> |
| | | /// 房间列表行 |
| | | /// </summary> |
| | | public RoomRowLayout(SmartSoundControlContentForm _smartSoundControlContentForm,SmartSound.Room _room) |
| | | { |
| | | this.smartSoundControlContentForm = _smartSoundControlContentForm; |
| | | this.mRoom = _room; |
| | | this.UseClickStatu = false; |
| | | this.BackgroundColor = UserCenterColor.Current.White;
|
| | | this.Height = Application.GetRealHeight(170);
|
| | | this.BackgroundColor = UserCenterColor.Current.White; |
| | | this.Height = Application.GetRealHeight(170); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// 初始化控件
|
| | | /// </summary>
|
| | | public void InitControl()
|
| | | /// <summary> |
| | | /// 初始化控件 |
| | | /// </summary> |
| | | public void InitControl() |
| | | { |
| | | //显示文本 |
| | | btnName = this.AddLeftCaption(string.Empty, 2000);
|
| | | btnName.Height = Application.GetRealHeight(60);
|
| | | btnName.TextSize = 14;
|
| | | btnName.Y = Application.GetRealHeight(57);
|
| | | btnName = this.AddLeftCaption(string.Empty, 2000); |
| | | btnName.Height = Application.GetRealHeight(60); |
| | | btnName.TextSize = 14; |
| | | btnName.Y = Application.GetRealHeight(57); |
| | | btnName.Text = mRoom.RoomName; |
| | | |
| | | Right_icon = this.AddMostRightEmptyIcon(58, 58);
|
| | | Right_icon = this.AddMostRightEmptyIcon(58, 58); |
| | | Right_icon.Gravity = Gravity.CenterVertical; |
| | | |
| | | btnName.ButtonClickEvent += (sender, e) =>
|
| | | btnName.ButtonClickEvent += (sender, e) => |
| | | { |
| | | mRoom.Checked = true; |
| | | RefreshRightIconState(mRoom.Checked); |
| | |
| | | RefreshRightIconState(mRoom.Checked); |
| | | AddBottomLine(); |
| | | |
| | | }
|
| | |
|
| | | } |
| | | |
| | | private void RefreshRightIconState(bool bol = false) |
| | | {
|
| | | { |
| | | try |
| | | { |
| | | if (bol) |
| | |
| | | { |
| | | string error = e.Message; |
| | | } |
| | | }
|
| | |
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | } |
| | | } |