Exemplo n.º 1
0
        public override void RenderControlToScript(StringBuilder script, bool useApplyTo)
        {
            if (DidRenderScript)
            {
                return;
            }


            script.Append("new Ext.TabPanel(");

            script.Append("{");



            if (useApplyTo)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append("applyTo:'" + this.ClientID + "'");
            }
            else
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append("contentEl:'" + this.ClientID + "'");
            }

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append(",id:'tp" + this.ClientID + "'");

            if (Title.Length > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",title:'" + this.Title + "'");
            }

            if (Region.Length > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",region:'" + this.Region + "'");
            }


            if ((AutoHeight) && (FixedPixelHeight == 0))
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",autoHeight:true");
            }

            if (FixedPixelHeight > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",height:'" + FixedPixelHeight.ToString() + "'");
            }

            if ((AutoWidth) && (FixedPixelWidth == 0))
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",autoWidth:true");
            }

            if (FixedPixelWidth > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",width: " + FixedPixelHeight.ToString());
            }

            if (!Header)
            {
                //if (UnMinify) script.Append("\n ");
                //script.Append(", header:false  ");
            }

            if (Plain)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",plain:true");
            }

            if (enableTabScroll)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",enableTabScroll:true");
            }


            if (Frame)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",frame:true");
            }



            if (!DeferredRender)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",deferredRender:false");
            }

            if (Split)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(", split: true ");

                if (MinSize > 0)
                {
                    if (UnMinify)
                    {
                        script.Append("\n ");
                    }
                    script.Append(", minSize: " + MinSize.ToString());
                }

                if (MaxSize > 0)
                {
                    if (UnMinify)
                    {
                        script.Append("\n ");
                    }
                    script.Append(", maxSize: " + MaxSize.ToString());
                }
            }

            SelectTab(script);

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append(",items:[");

            AddTabs(script);

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append("]");

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append("}");


            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append(")");


            DidRenderScript = true;
        }
Exemplo n.º 2
0
        public void RenderControlToScript(StringBuilder script)
        {
            if (DidRenderScript)
            {
                return;
            }

            script.Append(" {  ");
            //script.Append("contentEl:'" + this.ClientID + "'  ");

            //if (Title.Length > 0)
            //{
            script.Append("title:'" + this.Title + "'");
            //}

            if (region.Length > 0)
            {
                script.Append(",region:'" + region + "'");
            }

            if (layout.Length > 0)
            {
                script.Append(",layout:'" + layout + "'");
            }

            if ((AutoHeight) && (FixedPixelHeight == 0))
            {
                script.Append(",autoHeight:true");
            }

            if (FixedPixelHeight > 0)
            {
                script.Append(",height:'" + FixedPixelHeight.ToString() + "'");
            }

            if ((AutoWidth) && (FixedPixelWidth == 0))
            {
                script.Append(",autoWidth:true  ");
            }

            if (FixedPixelWidth > 0)
            {
                script.Append(",width: " + FixedPixelWidth.ToString());
            }

            if (collapsible)
            {
                script.Append(",collapsible:true ");
            }

            if (AutoScroll)
            {
                script.Append(",autoScroll:true ");
            }

            if (IconCls.Length > 0)
            {
                script.Append(",iconCls:'" + IconCls + "' ");
            }

            if (!Border)
            {
                script.Append(",border:false");
            }


            //private string autoExpandColumn = string.Empty;

            if (AutoExpandColumn.Length > 0)
            {
                script.Append(",autoExpandColumn:'" + AutoExpandColumn + "' ");
            }

            //private bool disableSelection = false;

            if (DisableSelection)
            {
                script.Append(",disableSelection:true");
            }

            //private bool enableColumnHide = true;

            if (EnableColumnHide)
            {
                script.Append(",enableColumnHide:true");
            }
            else
            {
                script.Append(",enableColumnHide:false");
            }

            //private bool enableColumnMove = true;

            if (!EnableColumnMove)
            {
                script.Append(",enableColumnMove:false ");
            }

            //private bool enableColumnResize = true;
            if (!EnableColumnResize)
            {
                script.Append(",enableColumnResize:false ");
            }

            //private bool enableDragDrop = false;
            if (EnableDragDrop)
            {
                script.Append(",enableDragDrop:true");
            }

            if (header)
            {
                script.Append(",header:true");
            }

            if (footer)
            {
                script.Append(",footer:true");
            }

            //private bool enableHdMenu = true;
            if (EnableHdMenu)
            {
                script.Append(",enableHdMenu:true");
            }
            else
            {
                script.Append(",enableHdMenu:false");
            }

            //private bool enableRowHeightSync = false;
            if (EnableRowHeightSync)
            {
                script.Append(",enableRowHeightSync:true");
            }


            //private bool loadMask = false;
            if (LoadMask)
            {
                script.Append(",loadMask:true");
            }

            //private int minColumnWidth = 25;
            if (MinColumnWidth != 25)
            {
                script.Append(",minColumnWidth:" + MinColumnWidth.ToString());
            }


            //private bool monitorWindowResize = true;
            if (!MonitorWindowResize)
            {
                script.Append(",monitorWindowResize:false");
            }


            //private bool stripeRows = false;
            if (StripeRows)
            {
                script.Append(",stripeRows:true");
            }

            //private bool trackMouseOver = true;
            if (!TrackMouseOver)
            {
                script.Append(",trackMouseOver:false");
            }


            if (HasVisibleExtTemplateFields())
            {
                RenderColumnModels(script);
            }



            script.Append(" } ");

            DidRenderScript = true;
        }
