Ext.Net.Renderer.ToConfigString C# (CSharp) Method

ToConfigString() private method

private ToConfigString ( ) : string
return string
        public virtual string ToConfigString()
        {
            if (this.Format != RendererFormat.None)
            {
                if (this.FormatArgs != null && this.FormatArgs.Length > 0)
                {
                    return new JFunction("return Ext.util.Format.".ConcatWith(
                                this.Format.ToString().ToLowerCamelCase(),
                                "(value,",
                                this.FormatArgs.Join(),
                                ");"), "value").ToScript();
                }

                if (this.Handler.IsEmpty())
                {
                    return "Ext.util.Format.".ConcatWith(this.Format.ToString().ToLowerCamelCase());
                }
            }

            if (this.Handler.IsNotEmpty())
            {
                string temp = TokenUtils.ParseTokens(this.Handler, this.Owner);

                if (TokenUtils.IsRawToken(temp))
                {
                    return TokenUtils.ReplaceRawToken(temp);
                }

                return new JFunction(
                        temp, 
                        this.Args)
                        .ToScript();
            }

            return TokenUtils.ReplaceRawToken(TokenUtils.ParseTokens(this.Fn));
        }

Usage Example

Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="renderer"></param>
 protected virtual void SetEditorRenderer(Renderer renderer)
 {
     this.Set("editorRenderer", new JRawValue(renderer.ToConfigString()));
 }
All Usage Examples Of Ext.Net.Renderer::ToConfigString