Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Fixed an issue with setting confidence before selecting model crashes program, forgot to upload update changes so included UserController updates.
  • Loading branch information
Babyhamsta authored Oct 28, 2023
1 parent 4e01b58 commit 232de37
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 15 additions & 3 deletions AimmyWPF/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,21 @@ void LoadSettingsMenu()
AIMinimumConfidence.Slider.TickFrequency = 1;
AIMinimumConfidence.Slider.ValueChanged += (s, x) =>
{
double ConfVal = ((double)AIMinimumConfidence.Slider.Value);
aimmySettings["AI_Min_Conf"] = ConfVal;
_onnxModel.ConfidenceThreshold = (float)(ConfVal / 100.0f);
if (lastLoadedModel != "N/A")
{
double ConfVal = ((double)AIMinimumConfidence.Slider.Value);
aimmySettings["AI_Min_Conf"] = ConfVal;
_onnxModel.ConfidenceThreshold = (float)(ConfVal / 100.0f);
}
else
{
// Prevent double messageboxes..
if (AIMinimumConfidence.Slider.Value != aimmySettings["AI_Min_Conf"])
{
System.Windows.MessageBox.Show("Unable to set confidence, please select a model and try again.");
AIMinimumConfidence.Slider.Value = aimmySettings["AI_Min_Conf"];
}
}
};

SettingsScroller.Children.Add(AIMinimumConfidence);
Expand Down
6 changes: 3 additions & 3 deletions AimmyWPF/UserController/AInfoSection.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
VerticalAlignment="Top" />
<Label x:Name="Notice"
Foreground="White"
Content="Aimmy is, and will never be for sale."
Content="Aimmy is free, and will never be for sale."
FontFamily="/AimmyWPF;component/Fonts/#Atkinson Hyperlegible"
VerticalContentAlignment="Center"
Padding="5,0,0,0"
Expand Down Expand Up @@ -68,7 +68,7 @@
RenderTransformOrigin="0.602,0.353" />
<Label x:Name="Credit"
Foreground="White"
Content="By BabyHamsta &amp; Nori"
Content="By Babyhamsta &amp; Nori"
FontFamily="/AimmyWPF;component/Fonts/#Atkinson Hyperlegible"
VerticalContentAlignment="Center"
Padding="0,0,0,0"
Expand All @@ -91,7 +91,7 @@
materialDesign:ButtonAssist.CornerRadius="5" />
<Label x:Name="VersionNumber"
Foreground="White"
Content="1.0.0"
Content="1.1.1"
VerticalContentAlignment="Center"
Padding="5,0,0,0"
FontSize="20"
Expand Down

0 comments on commit 232de37

Please sign in to comment.