示例#1
0
        public void LoginRemoteSystem(string name)
        {
            IRemoteSystem rs = GetRemoteSystem(name);

            if (rs != null)
            {
                rs.Login(rs.Config.UserName, rs.Config.Password, false);
            }
        }
示例#2
0
        public static bool CheckRemoteSystemLogin(IRemoteSystem rs)
        {
            if (rs == null)
            {
                return(false);
            }

            if (!rs.Config.UserName.Equals("") && !rs.Config.Password.Equals("") && !rs.Config.Password.Equals(CommonUtil.ToMD5Str("")))
            {
                rs.Login(rs.Config.UserName, rs.Config.Password, true);
                return(true);
            }
            else
            {
                return(ShowLoginDialog(rs));
            }
        }
示例#3
0
 public void InitRemoteSystems()
 {
     IRemoteSystemConfig[] rsList = mSystemContext.RemoteSystemConfigManager.GetConfigs();
     if (rsList != null)
     {
         foreach (IRemoteSystemConfig config in rsList)
         {
             if (config != null)
             {
                 IRemoteSystem rs = CreateRemoteSystem(config);
                 if (rs != null && config.AutoLogin && !config.UserName.Equals("") && !config.Password.Equals("") && !config.Password.Equals(CommonUtil.ToMD5Str("")))
                 {
                     rs.Login(config.UserName, config.Password, true);
                 }
             }
         }
     }
 }