/// <summary> /// 创建用户控件 /// </summary> /// <param name="node">节电</param> /// <returns>控件</returns> protected override FCView createUserControl(XmlNode node) { FCView userControl = base.createUserControl(node); if (userControl == null) { UserControlEx userControlEx = new UserControlEx(); userControlEx.Native = Native; Dictionary <String, String> attributes = getAttributes(node); if (attributes.ContainsKey("cid")) { userControlEx.Cid = attributes["cid"]; } if (attributes.ContainsKey("iscontainer")) { userControlEx.IsContainer = attributes["iscontainer"].ToLower() == "true"; } userControl = userControlEx; } return(userControl); }
/// <summary> /// 判断是否容器 /// </summary> /// <param name="control">控件</param> /// <returns>是否容器</returns> public bool isContainer(FCView control) { if (control is UserControlEx) { UserControlEx userControl = control as UserControlEx; return(userControl.IsContainer); } else if (control is FCLabel) { return(false); } else if (control is FCButton) { return(false); } else if (control is FCCalendar) { return(false); } else if (control is FCTextBox) { return(false); } else if (control is FCGrid) { return(false); } else if (control is FCChart) { return(false); } else { return(true); } }