Skip to content

Commit

Permalink
rebiew and qodana
Browse files Browse the repository at this point in the history
  • Loading branch information
gablm committed Sep 30, 2024
1 parent 2be2e32 commit 054895a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CollapseLauncher/Classes/GamePropertyVault.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ internal GamePresetProperty(UIElement UIElementParent, RegionResourceProp APIRes
throw new NotSupportedException($"[GamePresetProperty.Ctor] Game type: {GamePreset.GameType} ({GamePreset.ProfileName} - {GamePreset.ZoneName}) is not supported!");
}

_GamePlaytime = new Playtime(_GameVersion);
_GamePlaytime = new Playtime(_GameVersion);
}
}

Expand Down
14 changes: 7 additions & 7 deletions CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2344,10 +2344,10 @@ private async void ChangePlaytimeButton_Click(object sender, RoutedEventArgs e)
{
if (await Dialog_ChangePlaytime(this) != ContentDialogResult.Primary) return;

int Mins = int.Parse("0" + MinutePlaytimeTextBox.Text);
int Hours = int.Parse("0" + HourPlaytimeTextBox.Text);
int mins = int.Parse("0" + MinutePlaytimeTextBox.Text);
int hours = int.Parse("0" + HourPlaytimeTextBox.Text);

TimeSpan time = TimeSpan.FromMinutes(Hours * 60 + Mins);
TimeSpan time = TimeSpan.FromMinutes(hours * 60 + mins);
if (time.Hours > 99999) time = new TimeSpan(99999, 59, 0);

CurrentGameProperty._GamePlaytime.Update(time);
Expand Down Expand Up @@ -2413,16 +2413,16 @@ private void HidePlaytimeStatsFlyout(object sender, PointerRoutedEventArgs e)
*/
PointerPoint pointerPoint = e.GetCurrentPoint(senderAsFrameworkElement);
Point currentCursorPosition = pointerPoint.Position;
if ((currentCursorPosition.X > 0
if (currentCursorPosition.X > 0
&& currentCursorPosition.Y > 0
&& currentCursorPosition.X <= senderAsFrameworkElement.ActualWidth
&& currentCursorPosition.Y <= senderAsFrameworkElement.ActualHeight))
&& currentCursorPosition.X <= senderAsFrameworkElement!.ActualWidth
&& currentCursorPosition.Y <= senderAsFrameworkElement!.ActualHeight)
{
return;
}

// Otherwise, hide the flyout
Flyout flyout = senderAsFrameworkElement.Tag as Flyout;
Flyout flyout = senderAsFrameworkElement!.Tag as Flyout;
flyout!.Hide();
}
#nullable restore
Expand Down

0 comments on commit 054895a

Please sign in to comment.