黄学彪
2019-10-28 1f5636d69332170ea3a41c76c9519f6ff6f0a8d9
合并了代码
1个文件已添加
4个文件已删除
6个文件已修改
1696 ■■■■ 已修改文件
ZigbeeApp/Shared/Common/DeviceUI.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/Room.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Category/Category.cs 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardConfigureDeviceListForm.cs 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardDeviceEpointInfoForm.cs 236 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardDeviceMacInfoEditorForm.cs 319 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardDeviceManagementMainForm.cs 743 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserView/UserPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Shared.projitems 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/DeviceUI.cs
@@ -313,7 +313,7 @@
        #endregion
        #region ◆ 通过id获取场景区域_____________
        #region ◆ 通过id获取设备区域_____________
        /// <summary>
        /// GetZone
ZigbeeApp/Shared/Common/Room.cs
@@ -216,8 +216,9 @@
            get
            {
                List<DeviceUI> deviceList = new List<DeviceUI>();
                foreach (var room in Lists)
                {
                for (int i = 0; i < Lists.Count; i++)
                {
                    var room = Lists[i];
                    if (room.IsSharedRoom)
                    {
                        continue;
@@ -226,8 +227,9 @@
                    {
                        continue;
                    }
                    foreach (var device in room.DeviceUIList)
                    for (int j = 0; j < room.DeviceUIList.Count; j++)
                    {
                        var device = room.DeviceUIList[j];
                        if (device == null || device.CommonDevice == null)
                        {
                            continue;
ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -585,7 +585,7 @@
            var midFL = new FrameLayout
            {
                Y = topView.Bottom,
                Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight) - topView.Bottom,
                Height = Application.GetRealHeight(1549),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
            };
            AddChidren(midFL);
@@ -596,18 +596,17 @@
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
            };
            midFL.AddChidren(functionSceneAutoBG);
            //功能
            functionBtn = new ButtonLineForm(CommonFormResouce.X_Left, 34, 150, 68);
            functionSceneAutoBG.AddChidren(functionBtn);
            functionBtn.Init();
            functionBtn.SetTitle(R.MyInternationalizationString.Function);
            //场景
            sceneBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 + 20, 34, 150, 68);
            sceneBtn = new ButtonLineForm(CommonFormResouce.X_Left, 34, 150, 68);
            functionSceneAutoBG.AddChidren(sceneBtn);
            sceneBtn.Init();
            sceneBtn.SetTitle(R.MyInternationalizationString.Scence);
            //功能
            functionBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 + 20, 34, 150, 68);
            functionSceneAutoBG.AddChidren(functionBtn);
            functionBtn.Init();
            functionBtn.SetTitle(R.MyInternationalizationString.Function);
            //自动化
            automationBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 * 2 + 20, 34, 150, 68);
            automationBtn.Init();
@@ -895,11 +894,10 @@
                deviceListScrolView = new VerticalScrolViewLayout
                {
                    X = Application.GetRealWidth(CommonFormResouce.X_Left),
                    Y = functionTypeScrowView.Bottom + Application.GetRealHeight(50),
                    Y = Application.GetRealHeight(35+275),
                    Width = Application.GetRealWidth(1028),
                    Height = functionSceneBodyView.Height - Application.GetRealHeight(279 + 50) - 1,
                    Height = Application.GetRealHeight(938) - 1,
                    BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
                };
                functionSceneBodyView.AddChidren(deviceListScrolView);
                tempFunctionTypeBtn = new FunctionButton();
@@ -987,18 +985,18 @@
                            var deviceTypeRowLayout = new RowLayout()
                            {
                                Height = Application.GetRealHeight(127 + 35),
                                Height = Application.GetRealHeight(129 + 35),
                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                Tag = deviceUI
                            };
                            deviceListScrolView.AddChidren(deviceTypeRowLayout);
                            var deviceRow = new FunctionRow(0, 35);
                            var deviceRow = new CategoryFunctionRow(0, 35);
                            deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                            deviceRow.SetStatu(light.IsOnline == 1);
                            deviceRow.SetZoneText(deviceUI.GetZone());
                            deviceTypeRowLayout.AddChidren(deviceRow);
                            deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
                            {
@@ -1007,6 +1005,7 @@
                                zbGateway.ReportAction += UpdateDeviceControllStatu;
                                AddZbGateway(zbGatewayList, zbGateway, commonDeviceList, deviceUI.CommonDevice);
                                (send2 as Button).IsSelected = !(send2 as Button).IsSelected;
                                deviceRow.IsSelected = (send2 as Button).IsSelected;
                                if ((send2 as Button).IsSelected)
                                {
                                    light.SwitchControl(1);
@@ -1030,6 +1029,15 @@
                                });
                            };
                            deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                            {
                                var lightControl = new Phone.Device.Light.LightControl();
                                UserView.HomePage.Instance.AddChidren(lightControl);
                                UserView.HomePage.Instance.PageIndex += 1;
                                lightControl.action = RefreshBodyView;
                                lightControl.Show(deviceUI, room);
                            };
                            var editBtn = new CommonForm.RowLayoutEditButton()
                            {
                                Tag = deviceUI,
@@ -1080,10 +1088,11 @@
                            };
                            deviceListScrolView.AddChidren(deviceTypeRowLayout);
                            var deviceRow = new FunctionRow(0, 35);
                            var deviceRow = new CategoryFunctionRow(0, 35);
                            deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                            deviceRow.SetStatu(airSwitch.IsOnline == 1);
                            deviceRow.SetZoneText(deviceUI.GetZone());
                            deviceTypeRowLayout.AddChidren(deviceRow);
                            deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
