示例#1
0
        private void HandleOpenKws(WmOutlookRequest request)
        {
            UInt64 kwsID = request.Cmd.Elements[0].UInt64;
            Workspace kws = m_wm.GetKwsByInternalID(kwsID);
            if (kws == null || kws.GetRunLevel() < KwsRunLevel.Offline)
                throw new Exception("the " + Base.GetKwsString() + " cannot be displayed at this time");
            request.SendReply(request.MakeReply(OAnpType.OANP_RES_OK));

            m_wm.UiBroker.RequestShowMainForm();
            m_wm.UiBroker.RequestSelectKws(kws, true);
        }
示例#2
0
        private void HandleIsKwsUser(WmOutlookRequest request)
        {
            UInt64 kwsID = request.Cmd.Elements[0].UInt64;
            UInt32 nbUser = request.Cmd.Elements[1].UInt32;
            List<String> addrList = new List<String>();
            for (UInt32 i = 0; i < nbUser; i++) addrList.Add(request.Cmd.Elements[(int)i + 2].String);

            AnpMsg res = request.MakeReply(OAnpType.OANP_RES_IS_KWS_USER);
            res.AddUInt32(nbUser);
            Workspace kws = m_wm.GetKwsByInternalID(kwsID);

            foreach (String addr in addrList)
            {
                if (kws == null) res.AddUInt32(0);
                else res.AddUInt32(Convert.ToUInt32(kws.CoreData.UserInfo.GetUserByEmailAddress(addr) != null));
            }

            request.SendReply(res);
        }