coolite toolkit 皮肤扩展尝试

效果不如人意,等有空继续修改dll.

使用代码:

<ext:ComboBox ID="cbTheme" runat="server" EmptyText="选择皮肤" Width="78" Editable="false"
                                                    TypeAhead="true">
                                                    <Items>
                                                        <ext:ListItem Text="淡蓝色(默认)" Value="Default" />
                                                        <ext:ListItem Text="浅灰色皮肤" Value="Gray" />
                                                        <ext:ListItem Text="深蓝色皮肤" Value="Slate" />
                                                        <ext:ListItem Text="粉色" Value="Pink" />
                                                        <ext:ListItem Text="紫色" Value="Purple" />
                                                        <ext:ListItem Text="绿色" Value="Green" />
                                                    </Items>
                                                    <Listeners>
                                                        <Select Handler="Coolite.AjaxMethods.GetThemeUrl(cbTheme.getValue(),{
                                                                success: function (result) {
                                                                    Coolite.Ext.setTheme(result);
                                                                    ExampleTabs.items.each(function (el) {
                                                                        if (!Ext.isEmpty(el.iframe)) {
                                                                            if(!Ext.isEmpty(el.iframe.dom.contentWindow.Coolite))
                                                                            {
                                                                                el.iframe.dom.contentWindow.Coolite.Ext.setTheme(result);
                                                                            }
                                                                        }
                                                                    });
                                                                }
                                                            });" />
                                                    </Listeners>
                                                </ext:ComboBox>

[AjaxMethod]
        public string GetThemeUrl(string theme)
        {
            Theme temp = (Theme)Enum.Parse(typeof(Theme), theme);

            this.Session["Coolite.Theme"] = temp;

            return (temp == Coolite.Ext.Web.Theme.Default) ? "Default" : this.ScriptManager1.GetThemeUrl(temp);
        }

 

界面如下:

coolite toolkit 皮肤扩展尝试_第1张图片

你可能感兴趣的:(tool)