Refactoring e nuove funzionalità per AutoBidder v4.0
* Aggiornamento alla versione 4.0.0 * Refactoring architetturale: introdotte partial classes e UserControls modulari per migliorare manutenibilità e leggibilità. * Aggiunti nuovi UserControls: `AuctionMonitorControl`, `BrowserControl`, `SettingsControl`, `StatisticsControl`. * Introdotto supporto per WebView2 per il browser integrato. * Migliorata gestione delle aste: aggiunta/rimozione tramite URL o ID, configurazione predefinita. * Nuove funzionalità di esportazione: supporto CSV, JSON, XML con opzioni configurabili. * Logging avanzato: codifica colore per severità e auto-scroll. * Tema scuro moderno e miglioramenti UI/UX: sidebar di navigazione, griglie virtualizzate, icone emoji. * Persistenza dati: salvataggio automatico di aste e impostazioni in file JSON. * Documentazione aggiornata: `README.md`, `CHANGELOG.md` e nuovi file di supporto. * Miglioramenti alla sicurezza: cookie di sessione salvati in modo sicuro con DPAPI. * Preparazione per future estensioni: placeholder per funzionalità avanzate e struttura modulare.
This commit is contained in:
@@ -0,0 +1,293 @@
|
||||
<UserControl x:Class="AutoBidder.Controls.SettingsControl"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="800" d:DesignWidth="1200"
|
||||
Background="#1E1E1E">
|
||||
|
||||
<UserControl.Resources>
|
||||
<!-- Modern Button Style -->
|
||||
<Style x:Key="ModernButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="4"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Padding" Value="20,10"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- Section Header Style -->
|
||||
<Style x:Key="SectionHeader" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Margin" Value="0,0,0,15"/>
|
||||
</Style>
|
||||
|
||||
<!-- Label Style -->
|
||||
<Style x:Key="FieldLabel" TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="Margin" Value="0,0,0,5"/>
|
||||
</Style>
|
||||
|
||||
<!-- TextBox Style -->
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Background" Value="#252526"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- CheckBox Style -->
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="Margin" Value="0,6"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- RadioButton Style -->
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="Foreground" Value="#CCCCCC"/>
|
||||
<Setter Property="Margin" Value="0,0,20,0"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- Info Box Style -->
|
||||
<Style x:Key="InfoBox" TargetType="Border">
|
||||
<Setter Property="Background" Value="#2D2D30"/>
|
||||
<Setter Property="BorderBrush" Value="#3E3E42"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="4"/>
|
||||
<Setter Property="Padding" Value="15"/>
|
||||
<Setter Property="Margin" Value="0,10,0,0"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Scrollable Content -->
|
||||
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="30,20">
|
||||
|
||||
<!-- SEZIONE 1: Configurazione Sessione -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Configurazione Sessione"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Cookie di Autenticazione"
|
||||
Style="{StaticResource FieldLabel}"/>
|
||||
|
||||
<TextBox x:Name="SettingsCookieTextBox"
|
||||
Height="100"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,10"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,15">
|
||||
<Button Content="Importa dal Browser"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Margin="0,0,10,0"
|
||||
Click="ImportCookieFromBrowserButton_Click"/>
|
||||
|
||||
<Button Content="Cancella"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Click="CancelCookieButton_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Info Box -->
|
||||
<Border Style="{StaticResource InfoBox}">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Come ottenere la stringa cookie completa:"
|
||||
FontWeight="Bold"
|
||||
Foreground="#00D800"
|
||||
Margin="0,0,0,10"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Foreground="#CCCCCC"
|
||||
FontSize="12"
|
||||
LineHeight="20">
|
||||
1. Apri Chrome e vai su https://it.bidoo.com<LineBreak/>
|
||||
2. Effettua il login con le tue credenziali<LineBreak/>
|
||||
3. Premi F12 per aprire Developer Tools<LineBreak/>
|
||||
4. Vai alla tab "Application" → "Storage" → "Cookies" → "https://it.bidoo.com"<LineBreak/>
|
||||
5. Copia TUTTA la stringa di cookie (seleziona tutti i cookie e copia i valori)<LineBreak/>
|
||||
6. Formato: "cookie1=value1; cookie2=value2; __stattrb=xxxxx; ..."<LineBreak/>
|
||||
7. Incolla la stringa completa qui sopra
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 2: Impostazioni Export -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20"
|
||||
Margin="0,0,0,20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Impostazioni Export"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Percorso di Export"
|
||||
Style="{StaticResource FieldLabel}"/>
|
||||
|
||||
<Grid Margin="0,0,0,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox Grid.Column="0"
|
||||
x:Name="ExportPathTextBox"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,10,0"/>
|
||||
|
||||
<Button Grid.Column="1"
|
||||
x:Name="ExportBrowseButton"
|
||||
Content="Sfoglia"
|
||||
Background="#007ACC"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Click="ExportBrowseButton_Click"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Text="Formato File"
|
||||
Style="{StaticResource FieldLabel}"/>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,20">
|
||||
<RadioButton x:Name="ExtCsv"
|
||||
Content="CSV"
|
||||
GroupName="ExportFormat"
|
||||
IsChecked="True"/>
|
||||
<RadioButton x:Name="ExtJson"
|
||||
Content="JSON"
|
||||
GroupName="ExportFormat"/>
|
||||
<RadioButton x:Name="ExtXml"
|
||||
Content="XML"
|
||||
GroupName="ExportFormat"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Text="Opzioni di Export"
|
||||
Style="{StaticResource FieldLabel}"/>
|
||||
|
||||
<StackPanel>
|
||||
<CheckBox x:Name="IncludeUsedBids"
|
||||
Content="Includi solo puntate utilizzate"
|
||||
IsChecked="True"/>
|
||||
<CheckBox x:Name="IncludeLogs"
|
||||
Content="Includi log delle aste"/>
|
||||
<CheckBox x:Name="IncludeUserBids"
|
||||
Content="Includi storico puntate utenti"
|
||||
IsChecked="True"/>
|
||||
<CheckBox x:Name="IncludeMetadata"
|
||||
Content="Includi metadata delle aste"
|
||||
IsChecked="True"/>
|
||||
<CheckBox x:Name="RemoveAfterExport"
|
||||
Content="Rimuovi aste dopo l'export"/>
|
||||
<CheckBox x:Name="OverwriteExisting"
|
||||
Content="Sovrascrivi file esistenti"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- SEZIONE 3: Impostazioni Predefinite Aste -->
|
||||
<Border Background="#252526"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
Padding="20">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Impostazioni Predefinite Aste"
|
||||
Style="{StaticResource SectionHeader}"/>
|
||||
|
||||
<TextBlock Text="Queste impostazioni verranno applicate automaticamente alle nuove aste."
|
||||
Foreground="#999999"
|
||||
FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Margin="0,0,0,20"/>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="150"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Timer Click (secondi)" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" x:Name="DefaultTimerClick" Text="0" Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Delay (millisecondi)" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="DefaultDelayMs" Text="50" Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Prezzo Minimo (€)" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="DefaultMinPrice" Text="0" Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Prezzo Massimo (€)" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="3" Grid.Column="1" x:Name="DefaultMaxPrice" Text="0" Margin="10,10"/>
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="Max Click" Foreground="#CCCCCC" Margin="0,10" VerticalAlignment="Center"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1" x:Name="DefaultMaxClicks" Text="0" Margin="10,10"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- Fixed Bottom Bar with Save/Cancel -->
|
||||
<Border Grid.Row="1"
|
||||
Background="#2D2D30"
|
||||
BorderBrush="#3E3E42"
|
||||
BorderThickness="0,1,0,0"
|
||||
Padding="30,15">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="Salva"
|
||||
Background="#00D800"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Margin="0,0,10,0"
|
||||
Padding="40,10"
|
||||
Click="SaveAllSettings_Click"/>
|
||||
|
||||
<Button Content="Annulla"
|
||||
Background="#3E3E42"
|
||||
Style="{StaticResource ModernButton}"
|
||||
Padding="40,10"
|
||||
Click="CancelAllSettings_Click"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user