@@ -1115,6 +1124,15 @@
                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
                                    }
                                });
                            };
                            deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                            {
                                var lightControl = new Phone.Device.Light.LightControl();
                                UserView.HomePage.Instance.AddChidren(lightControl);
                                UserView.HomePage.Instance.PageIndex += 1;
                                lightControl.action = RefreshBodyView;
                                lightControl.Show(deviceUI, room);
                            };
                            var editBtn = new CommonForm.RowLayoutEditButton()
@@ -1163,16 +1181,17 @@
                            var deviceTypeRowLayout = new RowLayout()
                            {
                                Height = Application.GetRealHeight(127 + 35),
                                Height = Application.GetRealHeight(129 + 35),
                                LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                                Tag = deviceUI
                            };
                            deviceListScrolView.AddChidren(deviceTypeRowLayout);
                            var deviceRow = new FunctionRow(0, 35);
                            var deviceRow = new CategoryFunctionRow(0, 35);
                            deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
                            deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
                            deviceRow.SetStatu(dimmableLight.IsOnline == 1);
                            deviceRow.SetZoneText(deviceUI.GetZone());
                            deviceTypeRowLayout.AddChidren(deviceRow);
                            deviceRow.SwitchBtn.MouseUpEventHandler += (send2, e2) =>
@@ -1204,6 +1223,16 @@
                                        DeviceUI.ShowStatuTip(R.MyInternationalizationString.FAIL);
                                    }
                                });
                            };
                            deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) =>
                            {
                                var dimmableLightControl = new Phone.Device.Light.DimmableLightControl();
                                UserView.HomePage.Instance.AddChidren(dimmableLightControl);
                                UserView.HomePage.Instance.PageIndex += 1;
                                UserView.HomePage.Instance.ScrollEnabled = false;
                                dimmableLightControl.action = RefreshBodyView;
                                dimmableLightControl.Show(deviceUI, room);
                            };
                            var editBtn = new CommonForm.RowLayoutEditButton()
@@ -1452,7 +1481,7 @@
            var roomFL = new HorizontalScrolViewLayout()
            {
                X = Application.GetRealWidth(CommonFormResouce.X_Left),
                Height = Application.GetRealHeight(167),
                Height = Application.GetRealHeight(170),
                Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonFormResouce.X_Left),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
            };
@@ -1462,7 +1491,7 @@
            functionSceneBodyView = new FrameLayout()
            {
                Y = roomFL.Bottom,
                Height = Application.GetRealHeight(1316),
                Height = Application.GetRealHeight(973+279),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
            };
            functionSceneAutoBodyView.AddChidren(functionSceneBodyView);
