Skip to content

Commit 175c33a

Browse files
committed
v1.3.2
- Added a new loading screen window when changing install paths, as it may take some time to copy and move everything. - Fixed the user being able to change install paths while CodeRed was injected in the game. - Internal code refactoring and improvements.
1 parent 8fe5e3f commit 175c33a

File tree

10 files changed

+750
-63
lines changed

10 files changed

+750
-63
lines changed

Architecture/Path.cs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class Path
1212

1313
private void Initialize(string str)
1414
{
15-
if (!String.IsNullOrEmpty(str))
15+
if (!string.IsNullOrEmpty(str))
1616
{
1717
IndirectPath = str;
1818
IndirectPath = IndirectPath.Replace("/", "\\");
@@ -72,7 +72,7 @@ public void DeleteFile()
7272
// Modifies the current path with the given string. If you wish to return/add on to the path by creating a new one instead of modifying it, see down below for the divide operator overload.
7373
public Path Append(string str)
7474
{
75-
if (!String.IsNullOrEmpty(IndirectPath))
75+
if (!string.IsNullOrEmpty(IndirectPath))
7676
{
7777
if (IndirectPath[IndirectPath.Length - 1] == '\\')
7878
{
@@ -111,7 +111,7 @@ public Path Parent()
111111
{
112112
string parentPath = IndirectPath;
113113

114-
if (!String.IsNullOrEmpty(parentPath))
114+
if (!string.IsNullOrEmpty(parentPath))
115115
{
116116
Int32 parentStart = parentPath.LastIndexOf("\\");
117117
string tempPath = parentPath.Substring(parentStart, parentPath.Length - parentStart);
@@ -168,15 +168,24 @@ public List<Path> GetDirectories()
168168
return returnList;
169169
}
170170

171-
// Returns a NEW path object with a given string, unlike the "append" function this does not modify the input path in any way, example: Path newPath = givenPath / "Debug";
171+
// Returns a new path object with a given string, unlike the "append" function this does not modify the input path in any way, example: Path newPath = givenPath / "Debug";
172172
// Let's say givenPath is equal to "C:\", this operator returns a new path which will be equal to "C:\Debug", auto-formatting the slashes for you.
173-
public static Path operator /(Path a, string b)
173+
public static Path operator/(Path a, string b)
174174
{
175175
Path newPath = new Path();
176176
newPath.Set(a);
177-
//b = b.Replace("/", "\\");
178177
newPath.Append(b);
179178
return newPath;
180179
}
180+
181+
public static bool operator==(Path a, Path b)
182+
{
183+
return (a.GetPath() == b.GetPath());
184+
}
185+
186+
public static bool operator !=(Path a, Path b)
187+
{
188+
return (a.GetPath() != b.GetPath());
189+
}
181190
}
182191
}

CodeRedLauncher.csproj.user

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
<Compile Update="Controls\CROffline.cs">
3232
<SubType>UserControl</SubType>
3333
</Compile>
34+
<Compile Update="Controls\CRPathing.cs">
35+
<SubType>UserControl</SubType>
36+
</Compile>
3437
<Compile Update="Controls\CRPolicy.cs">
3538
<SubType>UserControl</SubType>
3639
</Compile>

Controls/CRPathing.Designer.cs

Lines changed: 188 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)