C# 클래스 SIL.FieldWorks.Common.Controls.PartGenerator

PartGenerator takes as input elements with attributes like class="LexSense" fieldType="mlstring" restrictions="customOnly" and generates a sequence of clones of the first non-comment child of the generate element, one for each field indicated by the parameters.
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_mdc IFwMetaDataCache
m_rootClassId int
m_source System.Xml.XmlNode

공개 메소드들

메소드 설명
Generate ( ) : System.Xml.XmlNode[]

Generate the nodes that the constructor arguments indicate.

GetGeneratedChildren ( XmlNode root, SIL.FieldWorks.FDO.FdoCache cache ) : List

Return an array list of the non-comment children of root, except that any "generate" elements are replaced with what they generate. This is for generating parts that are completely defined in the xml root. For generating parts through "layouts" use the interface that passes a Vc.

GetGeneratedChildren ( XmlNode root, SIL.FieldWorks.FDO.FdoCache cache, string keyAttrNames ) : List

Return an array list of the non-comment children of root, except that any "generate" elements are replaced with what they generate.

PartGenerator ( SIL.FieldWorks.FDO.FdoCache cache, XmlNode input ) : System

Make a part generator for the specified "generate" element, interpreting names using the specified metadatacache. Doesn't handle generate nodes refering to layouts. Use the constructor with Vc for that.

PartGenerator ( SIL.FieldWorks.FDO.FdoCache cache, XmlNode input, XmlVc vc, int rootClassId ) : System

Make a part generator for the specified "generate" element, interpreting names using the specified metadatacache, using vc and rootClassId for handling generate nodes that refer to layouts.

보호된 메소드들

메소드 설명
GeneratePartsFromLayouts ( int layoutClass, string fieldNameForReplace, int fieldIdForWs, XmlNode &layoutNode ) : List

make sure we can get a PartNode for this child, if not, try to (recursively) generate parts refering to the parent(s) until we can find the owner of the layout. clone this (generic) part: into this (specific) part:

InitMemberVariablesFromInput ( IFwMetaDataCache mdc, XmlNode input ) : void

initialize fields based on input node.

ReplaceParamsInAttributes ( XmlNode output, string labelName, string fieldName, int customFieldId, string className ) : void

비공개 메소드들

메소드 설명
Accept ( int flid ) : bool

This is the definition of what it means for a field to pass all current restrictions.

AppendClassAttribute ( XmlNode output, string fieldName, string className ) : void
GetGeneratedChildren ( XmlNode root, SIL.FieldWorks.FDO.FdoCache cache, XmlVc vc, int rootClassId ) : List

Return an array list of the non-comment children of root, except that any "generate" elements are replaced with what they generate.

GetGeneratedChildren ( XmlNode root, SIL.FieldWorks.FDO.FdoCache cache, string keyAttrNames, XmlVc vc, int rootClassId ) : List

MatchNodes ( XmlNode matchNode, XmlNode genNode, string keyAttrNames ) : bool

Answer true if the name and every attr specified in keyAttrNames matches.

SetupWsParams ( XmlNode output, int fieldId ) : void

메소드 상세

Generate() 공개 메소드

Generate the nodes that the constructor arguments indicate.
public Generate ( ) : System.Xml.XmlNode[]
리턴 System.Xml.XmlNode[]

GeneratePartsFromLayouts() 보호된 메소드

make sure we can get a PartNode for this child, if not, try to (recursively) generate parts refering to the parent(s) until we can find the owner of the layout. clone this (generic) part: into this (specific) part:
protected GeneratePartsFromLayouts ( int layoutClass, string fieldNameForReplace, int fieldIdForWs, XmlNode &layoutNode ) : List
layoutClass int
fieldNameForReplace string
fieldIdForWs int
layoutNode System.Xml.XmlNode
리턴 List

GetGeneratedChildren() 정적인 공개 메소드

Return an array list of the non-comment children of root, except that any "generate" elements are replaced with what they generate. This is for generating parts that are completely defined in the xml root. For generating parts through "layouts" use the interface that passes a Vc.
static public GetGeneratedChildren ( XmlNode root, SIL.FieldWorks.FDO.FdoCache cache ) : List
root System.Xml.XmlNode The root.
cache SIL.FieldWorks.FDO.FdoCache The FDO cache.
리턴 List

GetGeneratedChildren() 정적인 공개 메소드

Return an array list of the non-comment children of root, except that any "generate" elements are replaced with what they generate.
static public GetGeneratedChildren ( XmlNode root, SIL.FieldWorks.FDO.FdoCache cache, string keyAttrNames ) : List
root System.Xml.XmlNode The root.
cache SIL.FieldWorks.FDO.FdoCache The FDO cache.
keyAttrNames string if non-null, gives a list of key attribute names. /// generated children which match another node in root in all key attributes are omitted.
리턴 List

InitMemberVariablesFromInput() 보호된 메소드

initialize fields based on input node.
protected InitMemberVariablesFromInput ( IFwMetaDataCache mdc, XmlNode input ) : void
mdc IFwMetaDataCache
input System.Xml.XmlNode
리턴 void

PartGenerator() 공개 메소드

Make a part generator for the specified "generate" element, interpreting names using the specified metadatacache. Doesn't handle generate nodes refering to layouts. Use the constructor with Vc for that.
public PartGenerator ( SIL.FieldWorks.FDO.FdoCache cache, XmlNode input ) : System
cache SIL.FieldWorks.FDO.FdoCache
input System.Xml.XmlNode
리턴 System

PartGenerator() 공개 메소드

Make a part generator for the specified "generate" element, interpreting names using the specified metadatacache, using vc and rootClassId for handling generate nodes that refer to layouts.
public PartGenerator ( SIL.FieldWorks.FDO.FdoCache cache, XmlNode input, XmlVc vc, int rootClassId ) : System
cache SIL.FieldWorks.FDO.FdoCache
input System.Xml.XmlNode
vc XmlVc for parts/layouts
rootClassId int class of root object from which column layouts can be computed
리턴 System

ReplaceParamsInAttributes() 보호된 메소드

protected ReplaceParamsInAttributes ( XmlNode output, string labelName, string fieldName, int customFieldId, string className ) : void
output System.Xml.XmlNode
labelName string
fieldName string
customFieldId int
className string
리턴 void

프로퍼티 상세

m_mdc 보호되어 있는 프로퍼티

The metadata cache
protected IFwMetaDataCache m_mdc
리턴 IFwMetaDataCache

m_rootClassId 보호되어 있는 프로퍼티

class of item upon which to apply first layout
protected int m_rootClassId
리턴 int

m_source 보호되어 있는 프로퍼티

columnSpec
protected XmlNode,System.Xml m_source
리턴 System.Xml.XmlNode