|  |  | 
 |  |  |  | 
 |  |  | namespace HDL_ON.UI | 
 |  |  | { | 
 |  |  |   public class AddOutputPage : FrameLayout | 
 |  |  |   { | 
 |  |  |     FrameLayout bodyView; | 
 |  |  |     public class AddOutputPage : FrameLayout | 
 |  |  |     { | 
 |  |  |         FrameLayout bodyView; | 
 |  |  |  | 
 |  |  |     FrameLayout showdFunctionTypeRow; | 
 |  |  |         FrameLayout showdFunctionTypeRow; | 
 |  |  |  | 
 |  |  |     /// <summary> | 
 |  |  |     /// 楼层选择下拉图标 | 
 |  |  |     /// </summary> | 
 |  |  |     Button btnFloorDownIcon; | 
 |  |  |     /// <summary> | 
 |  |  |     /// 楼层显示 | 
 |  |  |     /// </summary> | 
 |  |  |     Button btnFloor; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 楼层选择下拉图标 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnFloorDownIcon; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 楼层显示 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnFloor; | 
 |  |  |  | 
 |  |  |     /// <summary> | 
 |  |  |     /// 筛选文本显示 | 
 |  |  |     /// </summary> | 
 |  |  |     Button btnScreenText; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 筛选文本显示 | 
 |  |  |         /// </summary> | 
 |  |  |         Button btnScreenText; | 
 |  |  |  | 
 |  |  |     VerticalScrolViewLayout functionListView; | 
 |  |  |         VerticalScrolViewLayout functionListView; | 
 |  |  |  | 
 |  |  | <<<<<<< HEAD | 
 |  |  |         Action<SecurityAlarm> refreshAction; | 
 |  |  |         /// <summary> | 
 |  |  |         /// 本地功能转换的输出列表(灯光、场景) | 
 |  |  | 
 |  |  |  | 
 |  |  |         SecurityAlarm alarm; | 
 |  |  |  | 
 |  |  |         public AddOutputPage(SecurityAlarm inOutput ,Action<SecurityAlarm> action) | 
 |  |  |         public AddOutputPage(SecurityAlarm inOutput, Action<SecurityAlarm> action) | 
 |  |  |         { | 
 |  |  |             bodyView = this; | 
 |  |  |             refreshAction = action; | 
 |  |  |             alarm = inOutput; | 
 |  |  |         } | 
 |  |  | ======= | 
 |  |  |     SecurityAlarm securityAlarm; | 
 |  |  |     Action<SecurityAlarm> refreshAction; | 
 |  |  |     List<SecurityOutput> outputList = new List<SecurityOutput>(); | 
 |  |  |  | 
 |  |  |     List<Function> allocatedList = new List<Function>(); | 
 |  |  |  | 
 |  |  |     public AddOutputPage(SecurityAlarm function, Action<SecurityAlarm> action) | 
 |  |  |     { | 
 |  |  |       bodyView = this; | 
 |  |  |       securityAlarm = function; | 
 |  |  |       refreshAction = action; | 
 |  |  |     } | 
 |  |  | >>>>>>> WJC | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /// <summary> | 
 |  |  |     /// 加载界面 | 
 |  |  |     /// </summary> | 
 |  |  |     public void LoadPage() | 
 |  |  |     { | 
 |  |  |       bodyView.BackgroundColor = CSS_Color.BackgroundColor; | 
 |  |  |       new TopViewDiv(bodyView, Language.StringByID(StringId.AddFunction)).LoadTopView(); | 
 |  |  |  | 
 |  |  |       #region 显示的功能类型切换区域 | 
 |  |  |       showdFunctionTypeRow = new FrameLayout() | 
 |  |  |       { | 
 |  |  |         Y = Application.GetRealHeight(64), | 
 |  |  |         Height = Application.GetRealHeight(62), | 
 |  |  |         BackgroundColor = CSS_Color.MainBackgroundColor, | 
 |  |  |       }; | 
 |  |  |       bodyView.AddChidren(showdFunctionTypeRow); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |       btnFloorDownIcon = new Button() | 
 |  |  |       { | 
 |  |  |         Width = Application.GetMinRealAverage(16), | 
 |  |  |         Height = Application.GetMinRealAverage(16), | 
 |  |  |         X = Application.GetRealWidth(16), | 
 |  |  |         Y = Application.GetRealHeight(18), | 
 |  |  |         UnSelectedImagePath = "Public/DownIcon.png", | 
 |  |  |       }; | 
 |  |  |       showdFunctionTypeRow.AddChidren(btnFloorDownIcon); | 
 |  |  |  | 
 |  |  |       btnFloor = new Button() | 
 |  |  |       { | 
 |  |  |         X = btnFloorDownIcon.Right, | 
 |  |  |         Y = Application.GetRealHeight(18), | 
 |  |  |         Width = Application.GetRealWidth(200), | 
 |  |  |         Height = Application.GetMinRealAverage(16), | 
 |  |  |         TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |         TextSize = CSS_FontSize.PromptFontSize_FirstLevel, | 
 |  |  |         TextAlignment = TextAlignment.CenterLeft, | 
 |  |  |         Text = DB_ResidenceData.Instance.CurFloor.roomName, | 
 |  |  |       }; | 
 |  |  |       showdFunctionTypeRow.AddChidren(btnFloor); | 
 |  |  |  | 
 |  |  |       #endregion | 
 |  |  |  | 
 |  |  |       functionListView = new VerticalScrolViewLayout() | 
 |  |  |       { | 
 |  |  |         Y = showdFunctionTypeRow.Bottom, | 
 |  |  |         Height = Application.GetRealHeight(530 - 100), | 
 |  |  |         BackgroundColor = CSS_Color.BackgroundColor, | 
 |  |  |       }; | 
 |  |  |       bodyView.AddChidren(functionListView); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |       foreach (var function in FunctionList.List.Functions) | 
 |  |  |       { | 
 |  |  |         if (!MainPage.SceneSupportFunctionList.Contains(function.spk)) | 
 |  |  |         /// <summary> | 
 |  |  |         /// 加载界面 | 
 |  |  |         /// </summary> | 
 |  |  |         public void LoadPage() | 
 |  |  |         { | 
 |  |  | <<<<<<< HEAD | 
 |  |  |             bodyView.BackgroundColor = CSS_Color.BackgroundColor; | 
 |  |  |             new TopViewDiv(bodyView, Language.StringByID(StringId.AddFunction)).LoadTopView(); | 
 |  |  |  | 
 |  |  | 
 |  |  |             functionListView = new VerticalScrolViewLayout() | 
 |  |  |             { | 
 |  |  |                 Y = showdFunctionTypeRow.Bottom, | 
 |  |  |                 Height = Application.GetRealHeight(530 -100), | 
 |  |  |                 Height = Application.GetRealHeight(530 - 100), | 
 |  |  |                 BackgroundColor = CSS_Color.BackgroundColor, | 
 |  |  |             }; | 
 |  |  |             bodyView.AddChidren(functionListView); | 
 |  |  | 
 |  |  |                 this.RemoveFromParent(); | 
 |  |  |                 refreshAction?.Invoke(alarm); | 
 |  |  |             }; | 
 |  |  | ======= | 
 |  |  |           continue; | 
 |  |  |         } | 
 |  |  |         if (function == null) | 
 |  |  |         { | 
 |  |  |           continue; | 
 |  |  |         } | 
 |  |  |         function.roomIds.Remove(null); | 
 |  |  |         allocatedList.Add(function); | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       LoadFunctionListRow(null); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |       var bottomView = new FrameLayout() | 
 |  |  |       { | 
 |  |  |         Y = Application.GetRealHeight(591), | 
 |  |  |         Height = Application.GetRealHeight(100), | 
 |  |  |         BackgroundColor = CSS_Color.MainBackgroundColor, | 
 |  |  |         Radius = (uint)Application.GetRealWidth(22), | 
 |  |  |       }; | 
 |  |  |       this.AddChidren(bottomView); | 
 |  |  |  | 
 |  |  |       var btnConfrim = new Button() | 
 |  |  |       { | 
 |  |  |         X = Application.GetRealWidth(78), | 
 |  |  |         Y = Application.GetRealHeight(12), | 
 |  |  |         Width = Application.GetRealWidth(220), | 
 |  |  |         Height = Application.GetRealWidth(44), | 
 |  |  |         Radius = (uint)Application.GetRealWidth(22), | 
 |  |  |         BackgroundColor = CSS_Color.MainColor, | 
 |  |  |         TextID = StringId.Confirm, | 
 |  |  |         TextSize = CSS_FontSize.SubheadingFontSize, | 
 |  |  |         TextColor = CSS_Color.MainBackgroundColor, | 
 |  |  |         TextAlignment = TextAlignment.Center, | 
 |  |  |       }; | 
 |  |  |       bottomView.AddChidren(btnConfrim); | 
 |  |  |       btnConfrim.MouseUpEventHandler = (sender, e) => | 
 |  |  |       { | 
 |  |  |         securityAlarm.output = new List<SecurityOutput>(); | 
 |  |  |         foreach (var output in outputList) | 
 |  |  |         { | 
 |  |  |           if (output.addCondition) | 
 |  |  |           { | 
 |  |  |             securityAlarm.output.Add(output); | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |         this.RemoveFromParent(); | 
 |  |  |         refreshAction?.Invoke(securityAlarm); | 
 |  |  |       }; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | >>>>>>> WJC | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | <<<<<<< HEAD | 
 |  |  |         /// <summary> | 
 |  |  |         /// 配置数据 | 
 |  |  |         /// </summary> | 
 |  |  |         void SetData(string roomId="") | 
 |  |  |         void SetData(string roomId = "") | 
 |  |  |         { | 
 |  |  |             allocatedList.Clear(); | 
 |  |  |             foreach (var function in FunctionList.List.GetLightList()) | 
 |  |  | 
 |  |  |                     RoomName = function.GetRoomListName(), | 
 |  |  |                 }); | 
 |  |  |             } | 
 |  |  | ======= | 
 |  |  |     } | 
 |  |  | >>>>>>> WJC | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             foreach (var scene in FunctionList.List.scenes) | 
 |  |  | 
 |  |  |                 }); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |     // <summary> | 
 |  |  |     /// 显示功能Row | 
 |  |  |     /// </summary> | 
 |  |  |     void LoadFunctionListRow(List<Function> functions) | 
 |  |  |     { | 
 |  |  |       functionListView.RemoveAll(); | 
 |  |  |       if (functions == null) | 
 |  |  |       { | 
 |  |  |         functions = allocatedList; | 
 |  |  |       } | 
 |  |  |       foreach (var function in functions) | 
 |  |  |       { | 
 |  |  |         var output = securityAlarm.output.Find((obj) => obj.sid == function.sid); | 
 |  |  |         if (output == null) | 
 |  |  |         { | 
 |  |  |           output = new SecurityOutput(); | 
 |  |  |           output.sid = function.sid; | 
 |  |  |         } | 
 |  |  |         else | 
 |  |  |         { | 
 |  |  |           output.addCondition = true; | 
 |  |  |         } | 
 |  |  |         outputList.Add(output); | 
 |  |  |  | 
 |  |  |         FrameLayout functionRow = new FrameLayout() | 
 |  |  |         { | 
 |  |  |           Height = Application.GetRealHeight(65), | 
 |  |  |           BackgroundColor = CSS_Color.MainBackgroundColor, | 
 |  |  |         }; | 
 |  |  |         functionListView.AddChidren(functionRow); | 
 |  |  |  | 
 |  |  |         var btnFunctionName = new Button() | 
 |  |  |         { | 
 |  |  |           X = Application.GetRealWidth(16), | 
 |  |  |           Width = Application.GetRealWidth(200), | 
 |  |  |           Height = Application.GetRealHeight(44), | 
 |  |  |           Text = function.name, | 
 |  |  |           TextAlignment = TextAlignment.CenterLeft, | 
 |  |  |           TextColor = CSS_Color.FirstLevelTitleColor, | 
 |  |  |           TextSize = CSS_FontSize.TextFontSize, | 
 |  |  |         }; | 
 |  |  |         functionRow.AddChidren(btnFunctionName); | 
 |  |  |  | 
 |  |  |         var btnFunctionFloorName = new Button() | 
 |  |  |         { | 
 |  |  |           X = Application.GetRealWidth(16), | 
 |  |  |           Y = Application.GetRealHeight(24), | 
 |  |  |           Width = Application.GetRealWidth(200), | 
 |  |  |           Height = Application.GetRealHeight(41), | 
 |  |  |           Text = function.GetRoomListName(), | 
 |  |  |           TextAlignment = TextAlignment.CenterLeft, | 
 |  |  |           TextColor = CSS_Color.PromptingColor1, | 
 |  |  |           TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, | 
 |  |  |         }; | 
 |  |  |         functionRow.AddChidren(btnFunctionFloorName); | 
 |  |  |  | 
 |  |  |         Button btnState = new Button() | 
 |  |  |         { | 
 |  |  |           Width = Application.GetRealWidth(317), | 
 |  |  |           TextAlignment = TextAlignment.CenterRight, | 
 |  |  |           TextSize = CSS_FontSize.TextFontSize, | 
 |  |  |           TextColor = CSS_Color.PromptingColor1, | 
 |  |  |         }; | 
 |  |  |         functionRow.AddChidren(btnState); | 
 |  |  |  | 
 |  |  | <<<<<<< HEAD | 
 |  |  |         // <summary> | 
 |  |  |         /// 显示功能Row | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |                 var output = alarm.output.Find((obj) => obj.sid == function.sid); | 
 |  |  |                 if (output == null) | 
 |  |  |                 { | 
 |  |  |                     output = new SecurityOutput() { status = new List<SecurityOutputStatus> { new SecurityOutputStatus { | 
 |  |  |                     output = new SecurityOutput() | 
 |  |  |                     { | 
 |  |  |                         status = new List<SecurityOutputStatus> { new SecurityOutputStatus { | 
 |  |  |                          key = FunctionAttributeKey.OnOff, | 
 |  |  |                          value = "on" | 
 |  |  |                     } } }; | 
 |  |  |                    | 
 |  |  |                     } } | 
 |  |  |                     }; | 
 |  |  |  | 
 |  |  |                     output.sid = function.sid; | 
 |  |  |                 } | 
 |  |  |                 //else | 
 |  |  | 
 |  |  |                     TextColor = CSS_Color.PromptingColor1, | 
 |  |  |                 }; | 
 |  |  |                 functionRow.AddChidren(btnState); | 
 |  |  |                | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                 Button btnChooseIcon = new Button() | 
 |  |  |                 { | 
 |  |  | 
 |  |  |  | 
 |  |  |                 var localOutput = alarm.output.Find((obj) => obj.sid == output.sid); | 
 |  |  |  | 
 |  |  |                 if (localOutput!=null) | 
 |  |  |                 if (localOutput != null) | 
 |  |  |                 { | 
 |  |  |                     btnChooseIcon.IsSelected = true; | 
 |  |  |                     btnState.Text = output.StateText(); | 
 |  |  | 
 |  |  |                     Height = Application.GetRealWidth(1), | 
 |  |  |                     BackgroundColor = CSS_Color.DividingLineColor, | 
 |  |  |                 }); | 
 |  |  | ======= | 
 |  |  |  | 
 |  |  |         Button btnChooseIcon = new Button() | 
 |  |  |         { | 
 |  |  |           X = Application.GetRealWidth(333), | 
 |  |  |           Gravity = Gravity.CenterVertical, | 
 |  |  |           Width = Application.GetMinRealAverage(32), | 
 |  |  |           Height = Application.GetMinRealAverage(32), | 
 |  |  |           UnSelectedImagePath = "Public/ChooseIcon.png", | 
 |  |  |           SelectedImagePath = "Public/ChooseOnIcon.png", | 
 |  |  |         }; | 
 |  |  |         functionRow.AddChidren(btnChooseIcon); | 
 |  |  |  | 
 |  |  |         btnChooseIcon.MouseUpEventHandler = (sender, e) => | 
 |  |  |         { | 
 |  |  |           btnChooseIcon.IsSelected = !btnChooseIcon.IsSelected; | 
 |  |  |           if (btnChooseIcon.IsSelected) | 
 |  |  |           { | 
 |  |  |             output.addCondition = true; | 
 |  |  |             if (output.status.Count == 0) | 
 |  |  |             { | 
 |  |  |               ShowStateDialog(output, btnState, btnChooseIcon); | 
 |  |  |             } | 
 |  |  |           } | 
 |  |  |           else | 
 |  |  |           { | 
 |  |  |             output.addCondition = false; | 
 |  |  |           } | 
 |  |  |         }; | 
 |  |  |         btnState.MouseUpEventHandler = (sender, e) => | 
 |  |  |         { | 
 |  |  |           ShowStateDialog(output, btnState, btnChooseIcon); | 
 |  |  |         }; | 
 |  |  | >>>>>>> WJC | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         if (output.addCondition) | 
 |  |  |         { | 
 |  |  |           btnChooseIcon.IsSelected = true; | 
 |  |  |           btnState.Text = output.StateText(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | <<<<<<< HEAD | 
 |  |  |         private void ShowStateDialog(SecurityOutput output, Button btnState, Button btnChoose = null) | 
 |  |  | ======= | 
 |  |  |         functionListView.AddChidren(new Button() | 
 |  |  | >>>>>>> WJC | 
 |  |  |         { | 
 |  |  |           Gravity = Gravity.CenterHorizontal, | 
 |  |  |           Width = Application.GetRealWidth(343), | 
 |  |  |           Height = Application.GetRealWidth(1), | 
 |  |  |           BackgroundColor = CSS_Color.DividingLineColor, | 
 |  |  |         }); | 
 |  |  |             Dialog dialog = new Dialog(); | 
 |  |  |  | 
 |  |  |             FrameLayout contentView = new FrameLayout(); | 
 |  |  |             dialog.AddChidren(contentView); | 
 |  |  |             contentView.MouseUpEventHandler = (sender, e) => | 
 |  |  |             { | 
 |  |  |                 dialog.Close(); | 
 |  |  |                 if (output.status.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     if (btnChoose != null) | 
 |  |  |                     { | 
 |  |  |                         btnChoose.IsSelected = false; | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |  | 
 |  |  | <<<<<<< HEAD | 
 |  |  |             VerticalScrolViewLayout optinView = new VerticalScrolViewLayout() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  | 
 |  |  |             optinView.AddChidren(btnClose); | 
 |  |  |             if (output.status.Count > 0) | 
 |  |  |             { | 
 |  |  |                 btnOpen.IsSelected =  output.status[0].value.ToLower() == "on"; | 
 |  |  |                 btnOpen.IsSelected = output.status[0].value.ToLower() == "on"; | 
 |  |  |                 btnClose.IsSelected = !btnOpen.IsSelected; | 
 |  |  |             } | 
 |  |  | ======= | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | >>>>>>> WJC | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     private void ShowStateDialog(SecurityOutput output, Button btnState, Button btnChoose = null) | 
 |  |  |     { | 
 |  |  |       Dialog dialog = new Dialog(); | 
 |  |  |             Button btnCancel = new Button() | 
 |  |  |             { | 
 |  |  |                 Gravity = Gravity.CenterHorizontal, | 
 |  |  |                 Y = optinView.Bottom + Application.GetRealHeight(8), | 
 |  |  |                 Width = Application.GetRealWidth(343), | 
 |  |  |                 Height = Application.GetRealHeight(44), | 
 |  |  |                 Radius = (uint)Application.GetRealHeight(13), | 
 |  |  |                 BackgroundColor = CSS_Color.MainBackgroundColor, | 
 |  |  |                 TextID = StringId.Cancel, | 
 |  |  |                 TextColor = CSS_Color.WarningColor, | 
 |  |  |                 IsBold = true, | 
 |  |  |             }; | 
 |  |  |             contentView.AddChidren(btnCancel); | 
 |  |  |  | 
 |  |  |       FrameLayout contentView = new FrameLayout(); | 
 |  |  |       dialog.AddChidren(contentView); | 
 |  |  |       contentView.MouseUpEventHandler = (sender, e) => | 
 |  |  |       { | 
 |  |  |         dialog.Close(); | 
 |  |  |         if (output.status.Count == 0) | 
 |  |  |         { | 
 |  |  |           if (btnChoose != null) | 
 |  |  |           { | 
 |  |  |             btnChoose.IsSelected = false; | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |       }; | 
 |  |  |             dialog.Show(); | 
 |  |  |  | 
 |  |  |       VerticalScrolViewLayout optinView = new VerticalScrolViewLayout() | 
 |  |  |       { | 
 |  |  |         Gravity = Gravity.CenterHorizontal, | 
 |  |  |         Y = Application.GetRealHeight(515), | 
 |  |  |         Width = Application.GetRealWidth(343), | 
 |  |  |         Height = Application.GetRealHeight(88), | 
 |  |  |         Radius = (uint)Application.GetRealHeight(13), | 
 |  |  |         BackgroundColor = CSS_Color.MainBackgroundColor, | 
 |  |  |       }; | 
 |  |  |       contentView.AddChidren(optinView); | 
 |  |  |  | 
 |  |  |       Button btnOpen = new Button() | 
 |  |  |       { | 
 |  |  |         Height = Application.GetRealHeight(44), | 
 |  |  |         TextAlignment = TextAlignment.Center, | 
 |  |  |         TextColor = CSS_Color.MainColor, | 
 |  |  |         TextSize = CSS_FontSize.SubheadingFontSize, | 
 |  |  |         TextID = StringId.On | 
 |  |  |       }; | 
 |  |  |       optinView.AddChidren(btnOpen); | 
 |  |  |  | 
 |  |  |       optinView.AddChidren(new Button() | 
 |  |  |       { | 
 |  |  |         Height = 1, | 
 |  |  |         BackgroundColor = CSS_Color.DividingLineColor | 
 |  |  |       }); | 
 |  |  |  | 
 |  |  |       Button btnClose = new Button() | 
 |  |  |       { | 
 |  |  |         Height = Application.GetRealHeight(44), | 
 |  |  |         TextAlignment = TextAlignment.Center, | 
 |  |  |         TextColor = CSS_Color.PromptingColor1, | 
 |  |  |         TextID = StringId.OFF, | 
 |  |  |         TextSize = CSS_FontSize.SubheadingFontSize, | 
 |  |  |       }; | 
 |  |  |       optinView.AddChidren(btnClose); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |       Button btnCancel = new Button() | 
 |  |  |       { | 
 |  |  |         Gravity = Gravity.CenterHorizontal, | 
 |  |  |         Y = optinView.Bottom + Application.GetRealHeight(8), | 
 |  |  |         Width = Application.GetRealWidth(343), | 
 |  |  |         Height = Application.GetRealHeight(44), | 
 |  |  |         Radius = (uint)Application.GetRealHeight(13), | 
 |  |  |         BackgroundColor = CSS_Color.MainBackgroundColor, | 
 |  |  |         TextID = StringId.Cancel, | 
 |  |  |         TextColor = CSS_Color.WarningColor, | 
 |  |  |         IsBold = true, | 
 |  |  |       }; | 
 |  |  |       contentView.AddChidren(btnCancel); | 
 |  |  |  | 
 |  |  |       dialog.Show(); | 
 |  |  |  | 
 |  |  |       btnOpen.MouseUpEventHandler = (sender, e) => | 
 |  |  |       { | 
 |  |  |         btnState.Text = btnOpen.Text; | 
 |  |  |         output.status = new List<SecurityOutputStatus>() | 
 |  |  |             btnOpen.MouseUpEventHandler = (sender, e) => { | 
 |  |  |                 btnState.Text = btnOpen.Text; | 
 |  |  |                 output.status = new List<SecurityOutputStatus>() | 
 |  |  |                 { | 
 |  |  |                     new SecurityOutputStatus() | 
 |  |  |                     { | 
 |  |  | 
 |  |  |                         value = "on", | 
 |  |  |                     } | 
 |  |  |                 }; | 
 |  |  | <<<<<<< HEAD | 
 |  |  |                 var localInput = alarm.output.Find((obj) => | 
 |  |  |                    obj.sid == output.sid | 
 |  |  |                 ); | 
 |  |  | 
 |  |  |                 btnState.Text = btnClose.Text; | 
 |  |  |                 output.status = new List<SecurityOutputStatus>() | 
 |  |  |                 { | 
 |  |  | ======= | 
 |  |  |         output.addCondition = true; | 
 |  |  |         if (btnChoose != null) | 
 |  |  |         { | 
 |  |  |           btnChoose.IsSelected = true; | 
 |  |  |         } | 
 |  |  |         dialog.Close(); | 
 |  |  |       }; | 
 |  |  |  | 
 |  |  |       btnClose.MouseUpEventHandler = (sender, e) => | 
 |  |  |       { | 
 |  |  |         btnState.Text = btnClose.Text; | 
 |  |  |         output.status = new List<SecurityOutputStatus>() | 
 |  |  |           { | 
 |  |  | >>>>>>> WJC | 
 |  |  |                     new SecurityOutputStatus() | 
 |  |  |                     { | 
 |  |  |                         key = FunctionAttributeKey.OnOff, | 
 |  |  |                         value = "off", | 
 |  |  |                     } | 
 |  |  | <<<<<<< HEAD | 
 |  |  |                 }; | 
 |  |  |                 var localInput = alarm.output.Find((obj) => | 
 |  |  |                  obj.sid == output.sid | 
 |  |  | 
 |  |  |  | 
 |  |  |             }; | 
 |  |  |  | 
 |  |  | ======= | 
 |  |  |           }; | 
 |  |  |         output.addCondition = true; | 
 |  |  |         if (btnChoose != null) | 
 |  |  |         { | 
 |  |  |           btnChoose.IsSelected = true; | 
 |  |  | >>>>>>> WJC | 
 |  |  |         } | 
 |  |  |         dialog.Close(); | 
 |  |  |       }; | 
 |  |  |  | 
 |  |  |       btnCancel.MouseUpEventHandler = (sender, e) => | 
 |  |  |       { | 
 |  |  |         dialog.Close(); | 
 |  |  |         if (output.status.Count == 0) | 
 |  |  |         { | 
 |  |  |           if (btnChoose != null) | 
 |  |  |           { | 
 |  |  |             btnChoose.IsSelected = false; | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |       }; | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | <<<<<<< HEAD | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 住宅列表点击事件 | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |                 }, nowSelectId); | 
 |  |  |             }; | 
 |  |  |         } | 
 |  |  | ======= | 
 |  |  |  | 
 |  |  | >>>>>>> WJC | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /// <summary> | 
 |  |  |     /// 住宅列表点击事件 | 
 |  |  |     /// </summary> | 
 |  |  |     void LoadDialog_ChangeFloor() | 
 |  |  |     { | 
 |  |  |       string nowSelectId = null; | 
 |  |  |       btnFloor.MouseUpEventHandler += (sender, e) => | 
 |  |  |       { | 
 |  |  |         var listAllFun = new List<Function>(); | 
 |  |  |         listAllFun.AddRange(allocatedList); | 
 |  |  |  | 
 |  |  |               //显示下拉界面 | 
 |  |  |               var form = new FloorRoomSelectPopupView(); | 
 |  |  |         form.ShowDeviceFunctionView(btnFloor, listAllFun, (selectId, listFun) => | 
 |  |  |               { | 
 |  |  |             nowSelectId = selectId; | 
 |  |  |                   //重新刷新设备列表 | 
 |  |  |                   this.LoadFunctionListRow(listFun); | 
 |  |  |           }, nowSelectId); | 
 |  |  |       }; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |   } | 
 |  |  | } |