Aggiornamento alla versione 4.0.0

* Aggiunto `BooleanToOpacityConverter` per gestire opacità dinamica.
* Introdotto nuovo sistema di timing con `BidBeforeDeadlineMs`.
* Aggiunta opzione `CheckAuctionOpenBeforeBid` per maggiore sicurezza.
* Implementato polling adattivo (10ms-1000ms) e cooldown di 800ms.
* Migliorata gestione pulsanti globali con supporto `AUTO-START`/`AUTO-STOP`.
* Fix per il tasto `Canc` e focus automatico sul `DataGrid`.
* Fix per avvio singola asta senza necessità di "Avvia Tutti".
* Aggiornati formati CSV/JSON/XML con nuovi campi.
* Migliorata gestione cookie con endpoint unico `buy_bids.php`.
* Miglioramenti UI/UX: tooltip, formattazione prezzi, feedback visivo.
* Aggiornata documentazione e changelog per la versione 4.0.0.
This commit is contained in:
Alberto Balbo
2025-11-19 18:43:40 +01:00
parent 6036896f7d
commit f017ec0364
27 changed files with 2281 additions and 1069 deletions
+98 -46
View File
@@ -3,11 +3,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:util="clr-namespace:AutoBidder.Utilities"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="1200"
Background="#1E1E1E">
<UserControl.Resources>
<!-- Converters -->
<util:BooleanToOpacityConverter x:Key="BoolToOpacity"/>
<!-- Rounded Button Style -->
<Style x:Key="RoundedButton" TargetType="Button">
<Setter Property="Template">
@@ -51,43 +55,53 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Header -->
<Border Grid.Row="0" Background="#2D2D30" Padding="15" BorderBrush="#3E3E42" BorderThickness="0,0,0,1">
<!-- Header - COMPATTO SU 2 RIGHE -->
<Border Grid.Row="0" Background="#2D2D30" Padding="15,10" BorderBrush="#3E3E42" BorderThickness="0,0,0,1">
<Grid>
<!-- Info Utente (Left) -->
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock x:Name="UsernameText"
Text="Utente: Non configurato"
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Riga 1: Puntate + Credito -->
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,5">
<TextBlock Text="Puntate: "
Foreground="#999999"
FontSize="13"
Margin="0,0,5,0"/>
<TextBlock x:Name="RemainingBidsText"
Text="0"
Foreground="#00D800"
FontSize="13"
FontWeight="SemiBold"
Margin="0,0,0,5"/>
FontWeight="Bold"
Margin="0,0,25,0"/>
<StackPanel Orientation="Horizontal" Margin="0,0,0,3">
<TextBlock Text="Puntate: "
Foreground="#CCCCCC"
FontSize="12"/>
<TextBlock x:Name="RemainingBidsText"
Text="0"
Foreground="#CCCCCC"
FontSize="12"
FontWeight="Bold"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Aste vinte da confermare: "
Foreground="#FFB700"
FontSize="12"/>
<TextBlock x:Name="BannerAsteDaRiscattare"
Text="0"
Foreground="#FFB700"
FontSize="12"
FontWeight="Bold"/>
</StackPanel>
<TextBlock Text="Credito Shop: "
Foreground="#999999"
FontSize="13"
Margin="0,0,5,0"/>
<TextBlock x:Name="ShopCreditText"
Text="EUR 0.00"
Foreground="#00D800"
FontSize="13"
FontWeight="Bold"/>
</StackPanel>
<!-- Riga 2: Aste vinte -->
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Text="Aste vinte da confermare: "
Foreground="#999999"
FontSize="12"
Margin="0,0,5,0"/>
<TextBlock x:Name="BannerAsteDaRiscattare"
Text="0"
Foreground="#FFB700"
FontSize="12"
FontWeight="Bold"/>
</StackPanel>
<!-- Control Buttons (Right) -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<!-- Control Buttons (Right) - Su entrambe le righe -->
<StackPanel Grid.Row="0" Grid.RowSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
<Button x:Name="StartButton"
Content="Avvia Tutti"
Background="#00D800"
@@ -197,7 +211,9 @@
AlternatingRowBackground="#252526"
BorderThickness="0"
SelectionChanged="MultiAuctionsGrid_SelectionChanged"
KeyDown="MultiAuctionsGrid_KeyDown">
PreviewKeyDown="MultiAuctionsGrid_PreviewKeyDown"
Focusable="True"
FocusVisualStyle="{x:Null}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#2D2D30"/>
@@ -239,24 +255,40 @@
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button Content="Avvia"
Command="{Binding DataContext.GridStartCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
IsEnabled="{Binding CanStart}"
Opacity="{Binding CanStart, Converter={StaticResource BoolToOpacity}}"
Background="#00D800"
Style="{StaticResource SmallRoundedButton}"
Padding="6,3"
FontSize="10"
Margin="1"/>
<Button Content="Pausa"
Command="{Binding DataContext.GridPauseCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
IsEnabled="{Binding CanPause}"
Opacity="{Binding CanPause, Converter={StaticResource BoolToOpacity}}"
Background="#FFB700"
Style="{StaticResource SmallRoundedButton}"
Padding="6,3"
FontSize="10"
Margin="1"/>
<Button Content="Ferma"
Command="{Binding DataContext.GridStopCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
IsEnabled="{Binding CanStop}"
Opacity="{Binding CanStop, Converter={StaticResource BoolToOpacity}}"
Background="#E81123"
Style="{StaticResource SmallRoundedButton}"
Padding="6,3"
FontSize="10"
Margin="1"/>
<Button Content="Punta"
Command="{Binding DataContext.GridBidCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
CommandParameter="{Binding}"
IsEnabled="{Binding CanBid}"
Opacity="{Binding CanBid, Converter={StaticResource BoolToOpacity}}"
Background="#9B4F96"
Style="{StaticResource SmallRoundedButton}"
Padding="6,3"
@@ -399,7 +431,7 @@
FontSize="10"/>
</UniformGrid>
<!-- Settings Grid - Campi piu larghi (100px) -->
<!-- Settings Grid - Campi aggiornati -->
<Grid Margin="0,0,0,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
@@ -412,25 +444,33 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Row 1 -->
<TextBlock Grid.Row="0" Grid.Column="0" Text="Timer (s):" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="0" Grid.Column="1" x:Name="SelectedTimerClick" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedTimerClick_TextChanged"/>
<!-- Row 1: Anticipo ms -->
<TextBlock Grid.Row="0" Grid.Column="0" Text="Anticipo (ms):" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center" ToolTip="Millisecondi prima della scadenza per puntare"/>
<TextBox Grid.Row="0" Grid.Column="1" x:Name="SelectedBidBeforeDeadlineMs" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedBidBeforeDeadlineMs_TextChanged"/>
<TextBlock Grid.Row="0" Grid.Column="3" Text="Delay (ms):" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="0" Grid.Column="4" x:Name="SelectedDelayMs" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedDelayMs_TextChanged"/>
<TextBlock Grid.Row="0" Grid.Column="3" Text="Min EUR:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="0" Grid.Column="4" x:Name="SelectedMinPrice" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMinPrice_TextChanged"/>
<!-- Row 2 -->
<TextBlock Grid.Row="1" Grid.Column="0" Text="Min EUR:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="1" x:Name="SelectedMinPrice" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMinPrice_TextChanged"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Max EUR:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="1" x:Name="SelectedMaxPrice" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMaxPrice_TextChanged"/>
<TextBlock Grid.Row="1" Grid.Column="3" Text="Max EUR:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="4" x:Name="SelectedMaxPrice" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMaxPrice_TextChanged"/>
<!-- Row 3 -->
<TextBlock Grid.Row="2" Grid.Column="0" Text="Max Clicks:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="2" Grid.Column="1" x:Name="SelectedMaxClicks" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMaxClicks_TextChanged"/>
<TextBlock Grid.Row="1" Grid.Column="3" Text="Max Clicks:" Foreground="#CCCCCC" FontSize="11" Margin="0,6" VerticalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="4" x:Name="SelectedMaxClicks" Background="#1E1E1E" Foreground="White" BorderBrush="#3E3E42" Padding="6" Margin="5,6" FontSize="11" TextChanged="SelectedMaxClicks_TextChanged"/>
<!-- Row 3: Check Auction Open -->
<CheckBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="5"
x:Name="SelectedCheckAuctionOpen"
Content="Verifica stato asta prima di puntare"
Foreground="#CCCCCC"
FontSize="11"
Margin="0,10,0,0"
Checked="SelectedCheckAuctionOpen_Changed"
Unchecked="SelectedCheckAuctionOpen_Changed"
ToolTip="Aggiunge una chiamata API extra per verificare che l'asta sia ancora aperta"/>
</Grid>
</StackPanel>
</ScrollViewer>
@@ -562,5 +602,17 @@
</Border>
</Grid>
</Grid>
<!-- Hidden user info panel for compatibility -->
<Border x:Name="UserInfoPanel"
Visibility="Collapsed">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="UsernameText" Text=""/>
<TextBlock x:Name="UserIdText" Text=""/>
</StackPanel>
<TextBlock x:Name="UserEmailText" Text=""/>
</StackPanel>
</Border>
</Grid>
</UserControl>