黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/UserCenter/UserMain/MessageManagementForm.cs
@@ -19,7 +19,7 @@
        /// </summary>
        private VerticalFrameRefreshControl listView = null;
        /// <summary>
        /// 全部的行
        /// 全部的行,主键是自动递增的东西
        /// </summary>
        private Dictionary<string, RowLayoutControl> dicAllRow = null;
@@ -68,10 +68,10 @@
        /// <summary>
        /// 初始化中部信息
        /// </summary>
        private async void InitMiddleData(bool showReload)
        private void InitMiddleData(bool showReload)
        {
            //获取数据
            var dicData = await this.GetMessageData();
            var dicData = this.GetMessageData();
            if (dicData == null)
            {
                if (showReload == true)
@@ -157,7 +157,7 @@
                            framBack.Name = dateIndex.ToString();
                            framBack.Height = Application.GetRealHeight(100);
                            framBack.BackgroundColor = UserCenterColor.Current.White;
                            listView.AddChidrenFrame(framBack);
                            listView.AddChidren(framBack);
                            //日期
                            string strMonth = Language.StringByID(R.MyInternationalizationString.Month);
@@ -167,16 +167,23 @@
                            framBack.AddChidren(frameDate);
                            var btnDate = new NormalViewControl(500, 60, true);
                            btnDate.TextSize = 15;
                            btnDate.X = ControlCommonResourse.XXLeft;
                            btnDate.X = HdlControlResourse.XXLeft;
                            btnDate.Y = Application.GetRealHeight(35);
                            btnDate.Text = Convert.ToDateTime(listGroup[0][0].CreatedOnUtc).ToString("MM" + strMonth + "dd" + strDate);
                            btnDate.Text = HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(listGroup[0][0].CreateTime).ToString("MM" + strMonth + "dd" + strDate);
                            frameDate.AddChidren(btnDate);
                        }
                        for (int i = 0; i < listData.Count; i++)
                        {
                            //添加信息行
                            this.AddMsgRowControl(framBack, listData[i], i != listData.Count - 1);
                            //一条信息里面,它可能包含多个报警
                            for (int j = 0; j < listData[i].listMsg.Count; j++)
                            {
                                //设置已读的初始值
                                listData[i].ListReading.Add(listData[i].IsRead);
                                //添加信息行
                                bool addLine = i != listData.Count - 1 || j != listData[i].listMsg.Count - 1;
                                this.AddMsgRowControl(framBack, listData[i], j, addLine);
                            }
                        }
                        //调整高度
                        listView.AdjustChidrenFrameHeight(framBack, Application.GetRealHeight(23));
@@ -222,7 +229,7 @@
        /// </summary>
        private void ShowBottomMenu()
        {
            bool authority = UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2;
            bool authority = HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.AuthorityNo == 2;
            var menuContr = new BottomMenuSelectForm();
            menuContr.AddForm(authority == true ? 2 : 1);
@@ -252,8 +259,9 @@
        /// </summary>
        /// <param name="frameList"></param>
        /// <param name="recordInfo"></param>
        /// <param name="msgIndex">报警消息的下标</param>
        /// <param name="addLine"></param>
        private void AddMsgRowControl(FrameListControl frameList, MessageRecordInfo recordInfo, bool addLine)
        private void AddMsgRowControl(FrameListControl frameList, MessageRecordInfo recordInfo, int msgIndex, bool addLine)
        {
            var rowControl = new RowLayoutControl(frameList.rowSpace / 2);
            frameList.AddChidren(rowControl);
@@ -268,24 +276,24 @@
            var btnMsgObject = rowControl.frameTable.AddLeftCaption(recordInfo.MsgObjectText, 600);
            //消息
            var btnMsg = rowControl.frameTable.AddMostRightView(recordInfo.MsgText, 600, 60);
            var btnMsg = rowControl.frameTable.AddMostRightView(recordInfo.listMsg[msgIndex], 600, 60);
            btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnMsg.Y = Application.GetRealHeight(5) + rowControl.frameTable.chidrenYaxis;
            rowControl.frameTable.AddChidren(btnMsg, ChidrenBindMode.BindEventOnly);
            rowControl.frameTable.AddChidren(btnMsg, ChidrenBindMode.BindEvent);
            //时间
            var btnTime = rowControl.frameTable.AddMostRightView("", 200, 50);
            btnTime.TextColor = UserCenterColor.Current.TextGrayColor1;
            btnTime.Y = btnMsg.Bottom + Application.GetRealHeight(12);
            var convertTime = UserCenterLogic.ConvertUtcTimeToLocalTime(recordInfo.CreatedOnUtc);
            var convertTime = HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(recordInfo.CreateTime);
            btnTime.Text = convertTime.ToString("HH:mm");
            rowControl.frameTable.AddChidren(btnTime, ChidrenBindMode.BindEventOnly);
            rowControl.frameTable.AddChidren(btnTime, ChidrenBindMode.BindEvent);
            //底线
            if (addLine == true)
            {
                rowControl.frameTable.AddBottomLine();
                rowControl.frameTable.AddBottomLine();
            }
            //已读
            if (recordInfo.IsReading == true)
            if (recordInfo.ListReading[msgIndex] == true)
            {
                rowControl.frameTable.UseClickStatu = false;
                //消息类型
@@ -298,17 +306,17 @@
            //新消息
            PicViewControl btnNewTip = null;
            if (recordInfo.IsReading == false)
            if (recordInfo.ListReading[msgIndex] == false)
            {
                btnNewTip = new PicViewControl(78, 55);
                btnNewTip.UnSelectedImagePath = "Item/NewVersion.png";
                btnNewTip.Y = Application.GetRealHeight(9) + rowControl.frameTable.chidrenYaxis;
                btnNewTip.X = btnMsgObject.Right + Application.GetRealWidth(10);
                rowControl.frameTable.AddChidren(btnNewTip, ChidrenBindMode.BindEventOnly);
                rowControl.frameTable.AddChidren(btnNewTip, ChidrenBindMode.BindEvent);
            }
            //主要主人和管理员能够删除
            if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
            if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.AuthorityNo == 2)
            {
                //删除
                var btnDelete = rowControl.AddDeleteControl();
@@ -316,21 +324,21 @@
                {
                    //确认删除消息?
                    string msg = Language.StringByID(R.MyInternationalizationString.uDeleteMessageMsg);
                    this.ShowMassage(ShowMsgType.Confirm, msg, async () =>
                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                    {
                        await this.DeleteMsg(recordInfo.Id, frameList, rowControl);
                        this.DeleteMsg(recordInfo.Id, frameList, rowControl);
                    });
                };
            }
            //点击
            rowControl.frameTable.ButtonClickEvent += async (sender, e) =>
            rowControl.frameTable.ButtonClickEvent += (sender, e) =>
            {
                if (recordInfo.IsReading == true)
                if (recordInfo.ListReading[msgIndex] == true)
                {
                    return;
                }
                recordInfo.IsReading = true;
                recordInfo.ListReading[msgIndex] = true;
                rowControl.frameTable.UseClickStatu = false;
                //消息类型
                btnMsgObject.TextColor = UserCenterColor.Current.TextGrayColor1;
@@ -340,7 +348,7 @@
                if (sender != null)
                {
                    //标记已读(不管它成功不成功)
                    await this.SetTickIsRead(recordInfo.Id);
                    this.SetTickIsRead(recordInfo.Id);
                }
            };
        }
@@ -353,13 +361,9 @@
        /// 标记已读
        /// </summary>
        /// <param name="strId"></param>
        private async Task<bool> SetTickIsRead(string strId)
        private bool SetTickIsRead(string strId)
        {
            var pra = new MessageReadStatuPra();
            pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
            pra.Id = strId;
            var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagMessageMessageCenterItem", true, pra);
            return result;
            return HdlMessageLogic.Current.SetTickIsRead(strId);
        }
        /// <summary>
@@ -374,15 +378,13 @@
            //确认标记全部消息为已读?
            this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uUnTipAllMessageMsg), () =>
            {
                HdlThreadLogic.Current.RunThread(async () =>
                HdlThreadLogic.Current.RunThread(() =>
                {
                    //打开进度条
                    this.ShowProgressBar();
                    var pra = new MessageReadStatuPra();
                    pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                    pra.TagAllOrClearType = 0;
                    var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagAllOrClearMessageCenter", true, pra);
                    var result = HdlMessageLogic.Current.SetAllTickIsRead();
                    //关闭进度条
                    this.CloseProgressBar();
                    if (result == false)
@@ -412,12 +414,9 @@
        /// <param name="strId"></param>
        /// <param name="frameList"></param>
        /// <param name="rowContr"></param>
        private async Task<bool> DeleteMsg(string strId, FrameListControl frameList, RowLayoutControl rowContr)
        private bool DeleteMsg(string strId, FrameListControl frameList, RowLayoutControl rowContr)
        {
            var pra = new MessageReadStatuPra();
            pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
            pra.Id = strId;
            var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/DelMessageCenterItem", true, pra);
            var result = HdlMessageLogic.Current.DeleteCloundMessage(strId);
            if (result == false)
            {
                return false;
@@ -449,15 +448,12 @@
            //确认删除全部消息?
            this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uDeleteAllMessageMsg), () =>
            {
                HdlThreadLogic.Current.RunThread(async () =>
                HdlThreadLogic.Current.RunThread(() =>
                {
                    //打开进度条
                    this.ShowProgressBar();
                    var pra = new MessageReadStatuPra();
                    pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
                    pra.TagAllOrClearType = 1;
                    var result = await UserCenterLogic.GetResultStatuByRequestHttps("MessageCenter/TagAllOrClearMessageCenter", true, pra);
                    var result = HdlMessageLogic.Current.DeleteAllCloundMessage();
                    if (result == false)
                    {
                        //关闭进度条
@@ -544,101 +540,33 @@
        /// 获取消息记录
        /// </summary>
        /// <returns></returns>
        private async Task<Dictionary<string, List<List<MessageRecordInfo>>>> GetMessageData()
        private Dictionary<string, List<List<MessageRecordInfo>>> GetMessageData()
        {
            this.dicAllRow = new Dictionary<string, RowLayoutControl>();
            var allListData = new List<MessageRecordInfo>();
            var pra = new MessageInfoPra();
            pra.LoginAccessToken = UserCenterLogic.GetConnectMainToken();
            //传感器上报
            pra.Topic = "/IASInfoReport";
            var dataInfo = await this.GetMessageDataFromDb(pra);
            if (dataInfo == null)
            {
                return null;
            }
            allListData.AddRange(dataInfo);
            //门锁上报
            pra.Topic = "/Alarms/SendAlarmInform";
            dataInfo = await this.GetMessageDataFromDb(pra);
            if (dataInfo == null)
            {
                return null;
            }
            allListData.AddRange(dataInfo);
            //撤防
            pra.Topic = "/Security/WithdrawMode_Respon";
            dataInfo = await this.GetMessageDataFromDb(pra);
            if (dataInfo == null)
            {
                return null;
            }
            allListData.AddRange(dataInfo);
            //布防
            pra.Topic = "/Security/EnableMode_Respon";
            dataInfo = await this.GetMessageDataFromDb(pra);
            if (dataInfo == null)
            {
                return null;
            }
            allListData.AddRange(dataInfo);
            //逻辑触发上报
            pra.Topic = "/Logic/Execute_Respon";
            dataInfo = await this.GetMessageDataFromDb(pra);
            if (dataInfo == null)
            {
                return null;
            }
            allListData.AddRange(dataInfo);
            //场景触发上报
            pra.Topic = "/Scene/Exec_Respon";
            dataInfo = await this.GetMessageDataFromDb(pra);
            if (dataInfo == null)
            {
                return null;
            }
            allListData.AddRange(dataInfo);
            //合并数据
            return this.MergeMessageRecordData(allListData);
        }
        /// <summary>
        /// 从云端获取数据
        /// </summary>
        /// <param name="pra"></param>
        /// <returns></returns>
        private async Task<List<MessageRecordInfo>> GetMessageDataFromDb(MessageInfoPra pra)
        {
            var result = await UserCenterLogic.GetResponseDataByRequestHttps("MessageCenter/GetMessageCenterPagger", true, pra);
            if (result == null)
            {
                return null;
            }
            var dataInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageCentetInfo>(result);
            var listData = new List<MessageRecordInfo>();
            for (int i = 0; i < dataInfo.PageData.Count; i++)
            var listMsg = HdlMessageLogic.Current.GetListMessageFromDb();
            if (listMsg == null)
            {
                return new Dictionary<string, List<List<MessageRecordInfo>>>();
            }
            for (int i = 0; i < listMsg.Count; i++)
            {
                try
                {
                    var data = dataInfo.PageData[i];
                    var data = listMsg[i];
                    //处理消息类型
                    this.AdjustMsgContent(ref data);
                    listData.Add(data);
                    if (this.AdjustMsgContent(ref data) == true)
                    {
                        listData.Add(data);
                    }
                }
                catch { continue; }
            }
            return listData;
            //合并数据
            return this.MergeMessageRecordData(listData);
        }
        /// <summary>
@@ -655,12 +583,12 @@
            var listSortKeys = new List<string>();
            foreach (var data in dataInfo)
            {
                if (dicTemp.ContainsKey(data.CreatedOnUtc) == false)
                if (dicTemp.ContainsKey(data.CreateTime) == false)
                {
                    dicTemp[data.CreatedOnUtc] = new List<MessageRecordInfo>();
                    listSortKeys.Add(data.CreatedOnUtc);
                    dicTemp[data.CreateTime] = new List<MessageRecordInfo>();
                    listSortKeys.Add(data.CreateTime);
                }
                dicTemp[data.CreatedOnUtc].Add(data);
                dicTemp[data.CreateTime].Add(data);
            }
            listSortKeys.Sort();
@@ -670,30 +598,30 @@
                var listData = dicTemp[listSortKeys[i]];
                foreach (var data2 in listData)
                {
                    if (data2.Topic == "/DoorLock/DoorLockOperatingEventNotificationCommand")
                    try
                    {
                        //暂时不处理这个主题
                        continue;
                        if (data2.MessageTitle == "/DoorLock/DoorLockOperatingEventNotificationCommand")
                        {
                            //暂时不处理这个主题
                            continue;
                        }
                        string strDay = HdlCommonLogic.Current.ConvertUtcTimeToLocalTime2(data2.CreateTime).ToString("yyyy/MM/dd");
                        //按每天分组
                        if (dicData.ContainsKey(strDay) == false)
                        {
                            listGroup = new List<MessageRecordInfo>();
                            dicData[strDay] = new List<List<MessageRecordInfo>>();
                            dicData[strDay].Add(listGroup);
                        }
                        if (listGroup.Count > 20)
                        {
                            //每20个一组
                            listGroup = new List<MessageRecordInfo>();
                            dicData[strDay].Add(listGroup);
                        }
                        listGroup.Add(data2);
                    }
                    string[] myArry = data2.CreatedOnUtc.Split(new string[] { "T" }, StringSplitOptions.RemoveEmptyEntries);
                    if (myArry.Length != 2)
                    {
                        continue;
                    }
                    string dicKeys = myArry[0];//日期
                    if (dicData.ContainsKey(dicKeys) == false)
                    {
                        listGroup = new List<MessageRecordInfo>();
                        dicData[dicKeys] = new List<List<MessageRecordInfo>>();
                        dicData[dicKeys].Add(listGroup);
                    }
                    if (listGroup.Count > 20)
                    {
                        //每20个一组
                        listGroup = new List<MessageRecordInfo>();
                        dicData[dicKeys].Add(listGroup);
                    }
                    listGroup.Add(data2);
                    catch { }
                }
            }
            return dicData;
@@ -707,39 +635,50 @@
        /// 处理消息类型
        /// </summary>
        /// <param name="recordInfo">消息数据</param>
        private void AdjustMsgContent(ref MessageRecordInfo recordInfo)
        private bool AdjustMsgContent(ref MessageRecordInfo recordInfo)
        {
            var jobject = JObject.Parse(recordInfo.PayloadJson);
            //传感器上报
            if (recordInfo.Topic == "/IASInfoReport")
            if (recordInfo.MessageTitle == "/IASInfoReport")
            {
                var jobject = JObject.Parse(recordInfo.MessageExpand);
                this.SensorDeviceReportPush(jobject, ref recordInfo);
            }
            //门锁上报
            else if (recordInfo.Topic == "/Alarms/SendAlarmInform")
            else if (recordInfo.MessageTitle == "/Alarms/SendAlarmInform")
            {
                var jobject = JObject.Parse(recordInfo.MessageExpand);
                this.DoorLockDeviceReportPush(jobject, ref recordInfo);
            }
            //撤防
            else if (recordInfo.Topic == "/Security/WithdrawMode_Respon")
            else if (recordInfo.MessageTitle == "/Security/WithdrawMode_Respon")
            {
                var jobject = JObject.Parse(recordInfo.MessageExpand);
                this.RemoveSafetyGarrisonPush(jobject, ref recordInfo);
            }
            //布防
            else if (recordInfo.Topic == "/Security/EnableMode_Respon")
            else if (recordInfo.MessageTitle == "/Security/EnableMode_Respon")
            {
                var jobject = JObject.Parse(recordInfo.MessageExpand);
                this.SetSafetyGarrisonPush(jobject, ref recordInfo);
            }
            //逻辑触发上报
            else if (recordInfo.Topic == "/Logic/Execute_Respon")
            else if (recordInfo.MessageTitle == "/Logic/Execute_Respon")
            {
                var jobject = JObject.Parse(recordInfo.MessageExpand);
                this.LogicExecutePush(jobject, ref recordInfo);
            }
            //场景触发上报
            else if (recordInfo.Topic == "/Scene/Exec_Respon")
            else if (recordInfo.MessageTitle == "/Scene/Exec_Respon")
            {
                var jobject = JObject.Parse(recordInfo.MessageExpand);
                this.SceneExecPush(jobject, ref recordInfo);
            }
            else
            {
                //不处理的主题
                return false;
            }
            return true;
        }
        #endregion
@@ -755,21 +694,22 @@
            var ias = new IASZone() { DeviceAddr = receiveData.Value<string>("DeviceAddr"), DeviceEpoint = receiveData.Value<int>("Epoint") };
            ias.iASInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone.IASInfoData>(receiveData["Data"].ToString());
            //图标
            var localDevice = Common.LocalDevice.Current.GetDevice(ias.DeviceAddr, ias.DeviceEpoint);
            var localDevice = HdlDeviceCommonLogic.Current.GetDevice(ias.DeviceAddr, ias.DeviceEpoint);
            if (localDevice == null)
            {
                recordInfo.IconPath = "Device/Sensor.png";
                //消息类型:传感器
                recordInfo.MsgObjectText = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId1200);
                var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("A402");
                recordInfo.MsgObjectText = infoContent != null ? infoContent.A官方名字 : string.Empty;
            }
            else
            {
                string selectPath = string.Empty;
                string unselecPath = string.Empty;
                Common.LocalDevice.Current.GetDeviceIcon(localDevice, ref unselecPath, ref selectPath);
                HdlDeviceCommonLogic.Current.GetDeviceIcon(localDevice, ref unselecPath, ref selectPath);
                recordInfo.IconPath = unselecPath;
                //消息类型
                recordInfo.MsgObjectText = Common.LocalDevice.Current.GetDeviceEpointName(localDevice);
                recordInfo.MsgObjectText = HdlDeviceCommonLogic.Current.GetDeviceEpointName(localDevice);
            }
            //消息
@@ -777,19 +717,27 @@
            if (info == null)
            {
                //非在册的消息记录
                recordInfo.MsgText = Language.StringByID(R.MyInternationalizationString.uSensorAlarmHadTriggered);
                recordInfo.listMsg.Add(Language.StringByID(R.MyInternationalizationString.uSensorAlarmHadTriggered));
                return true;
            }
            else if (info.BatteryMsg != null)
            if (string.IsNullOrEmpty(info.AlarmMsg) == false)
            {
                recordInfo.MsgText = info.BatteryMsg;
                recordInfo.listMsg.Add(info.AlarmMsg);
            }
            else if (info.DemolishmenMsg != null)
            if (info.BatteryMsg != null)
            {
                recordInfo.MsgText = info.DemolishmenMsg;
                recordInfo.listMsg.Add(info.BatteryMsg);
            }
            else
            if (info.DemolishmenMsg != null)
            {
                recordInfo.MsgText = string.IsNullOrEmpty(info.AlarmMsg) == false ? info.AlarmMsg : Language.StringByID(R.MyInternationalizationString.uSensorAlarmHadTriggered);
                recordInfo.listMsg.Add(info.DemolishmenMsg);
            }
            //触发传感器报警
            if (recordInfo.listMsg.Count == 0)
            {
                recordInfo.listMsg.Add(Language.StringByID(R.MyInternationalizationString.uSensorAlarmHadTriggered));
            }
            return true;
        }
@@ -805,25 +753,27 @@
        private void DoorLockDeviceReportPush(JObject receiveData, ref MessageRecordInfo recordInfo)
        {
            //图标
            var device = Common.LocalDevice.Current.GetDevice(receiveData.Value<string>("DeviceAddr"), receiveData.Value<int>("Epoint"));
            var device = HdlDeviceCommonLogic.Current.GetDevice(receiveData.Value<string>("DeviceAddr"), receiveData.Value<int>("Epoint"));
            if (device == null)
            {
                recordInfo.IconPath = "Device/IntelligentLocks.png";
                //消息类型:智能门锁
                recordInfo.MsgObjectText = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2800);
                var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("A405");
                recordInfo.MsgObjectText = infoContent != null ? infoContent.A官方名字 : string.Empty;
            }
            else
            {
                string selectPath = string.Empty;
                string unselecPath = string.Empty;
                Common.LocalDevice.Current.GetDeviceIcon(device, ref unselecPath, ref selectPath);
                HdlDeviceCommonLogic.Current.GetDeviceIcon(device, ref unselecPath, ref selectPath);
                recordInfo.IconPath = unselecPath;
                //消息类型
                recordInfo.MsgObjectText = Common.LocalDevice.Current.GetDeviceEpointName(device);
                recordInfo.MsgObjectText = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
            }
            //消息
            var msgInfo = HdlAlarmsLogic.Current.GetDoorLockAlarmInfo(receiveData);
            recordInfo.MsgText = msgInfo != null ? msgInfo.AlarmMsg : Language.StringByID(R.MyInternationalizationString.uDoorLocksAlarmHadTriggered);
            string MsgText = msgInfo != null ? msgInfo.AlarmMsg : Language.StringByID(R.MyInternationalizationString.uDoorLocksAlarmHadTriggered);
            recordInfo.listMsg.Add(MsgText);
        }
        #endregion
@@ -848,12 +798,12 @@
                    //离家布防
                    recordInfo.MsgObjectText = Language.StringByID(R.MyInternationalizationString.uRemoveHomeGarrison);
                    //已执行
                    recordInfo.MsgText = Language.StringByID(R.MyInternationalizationString.uExecuted);
                    recordInfo.listMsg.Add(Language.StringByID(R.MyInternationalizationString.uExecuted));
                }
                else
                {
                    //已执行
                    recordInfo.MsgText = Language.StringByID(R.MyInternationalizationString.uExecuted);
                    recordInfo.listMsg.Add(Language.StringByID(R.MyInternationalizationString.uExecuted));
                    //没有内部防区
                    if (HdlSafeguardLogic.Current.IsHadInternalDefenseArea() == false)
                    {
@@ -891,7 +841,7 @@
            if (data.Result == 0)
            {
                //已执行
                recordInfo.MsgText = Language.StringByID(R.MyInternationalizationString.uExecuted);
                recordInfo.listMsg.Add(Language.StringByID(R.MyInternationalizationString.uExecuted));
                //撤防
                recordInfo.MsgObjectText = Language.StringByID(R.MyInternationalizationString.uWithdrawGarrison);
            }
@@ -917,7 +867,7 @@
            //类型:逻辑名字
            recordInfo.MsgObjectText = receiveData["Data"]["LogicName"].ToString();
            //已执行
            recordInfo.MsgText = Language.StringByID(R.MyInternationalizationString.uExecuted);
            recordInfo.listMsg.Add(Language.StringByID(R.MyInternationalizationString.uExecuted));
        }
        #endregion
@@ -935,7 +885,7 @@
            //类型:场景名字
            recordInfo.MsgObjectText = receiveData["Data"]["ScenesName"].ToString();
            //已执行
            recordInfo.MsgText = Language.StringByID(R.MyInternationalizationString.uExecuted);
            recordInfo.listMsg.Add(Language.StringByID(R.MyInternationalizationString.uExecuted));
        }
        #endregion
@@ -947,7 +897,8 @@
        /// </summary>
        public override void CloseFormBefore()
        {
            if (UserCenterResourse.DicActionForm.ContainsKey("UserMainForm") == false)
            var userPageForm = UserView.UserPage.Instance.GetNowActionForm();
            if (userPageForm != null && userPageForm.FormID == "UserMainForm")
            {
                Common.CommonPage.Instance.IsDrawerLockMode = false;
            }