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; } }
/// <summary> /// 获取最后一次自动登陆steam用户名称 /// </summary> /// <returns></returns> public string GetLastLoginUserName() { return(RegistryKeyHelper.ReadRegistryKey(Registry.CurrentUser, SteamRegistryPath, "AutoLoginUser")); }