Aggiunta calcolo valore prodotto e miglioramenti UI
Implementato il calcolo del valore reale dei prodotti in asta, includendo il prezzo "Compra Subito", spese di spedizione e risparmio stimato. Aggiunta una nuova sezione "Info Prodotto" nella UI per visualizzare i dettagli estratti e i calcoli. - **AuctionMonitorControl.xaml**: Aggiunta sezione fissa per mostrare informazioni prodotto e calcolo valore. - **AuctionMonitorControl.xaml.cs**: Gestiti eventi per il caricamento e aggiornamento delle informazioni prodotto. - **MainWindow**: Integrati handler per il calcolo e refresh delle informazioni prodotto. - **AuctionInfo.cs**: Aggiunte proprietà per gestire prezzo "Compra Subito", spese di spedizione e limiti di vincita. - **ProductValueCalculator.cs**: Nuova utility per calcolare il valore del prodotto e parsare informazioni dall'HTML. - **AuctionViewModel.cs**: Binding per visualizzare risparmio, costo totale e convenienza nella UI. - **Documentazione**: Aggiornata con dettagli sull'algoritmo di calcolo e layout UI. Fix: - Risolto problema di encoding UTF-8 per emoji nella UI. - Migliorato parsing HTML per prezzi e limiti di vincita. TODO: - Testare parsing su più aste e gestire edge cases. - Implementare caricamento automatico delle informazioni.
This commit is contained in:
@@ -467,6 +467,93 @@
|
||||
Click="ExportAuctionButton_Click"/>
|
||||
</Grid>
|
||||
|
||||
<!-- NUOVA SEZIONE: Info Prodotto - SEZIONE FISSA -->
|
||||
<Border BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
Background="#2D2D30"
|
||||
Padding="10"
|
||||
CornerRadius="4"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel>
|
||||
<!-- Header fisso -->
|
||||
<TextBlock Text="Informazioni Prodotto"
|
||||
FontWeight="Bold"
|
||||
FontSize="12"
|
||||
Foreground="#CCCCCC"
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
<!-- Dati Prodotto -->
|
||||
<Grid x:Name="ProductInfoGrid" Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Valore -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="Valore:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="11"
|
||||
Margin="0,3"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||
x:Name="ProductBuyNowPriceText"
|
||||
Text="-"
|
||||
Foreground="#007ACC"
|
||||
FontSize="11"
|
||||
FontWeight="Bold"
|
||||
Margin="5,3"/>
|
||||
|
||||
<!-- Extra (Spedizione/Transazione) -->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
Text="Extra:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="11"
|
||||
Margin="0,3"
|
||||
ToolTip="Spese di spedizione o transazione"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1"
|
||||
x:Name="ProductShippingCostText"
|
||||
Text="-"
|
||||
Foreground="#FFB700"
|
||||
FontSize="11"
|
||||
Margin="5,3"/>
|
||||
|
||||
<!-- Limite Vincita -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||
Text="Limite:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="11"
|
||||
Margin="0,3"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1"
|
||||
x:Name="ProductWinLimitText"
|
||||
Text="-"
|
||||
Foreground="#999999"
|
||||
FontSize="11"
|
||||
TextWrapping="Wrap"
|
||||
Margin="5,3"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Pulsante Applica Limiti -->
|
||||
<Button x:Name="RefreshProductInfoButton"
|
||||
Content="Applica Limiti Suggeriti"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource SmallRoundedButton}"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10,6"
|
||||
FontSize="11"
|
||||
Margin="0,0,0,0"
|
||||
Click="RefreshProductInfoButton_Click"
|
||||
ToolTip="Calcola e applica limiti Max EUR e Max Clicks basati sul valore del prodotto"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Settings Grid - Campi aggiornati -->
|
||||
<Grid Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
Reference in New Issue
Block a user