﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebDesktop - Get Array of open WebDesktopWindow ID's</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webdesktopwindow-array-of-open-window-ids/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Get Array of open WebDesktopWindow ID's</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webdesktopwindow-array-of-open-window-ids/</link><pubDate>Tue, 05 Jan 2010 22:26:41 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebDesktop</category><category>Open Windows</category><category>Name</category><description>&lt;p&gt;You could retrieve all the windows object of the WebDesktopManager using the Windows property. In order to achieve the scenario, you will need to parse the Name property of the Window object and split the Name on "-" separator. Here is snippet for the client side:&lt;/p&gt;&lt;pre&gt;function AlertClientID() {&lt;br /&gt;    var deskktopMng = ISGetObject("WebDesktopManager1");&lt;br /&gt;&lt;br /&gt;    var idList = new Array();&lt;br /&gt;    var windowList = deskktopMng.Windows;&lt;br /&gt;&lt;br /&gt;    var arrIndex = 0;&lt;br /&gt;    for(var i = 0; i &amp;lt; windowList.length; i&amp;#43;&amp;#43;) {&lt;br /&gt;        var nameComp = windowList[i].Name.split("-");&lt;br /&gt;        if (windowList[i].ClientVisible == true) {&lt;br /&gt;            idList[arrIndex] = nameComp[1];&lt;br /&gt;            arrIndex&amp;#43;&amp;#43;;&lt;br /&gt;        }               &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    alert(idList.join("\r\n"));&lt;br /&gt;    &lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Here is the snippet for the server side:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;ArrayList idList = new ArrayList();&lt;br /&gt;&lt;br /&gt;foreach (WebDesktopWindow wnd in WebDesktopManager1.Windows)&lt;br /&gt;{&lt;br /&gt;    string[] nameComp = wnd.Name.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);&lt;br /&gt;    if(wnd.ClientVisible == true)&lt;br /&gt;        idList.Add(nameComp[1]);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Process arraylist&lt;/pre&gt;
&lt;p&gt;The snippet will only hold the ID of the window which displayed to the user.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Get Array of open WebDesktopWindow ID's</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/webdesktopwindow-array-of-open-window-ids/</link><pubDate>Tue, 05 Jan 2010 12:44:35 GMT</pubDate><dc:creator>alex@millhorn.com</dc:creator><category>WebDesktop</category><category>Open Windows</category><category>Name</category><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;We use the WebDesktopManager to manage details about our clients.  Our WebDesktopWindows are named according the the unique ClientID of the client.  &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;For example, details of client John Doe, with a clientid of 199 would be opened in window:&lt;br /&gt;wndClient-199&lt;/p&gt;
&lt;p&gt;I need to create a function to cycle through all open Windows and return the clientid's of the open clients in an array.  So, with the above example, I need to have a way to have an integer array returned with a size of 1, with an integer value of 199.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thank you in advance&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>