黄学彪
2020-04-15 23532fa8ad34c89b6d24b01eaef6475fd0aad898
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -734,41 +734,6 @@
        #endregion
        #region ■ 子控件的Y轴坐标____________________
        /// <summary>
        /// 指定位置类型获取Rowlayout的子控件的Y轴坐标(请确保子控件不大于父容器)
        /// </summary>
        /// <param name="fatherCtrHeight">父控件的真实高度</param>
        /// <param name="ctrHeight">子控件的真实高度</param>
        /// <param name="alignment">位置对齐方式</param>
        /// <param name="Space">上下间的空白间距,省略时,取行控件共通变量的值。设置为-1时,不计算空白间距</param>
        /// <returns></returns>
        public static int GetControlChidrenYaxis(int fatherCtrHeight, int ctrHeight, UViewAlignment alignment, int Space = 0)
        {
            if (Space < 0)
            {
                //不计算间距值
                Space = 0;
            }
            if (alignment == UViewAlignment.Center)
            {
                return fatherCtrHeight / 2 - ctrHeight / 2;
            }
            else if (alignment == UViewAlignment.Top)
            {
                return (fatherCtrHeight / 2 - Space / 2) / 2 - ctrHeight / 2;
            }
            else
            {
                int top = fatherCtrHeight / 2 + Space / 2;
                return top + (fatherCtrHeight - top) / 2 - ctrHeight / 2;
            }
        }
        #endregion
        #region ■ 拼接信息___________________________
        /// <summary>
@@ -918,14 +883,14 @@
                //初始化本地的设备信息
                Common.LocalDevice.Current.ReFreshByLocal();
                //初始化房间(郭雪城那边不做处理,需要这里特殊执行一步)
                HdlRoomLogic.Current.RefreshAllRoomByLocation();
                if (hadNet == true)
                {
                    //同步云端的网关id,如果本地拥有云端不存在的id,则表示应该被换绑了,直接删除
                    HdlGatewayLogic.Current.SynchronizeDbGateway();
                }
                //初始化房间(郭雪城那边不做处理,需要这里特殊执行一步)
                HdlRoomLogic.Current.RefreshAllRoomByLocation();
                //刷新APP前一次选择的网关ID(可以反复调用,需要在网关初始化完了之后才能调用)
                HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();