[DZ平台]主题变更

 效果

         var setTheme = function () {
             Ext.net.DirectMethods.GetThemeUrl(cbTheme.getValue(), {
                 success: function (result) {
                     Ext.net.ResourceMgr.setTheme(result);
                 }
             });
         };
                                     <ext:ComboBox ID="cbTheme" runat="server" Width="120" >
                                                    <Items>
                                                        <ext:ListItem Text="Default" Value="Default"></ext:ListItem>
                                                        <ext:ListItem Text="Slate" Value="Slate"></ext:ListItem>
                                                        <ext:ListItem Text="Gray" Value="Gray"></ext:ListItem>
                                                        <ext:ListItem Text="Access" Value="Access"></ext:ListItem>
                                                    </Items>
                                                    <Listeners>
                                                        <Select Handler="setTheme();" />
                                                    </Listeners>
                                                </ext:ComboBox>
                                    <ext:ToolbarSeparator/>
        [DirectMethod]
        public string GetThemeUrl(string theme)
        {
            Theme temp = (Theme)Enum.Parse(typeof(Theme), theme);
            this.Session["Ext.Net.Theme"] = temp;
            return (temp == Ext.Net.Theme.Default) ? "Default" : X.ResourceManager.GetThemeUrl(temp);
        }



 

你可能感兴趣的:(server,function,String,ext,Access,平台)