@@ -1556,7 +1585,7 @@
            {
                var sceneScrolView = new VerticalScrolViewLayout
                {
                    Y = Application.GetRealHeight(58)
                    //Y = Application.GetRealHeight(58)
                };
                functionSceneBodyView.AddChidren(sceneScrolView);
                foreach (var scene in sceneList)
ZigbeeApp/Shared/Phone/Device/CommonForm/CategoryFunctionRow.cs
New file
@@ -0,0 +1,202 @@
using System;
using Shared.Common;
namespace Shared.Phone.Device.CommonForm
{
    public class CategoryFunctionRow : FrameLayout
    {
        /// <summary>
        /// name
        /// </summary>
        public Button NameBtn;
        /// <summary>
        /// Image
        /// </summary>
        public Button ImageBtn;
        /// <summary>
        /// ImageBG
        /// </summary>
        public Button ImageBG;
        /// <summary>
        /// SwitchBtn
        /// </summary>
        public Button SwitchBtn;
        /// <summary>
        /// ZoneBtn
        /// </summary>
        private Button ZoneBtn;
        /// <summary>
        /// ClickBtn
        /// </summary>
        public Button ClickBtn;
        /// <summary>
        /// v_Selected
        /// </summary>
        private bool v_Selected;
        /// <summary>
        /// IsSelected
        /// </summary>
        public bool IsSelected
        {
            set
            {
                v_Selected = value;
                try
                {
                    SetStatu(v_Selected);
                }
                catch
                {
                }
            }
            get
            {
                return v_Selected;
            }
        }
        /// <summary>
        /// FunctionRow
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        public CategoryFunctionRow(int x = 0, int y = 0)
        {
            X = Application.GetRealWidth(x);
            Y = Application.GetRealHeight(y);
            Width = Application.GetRealWidth(1022);
            Height = Application.GetRealHeight(127);
            BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
        }
        /// <summary>
        /// Init
        /// </summary>
        /// <param name="imagePath"></param>
        /// <param name="selectedImagePath"></param>
        public void Init(string imagePath, string selectedImagePath)
        {
            ImageBG = new Button()
            {
                X = Application.GetRealWidth(45),
                Width = Application.GetMinRealAverage(112),
                Height = Application.GetMinRealAverage(112),
                Gravity = Gravity.CenterVertical,
                Radius = (uint)Application.GetMinRealAverage(112 / 2),
                BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
                SelectedBackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor,
                Tag = Tag
            };
            AddChidren(ImageBG);
            ImageBtn = new Button()
            {
                X = Application.GetRealWidth(63),
                Width = Application.GetMinRealAverage(78),
                Height = Application.GetMinRealAverage(78),
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath = imagePath,
                SelectedImagePath = selectedImagePath,
                Tag = Tag
            };
            AddChidren(ImageBtn);
            NameBtn = new Button()
            {
                X = Application.GetRealWidth(181),
                Y = Application.GetRealHeight(14),
                Width = Application.GetRealWidth(400),
                Height = Application.GetRealHeight(58),
                TextColor = ZigbeeColor.Current.GXCTextBlackColor,
                SelectedTextColor = ZigbeeColor.Current.GXCTextSelectedColor,
                TextAlignment = TextAlignment.CenterLeft,
                Tag = Tag
            };
            AddChidren(NameBtn);
            ZoneBtn = new Button
            {
                X = Application.GetRealWidth(181),
                Y = Application.GetRealHeight(72),
                Width = Application.GetRealWidth(400),
                Height = Application.GetRealHeight(49),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2
            };
            AddChidren(ZoneBtn);
            SwitchBtn = new Button()
            {
                X = Application.GetRealWidth(896),
                Width = Application.GetMinRealAverage(78),
                Height = Application.GetMinRealAverage(78),
                Gravity = Gravity.CenterVertical,
                UnSelectedImagePath = "Item/Switch.png",
                SelectedImagePath = "Item/SwitchSelected.png",
                Tag = Tag
            };
            AddChidren(SwitchBtn);
            var line = new Button()
            {
                X = Application.GetRealWidth(200),
                Y = Height - 2,
                Width = Application.GetRealWidth(821),
                Height = 2,
                BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor,
                Tag = Tag
            };
            AddChidren(line);
            ClickBtn = new Button
            {
                Width=Application.GetRealWidth(890)
            };
            AddChidren(ClickBtn);
        }
        /// <summary>
        /// SetTitle
        /// </summary>
        /// <param name="title"></param>
        public void SetTitle(string title)
        {
            NameBtn.Text = title;
        }
        /// <summary>
        /// SetTitle
        /// </summary>
        /// <param name="title"></param>
        public void SetTitle(int title)
        {
            SetTitle(Language.StringByID(title));
        }
        /// <summary>
        /// SetZoneText
        /// </summary>
        /// <param name="title"></param>
        public void SetZoneText(string title)
        {
            ZoneBtn.Text = title;
        }
        /// <summary>
        /// SetStatu
        /// </summary>
        /// <param name="statu"></param>
        public void SetStatu(bool statu)
        {
            NameBtn.IsSelected = ImageBG.IsSelected = ImageBtn.IsSelected = SwitchBtn.IsSelected = statu;
        }
        /// <summary>
        /// HideSwitchBtn
        /// </summary>
        /// <param name="statu"></param>
        public void HideSwitchBtn(bool statu)
        {
            SwitchBtn.Visible = statu;
        }
    }
}
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardConfigureDeviceListForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardDeviceEpointInfoForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardDeviceMacInfoEditorForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserCenter/DeviceShard/ShardDeviceManagementMainForm.cs
File was deleted
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -72,7 +72,7 @@
        private readonly int sleepSpan = 300;
        private FrameLayout itemView;
        private FrameLayout itemView=new FrameLayout();
        #endregion
ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -67,6 +67,7 @@
        /// <param name="typeTag">Type tag.</param>
        public void DeviceInfoChange(CommonDevice common, string typeTag)
        {
            ///
            //设备上报状态中 当CluterID=3,就证明该设备在线,直接标记
            if (typeTag == "DeviceStatusReport")
            {
ZigbeeApp/Shared/Shared.projitems
@@ -44,6 +44,7 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\ACLeftIconButtonRowLayout.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\BackButton.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\ButtonLineForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CategoryFunctionRow.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonEnum.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CommonFormResouce.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\CompleteButton.cs" />