Skip to content

Commit 60ceb87

Browse files
committed
v1.0.4
1 parent 44c6495 commit 60ceb87

File tree

4 files changed

+42
-60
lines changed

4 files changed

+42
-60
lines changed

Controls/CRNewsPanel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ private void NextBtn_DoubleClick(object sender, EventArgs e)
335335

336336
private void ThumbnailImg_Click(object sender, EventArgs e)
337337
{
338-
Process.Start(new ProcessStartInfo(NewsArticles[CurrentIndex].NewsUrl) { UseShellExecute = true });
338+
if (!String.IsNullOrEmpty(NewsArticles[CurrentIndex].NewsUrl))
339+
{
340+
Process.Start(new ProcessStartInfo(NewsArticles[CurrentIndex].NewsUrl) { UseShellExecute = true });
341+
}
339342
}
340343

341344
private void PreviousBtn_MouseEnter(object sender, EventArgs e)

Forms/MainFrm.cs

Lines changed: 35 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private void ManualInjectBtn_Click(object sender, EventArgs e)
163163

164164
if (processes.Count > 0)
165165
{
166-
LogInjectionResult(LibraryManager.TryLoadIndividual(processes[0], Storage.GetLibraryFile()), true);
166+
LogInjectionResult(LibraryManager.TryLoadIndividual(processes[0], Storage.GetLibraryFile()));
167167
}
168168
}
169169
else
@@ -174,33 +174,12 @@ private void ManualInjectBtn_Click(object sender, EventArgs e)
174174
{
175175
foreach (InjectionResults result in results)
176176
{
177-
LogInjectionResult(result, true);
177+
LogInjectionResult(result);
178178
}
179179
}
180180
}
181181
}
182182

183-
// combobox for player id
184-
// combobox for playlist
185-
// slider for timeframe (or combo)
186-
187-
/*
188-
189-
Data Graph:
190-
- Score [Red]
191-
- Goals [Orange]
192-
- Assists [Yellow]
193-
- Saves [Green]
194-
- Shots [Blue]
195-
- Damage [Purple] (Dropshot only)
196-
197-
MMR Graph:
198-
- Start Line in Center
199-
200-
Bar Graph:
201-
- Goal to shot ratio
202-
*/
203-
204183
private void ReloadSessionsBtn_OnButtonClick(object sender, EventArgs e)
205184
{
206185
Sessions.ParseSessions();
@@ -434,24 +413,31 @@ private void ProcessTmr_Tick(object sender, EventArgs e)
434413
{
435414
LaunchBtn.DisplayText = "Launch (Already Running)";
436415

437-
if (!Updator.IsOutdated())
416+
if (ProcessCtrl.Status != CRProcessPanel.StatusTypes.TYPE_INJECTING)
438417
{
439-
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_RUNNING;
440-
}
441-
else
442-
{
443-
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_OUTDATED;
444-
}
418+
if (!Updator.IsOutdated())
419+
{
420+
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_RUNNING;
421+
ProcessCtrl.Result = InjectionResults.RESULT_NONE;
422+
}
423+
else
424+
{
425+
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_OUTDATED;
426+
ProcessCtrl.Result = InjectionResults.RESULT_NONE;
427+
}
445428

446-
if (Updator.IsOutdated() && Configuration.ShouldPreventInjection())
447-
{
448-
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_OUTDATED;
449-
InjectTmr.Stop();
450-
}
451-
else
452-
{
453-
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_INJECTING;
454-
InjectTmr.Start();
429+
if (Updator.IsOutdated() && Configuration.ShouldPreventInjection())
430+
{
431+
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_OUTDATED;
432+
ProcessCtrl.Result = InjectionResults.RESULT_NONE;
433+
InjectTmr.Stop();
434+
}
435+
else
436+
{
437+
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_INJECTING;
438+
ProcessCtrl.Result = InjectionResults.RESULT_NONE;
439+
InjectTmr.Start();
440+
}
455441
}
456442
}
457443
else
@@ -460,13 +446,15 @@ private void ProcessTmr_Tick(object sender, EventArgs e)
460446
LaunchBtn.DisplayText = "Launch Rocket League";
461447
ManualInjectBtn.Visible = false;
462448
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_NOT_RUNNING;
449+
ProcessCtrl.Result = InjectionResults.RESULT_NONE;
463450
}
464451
}
465452
else
466453
{
467454
ProcessTmr.Stop();
468455
ManualInjectBtn.Visible = false;
469456
ProcessCtrl.Status = CRProcessPanel.StatusTypes.TYPE_DISABLED;
457+
ProcessCtrl.Result = InjectionResults.RESULT_NONE;
470458
}
471459
}
472460

@@ -502,12 +490,10 @@ private void InjectTmr_Tick(object sender, EventArgs e)
502490

503491
if (processes.Count > 0)
504492
{
505-
LogInjectionResult(LibraryManager.TryLoadIndividual(processes[0], Storage.GetLibraryFile()), true);
506-
}
507-
else
508-
{
509-
InjectTmr.Stop();
493+
LogInjectionResult(LibraryManager.TryLoadIndividual(processes[0], Storage.GetLibraryFile()));
510494
}
495+
496+
InjectTmr.Stop();
511497
}
512498
else
513499
{
@@ -517,13 +503,11 @@ private void InjectTmr_Tick(object sender, EventArgs e)
517503
{
518504
foreach (InjectionResults result in results)
519505
{
520-
LogInjectionResult(result, true);
506+
LogInjectionResult(result);
521507
}
522508
}
523-
else
524-
{
525-
InjectTmr.Stop();
526-
}
509+
510+
InjectTmr.Stop();
527511
}
528512
}
529513

@@ -540,12 +524,9 @@ private void UpdateTmr_Tick(object sender, EventArgs e)
540524
}
541525
}
542526

543-
void LogInjectionResult(InjectionResults result, bool bUpdateStatus)
527+
void LogInjectionResult(InjectionResults result)
544528
{
545-
if (bUpdateStatus)
546-
{
547-
ProcessCtrl.Result = result;
548-
}
529+
ProcessCtrl.Result = result;
549530

550531
switch (result)
551532
{

Framework/Assembly.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static class Assembly
1111
private static readonly string Product = "CodeRedLauncher";
1212
private static readonly string Copyright = "Copyright © CodeRedModding 2022";
1313
private static readonly string License = "MIT License";
14-
private static readonly string Version = "1.0.3";
14+
private static readonly string Version = "1.0.4";
1515

1616
public static string GetTitle() { return Title; }
1717
public static string GetDescription() { return Description; }

Framework/Manager.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,8 @@ public static InjectionResults TryLoadIndividual(Process process, Architecture.P
364364
return InjectionResults.RESULT_PROCESS_NOT_FOUND;
365365
}
366366
}
367-
else
368-
{
369-
return InjectionResults.RESULT_LIBRARY_NOT_FOUND;
370-
}
367+
368+
return InjectionResults.RESULT_LIBRARY_NOT_FOUND;
371369
}
372370

373371
private static InjectionResults LoadLibraryInternal(Process process, Architecture.Path libraryFile)

0 commit comments

Comments
 (0)