- Aggiunto il pulsante "Rimuovi Tutte" in `AuctionMonitorControl.xaml` per eliminare tutte le aste monitorate. - Implementato il metodo `RemoveAllButton_Click` in `AuctionMonitorControl.xaml.cs` e registrato il nuovo evento routed `RemoveAllClickedEvent`. - Aggiunto il gestore `AuctionMonitor_RemoveAllClicked` in `MainWindow.ControlEvents.cs` e collegato l'evento in `MainWindow.xaml`. - Migliorata la gestione degli errori e aggiunti messaggi di conferma dettagliati. - Introdotti nuovi metodi di utilità per resettare le impostazioni, pulire la lista utenti e il log di un'asta selezionata. - Rimosso codice obsoleto per semplificare la base di codice.
941 lines
57 KiB
XML
941 lines
57 KiB
XML
<UserControl x:Class="AutoBidder.Controls.AuctionMonitorControl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}"
|
|
CornerRadius="8"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Padding" Value="15,10"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
</Style>
|
|
|
|
<!-- Small Rounded Button -->
|
|
<Style x:Key="SmallRoundedButton" TargetType="Button" BasedOn="{StaticResource RoundedButton}">
|
|
<Setter Property="Padding" Value="12,6"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
</Style>
|
|
|
|
<!-- Card Style -->
|
|
<Style x:Key="CardBorder" TargetType="Border">
|
|
<Setter Property="Background" Value="#252526"/>
|
|
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="4"/>
|
|
<Setter Property="Margin" Value="5"/>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header - COMPATTO SU 2 RIGHE -->
|
|
<Border Grid.Row="0" Background="#2D2D30" Padding="15,10" BorderBrush="#3E3E42" BorderThickness="0,0,0,1">
|
|
<Grid>
|
|
<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"/>
|
|
|
|
<!-- ? StackPanel per includere indicatore limite -->
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock x:Name="RemainingBidsText"
|
|
Text="0"
|
|
Foreground="#00D800"
|
|
FontSize="13"
|
|
FontWeight="Bold"
|
|
Margin="0,0,0,0"/>
|
|
|
|
<!-- ? Indicatore limite minimo puntate (solo numero tra parentesi) -->
|
|
<TextBlock x:Name="MinBidsLimitIndicator"
|
|
Text="(20)"
|
|
FontSize="13"
|
|
FontWeight="Bold"
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Visibility="Collapsed"
|
|
ToolTip="Limite minimo puntate attivo"/>
|
|
</StackPanel>
|
|
|
|
<TextBlock Text="Credito Shop: "
|
|
Foreground="#999999"
|
|
FontSize="13"
|
|
Margin="25,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) - 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"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5,0"
|
|
Click="StartButton_Click"/>
|
|
|
|
<Button x:Name="PauseAllButton"
|
|
Content="Pausa Tutti"
|
|
Background="#FFB700"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5,0"
|
|
Click="PauseAllButton_Click"/>
|
|
|
|
<Button x:Name="StopButton"
|
|
Content="Ferma Tutti"
|
|
Background="#E81123"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5,0"
|
|
Click="StopButton_Click"/>
|
|
|
|
<!-- Separator -->
|
|
<Border Width="1"
|
|
Background="#3E3E42"
|
|
Margin="10,5"/>
|
|
|
|
<!-- Export Button -->
|
|
<Button x:Name="ExportButton"
|
|
Content="Esporta"
|
|
Background="#007ACC"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5,0"
|
|
Click="ExportButton_Click"
|
|
ToolTip="Esporta dati aste monitorate"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Main Layout: 2 rows -->
|
|
<Grid Grid.Row="1" Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="5"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- TOP ROW: Auction Grid (2/3) + Global Log (1/3) -->
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="5"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- TOP LEFT: Auction Grid -->
|
|
<Border Grid.Column="0" Style="{StaticResource CardBorder}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Grid Header -->
|
|
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
|
<Grid>
|
|
<TextBlock x:Name="MonitorateTitle"
|
|
Text="Aste monitorate: 0"
|
|
Foreground="#00D800"
|
|
FontSize="14"
|
|
FontWeight="Bold"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Content="Aggiungi"
|
|
x:Name="AddUrlButton"
|
|
Background="#007ACC"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="10,5"
|
|
FontSize="11"
|
|
Margin="3,0"
|
|
Click="AddUrlButton_Click"
|
|
ToolTip="Aggiungi nuova asta"/>
|
|
|
|
<Button Content="Rimuovi"
|
|
x:Name="RemoveUrlButton"
|
|
Background="#3E3E42"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="10,5"
|
|
FontSize="11"
|
|
Margin="3,0"
|
|
Click="RemoveUrlButton_Click"
|
|
ToolTip="Rimuovi asta selezionata"/>
|
|
|
|
<Button Content="Rimuovi Tutte"
|
|
x:Name="RemoveAllButton"
|
|
Background="#E81123"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="10,5"
|
|
FontSize="11"
|
|
Margin="3,0"
|
|
Click="RemoveAllButton_Click"
|
|
ToolTip="Rimuovi tutte le aste monitorate"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Auction DataGrid -->
|
|
<DataGrid Grid.Row="1"
|
|
x:Name="MultiAuctionsGrid"
|
|
AutoGenerateColumns="False"
|
|
SelectionMode="Single"
|
|
CanUserAddRows="False"
|
|
IsReadOnly="True"
|
|
GridLinesVisibility="Horizontal"
|
|
HeadersVisibility="Column"
|
|
Background="#1E1E1E"
|
|
Foreground="#CCCCCC"
|
|
RowBackground="#1E1E1E"
|
|
AlternatingRowBackground="#252526"
|
|
BorderThickness="0"
|
|
SelectionChanged="MultiAuctionsGrid_SelectionChanged"
|
|
PreviewKeyDown="MultiAuctionsGrid_PreviewKeyDown"
|
|
Focusable="True"
|
|
FocusVisualStyle="{x:Null}">
|
|
<DataGrid.ColumnHeaderStyle>
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="Background" Value="#2D2D30"/>
|
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
<Setter Property="Padding" Value="8,6"/>
|
|
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
|
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
|
<Setter Property="FontSize" Value="11"/>
|
|
</Style>
|
|
</DataGrid.ColumnHeaderStyle>
|
|
<DataGrid.CellStyle>
|
|
<Style TargetType="DataGridCell">
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="Padding" Value="8,4"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="FontSize" Value="11"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="#094771"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.CellStyle>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="ID" Binding="{Binding AuctionId}" Width="90"/>
|
|
<DataGridTextColumn Header="Asta" Binding="{Binding Name}" Width="2*"/>
|
|
<DataGridTextColumn Header="Latenza" Binding="{Binding AuctionInfo.PollingLatencyMs}" Width="70"/>
|
|
<DataGridTextColumn Header="Stato" Binding="{Binding StatusDisplay}" Width="100"/>
|
|
<DataGridTextColumn Header="Timer" Binding="{Binding TimerDisplay}" Width="90"/>
|
|
<DataGridTextColumn Header="Prezzo" Binding="{Binding PriceDisplay}" Width="70"/>
|
|
<DataGridTextColumn Header="Ultimo" Binding="{Binding LastBidder}" Width="110"/>
|
|
<DataGridTextColumn Header="Clicks" Binding="{Binding MyClicks}" Width="60"/>
|
|
<DataGridTextColumn Header="Resets" Binding="{Binding ResetCount}" Width="60"/>
|
|
<DataGridTemplateColumn Header="Azioni" Width="260">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<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"
|
|
FontSize="10"
|
|
Margin="1"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Vertical Splitter -->
|
|
<GridSplitter Grid.Column="1"
|
|
Width="5"
|
|
HorizontalAlignment="Stretch"
|
|
Background="#3E3E42"
|
|
ResizeBehavior="PreviousAndNext"/>
|
|
|
|
<!-- TOP RIGHT: Global Log -->
|
|
<Border Grid.Column="2" Style="{StaticResource CardBorder}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
|
<Grid>
|
|
<TextBlock Text="Log Globale"
|
|
Foreground="#00D800"
|
|
FontSize="13"
|
|
FontWeight="Bold"
|
|
VerticalAlignment="Center"/>
|
|
<Button x:Name="ClearGlobalLogButton"
|
|
Content="Pulisci"
|
|
HorizontalAlignment="Right"
|
|
Background="#3E3E42"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="8,4"
|
|
FontSize="10"
|
|
Click="ClearGlobalLogButton_Click"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Log Box -->
|
|
<RichTextBox Grid.Row="1"
|
|
x:Name="LogBox"
|
|
IsReadOnly="True"
|
|
VerticalScrollBarVisibility="Auto"
|
|
Background="#1E1E1E"
|
|
Foreground="#00D800"
|
|
BorderThickness="0"
|
|
FontFamily="Consolas"
|
|
FontSize="10"
|
|
Padding="8"/>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- Horizontal Splitter -->
|
|
<GridSplitter Grid.Row="1"
|
|
Height="5"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="#3E3E42"
|
|
ResizeBehavior="PreviousAndNext"/>
|
|
|
|
<!-- BOTTOM ROW: Settings (1/3) + Bidders (1/3) + Auction Log (1/3) -->
|
|
<Grid Grid.Row="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="5"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="5"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- BOTTOM LEFT: Settings (Impostazioni) -->
|
|
<Border Grid.Column="0" Style="{StaticResource CardBorder}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
|
<TextBlock Text="Impostazioni"
|
|
Foreground="#00D800"
|
|
FontSize="13"
|
|
FontWeight="Bold"/>
|
|
</Border>
|
|
|
|
<!-- Settings Content -->
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Margin="10">
|
|
<TextBlock x:Name="SelectedAuctionName"
|
|
Text="Seleziona un'asta"
|
|
Foreground="White"
|
|
FontSize="13"
|
|
FontWeight="Bold"
|
|
Margin="0,0,0,8"/>
|
|
|
|
<TextBox x:Name="SelectedAuctionUrl"
|
|
IsReadOnly="True"
|
|
Background="#1E1E1E"
|
|
Foreground="#999999"
|
|
BorderBrush="#3E3E42"
|
|
BorderThickness="1"
|
|
Padding="6"
|
|
FontSize="10"
|
|
Margin="0,0,0,8"
|
|
TextWrapping="Wrap"
|
|
MaxHeight="50"/>
|
|
|
|
<!-- Pulsanti azione asta - RIORDINATI E FUNZIONANTI -->
|
|
<Grid Margin="0,0,0,15">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Riga 1: Browser -->
|
|
<Button Grid.Row="0" Grid.Column="0"
|
|
x:Name="OpenAuctionInternalButton"
|
|
Content="Browser Interno"
|
|
Background="#007ACC"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="8,5"
|
|
FontSize="10"
|
|
Margin="0,0,2,3"
|
|
ToolTip="Apri asta nel browser integrato"
|
|
Click="OpenAuctionInternalButton_Click"/>
|
|
|
|
<Button Grid.Row="0" Grid.Column="1"
|
|
x:Name="OpenAuctionExternalButton"
|
|
Content="Browser Esterno"
|
|
Background="#0078D7"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="8,5"
|
|
FontSize="10"
|
|
Margin="2,0,0,3"
|
|
ToolTip="Apri asta nel browser predefinito di sistema"
|
|
Click="OpenAuctionExternalButton_Click"/>
|
|
|
|
<!-- Riga 2: Azioni -->
|
|
<Button Grid.Row="1" Grid.Column="0"
|
|
x:Name="CopyAuctionUrlButton"
|
|
Content="Copia URL"
|
|
Background="#9B4F96"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="8,5"
|
|
FontSize="10"
|
|
Margin="0,0,2,0"
|
|
ToolTip="Copia URL negli appunti"
|
|
Click="CopyAuctionUrlButton_Click"/>
|
|
|
|
<Button Grid.Row="1" Grid.Column="1"
|
|
x:Name="ExportAuctionButton"
|
|
Content="Esporta"
|
|
Background="#106EBE"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="8,5"
|
|
FontSize="10"
|
|
Margin="2,0,0,0"
|
|
ToolTip="Esporta dati asta"
|
|
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>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="100"/>
|
|
<ColumnDefinition Width="15"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="100"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 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="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="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 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>
|
|
|
|
<!-- Footer Button (bottom like other panels) -->
|
|
<Button Grid.Row="2"
|
|
x:Name="ResetSettingsButton"
|
|
Content="Reset"
|
|
Background="#3E3E42"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
HorizontalAlignment="Stretch"
|
|
Margin="5"
|
|
Click="ResetSettingsButton_Click"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Vertical Splitter 1 -->
|
|
<GridSplitter Grid.Column="1"
|
|
Width="5"
|
|
HorizontalAlignment="Stretch"
|
|
Background="#3E3E42"
|
|
ResizeBehavior="PreviousAndNext"/>
|
|
|
|
<!-- BOTTOM CENTER: Tab Control (Utenti + Storia Puntate) -->
|
|
<Border Grid.Column="2" Style="{StaticResource CardBorder}">
|
|
<TabControl Background="#252526" BorderThickness="0">
|
|
<TabControl.Resources>
|
|
<!-- Tab Header Style -->
|
|
<Style TargetType="TabItem">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabItem">
|
|
<Border Name="Border"
|
|
Background="#2D2D30"
|
|
BorderBrush="#3E3E42"
|
|
BorderThickness="0,0,1,0"
|
|
Padding="15,8">
|
|
<ContentPresenter x:Name="ContentSite"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
ContentSource="Header"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="#094771"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="#3E3E42"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
</Style>
|
|
</TabControl.Resources>
|
|
|
|
<!-- Tab 1: Utenti -->
|
|
<TabItem Header="Utenti">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8">
|
|
<TextBlock x:Name="SelectedAuctionBiddersCount"
|
|
Text="Utenti: 0"
|
|
Foreground="#00D800"
|
|
FontSize="13"
|
|
FontWeight="Bold"/>
|
|
</Border>
|
|
|
|
<!-- Bidders Grid -->
|
|
<DataGrid Grid.Row="1"
|
|
x:Name="SelectedAuctionBiddersGrid"
|
|
AutoGenerateColumns="False"
|
|
IsReadOnly="True"
|
|
Background="#1E1E1E"
|
|
Foreground="#CCCCCC"
|
|
RowBackground="#1E1E1E"
|
|
AlternatingRowBackground="#252526"
|
|
GridLinesVisibility="None"
|
|
HeadersVisibility="Column"
|
|
BorderThickness="0"
|
|
FontSize="11">
|
|
<DataGrid.ColumnHeaderStyle>
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="Background" Value="#2D2D30"/>
|
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Padding" Value="8,5"/>
|
|
<Setter Property="FontSize" Value="11"/>
|
|
</Style>
|
|
</DataGrid.ColumnHeaderStyle>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="Utente" Binding="{Binding Username}" Width="*"/>
|
|
<DataGridTextColumn Header="Punt." Binding="{Binding BidCount}" Width="50"/>
|
|
<DataGridTextColumn Header="Ultima" Binding="{Binding LastBidTimeDisplay}" Width="70"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
<!-- Footer Button -->
|
|
<Button Grid.Row="2"
|
|
x:Name="ClearBiddersButton"
|
|
Content="Pulisci"
|
|
Background="#3E3E42"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
HorizontalAlignment="Stretch"
|
|
Margin="5"
|
|
Click="ClearBiddersButton_Click"/>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<!-- Tab 2: Storia Puntate -->
|
|
<TabItem Header="Storia Puntate">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8">
|
|
<TextBlock x:Name="BidHistoryCount"
|
|
Text="Ultime puntate: 0"
|
|
Foreground="#00D800"
|
|
FontSize="13"
|
|
FontWeight="Bold"/>
|
|
</Border>
|
|
|
|
<!-- Storia Puntate Grid -->
|
|
<DataGrid Grid.Row="1"
|
|
x:Name="BidHistoryGrid"
|
|
ItemsSource="{Binding ElementName=MultiAuctionsGrid, Path=SelectedItem.BidHistoryEntries}"
|
|
AutoGenerateColumns="False"
|
|
IsReadOnly="True"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
CanUserResizeRows="False"
|
|
HeadersVisibility="Column"
|
|
GridLinesVisibility="Horizontal"
|
|
HorizontalGridLinesBrush="#3E3E42"
|
|
Background="#1E1E1E"
|
|
Foreground="#CCCCCC"
|
|
BorderThickness="0"
|
|
RowHeight="28">
|
|
|
|
<DataGrid.Columns>
|
|
<!-- Colonna Prezzo -->
|
|
<DataGridTextColumn Header="PREZZO"
|
|
Binding="{Binding PriceFormatted}"
|
|
Width="70">
|
|
<DataGridTextColumn.ElementStyle>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#00D800"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="11"/>
|
|
</Style>
|
|
</DataGridTextColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
|
|
<!-- Colonna Modalita' -->
|
|
<DataGridTextColumn Header="TIPO"
|
|
Binding="{Binding BidType}"
|
|
Width="65">
|
|
<DataGridTextColumn.ElementStyle>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="10"/>
|
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding BidType}" Value="Auto">
|
|
<Setter Property="Foreground" Value="#FFC107"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding BidType}" Value="Manuale">
|
|
<Setter Property="Foreground" Value="#03A9F4"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGridTextColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
|
|
<!-- Colonna Orario -->
|
|
<DataGridTextColumn Header="ORARIO"
|
|
Binding="{Binding TimeFormatted}"
|
|
Width="70">
|
|
<DataGridTextColumn.ElementStyle>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#9E9E9E"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="10"/>
|
|
</Style>
|
|
</DataGridTextColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
|
|
<!-- Colonna Utente -->
|
|
<DataGridTextColumn Header="UTENTE"
|
|
Binding="{Binding Username}"
|
|
Width="*">
|
|
<DataGridTextColumn.ElementStyle>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="Margin" Value="8,0,0,0"/>
|
|
<Setter Property="FontSize" Value="11"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsMyBid}" Value="True">
|
|
<Setter Property="Foreground" Value="#00D800"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGridTextColumn.ElementStyle>
|
|
</DataGridTextColumn>
|
|
</DataGrid.Columns>
|
|
|
|
<!-- Stili righe -->
|
|
<DataGrid.RowStyle>
|
|
<Style TargetType="DataGridRow">
|
|
<Setter Property="Background" Value="#1E1E1E"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#3E3E42"/>
|
|
</Trigger>
|
|
<DataTrigger Binding="{Binding IsMyBid}" Value="True">
|
|
<Setter Property="Background" Value="#1A4D1A"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
|
|
<!-- Stile header -->
|
|
<DataGrid.ColumnHeaderStyle>
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<Setter Property="Background" Value="#252526"/>
|
|
<Setter Property="Foreground" Value="#CCCCCC"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="FontSize" Value="10"/>
|
|
<Setter Property="Padding" Value="8,6"/>
|
|
<Setter Property="BorderThickness" Value="0,0,1,1"/>
|
|
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
</Style>
|
|
</DataGrid.ColumnHeaderStyle>
|
|
</DataGrid>
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Border>
|
|
|
|
<!-- Vertical Splitter 2 -->
|
|
<GridSplitter Grid.Column="3"
|
|
Width="5"
|
|
HorizontalAlignment="Stretch"
|
|
Background="#3E3E42"
|
|
ResizeBehavior="PreviousAndNext"/>
|
|
|
|
<!-- BOTTOM RIGHT: Auction Log -->
|
|
<Border Grid.Column="4" Style="{StaticResource CardBorder}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Border Grid.Row="0" Background="#2D2D30" Padding="10,8" CornerRadius="4,4,0,0">
|
|
<Grid>
|
|
<TextBlock Text="Log Asta"
|
|
Foreground="#00D800"
|
|
FontSize="13"
|
|
FontWeight="Bold"
|
|
VerticalAlignment="Center"/>
|
|
<Button x:Name="ClearLogButton"
|
|
Content="Pulisci"
|
|
HorizontalAlignment="Right"
|
|
Background="#3E3E42"
|
|
Style="{StaticResource SmallRoundedButton}"
|
|
Padding="8,4"
|
|
FontSize="10"
|
|
Click="ClearLogButton_Click"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Auction Log Box -->
|
|
<RichTextBox Grid.Row="1"
|
|
x:Name="SelectedAuctionLog"
|
|
IsReadOnly="True"
|
|
VerticalScrollBarVisibility="Auto"
|
|
Background="#1E1E1E"
|
|
Foreground="#CCCCCC"
|
|
BorderThickness="0"
|
|
FontFamily="Consolas"
|
|
FontSize="10"
|
|
Padding="8"/>
|
|
</Grid>
|
|
</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>
|