This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Commit Some basic things working
- Loading branch information
0 parents
commit 02e39ec
Showing
24 changed files
with
1,570 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/.vs | ||
|
||
/Updater/.vs | ||
/Updater/bin | ||
/Updater/obj | ||
|
||
/SteamSwitcher/.vs | ||
/SteamSwitcher/bin | ||
/SteamSwitcher/obj |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Installation: | ||
This copy is a portable version. Just extract the entire folder into a place you won't delete it. | ||
You'll have the option to create a Desktop/Start menu shortcuts in the options menu. | ||
|
||
Find more information on GitHub: https://github.com/MageSneaky/SteamAccountSwitcherCMD | ||
|
||
To use the program, you need the corresponding .NET Framework runtime. Those can be found below: | ||
|
||
.NET 6 Desktop Runtime: | ||
- x64: https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-desktop-6.0.1-windows-x64-installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.IO; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
|
||
|
||
class IniFile | ||
{ | ||
string Path; | ||
string EXE = Assembly.GetExecutingAssembly().GetName().Name; | ||
|
||
[DllImport("kernel32", CharSet = CharSet.Unicode)] | ||
static extern long WritePrivateProfileString(string Section, string Key, string Value, string FilePath); | ||
|
||
[DllImport("kernel32", CharSet = CharSet.Unicode)] | ||
static extern int GetPrivateProfileString(string Section, string Key, string Default, StringBuilder RetVal, int Size, string FilePath); | ||
|
||
public IniFile(string IniPath = null) | ||
{ | ||
Path = new FileInfo(IniPath ?? EXE + ".ini").FullName; | ||
} | ||
|
||
public string Read(string Key, string Section = null) | ||
{ | ||
var RetVal = new StringBuilder(255); | ||
GetPrivateProfileString(Section ?? EXE, Key, "", RetVal, 255, Path); | ||
return RetVal.ToString(); | ||
} | ||
|
||
public void Write(string Key, string Value, string Section = null) | ||
{ | ||
WritePrivateProfileString(Section ?? EXE, Key, Value, Path); | ||
} | ||
|
||
public void DeleteKey(string Key, string Section = null) | ||
{ | ||
Write(Key, null, Section ?? EXE); | ||
} | ||
|
||
public void DeleteSection(string Section = null) | ||
{ | ||
Write(null, null, Section ?? EXE); | ||
} | ||
|
||
public bool KeyExists(string Key, string Section = null) | ||
{ | ||
return Read(Key, Section).Length > 0; | ||
} | ||
} |
Oops, something went wrong.