Skip to content

Commit 49fd2a1

Browse files
committed
v1.2.6
- Added a new "auto install updates" setting, which will auto download and install updates in the background. - Fixed the windows icon not being the same as the exe icon. - Fixed some capitalization and spelling errors.
1 parent f190dae commit 49fd2a1

21 files changed

Lines changed: 1136 additions & 953 deletions

CodeRedLauncher.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<ApplicationIcon>Icon.ico</ApplicationIcon>
99
<StartupObject>CodeRedLauncher.Program</StartupObject>
1010
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
11+
<NoWin32Manifest>true</NoWin32Manifest>
12+
<ImplicitUsings>disable</ImplicitUsings>
1113
</PropertyGroup>
1214

1315
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

Controls/CRInstall.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Controls/CRInstall.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ public void UpdateTheme()
141141
{
142142
if (DisplayType == InstallLayouts.None)
143143
{
144-
DescriptionLbl.Text = "it looks like this is your first time using codered, we need to download and install a few things first. would you like to customize your install path?";
144+
DescriptionLbl.Text = "It looks like this is your first time using codered, we need to download and install a few things first. Would you like to customize your install path?";
145145
}
146146
else if (DisplayType == InstallLayouts.Downloading)
147147
{
148-
DescriptionLbl.Text = "downloading and installing files, please wait...";
148+
DescriptionLbl.Text = "Downloading and installing files, please wait...";
149149
}
150150

151151
if (ControlType == ControlTheme.Dark)

Controls/CRPolicy.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Controls/CRPolicy.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@
129129
<metadata name="AltBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
130130
<value>True</value>
131131
</metadata>
132+
<metadata name="AcceptBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
133+
<value>True</value>
134+
</metadata>
135+
<metadata name="DenyBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
136+
<value>True</value>
137+
</metadata>
138+
<metadata name="AltBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
139+
<value>True</value>
140+
</metadata>
132141
<metadata name="TitleLbl.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
133142
<value>True</value>
134143
</metadata>

Controls/CRUpdate.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public void UpdateTheme()
183183
}
184184
else if (UpdateType == UpdateLayouts.Downloading)
185185
{
186-
DescriptionLbl.Text = "Downloading and installing updates, please wait...";
186+
DescriptionLbl.Text = "Downloading and installing files, please wait...";
187187
_buttonsEnabled = false;
188188
AcceptBtn.Visible = true;
189189
DenyBtn.Visible = true;
@@ -260,15 +260,19 @@ public void HidePopup()
260260
ButtonsEnabled = true;
261261
}
262262

263-
public void ShowPopup()
263+
public void ShowPopup(bool bNoTopmost = false)
264264
{
265265
this.Visible = true;
266266
this.BringToFront();
267267

268268
if (BoundForm != null)
269269
{
270270
BoundForm.Show();
271-
BoundForm.TopMost = true;
271+
272+
if (!bNoTopmost)
273+
{
274+
BoundForm.TopMost = true;
275+
}
272276
}
273277

274278
if (BoundTitle != null)

Forms/MainFrm.Designer.cs

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

Forms/MainFrm.cs

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ private void AutoCheckUpdatesBx_OnCheckChanged(object sender, EventArgs e)
167167
}
168168
}
169169