Exemplo n.º 3
0
        public override void RenderControlToScript(StringBuilder script, bool useApplyTo)
        {
            if (DidRenderScript)
            {
                return;
            }

            if (RenderConstructor)
            {
                script.Append("new Ext.Panel(");
            }

            script.Append(" {  ");

            if (useApplyTo)
            {
                script.Append("applyTo:'" + this.ClientID + "'");
            }
            else
            {
                script.Append("contentEl:'" + this.ClientID + "'  ");
            }


            script.Append(", title: '" + this.Title + "' ");

            if (Region.Length > 0)
            {
                script.Append(", region: '" + Region + "'");
            }

            if (Layout.Length > 0)
            {
                script.Append(", layout: '" + Layout + "'");
            }

            if ((AutoHeight) && (FixedPixelHeight == 0))
            {
                script.Append(", autoHeight:true  ");
            }

            if (FixedPixelHeight > 0)
            {
                script.Append(", height: '" + FixedPixelHeight.ToString() + "'");
            }

            if ((AutoWidth) && (FixedPixelWidth == 0))
            {
                script.Append(", autoWidth:true  ");
            }

            if (FixedPixelWidth > 0)
            {
                script.Append(", width: " + FixedPixelWidth.ToString());
            }

            if (Collapsible)
            {
                script.Append(", collapsible: true ");
            }

            if (AutoScroll)
            {
                script.Append(", autoScroll: true ");
            }

            if (split)
            {
                script.Append(", split: true ");

                if (minSize > 0)
                {
                    script.Append(", minSize: " + minSize.ToString());
                }

                if (maxSize > 0)
                {
                    script.Append(", maxSize: " + maxSize.ToString());
                }
            }

            if (AnimateLayout)
            {
                script.Append(", layoutConfig:{ animate:true }");
            }

            bool hasChildren = HasVisibleExtChildren();

            if (hasChildren)
            {
                script.Append("\n ,items:[");

                AddItems(script);

                script.Append(" ]  ");
            }

            script.Append(" } ");

            if (RenderConstructor)
            {
                script.Append(")");
            }

            DidRenderScript = true;
        }
