Ejemplo n.º 1
0
 public void setBackground(IrisBackground image)
 {
     background.Source = image.bmp;
 }
Ejemplo n.º 2
0
 public static void addBackground(string bgdName, IrisBackground background)
 {
     backgrounds.Add(bgdName, background);
 }
Ejemplo n.º 3
0
        public IrisBackground parseBackground()
        {
            IrisBackground bgd = new IrisBackground();
            String fieldName, fieldValue;

            nextTokenIfEquals(Token.TokenValue.BACKGROUND);

            if (currentTokenEquals(Token.TokenValue.VALUE_IDENTIFIER))
            {
                bgd.name = currentToken.stringValue;

                nextToken();

                nextTokenIfEquals(Token.TokenValue.LBRACE);

                while (!currentTokenEquals(Token.TokenValue.RBRACE))
                {
                    if (currentTokenEquals(Token.TokenValue.VALUE_IDENTIFIER))
                    {
                        fieldName = currentToken.stringValue;

                        nextToken();

                        nextTokenIfEquals(Token.TokenValue.EQ);

                        if (fieldName.Equals("source"))
                        {
                            if (currentTokenEquals(Token.TokenValue.STRING))
                            {
                                fieldValue = currentToken.stringValue;

                                nextToken();

                                nextTokenIfEquals(Token.TokenValue.SEMICOLON);
                                bgd.setImage(fieldValue);
                            }
                            else
                            {

                            }
                        }
                        else
                        {

                        }
                    }
                    else
                    {
                        throw new SyntaxError(lineNumber, colNumber, Token.TokenValue.VALUE_IDENTIFIER);
                    }
                }

                nextTokenIfEquals(Token.TokenValue.RBRACE);
            }
            else
            {
                throw new SyntaxError(lineNumber, colNumber, Token.TokenValue.VALUE_IDENTIFIER);
            }

            return bgd;
        }
Ejemplo n.º 4
0
 public static void addBackground(string bgdName, IrisBackground background)
 {
     backgrounds.Add(bgdName, background);
 }
Ejemplo n.º 5
0
        public void addBackground(IrisBackground background)
        {
            if (backgrounds == null)
            {
                backgrounds = new List<IrisBackground>();
            }

            backgrounds.Add(background);
        }