예제 #1
0
        public SteamHelper()
        {
            var steamExePath = RegistryKeyHelper.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamExe");
            var steamPath    = RegistryKeyHelper.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "SteamPath");

            if (File.Exists(steamExePath))
            {
                SteamExePath = steamExePath;
            }
            if (Directory.Exists(steamPath))
            {
                SteamPath = steamPath;
            }
        }
예제 #2
0
 /// <summary>
 /// 获取最后一次自动登陆steam用户名称
 /// </summary>
 /// <returns></returns>
 public string GetLastLoginUserName()
 {
     return(RegistryKeyHelper.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "AutoLoginUser"));
 }
예제 #3
0
 /// <summary>
 /// 设置下次登陆steam用户
 /// </summary>
 public void SetCurrentUser(string username)
 {
     RegistryKeyHelper.AddOrUpdateRegistryKey(Registry.CurrentUser, SteamRegistryPath, "AutoLoginUser", username, RegistryValueKind.String);
 }