Exemplo n.º 4
0
        public override void RenderControlToScript(StringBuilder script, bool useApplyTo)
        {
            if (DidRenderScript)
            {
                return;
            }


            script.Append("new Ext.Window(");

            script.Append("{");

            //if (useApplyTo)
            //{
            //    if (UnMinify) script.Append("\n ");
            script.Append("applyTo:'" + this.ClientID + "'");
            //}
            //else
            //{
            //    if (UnMinify) script.Append("\n ");
            //    script.Append("contentEl:'" + this.ClientID + "'");
            //}

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append(",id:'tp" + this.ClientID + "'");

            if (Title.Length > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",title:'" + this.Title + "'");
            }

            //if (Region.Length > 0)
            //{
            //    if (UnMinify) script.Append("\n ");
            //    script.Append(",region:'" + this.Region + "'");
            //}

            //script.Append(",deferredRender:false");

            if (Layout.Length > 0)
            {
                script.Append(", layout: '" + Layout + "'");
            }

            if ((AutoHeight) && (FixedPixelHeight == 0))
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",autoHeight:true");
            }



            if ((AutoWidth) && (FixedPixelWidth == 0))
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",autoWidth:true");
            }

            if (FixedPixelHeight > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",height:'" + FixedPixelHeight.ToString() + "'");
            }

            if (FixedPixelWidth > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",width: " + FixedPixelWidth.ToString());
            }

            //script.Append(",height:'100%'");
            //script.Append(",width:'100%'");


            if (UsePosition)
            {
                script.Append(",x:" + Left.ToString(CultureInfo.InvariantCulture));
                script.Append(",y:" + Top.ToString(CultureInfo.InvariantCulture));
            }

            if (closable)
            {
                script.Append(",closable:true");
            }
            else
            {
                script.Append(",closable:false");
            }

            if (animateTarget.Length > 0)
            {
                script.Append(",animateTarget:'" + this.animateTarget + "'");
            }

            script.Append(",baseCls:'" + this.baseCls + "'");
            script.Append(",closeAction:'" + this.closeAction + "'");

            if (constrain)
            {
                script.Append(",constrain:true");
            }
            else
            {
                script.Append(",constrain:false");
            }

            if (defaultButton.Length > 0)
            {
                script.Append(",defaultButton:'" + this.defaultButton + "'");
            }

            if (draggable)
            {
                script.Append(",draggable:true");
            }
            else
            {
                script.Append(",draggable:false");
            }

            if (expandOnShow)
            {
                script.Append(",expandOnShow:true");
            }
            else
            {
                script.Append(",expandOnShow:false");
            }

            if (maximizable)
            {
                script.Append(",maximizable:true");
            }
            else
            {
                script.Append(",maximizable:false");
            }

            if (plain)
            {
                script.Append(",plain:true");
            }
            else
            {
                script.Append(",plain:false");
            }

            if (resizable)
            {
                script.Append(",resizable:true");
                script.Append(",resizeHandles:'" + this.resizeHandles + "'");
            }
            else
            {
                script.Append(",resizable:false");
            }



            script.Append(",minHeight: " + minHeight.ToString());
            script.Append(",minWidth: " + minWidth.ToString());

            if (modal)
            {
                script.Append(",modal:true");
            }
            else
            {
                script.Append(",modal:false");
            }

            if (minimizable)
            {
                script.Append(",minimizable:true");
            }
            else
            {
                script.Append(",minimizable:false");
            }



            script.Append(",id:'" + this.ClientID + "'");

            bool hasChildren = HasVisibleExtChildren();

            if (hasChildren)
            {
                script.Append("\n ,items:[");

                AddExtItems(script);

                script.Append(" ]  ");
            }

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append("}");


            if (UnMinify)
            {
                script.Append("\n ");
            }


            script.Append(")");


            DidRenderScript = true;
        }
Exemplo n.º 5
0
        public override void RenderControlToScript(StringBuilder script)
        {
            if (DidRenderScript)
            {
                return;
            }

            script.Append("{");
            if (UnMinify)
            {
                script.Append("\n ");
            }

            script.Append("contentEl:'" + this.ClientID + "'");

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append(",id:'tab" + this.ClientID + "'");

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append(",title:'" + this.Title + "'");

            if (this.closable)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",closable:true");
            }

            if ((AutoHeight) && (FixedPixelHeight == 0))
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",autoHeight:true");
            }

            if (FixedPixelHeight > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",height:'" + FixedPixelHeight.ToString() + "'");
            }

            if ((AutoWidth) && (FixedPixelWidth == 0))
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",autoWidth:true");
            }

            if (FixedPixelWidth > 0)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",width:" + FixedPixelWidth.ToString());
            }

            if (AutoScroll)
            {
                if (UnMinify)
                {
                    script.Append("\n ");
                }
                script.Append(",autoScroll:true");
            }

            if (UnMinify)
            {
                script.Append("\n ");
            }
            script.Append("}");

            DidRenderScript = true;
        }
Exemplo n.º 6
0
        public override void RenderControlToScript(StringBuilder script)
        {
            if (DidRenderScript)
            {
                return;
            }

            script.Append(" {  ");
            script.Append("contentEl:'" + this.ClientID + "'  ");
            script.Append(", title: '" + this.Title + "' ");

            if (region.Length > 0)
            {
                script.Append(", region: '" + region + "'");
            }

            if (layout.Length > 0)
            {
                script.Append(", layout: '" + layout + "'");
            }

            if (ctCls.Length > 0)
            {
                script.Append(", ctCls: '" + ctCls + "'");
            }

            if ((AutoHeight) && (FixedPixelHeight == 0))
            {
                script.Append(", autoHeight:true  ");
            }

            if (FixedPixelHeight > 0)
            {
                script.Append(", height: '" + FixedPixelHeight.ToString() + "'");
            }

            if ((AutoWidth) && (FixedPixelWidth == 0))
            {
                script.Append(", autoWidth:true  ");
            }

            if (FixedPixelWidth > 0)
            {
                script.Append(", width: " + FixedPixelWidth.ToString());
            }

            if (collapsible)
            {
                script.Append(", collapsible: true ");
            }

            if (AutoScroll)
            {
                script.Append(", autoScroll: true ");
            }

            if (IconCls.Length > 0)
            {
                script.Append(", iconCls: '" + IconCls + "' ");
            }

            if (!Border)
            {
                script.Append(", border: false ");
            }

            script.Append(" } ");

            DidRenderScript = true;
        }