Skip to content

Commit

Permalink
Aggiustamenti interfaccia.
Browse files Browse the repository at this point in the history
  • Loading branch information
gpicchiarelli committed Oct 29, 2023
1 parent 93b727b commit 615fbce
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 12 deletions.
19 changes: 14 additions & 5 deletions AccordaGUItar/AccordaGUItar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,19 @@
<ComboBoxItem Content="Corda 4 - Re [D] - 146.83Hz"/>
<ComboBoxItem Content="Corda 5 - La [A] - 110Hz"/>
<ComboBoxItem Content="Corda 6 - Mi (basso) [E] - 82.41Hz"/>
</ComboBox>

<lvc:AngularGauge Name="gauge" Foreground="White" Margin="10" Grid.Row="5" FromValue="0" Width="200" Height="200" >
</lvc:AngularGauge>

</ComboBox>
<lvc:AngularGauge Name="gauge"
Margin="10" Grid.Row="5"
FromValue="-50"
ToValue="+50"
Width="200"
Height="200"
TicksForeground="White"
Foreground="WhiteSmoke"
FontWeight="Bold" FontSize="16"
SectionsInnerRadius=".6"

>
</lvc:AngularGauge>
</Grid>
</Window>
8 changes: 5 additions & 3 deletions AccordaGUItar/AccordaGUItar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,17 @@ private void AvviaAccordatura()
{
if (FrequenzaAttuale.Text.Trim() != String.Empty)
{
double targetFrequency = GetTargetFrequency();// Ottieni la frequenza target in base alla corda selezionata dal ComboBox
double targetFrequency = GetTargetFrequency(); // Ottieni la frequenza target in base alla corda selezionata dal ComboBox
double currentFrequency = double.Parse(FrequenzaAttuale.Text);

double frequencyDifference = Math.Abs(currentFrequency - targetFrequency);
double differencePercentage = (frequencyDifference / targetFrequency) * 100.0;
double frequencyDifference = currentFrequency - targetFrequency;
double differencePercentage = (frequencyDifference / (targetFrequency / 2)) * 100.0;

const int MaxValue = 100;
int progressValue = MaxValue - (int)differencePercentage;
progressValue = Math.Max(0, Math.Min(MaxValue, progressValue));

gauge.Value = progressValue;
}
}

Expand Down
Binary file modified AccordaGUItar/bin/Debug/net7.0-windows/AccordaGUItar.dll
Binary file not shown.
Binary file modified AccordaGUItar/bin/Debug/net7.0-windows/AccordaGUItar.pdb
Binary file not shown.
Binary file modified AccordaGUItar/obj/Debug/net7.0-windows/AccordaGUItar.baml
Binary file not shown.
Binary file modified AccordaGUItar/obj/Debug/net7.0-windows/AccordaGUItar.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions AccordaGUItar/obj/Debug/net7.0-windows/AccordaGUItar.g.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\AccordaGUItar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "B68DCB6F947EF19C9CAD2AB5C4B95619EB90125D"
#pragma checksum "..\..\..\AccordaGUItar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C125F4B1B1323FEC06295C53C20B95592FC56F6E"
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
Expand Down Expand Up @@ -74,7 +74,7 @@ public partial class AccordaGUI : System.Windows.Window, System.Windows.Markup.I
#line hidden


#line 43 "..\..\..\AccordaGUItar.xaml"
#line 42 "..\..\..\AccordaGUItar.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal LiveCharts.Wpf.AngularGauge gauge;

Expand Down
4 changes: 2 additions & 2 deletions AccordaGUItar/obj/Debug/net7.0-windows/AccordaGUItar.g.i.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\AccordaGUItar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "B68DCB6F947EF19C9CAD2AB5C4B95619EB90125D"
#pragma checksum "..\..\..\AccordaGUItar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C125F4B1B1323FEC06295C53C20B95592FC56F6E"
//------------------------------------------------------------------------------
// <auto-generated>
// Il codice è stato generato da uno strumento.
Expand Down Expand Up @@ -74,7 +74,7 @@ public partial class AccordaGUI : System.Windows.Window, System.Windows.Markup.I
#line hidden


#line 43 "..\..\..\AccordaGUItar.xaml"
#line 42 "..\..\..\AccordaGUItar.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal LiveCharts.Wpf.AngularGauge gauge;

Expand Down
Binary file modified AccordaGUItar/obj/Debug/net7.0-windows/AccordaGUItar.g.resources
Binary file not shown.
Binary file modified AccordaGUItar/obj/Debug/net7.0-windows/AccordaGUItar.pdb
Binary file not shown.
Binary file modified accorda.net/.vs/Accorda/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified accorda.net/.vs/Accorda/v17/.suo
Binary file not shown.

0 comments on commit 615fbce

Please sign in to comment.