示例#1
0
        /// <summary>
        /// Fill the values of the server info specified based on the values of
        /// the registry specified.
        /// </summary>
        public static void RegToServerInfo(KwmCfg 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 = 443;
            }

            else
            {
                info.kps_login = "";
                info.kps_secret = "";
                info.kps_net_addr = "";
                info.kps_port_num = 0;
            }
        }
示例#2
0
文件: KwmUtil.cs 项目: tmbx/etkwm
 /// <summary>
 /// Write the values of this instance in the Registry and set this
 /// instance has the current configuration instance.
 /// </summary>
 public void Commit()
 {
     WriteRegistry();
     Cur = this;
 }
示例#3
0
文件: KwmUtil.cs 项目: tmbx/etkwm
 /// <summary>
 /// Return an instance of this class having the values read from the
 /// registry.
 /// </summary>
 public static KwmCfg Spawn()
 {
     KwmCfg self = new KwmCfg();
     self.ReadRegistry();
     return self;
 }
示例#4
0
文件: WmCoreOp.cs 项目: tmbx/kwm-ng
 /// <summary>
 /// Update the registry object specified with the current information.
 /// </summary>
 private void UpdateRegistryObject(KwmCfg cfg)
 {
     cfg.KpsAddr = KpsAddr;
     cfg.KpsUserName = KpsUserName;
     cfg.KpsLoginToken = KpsLoginToken;
     cfg.KpsKcdAddr = KcdAddr;
 }
示例#5
0
文件: WmCoreOp.cs 项目: tmbx/kwm-ng
 /// <summary>
 /// Submit the ticket query to KMOD.
 /// </summary>
 private void SubmitKmodTicketQuery()
 {
     WmLoginTicketQuery ticketQuery = new WmLoginTicketQuery();
     m_kmodQuery = ticketQuery;
     KwmCfg cfg = new KwmCfg();
     UpdateRegistryObject(cfg);
     ticketQuery.Submit(Wm.KmodBroker, cfg, OnKmodTicketResult);
 }
示例#6
0
        /// <summary>
        /// Submit the query using the credentials obtained from the registry
        /// specified.
        /// </summary>
        public void Submit(WmKmodBroker broker, KwmCfg cfg, WmLoginTicketQueryDelegate callback)
        {
            // Set the proper callback.
            Callback2 = callback;

            // Fill out the server information.
            K3p.K3pSetServerInfo ssi = new K3p.K3pSetServerInfo();
            WmK3pServerInfo.RegToServerInfo(cfg, ssi.Info);

            // Submit the query.
            base.Submit(broker, new K3pCmd[] { ssi, new K3p.kpp_get_kws_ticket() }, AnalyseResults);
        }