/// <summary> /// Return the current list of Outlook workspaces. /// </summary> public List<OutlookKws> GetKwsList() { List<OutlookKws> outlookList = new List<OutlookKws>(); List<KwsBrowserFolderNode> folderList = new List<KwsBrowserFolderNode>(); List<KwsBrowserKwsNode> kwsList = new List<KwsBrowserKwsNode>(); m_wm.UiBroker.Browser.RecursiveList(true, m_wm.UiBroker.Browser.RootNode, folderList, kwsList); foreach (KwsBrowserKwsNode node in kwsList) { Workspace kws = node.Kws; OutlookKws o = new OutlookKws(); outlookList.Add(o); o.InternalID = kws.InternalID; o.ExternalID = kws.CoreData.Credentials.ExternalID; o.KcdAddress = kws.CoreData.Credentials.KasID.Host; o.KwmoAddress = kws.CoreData.Credentials.KwmoAddress; o.KwsName = kws.CoreData.Credentials.KwsName; o.FolderPath = node.Parent.FullPath; o.SecureFlag = kws.CoreData.Credentials.SecureFlag; o.InvitePowerFlag = kws.KwmUser.PrivLevel == UserPrivLevel.Root || (kws.KwmUser.ManagerFlag && !kws.CoreData.Credentials.FreezeFlag) || (kws.KwmUser.AdminFlag && !kws.CoreData.Credentials.DeepFreezeFlag); o.ConnectedFlag = kws.GetRunLevel() == KwsRunLevel.Online; o.PublicFlag = kws.IsPublicKws(); o.FreezeFlag = kws.CoreData.Credentials.FreezeFlag; o.DeepFreezeFlag = kws.CoreData.Credentials.DeepFreezeFlag; o.CreationDate = kws.CoreData.CreationDate; } return outlookList; }
/// <summary> /// Return the current list of Outlook workspaces. /// </summary> public List<OutlookKws> GetKwsList() { List<OutlookKws> outlookList = new List<OutlookKws>(); List<KwsBrowserFolderNode> folderList = new List<KwsBrowserFolderNode>(); List<KwsBrowserKwsNode> kwsList = new List<KwsBrowserKwsNode>(); m_wm.UiBroker.Browser.RecursiveList(true, m_wm.UiBroker.Browser.RootNode, folderList, kwsList); foreach (KwsBrowserKwsNode node in kwsList) { Workspace kws = node.Kws; OutlookKws o = new OutlookKws(); outlookList.Add(o); o.InternalID = kws.InternalID; o.ExternalID = kws.CoreData.Credentials.ExternalID; o.KcdAddress = kws.CoreData.Credentials.KasID.Host; o.KwmoAddress = kws.CoreData.Credentials.KwmoAddress; o.KwsName = kws.CoreData.Credentials.KwsName; o.FolderPath = node.Parent.FullPath; o.SecureFlag = kws.CoreData.Credentials.SecureFlag; o.InviteFlag = kws.CoreData.Credentials.AdminFlag; o.ConnectedFlag = kws.GetRunLevel() == KwsRunLevel.Online; o.PublicFlag = kws.IsPublicKws(); if (kws.CoreData.UserInfo.Creator == null) o.CreationDate = UInt64.MaxValue; else o.CreationDate = kws.CoreData.UserInfo.Creator.InvitationDate; } return outlookList; }