示例#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);
 }