[CLOSED] How to restore desktop application layout

  1. #1

    [CLOSED] How to restore desktop application layout

    Hi, I have a desktop app and need to save the application layout. when user login, all window should be opened with same size, position and display order. I can find the window's pos & size and visibility but don't know how to get the display order. Is there any method or object that can tell me this info? or do I have to keep track of it by myself?
    Thanks
    -szhang
    Last edited by Daniil; May 13, 2015 at 7:51 AM. Reason: [CLOSED]
  2. #2
    Hi @susanz,

    but don't know how to get the display order. Is there any method or object that can tell me this info?
    Please use Ext.WindowManager.

    There are eachBottomUp and eachTopDown methods which are useful for your scenario.
    http://docs.sencha.com/extjs/5.1/5.1...d-eachBottomUp
    http://docs.sencha.com/extjs/5.1/5.1...od-eachTopDown


    Example
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v3 Example</title>
    
        <script>
            var bottomUpOrder = function () {
                console.log("Bottom up:");
                Ext.WindowManager.eachBottomUp(function (component) {
                    console.log(component.id);
                });
            };
    
            var topDownOrder = function () {
                console.log("Top down:");
                Ext.WindowManager.eachTopDown(function (component) {
                    console.log(component.id);
                });
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Desktop ID="Desktop1" runat="server">
                <TaskBar QuickStartWidth="200">
                    <QuickStart>
                        <ext:Toolbar runat="server">
                            <Items>
                                <ext:Button runat="server" Text="Bottom up order" Handler="bottomUpOrder" />
                                <ext:Button runat="server" Text="Top down order" Handler="topDownOrder" />
                            </Items>
                        </ext:Toolbar>
                    </QuickStart>
    
                </TaskBar>
                <Modules>
                    <ext:DesktopModule ModuleID="DesktopModule1" AutoRun="true">
                        <Window>
                            <ext:Window ID="Window1" runat="server" Title="Window 1" />
                        </Window>
                    </ext:DesktopModule>
    
                    <ext:DesktopModule ModuleID="DesktopModule2" AutoRun="true">
                        <Window>
                            <ext:Window ID="Window2" runat="server" Title="Window 2" />
                        </Window>
                    </ext:DesktopModule>
    
                    <ext:DesktopModule ModuleID="DesktopModule3" AutoRun="true">
                        <Window>
                            <ext:Window ID="Window3" runat="server" Title="Window 3" />
                        </Window>
                    </ext:DesktopModule>
                </Modules>
            </ext:Desktop>
        </form>
    </body>
    </html>
  3. #3
    Hi Daniil, Thank you so much. That is exactly what I am looking for.
    Thanks
    -szhang

Similar Threads

  1. [CLOSED] Maximize Restore
    By vijay.sahu in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 22, 2013, 11:13 AM
  2. Replies: 2
    Last Post: Dec 07, 2011, 4:37 AM
  3. [CLOSED] Restore State?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 20, 2010, 1:58 PM
  4. Save and restore UI states?
    By Zhivko in forum 1.x Help
    Replies: 2
    Last Post: Feb 11, 2010, 10:21 AM
  5. Save and restore between layouts
    By giannik in forum Open Discussions
    Replies: 3
    Last Post: Apr 24, 2008, 3:05 PM

Posting Permissions