//============================================================ // <T>加载资源。</T> // // @param resource 资源 //============================================================ public void LoadResource(FRcObject resource) { // 检查参数 _resource = resource as FRcPageControl; if (_resource == null) { return; } // 加载属性 }
//============================================================ // <T>根据类型名称创建界面组件。</T> // // @param typeName 类型名称 //============================================================ public FRcComponent CreateComponent(string typeName) { ERcComponent componentCd = REnum.ToValue <ERcComponent>(typeName); FRcComponent component = null; // 创建对象 switch (componentCd) { case ERcComponent.StaticLabel: component = new FRcStaticLabel(this); break; case ERcComponent.Label: component = new FRcLabel(this); break; case ERcComponent.Radio: component = new FRcRadio(this); break; case ERcComponent.Check: component = new FRcCheck(this); break; case ERcComponent.Number: component = new FRcNumber(this); break; case ERcComponent.Edit: component = new FRcEdit(this); break; case ERcComponent.RichEdit: component = new FRcRichEdit(this); break; case ERcComponent.Button: component = new FRcButton(this); break; case ERcComponent.Slider: component = new FRcSlider(this); break; case ERcComponent.ScrollBar: component = new FRcScrollBar(this); break; case ERcComponent.ProgressBar: component = new FRcProgressBar(this); break; case ERcComponent.Calendar: component = new FRcLabel(this); break; case ERcComponent.PictureBox: component = new FRcPictureBox(this); break; case ERcComponent.FontBox: component = new FRcFontBox(this); break; case ERcComponent.MovieBox: component = new FRcMovieBox(this); break; case ERcComponent.SlotItem: component = new FRcSlotItem(this); break; case ERcComponent.Slot: component = new FRcSlot(this); break; case ERcComponent.Panel: component = new FRcPanel(this); break; case ERcComponent.Page: component = new FRcPage(this); break; case ERcComponent.PageControl: component = new FRcPageControl(this); break; case ERcComponent.SelectItem: component = new FRcSelectItem(this); break; case ERcComponent.Select: component = new FRcSelect(this); break; case ERcComponent.MenuItem: component = new FRcMenuItem(this); break; case ERcComponent.Menu: component = new FRcMenu(this); break; case ERcComponent.ListItem: component = new FRcListItem(this); break; case ERcComponent.ListView: component = new FRcListView(this); break; case ERcComponent.TreeNodeType: component = new FRcTreeNodeType(this); break; case ERcComponent.TreeNodeLevel: component = new FRcTreeNodeLevel(this); break; case ERcComponent.TreeNode: component = new FRcTreeNode(this); break; case ERcComponent.TreeView: component = new FRcTreeView(this); break; case ERcComponent.GridCell: component = new FRcGridCell(this); break; case ERcComponent.GridCellCheck: component = new FRcGridCellCheck(this); break; case ERcComponent.GridCellNumber: component = new FRcGridCellNumber(this); break; case ERcComponent.GridCellText: component = new FRcGridCellText(this); break; case ERcComponent.GridRow: component = new FRcGridRow(this); break; case ERcComponent.GridColumn: component = new FRcLabel(this); break; case ERcComponent.GridColumnCheck: component = new FRcGridColumnCheck(this); break; case ERcComponent.GridColumnNumber: component = new FRcGridColumnNumber(this); break; case ERcComponent.GridColumnText: component = new FRcGridColumnText(this); break; case ERcComponent.GridView: component = new FRcGridView(this); break; case ERcComponent.Widget: component = new FRcWidget(this); break; case ERcComponent.Bar: component = new FRcBar(this); break; case ERcComponent.Form: component = new FRcForm(this); break; case ERcComponent.Table: component = new FRcTable(this); break; case ERcComponent.Window: component = new FRcWindow(this); break; } // 设置内容 if (component != null) { component.LoadStyle(); } else { throw new FFatalException("Unknown componment type. (type_name={1})", typeName); } // 返回对象 return(component); }