170+
private void AutoInstallBx_OnCheckChanged(object sender, EventArgs e)
171+
{
172+
Configuration.AutoInstallUpdates.SetValue(AutoInstallBx.BoxChecked).Save();
173+
}
174+
170175
private void PreventInjectionBx_OnCheckChanged(object sender, EventArgs e)
171176
{
172177
Configuration.PreventInjection.SetValue(PreventInjectionBx.BoxChecked).Save();
@@ -453,7 +458,7 @@ private void ProcessTmr_Tick(object sender, EventArgs e)
453458
{
454459
if (LibraryManager.AnyProcessRunning())
455460
{
456-
LaunchBtn.DisplayText = "launch (already running)";
461+
LaunchBtn.DisplayText = "Launch (Already running)";
457462

458463
if ((ProcessStatusCtrl.DisplayType != StatusTypes.Process_Injecting) && (ProcessStatusCtrl.DisplayType != StatusTypes.Process_Manual))
459464
{
@@ -498,7 +503,7 @@ private void ProcessTmr_Tick(object sender, EventArgs e)
498503
else
499504
{
500505
InjectTmr.Stop();
501-
LaunchBtn.DisplayText = "launch rocket league";
506+
LaunchBtn.DisplayText = "Launch Rocket League";
502507
ManualInjectBtn.SendToBack();
503508
ManualInjectBtn.Visible = false;
504509
LaunchBtn.BringToFront();
@@ -885,6 +890,7 @@ private void ConfigToInterface()
885890
if (Configuration.CheckInitialized())
886891
{
887892
AutoCheckUpdatesBx.BoxChecked = Configuration.ShouldCheckForUpdates();
893+
AutoInstallBx.BoxChecked = Configuration.ShouldAutoInstall();
888894
PreventInjectionBx.BoxChecked = Configuration.ShouldPreventInjection();
889895
RunOnStartupBx.BoxChecked = Configuration.ShouldRunOnStartup();
890896
MinimizeOnStartupBx.BoxChecked = Configuration.ShouldMinimizeOnStartup();
@@ -969,6 +975,7 @@ private void UpdateTheme()
969975
SettingsArtOne.BackgroundImage = (lightMode ? Properties.Resources.TR3_Light : Properties.Resources.TR3_Dark);
970976
SettingsArtTwo.BackgroundImage = (lightMode ? Properties.Resources.BR3_Light : Properties.Resources.BR3_Dark);
971977
AutoCheckUpdatesBx.SetTheme(control, icon);
978+
AutoInstallBx.SetTheme(control, icon);
972979
PreventInjectionBx.SetTheme(control, icon);
973980
RunOnStartupBx.SetTheme(control, icon);
974981
MinimizeOnStartupBx.SetTheme(control, icon);
@@ -1068,7 +1075,14 @@ private async Task<bool> CheckForUpdates(bool bInvalidate, bool bShowPrompt = tr
10681075

10691076
if (bShowPrompt)
10701077
{
1071-
UpdatePopup.ShowPopup();
1078+
if (Configuration.ShouldAutoInstall() && (UpdatePopup.UpdateType != CRUpdate.UpdateLayouts.Running))
1079+
{
1080+
UpdatePopup_ButtonClickAccept(null, null);
1081+
}
1082+
else
1083+
{
1084+
UpdatePopup.ShowPopup();
1085+
}
10721086
}
10731087
}
10741088
else if (!ignoreModule && moduleOutdated)
@@ -1096,7 +1110,14 @@ private async Task<bool> CheckForUpdates(bool bInvalidate, bool bShowPrompt = tr
10961110

10971111
if (bShowPrompt)
10981112
{
1099-
UpdatePopup.ShowPopup();
1113+
if (Configuration.ShouldAutoInstall() && (UpdatePopup.UpdateType != CRUpdate.UpdateLayouts.Running))
1114+
{
1115+
UpdatePopup_ButtonClickAccept(null, null);
1116+
}
1117+
else
1118+
{
1119+
UpdatePopup.ShowPopup();
1120+
}
11001121
}
11011122
}
11021123
else if (launcherOutdated)
@@ -1109,14 +1130,31 @@ private async Task<bool> CheckForUpdates(bool bInvalidate, bool bShowPrompt = tr
11091130
if (bShowPrompt)
11101131
{
11111132
UpdatePopup.UpdateType = CRUpdate.UpdateLayouts.Launcher;
1112-
UpdatePopup.ShowPopup();
1133+
1134+
if (Configuration.ShouldAutoInstall())
1135+
{
1136+
UpdatePopup_ButtonClickAccept(null, null);
1137+
}
1138+
else
1139+
{
1140+
UpdatePopup.ShowPopup();
1141+
}
11131142
}
11141143
}
11151144
else
11161145
{
11171146
UpdateStatusCtrl.DisplayType = StatusTypes.Version_Safe;
11181147
UpdateStatusCtrl.ViewType = StatusViews.Two;
1119-
UpdatePopup.ShowPopup();
1148+
1149+
if (Configuration.ShouldAutoInstall())
1150+
{
1151+
UpdatePopup_ButtonClickAccept(null, null);
1152+
}
1153+
else
1154+
{
1155+
UpdatePopup.ShowPopup();
1156+
}
1157+
11201158
ProcessTmr.Start();
11211159
}
11221160
}

0 commit comments

Comments
 (0)