Esempio n. 1
0
        public void Login(string steamUserName, SecurePassword steamPassword, string steamWebAPIKey)
        {
            //Check inputs for null (notify if incorrect outside of constructor)
            if (String.IsNullOrEmpty(steamUserName))
            {
                throw new ArgumentNullException("steamUserName");
            }
            if (steamPassword == null)
            {
                throw new ArgumentNullException("steamPassword");
            }
            if (String.IsNullOrEmpty(steamWebAPIKey))
            {
                throw new ArgumentNullException("steamWebAPIKey");
            }

            m_SteamUserName = steamUserName;
            m_SteamPassword = steamPassword;

            //Set the Steam Web API Key as we only need to do this once.
            //This doesn't check whether the key is valid though.
            SteamManager.SteamAPIKey = steamWebAPIKey;

            // Connect to Steam
            m_isRunning = true;
            //Create a thread to manage callbacks
            m_steamKitThread = new Thread(ManageCallbacks);
            m_steamKitThread.IsBackground = true;

            //Start the Callback Manager thread
            m_steamKitThread.Start();
            m_steamClient.Connect();
        }
Esempio n. 2
0
        public static SecurePassword Load()
        {
            SecurePassword password = new SecurePassword();

            password.LoadFromDisk();
            return(password);
        }