Example #1
0
        public IEnumerable <Inline> ParseLine(string[] line)
        {
            var rowCount = line.Length / this.columnCount + (line.Length % this.columnCount != 0 ? 1 : 0);

            var grid = new Grid();

            grid.ColumnDefinitions.AddRange(Generater.Create <ColumnDefinition>(this.columnCount));
            grid.RowDefinitions.AddRange(Generater.Create <RowDefinition>(rowCount));

            var imageUriParser = new ImageUriParser();
            var imageCreator   = new ImagesCreator();

            foreach (var item in line
                     .Select(z => imageUriParser.TryParse(z))
                     .Where(z => z != null)
                     .EnumerateIndexValuePair())
            {
                var image = imageCreator.AddImage(item.Value);
                if (image == null)
                {
                    continue;
                }
                var col = item.Index % this.columnCount;
                var row = item.Index / this.columnCount;
                Grid.SetColumn(image, col);
                Grid.SetRow(image, row);
                grid.Children.Add(image);
            }

            yield return(new InlineUIContainer(grid));
        }
Example #2
0
        /// <summary>
        /// 处理引用型关键字
        /// </summary>
        /// <param name="UserInput"></param>
        public virtual void HandleRefKeyWords(List <KeyWordValue> UserInput)
        {
            var query = UIRoot.Query <KeyWordInput>();

            query.ForEach((kwi) =>
            {
                if (!kwi.isTextInput)
                {
                    SetValue(kwi.thisKeyWord.key, Generater.Generate(kwi.value, UserInput));
                }
            });
        }
Example #3
0
        public override ElementData Generate()
        {
            var data = base.Generate();

            switch (space)
            {
            case Space.Object: data.vert = Generater.Generate(Vert_space_obj, Values); break;

            case Space.World: data.vert = Generater.Generate(Vert_space_world, Values); break;

            case Space.Screen: data.vert = Generater.Generate(Vert_space_screen, Values); break;
            }
            return(data);
        }
Example #4
0
        public override ElementData Generate()
        {
            var generateData = base.Generate();

            switch (space)
            {
            case Space.Screen:
            {
                generateData.appdata = string.Empty;
                generateData.vert    = Generater.Generate(Vert_ScreenSpace, keyWords, ValueDic.Values);
            }
            break;
            }
            return(generateData);
        }
Example #5
0
        public virtual ElementData Generate()
        {
            //在校验时已经合并过一次
            ///this.MergeValues(UserInput);
            ElementData generateData = new ElementData();

            generateData.Shader_Properties = Generater.Generate(GenerateTemplate.Shader_Properties, keyWords, ValueDic.Values);
            generateData.Shader_Tags       = Generater.Generate(GenerateTemplate.Shader_Tags, keyWords, ValueDic.Values);
            generateData.Pass_Tags         = Generater.Generate(GenerateTemplate.Pass_Tags, keyWords, ValueDic.Values);
            generateData.Pass_Pragmas      = Generater.Generate(GenerateTemplate.Pass_Pragmas, keyWords, ValueDic.Values);
            generateData.appdata           = Generater.Generate(GenerateTemplate.appdata, keyWords, ValueDic.Values);
            generateData.v2f             = Generater.Generate(GenerateTemplate.v2f, keyWords, ValueDic.Values);
            generateData.Pass_Properties = Generater.Generate(GenerateTemplate.Pass_Properties, keyWords, ValueDic.Values);
            generateData.vert            = Generater.Generate(GenerateTemplate.vert, keyWords, ValueDic.Values);
            generateData.frag            = Generater.Generate(GenerateTemplate.frag, keyWords, ValueDic.Values);
            return(generateData);
        }
Example #6
0
        public override ElementData Generate()
        {
            var generateData = base.Generate();

            if (UseReflectProbe)
            {
                generateData.Pass_Properties = string.Empty;
            }
            if (DecodeHDR)
            {
                generateData.frag = Generater.Generate(FragHDR, KeyWords, ValueDic.Values);
            }
            else
            {
                generateData.frag = Generater.Generate(FragSimple, KeyWords, ValueDic.Values);
            }
            return(generateData);
        }
Example #7
0
 public static void cxGenerateGrid(this ASPxGridView grid, Generater.GenerateGridParams generateGridParams )
 {
     Generater.Instance.GenerateGrid(grid, generateGridParams);
 }
Example #8
0
 public Form1()
 {
     InitializeComponent();
     gen = new Generater();
 }