Exemple #1
0
        /// <summary>
        /// Fill the values of the server info specified based on the values of
        /// the registry specified.
        /// </summary>
        public static void RegToServerInfo(WmWinRegistry reg, K3p.kpp_server_info info)
        {
            if (reg.CanLoginOnKps())
            {
                info.kps_login = reg.KpsUserName;
                info.kps_secret = reg.KpsLoginToken;
                info.kps_net_addr = reg.KpsAddr;
                info.kps_port_num = reg.KpsPort;
            }

            else
            {
                info.kps_login = "";
                info.kps_secret = "";
                info.kps_net_addr = "";
                info.kps_port_num = 0;
            }
        }
Exemple #2
0
        /// <summary>
        /// If the registry information indicates that we can create a
        /// workspace, this method returns true. Otherwise, it returns false 
        /// and either sends a get ticket query if confirmFlag is true and we
        /// have a login token or goes to the result page otherwise.
        /// </summary>
        private bool CheckCanCreateKws(WmWinRegistry registry, bool confirmFlag)
        {
            Logging.Log(1, "CheckCanCreateKws()");
            bool okFlag = false;
            if (!registry.CanLoginOnKps()) OpRes = KwmCoreKwsOpRes.InvalidCfg;
            else if (!registry.CanCreateKws()) OpRes = KwmCoreKwsOpRes.NoPower;
            else okFlag = true;

            if (!okFlag)
            {
                if (confirmFlag && registry.CanLoginOnKps())
                {
                    m_ih.Wiz.ShowPleaseWait("Getting authorization from SOS server " + registry.KpsAddr + ":" + registry.KpsPort);
                    m_opStep = KwmCoreKwsOpStep.InitialPowerQuery;
                    m_sh.PostLoginTicketQuery(registry, HandleLoginTicketQueryResult);
                }

                else
                {
                    ShowWizardEnd();
                }
            }

            return okFlag;
        }