예제 #1
0
 /// <summary>
 /// <para>Read a Relatived POS/SIZE vector</para>
 ///<see cref="UISRelativeVector"/> -> <see cref="Word(Type)"/> <see cref="Lexical.Space"/> <see cref="Vector"/>
 /// </summary>
 /// <returns></returns>
 private static UISValue RelativeVector()
 {
     //Relative with some element
     if (Test(Tag.REAL, Tag.NUMBER, Tag.LeftPar, Tag.Index))
     {
         return(Vector());
     }
     else
     {
         UISText lex = Word(typeof(Space));
         ExpectGrammar(Tag.SPACE);
         UISVector         vec    = Vector();
         UISRelativeVector result = new UISRelativeVector(vec.First, vec.Second, lex.Text, vec.IncludeByPar);
         return(result);
     }
 }
예제 #2
0
        private static UISValue Motion()
        {
            UISAnimationElement result = null;

            if (Test(Tag.IDENTITY))
            {
                UISText ani = Word(typeof(Space));
                result = Animation_Table.FirstOrDefault(p => p.ElementName == ani.Text);
                if (result == null)
                {
                    ThrowError(new UISTargetAnimationNotExistException(ani.Text));                                 //读取Delay
                }
                if (' ' == (int)look.TokenTag)
                {
                    Move();
                    Word id = look as Word;
                    if (id.Lexeme != "delay")
                    {
                        ThrowError(new UISUnsupportPropertyException(id.Lexeme));
                    }
                    ExpectGrammar(Tag.IDENTITY);
                    ExpectGrammar(Tag.Equal);
                    TestGrammar(Tag.NUMBER);
                    return(new UISMotion(result, Expr() as UISNumber));
                }
                return(new UISMotion(result));
            }
            else if (ExpectGrammar(Tag.AnimationInline, Tag.Animation))
            {
                result = new UISAnimationElement($"INLINE_ANIMATION_{TEMP_ANIMATION_FLAG++}", true);
                result.AddProperty(Animation());
                return(new UISMotion(result));
            }

            return(ThrowError(new UISInlineAnimationException((look as Word).Lexeme)));
        }
예제 #3
0
 protected override void Refresh()
 {
     FSIZE = FindPropertyDefine <UISNumber>(Property.FSIZE);
     TEXT  = FindPropertyDefine <UISText>(Property.TEXT);
 }
예제 #4
0
 public UISGroup(UISText name)
 {
     this.GroupName = name;
 }