Exemple #1
0
 private string GetColor(QlsGrammar.QlsParser.StyleContext context)
 {
     return(context
            .stylePart()
            .FirstOrDefault(x => x.color != null)
            ?.color
            .Text);
 }
Exemple #2
0
 private string GetFont(QlsGrammar.QlsParser.StyleContext context)
 {
     return(context
            .stylePart()
            .FirstOrDefault(x => x.fontname != null)
            ?.fontname
            .Text
            .Replace("\"", ""));
 }
Exemple #3
0
        private IWidget CreateWidget(QlsGrammar.QlsParser.StyleContext context)
        {
            var chosenWidget = context
                               .stylePart()
                               .FirstOrDefault(x => x.widget != null)
                               ?.widget
                               .controlType();

            return(CreateWidget(chosenWidget));
        }
Exemple #4
0
        private int?GetWidth(QlsGrammar.QlsParser.StyleContext context)
        {
            var width = context
                        .stylePart()
                        .FirstOrDefault(x => x.width != null)
                        ?.width
                        .Text;

            return(width != null ? (int?)int.Parse(width) : null);
        }
Exemple #5
0
        private decimal?GetFontSize(QlsGrammar.QlsParser.StyleContext context)
        {
            var size = context
                       .stylePart()
                       .FirstOrDefault(x => x.fontsize != null)
                       ?.fontsize
                       .Text;

            return(size != null ?  (decimal?)decimal.Parse(size) : null);
        }