Пример #1
0
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        base.gaxb_final(element, _parent, args);

        if (element != null)
        {
            style = element.GetAttribute("style");

            string s = element.GetAttribute("value");
            if (s != null)
            {
                value = PlanetUnityStyle.ReplaceStyleTags(PlanetUnityOverride.processString(this, s));
            }

            s = element.GetAttribute("autoreload");
            if (s != null)
            {
                autoreload = bool.Parse(s);
            }
        }

        if (style != null)
        {
            string classString = "MarkdownStyle" + style;

            Type entityClass = Type.GetType(classString, true);
            mdStyle = (Activator.CreateInstance(entityClass)) as MarkdownStyle;
        }
        else
        {
            mdStyle = new MarkdownStyleGeneric();
        }

        mdStyle.markdownEntity = this;
    }
Пример #2
0
 public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
 {
     base.gaxb_final(element, _parent, args);
     if (element != null)
     {
         onTouchUp = element.GetAttribute("onTouchUp");
     }
 }
Пример #3
0
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        base.gaxb_final(element, _parent, args);

        string attrib;

        if (element != null)
        {
            attrib = element.GetAttribute("angle");
            if (attrib != null)
            {
                angle = float.Parse(attrib);
            }
        }
    }
Пример #4
0
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        base.gaxb_final(element, _parent, args);

        string attr;

        if (element != null)
        {
            attr = element.GetAttribute("regexValidation");
            if (attr != null)
            {
                regexValidation = attr;
            }

            attr = element.GetAttribute("onValueChanged");
            if (attr != null)
            {
                attr = PlanetUnityOverride.processString(_parent, attr);
            }
            if (attr != null)
            {
                onValueChanged = (attr);
            }

            attr = element.GetAttribute("placeholder");
            if (attr != null)
            {
                attr = PlanetUnityOverride.processString(_parent, attr);
            }
            if (attr != null)
            {
                placeholder = (attr);
            }

            attr = element.GetAttribute("characterLimit");
            if (attr != null)
            {
                attr = PlanetUnityOverride.processString(_parent, attr);
            }
            if (attr != null)
            {
                characterLimit = (int)float.Parse(attr);
            }

            attr = element.GetAttribute("asteriskChar");
            if (attr != null)
            {
                attr = PlanetUnityOverride.processString(_parent, attr);
            }
            if (attr != null)
            {
                asteriskChar = char.Parse(attr);
            }

            attr = element.GetAttribute("contentType");
            if (attr != null)
            {
                attr = PlanetUnityOverride.processString(_parent, attr);
            }
            if (attr != null)
            {
                contentType = (PlanetUnity2.InputFieldContentType)System.Enum.Parse(typeof(PlanetUnity2.InputFieldContentType), attr);
            }

            attr = element.GetAttribute("lineType");
            if (attr != null)
            {
                attr = PlanetUnityOverride.processString(_parent, attr);
            }
            if (attr != null)
            {
                lineType = (PlanetUnity2.InputFieldLineType)System.Enum.Parse(typeof(PlanetUnity2.InputFieldLineType), attr);
            }

            attr = element.GetAttribute("selectionColor");
            if (attr != null)
            {
                attr = PlanetUnityOverride.processString(_parent, attr);
            }
            if (attr != null)
            {
                selectionColor = new Color().PUParse(attr);
            }
        }
    }
Пример #5
0
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        string attrib;

        if (font == null)
        {
            font = DefaultFont;
        }

        if (element != null)
        {
            attrib = element.GetAttribute("font");
            if (attrib != null)
            {
                font = attrib;
            }

            attrib = element.GetAttribute("onLinkClick");
            if (attrib != null)
            {
                onLinkClick = PlanetUnityOverride.processString(_parent, attrib);
            }

            attrib = element.GetAttribute("fontSize");
            if (attrib != null)
            {
                fontSize = (int)(float.Parse(PlanetUnityOverride.processString(_parent, attrib)));
            }

            attrib = element.GetAttribute("fontStyle");
            if (attrib != null)
            {
                fontStyle = attrib;
            }

            attrib = element.GetAttribute("sizeToFit");
            if (attrib != null)
            {
                sizeToFit = bool.Parse(PlanetUnityOverride.processString(_parent, attrib));
            }

            attrib = element.GetAttribute("maxSize");
            if (attrib != null)
            {
                maxSize = (int)(float.Parse(PlanetUnityOverride.processString(_parent, attrib)));
            }

            attrib = element.GetAttribute("enableWordWrapping");
            if (attrib != null)
            {
                enableWordWrapping = bool.Parse(attrib);
            }

            attrib = element.GetAttribute("maxVisibleLines");
            if (attrib != null)
            {
                maxVisibleLines = int.Parse(attrib);
            }

            attrib = element.GetAttribute("minSize");
            if (attrib != null)
            {
                minSize = (int)(float.Parse(PlanetUnityOverride.processString(_parent, attrib)));
            }

            attrib = element.GetAttribute("alignment");
            if (attrib != null)
            {
                alignment = (TextAlignmentOptions)Enum.Parse(typeof(TextAlignmentOptions), attrib);
            }

            attrib = element.GetAttribute("fontColor");
            if (attrib != null)
            {
                fontColor = fontColor.PUParse(attrib);
            }

            attrib = element.GetAttribute("overflowMode");
            if (attrib != null)
            {
                overflowMode = (TextOverflowModes)Enum.Parse(typeof(TextOverflowModes), attrib);
            }

            attrib = element.GetAttribute("lineSpacing");
            if (attrib != null)
            {
                lineSpacing = (int)(float.Parse(PlanetUnityOverride.processString(_parent, attrib)));
            }

            value = element.GetAttribute("value");
            value = PlanetUnityOverride.processString(_parent, value);
        }

        base.gaxb_final(element, _parent, args);
    }