- Rimossa la sezione "Impostazioni Export" dalla UI e dal code-behind, inclusi controlli, eventi e file legacy di export. - Aggiunta configurazione del livello minimo di log (ErrorOnly, Normal, Informational, Debug, Trace) con guida e legenda colori. - La funzione di log ora filtra i messaggi in base al livello selezionato. - Aggiornati modelli di impostazioni e enum LogLevel per supportare i nuovi livelli. - Refactoring commenti e uniformità sezioni impostazioni. - Migliorata la chiarezza del log di avvio applicazione.
341 lines
17 KiB
XML
341 lines
17 KiB
XML
<Window x:Class="AutoBidder.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="clr-namespace:AutoBidder.Controls"
|
|
Title="AutoBidder 4.0"
|
|
Height="800"
|
|
Width="1400"
|
|
WindowStartupLocation="CenterScreen"
|
|
Background="#1E1E1E"
|
|
Icon="Icon/favicon.ico">
|
|
|
|
<Window.Resources>
|
|
<!-- 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,8"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
</Style>
|
|
|
|
<!-- Tab Button Style (Vertical Sidebar) -->
|
|
<Style x:Key="VerticalTabButton" TargetType="RadioButton">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Border x:Name="border"
|
|
Background="#2D2D30"
|
|
BorderBrush="Transparent"
|
|
BorderThickness="0,0,3,0"
|
|
Padding="20,15"
|
|
Margin="0,5">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock x:Name="icon"
|
|
Text="{TemplateBinding Tag}"
|
|
FontSize="20"
|
|
Margin="0,0,15,0"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="{TemplateBinding Content}"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
Foreground="#CCCCCC"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#3E3E42"/>
|
|
<Setter TargetName="border" Property="BorderBrush" Value="#00D800"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#3E3E42"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="200"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Vertical Sidebar -->
|
|
<Border Grid.Column="0" Background="#252526" BorderBrush="#3E3E42" BorderThickness="0,0,1,0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Navigation Tabs -->
|
|
<StackPanel Grid.Row="0" Margin="0,20,0,0">
|
|
<RadioButton x:Name="TabAsteAttive"
|
|
Content="Aste Attive"
|
|
Tag="🎯"
|
|
Style="{StaticResource VerticalTabButton}"
|
|
IsChecked="True"
|
|
Checked="TabAsteAttive_Checked"/>
|
|
|
|
<RadioButton x:Name="TabBrowser"
|
|
Content="Browser"
|
|
Tag="🌐"
|
|
Style="{StaticResource VerticalTabButton}"
|
|
Checked="TabBrowser_Checked"/>
|
|
|
|
<RadioButton x:Name="TabPuntateGratis"
|
|
Content="Puntate Gratis"
|
|
Tag="🎁"
|
|
Style="{StaticResource VerticalTabButton}"
|
|
Checked="TabPuntateGratis_Checked"/>
|
|
|
|
<RadioButton x:Name="TabDatiStatistici"
|
|
Content="Dati Statistici"
|
|
Tag="📊"
|
|
Style="{StaticResource VerticalTabButton}"
|
|
Checked="TabDatiStatistici_Checked"/>
|
|
|
|
<RadioButton x:Name="TabImpostazioni"
|
|
Content="Impostazioni"
|
|
Tag="⚙️"
|
|
Style="{StaticResource VerticalTabButton}"
|
|
Checked="TabImpostazioni_Checked"/>
|
|
</StackPanel>
|
|
|
|
<!-- User Info Panel - SOPRA AutoBidder - SEMPRE VISIBILE -->
|
|
<Border x:Name="SidebarUserInfoPanel"
|
|
Grid.Row="1"
|
|
Background="#2D2D30"
|
|
BorderBrush="#3E3E42"
|
|
BorderThickness="0,1,0,1"
|
|
Padding="15,12">
|
|
<StackPanel>
|
|
<!-- Riga 1: Username (o "Non connesso") -->
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
|
|
<TextBlock x:Name="SidebarUsernameText"
|
|
Text="Non connesso"
|
|
Foreground="#FF5252"
|
|
FontSize="11"
|
|
FontWeight="SemiBold"
|
|
TextTrimming="CharacterEllipsis"
|
|
Cursor="Hand"
|
|
MouseLeftButtonDown="SidebarUsername_Click"
|
|
ToolTip="Click per gestire la connessione"/>
|
|
</StackPanel>
|
|
|
|
<!-- Riga 2: ID + Email (visibili solo quando connesso) -->
|
|
<StackPanel x:Name="SidebarUserDetailsPanel"
|
|
Orientation="Vertical"
|
|
Visibility="Collapsed">
|
|
<TextBlock x:Name="SidebarUserIdText"
|
|
Text="ID: 6707664"
|
|
Foreground="#666666"
|
|
FontSize="9"
|
|
Margin="0,0,0,2"/>
|
|
<TextBlock x:Name="SidebarUserEmailText"
|
|
Text="email@email.com"
|
|
Foreground="#999999"
|
|
FontSize="9"
|
|
TextTrimming="CharacterEllipsis"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- App Title & Logo (Bottom) -->
|
|
<Border Grid.Row="2" Background="#007ACC" Padding="15,20" BorderBrush="#3E3E42" BorderThickness="0,1,0,0">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
<Image Source="Icon/favicon.ico" Width="24" Height="24" Margin="0,0,10,0"/>
|
|
<TextBlock Text="AutoBidder"
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
Foreground="White"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Content Area -->
|
|
<Grid Grid.Column="1" Background="#1E1E1E">
|
|
<!-- Aste Attive Panel -->
|
|
<controls:AuctionMonitorControl x:Name="AuctionMonitor"
|
|
Visibility="Visible"
|
|
GridStartCommand="{Binding GridStartCommand}"
|
|
GridPauseCommand="{Binding GridPauseCommand}"
|
|
GridStopCommand="{Binding GridStopCommand}"
|
|
GridBidCommand="{Binding GridBidCommand}"
|
|
StartClicked="AuctionMonitor_StartClicked"
|
|
PauseAllClicked="AuctionMonitor_PauseAllClicked"
|
|
StopClicked="AuctionMonitor_StopClicked"
|
|
ExportClicked="AuctionMonitor_ExportClicked"
|
|
AddUrlClicked="AuctionMonitor_AddUrlClicked"
|
|
RemoveUrlClicked="AuctionMonitor_RemoveUrlClicked"
|
|
RemoveAllClicked="AuctionMonitor_RemoveAllClicked"
|
|
MoveUpClicked="AuctionMonitor_MoveUpClicked"
|
|
MoveDownClicked="AuctionMonitor_MoveDownClicked"
|
|
AuctionSelectionChanged="AuctionMonitor_AuctionSelectionChanged"
|
|
CopyUrlClicked="AuctionMonitor_CopyUrlClicked"
|
|
OpenAuctionInternalClicked="AuctionMonitor_OpenAuctionInternalClicked"
|
|
OpenAuctionExternalClicked="AuctionMonitor_OpenAuctionExternalClicked"
|
|
ExportAuctionClicked="AuctionMonitor_ExportAuctionClicked"
|
|
ResetSettingsClicked="AuctionMonitor_ResetSettingsClicked"
|
|
ClearBiddersClicked="AuctionMonitor_ClearBiddersClicked"
|
|
ClearLogClicked="AuctionMonitor_ClearLogClicked"
|
|
ClearGlobalLogClicked="AuctionMonitor_ClearGlobalLogClicked"
|
|
RefreshProductInfoClicked="AuctionMonitor_RefreshProductInfoClicked"
|
|
BidBeforeDeadlineMsChanged="AuctionMonitor_BidBeforeDeadlineMsChanged"
|
|
CheckAuctionOpenChanged="AuctionMonitor_CheckAuctionOpenChanged"
|
|
MinPriceChanged="AuctionMonitor_MinPriceChanged"
|
|
MaxPriceChanged="AuctionMonitor_MaxPriceChanged"
|
|
MaxClicksChanged="AuctionMonitor_MaxClicksChanged"/>
|
|
|
|
<!-- Browser Panel -->
|
|
<controls:BrowserControl x:Name="Browser"
|
|
Visibility="Collapsed"
|
|
BrowserBackClicked="Browser_BrowserBackClicked"
|
|
BrowserForwardClicked="Browser_BrowserForwardClicked"
|
|
BrowserRefreshClicked="Browser_BrowserRefreshClicked"
|
|
BrowserHomeClicked="Browser_BrowserHomeClicked"
|
|
BrowserAddAuctionClicked="Browser_BrowserAddAuctionClicked"/>
|
|
|
|
<!-- Puntate Gratis Panel (PLACEHOLDER STYLE) -->
|
|
<Grid x:Name="PuntateGratisPanel" Visibility="Collapsed" Background="#1E1E1E">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Placeholder -->
|
|
<Border Grid.Row="0" Background="#1E1E1E" Margin="15">
|
|
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<TextBlock Text="🎁"
|
|
FontSize="80"
|
|
Foreground="#3E3E42"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,20"/>
|
|
<TextBlock Text="Puntate Gratis"
|
|
FontSize="24"
|
|
Foreground="#CCCCCC"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,10"/>
|
|
<TextBlock Text="Funzionalità in sviluppo"
|
|
FontSize="16"
|
|
Foreground="#999999"
|
|
HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Control Buttons -->
|
|
<Border Grid.Row="1" Background="#252526" Padding="15" BorderBrush="#3E3E42" BorderThickness="0,1,0,0">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
<Button x:Name="FreeBidsStart"
|
|
Content="▶ Avvia Ricerca"
|
|
Background="#3E3E42"
|
|
Foreground="#666666"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5"
|
|
IsEnabled="False"
|
|
ToolTip="Funzionalità in sviluppo"/>
|
|
|
|
<Button x:Name="FreeBidsStop"
|
|
Content="⏹ Ferma Ricerca"
|
|
Background="#3E3E42"
|
|
Foreground="#666666"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5"
|
|
IsEnabled="False"
|
|
ToolTip="Funzionalità in sviluppo"/>
|
|
|
|
<TextBlock Text="Funzionalità in sviluppo"
|
|
Foreground="#FFB700"
|
|
FontSize="13"
|
|
VerticalAlignment="Center"
|
|
Margin="20,0,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- Statistics Panel (SENZA HEADER VERDE) -->
|
|
<Grid x:Name="StatisticsPanel" Visibility="Collapsed" Background="#1E1E1E">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Placeholder -->
|
|
<Border Grid.Row="0" Background="#1E1E1E" Margin="15">
|
|
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<TextBlock Text="📊"
|
|
FontSize="80"
|
|
Foreground="#3E3E42"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,20"/>
|
|
<TextBlock Text="Analisi Statistiche"
|
|
FontSize="24"
|
|
Foreground="#CCCCCC"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,10"/>
|
|
<TextBlock Text="Funzionalità in sviluppo"
|
|
FontSize="16"
|
|
Foreground="#999999"
|
|
HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Control Buttons -->
|
|
<Border Grid.Row="1" Background="#252526" Padding="15" BorderBrush="#3E3E42" BorderThickness="0,1,0,0">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
<Button Content="🔄 Carica Statistiche"
|
|
Background="#3E3E42"
|
|
Foreground="#666666"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5"
|
|
IsEnabled="False"
|
|
ToolTip="Funzionalità in sviluppo"/>
|
|
|
|
<Button Content="📤 Esporta Dati"
|
|
Background="#3E3E42"
|
|
Foreground="#666666"
|
|
Style="{StaticResource RoundedButton}"
|
|
Margin="5"
|
|
IsEnabled="False"
|
|
ToolTip="Funzionalità in sviluppo"/>
|
|
|
|
<TextBlock Text="Funzionalità in sviluppo"
|
|
Foreground="#FFB700"
|
|
FontSize="13"
|
|
VerticalAlignment="Center"
|
|
Margin="20,0,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- Settings Panel -->
|
|
<controls:SettingsControl x:Name="Settings"
|
|
Visibility="Collapsed"
|
|
SaveDefaultsClicked="Settings_SaveDefaultsClicked"
|
|
CancelDefaultsClicked="Settings_CancelDefaultsClicked"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Window> |