Exemple #1
0
        private FrontendObject ProcessObjectTypeTag(FrontendObject frontendObject, ObjectTypeTag objectTypeTag)
        {
            FrontendObject newInstance;

            switch (objectTypeTag.Type)
            {
            case FEObjType.FE_Image:
                newInstance = new FrontendImage(frontendObject);
                break;

            case FEObjType.FE_Group:
                newInstance = new FrontendGroup(frontendObject);
                break;

            case FEObjType.FE_String:
                newInstance = new FrontendString(frontendObject);
                break;

            case FEObjType.FE_MultiImage:
                newInstance = new FrontendMultiImage(frontendObject);
                break;

            case FEObjType.FE_ColoredImage:
                newInstance = new FrontendColoredImage(frontendObject);
                break;

            default:
                throw new IndexOutOfRangeException($"cannot handle object type: {objectTypeTag.Type}");
            }

            newInstance.Type = objectTypeTag.Type;

            return(newInstance);
        }
Exemple #2
0
 private FrontendObject ProcessStringBufferFormattingTag(FrontendString frontendString, StringBufferFormattingTag stringBufferFormattingTag)
 {
     frontendString.Formatting = stringBufferFormattingTag.Formatting;
     return(frontendString);
 }
Exemple #3
0
 private FrontendObject ProcessStringBufferLabelHashTag(FrontendString frontendString, StringBufferLabelHashTag stringBufferLabelHashTag)
 {
     frontendString.Hash = stringBufferLabelHashTag.Hash;
     return(frontendString);
 }
Exemple #4
0
 private FrontendObject ProcessStringBufferMaxWidthTag(FrontendString frontendString, StringBufferMaxWidthTag stringBufferMaxWidthTag)
 {
     frontendString.MaxWidth = stringBufferMaxWidthTag.MaxWidth;
     return(frontendString);
 }
Exemple #5
0
 private FrontendObject ProcessStringBufferTextTag(FrontendString frontendString, StringBufferTextTag stringBufferTextTag)
 {
     frontendString.Value = stringBufferTextTag.Value;
     return(frontendString);
 }