Le aste non si salvano più in un file JSON per asta più tre archivi da tenere allineati: un solo database SQLite (winsqlite3.dll di Windows via P/Invoke, nessun pacchetto) con prodotti, aste, puntate, interrogazioni coalescenti, reset con profondità del ciclo, nostre puntate, decisioni del motore, misure di rete, puntatori, sessioni e contabilità. Scrittura in coda su un thread dedicato, letture in WAL. Per scelta dell'utente si parte da zero: il database si riempie man mano che si osservano le aste; i vecchi dossier restano leggibili per un'importazione futura ma non si scrivono più. Storico, schede, apprendimento, rigiocata ed esportazioni leggono tutti da lì. Il documento di progetto (Modifiche.txt) tradotto in C# senza librerie: - RiskManager: kill-switch (file KILL_SWITCH, anche dalla barra), HALT persistente per stop-loss e drawdown, tetto del giorno, aste in gioco insieme, contabilità in euro. - Theory: valore atteso con fee, spedizione, valore reale per prodotto (nuova colonna nella scheda Prodotti) e copertura «Compralo Ora»; null-model; sopravvivenza empirica e Kaplan-Meier dai reset; arrivi di Poisson. - Shadow per asta: in Osserva il cecchino arriva allo stesso istante, registra cosa avrebbe fatto e non punta; alla chiusura ogni decisione riceve l'esito, e ShadowReport confronta le policy sugli stessi istanti con intervallo di confidenza sul ROI. - NeuralNet (MLP, Adam) come sfidante del logistico, scelto dal Brier prequenziale; ThompsonBandit come seconda policy che impara dagli esiti delle decisioni; PennyAuctionEnv con avversari tarati sul database e QLearningAgent conservativo; SimulationLab per il confronto fra policy; esportazione CSV delle decisioni con reason_detail. Tutto nella scheda Apprendimento. Ml/LEGGIMI.md riscritto con le avvertenze su termini d'uso, quadro legale e realtà economica, lo schema del database e lo stato delle milestone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
632 lines
27 KiB
C#
632 lines
27 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace AutoBidder.Controls
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for AuctionMonitorControl.xaml
|
|
/// </summary>
|
|
public partial class AuctionMonitorControl : UserControl
|
|
{
|
|
public AuctionMonitorControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
// Dependency Properties per Commands (da bindare al MainWindow)
|
|
public static readonly DependencyProperty GridStartCommandProperty =
|
|
DependencyProperty.Register(nameof(GridStartCommand), typeof(ICommand), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly DependencyProperty GridPauseCommandProperty =
|
|
DependencyProperty.Register(nameof(GridPauseCommand), typeof(ICommand), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly DependencyProperty GridStopCommandProperty =
|
|
DependencyProperty.Register(nameof(GridStopCommand), typeof(ICommand), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly DependencyProperty GridBidCommandProperty =
|
|
DependencyProperty.Register(nameof(GridBidCommand), typeof(ICommand), typeof(AuctionMonitorControl));
|
|
|
|
public ICommand? GridStartCommand
|
|
{
|
|
get => (ICommand?)GetValue(GridStartCommandProperty);
|
|
set => SetValue(GridStartCommandProperty, value);
|
|
}
|
|
|
|
public ICommand? GridPauseCommand
|
|
{
|
|
get => (ICommand?)GetValue(GridPauseCommandProperty);
|
|
set => SetValue(GridPauseCommandProperty, value);
|
|
}
|
|
|
|
public ICommand? GridStopCommand
|
|
{
|
|
get => (ICommand?)GetValue(GridStopCommandProperty);
|
|
set => SetValue(GridStopCommandProperty, value);
|
|
}
|
|
|
|
public ICommand? GridBidCommand
|
|
{
|
|
get => (ICommand?)GetValue(GridBidCommandProperty);
|
|
set => SetValue(GridBidCommandProperty, value);
|
|
}
|
|
|
|
// Event handlers - these will bubble up to MainWindow
|
|
private void StartButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(StartClickedEvent, this));
|
|
}
|
|
|
|
private void PauseAllButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(PauseAllClickedEvent, this));
|
|
}
|
|
|
|
private void StopButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(StopClickedEvent, this));
|
|
}
|
|
|
|
private void KillSwitchToggle_Changed(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(KillSwitchChangedEvent, this));
|
|
}
|
|
|
|
public static readonly RoutedEvent KillSwitchChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"KillSwitchChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public event RoutedEventHandler KillSwitchChanged
|
|
{
|
|
add { AddHandler(KillSwitchChangedEvent, value); }
|
|
remove { RemoveHandler(KillSwitchChangedEvent, value); }
|
|
}
|
|
|
|
private void AddUrlButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(AddUrlClickedEvent, this));
|
|
}
|
|
|
|
private void RemoveUrlButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(RemoveUrlClickedEvent, this));
|
|
}
|
|
|
|
private void RemoveAllButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(RemoveAllClickedEvent, this));
|
|
}
|
|
|
|
private void ExportButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(ExportClickedEvent, this));
|
|
}
|
|
|
|
private void RemoveFinishedButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(RemoveFinishedClickedEvent, this));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Aggiorna i contatori della barra strumenti. Li calcola il chiamante, che ha
|
|
/// l'elenco completo: qui si presentano soltanto.
|
|
/// </summary>
|
|
public void UpdateCounters(int total, int active, int watch, int stopped, int won, int lost)
|
|
{
|
|
PillTotal.Text = total == 1 ? "1 asta" : $"{total} aste";
|
|
PillActive.Text = $"{active} attive";
|
|
PillWatch.Text = $"{watch} osserva";
|
|
PillStopped.Text = $"{stopped} ferme";
|
|
PillWon.Text = $"{won} vinte";
|
|
PillLost.Text = $"{lost} perse";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Stato del motore: traffico prodotto, aggancio all'orologio del server e ritardo
|
|
/// medio di rete. Tutti e tre i valori arrivano già misurati dal chiamante.
|
|
/// </summary>
|
|
public void UpdateEngineStatus(long requestsSent, bool clockSynced, int clockSamples, double avgPingMs)
|
|
{
|
|
RequestsText.Text = requestsSent.ToString("N0");
|
|
|
|
// Senza campioni non c'è nulla da dire: meglio un trattino di un numero finto.
|
|
if (clockSamples == 0)
|
|
{
|
|
ClockText.Text = "—";
|
|
SetClockTone("Brush.TextFaint");
|
|
ClockPill.ToolTip =
|
|
"Nessuna misura: il motore non sta interrogando Bidoo.\n" +
|
|
"Il pallino diventa verde quando l'orologio è agganciato e la rete risponde in fretta.";
|
|
return;
|
|
}
|
|
|
|
ClockText.Text = avgPingMs > 0 ? $"{avgPingMs:F0} ms" : "—";
|
|
|
|
var tone = !clockSynced ? "Brush.Warning" : PingTone(avgPingMs);
|
|
SetClockTone(tone);
|
|
|
|
var sync = clockSynced
|
|
? $"Orologio agganciato al server ({clockSamples} campioni)."
|
|
: $"Orologio in aggancio: {clockSamples} campioni su 3.";
|
|
|
|
ClockPill.ToolTip =
|
|
$"{sync}\n" +
|
|
$"Ritardo medio di rete: {avgPingMs:F0} ms — {PingVerdict(avgPingMs)}.\n" +
|
|
"Tieni l'anticipo puntata sopra questo valore.";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Soglie del ritardo di rete. Sono tarate su ciò che serve al motore: con un
|
|
/// anticipo tipico di qualche centinaio di millisecondi, oltre i 400 ms di
|
|
/// round-trip il margine per arrivare in tempo si assottiglia davvero.
|
|
/// </summary>
|
|
private static string PingTone(double ms) => ms switch
|
|
{
|
|
<= 0 => "Brush.TextFaint",
|
|
< 150 => "Brush.Success",
|
|
< 400 => "Brush.Warning",
|
|
_ => "Brush.Danger"
|
|
};
|
|
|
|
private static string PingVerdict(double ms) => ms switch
|
|
{
|
|
<= 0 => "non misurato",
|
|
< 150 => "rete pronta",
|
|
< 400 => "rete lenta, alza l'anticipo",
|
|
_ => "rete molto lenta, puntate a rischio"
|
|
};
|
|
|
|
private void SetClockTone(string brushKey)
|
|
{
|
|
ClockDot.SetResourceReference(ForegroundProperty, brushKey);
|
|
ClockText.SetResourceReference(ForegroundProperty, brushKey);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Stato del conto: puntate, credito e vincite da confermare.
|
|
///
|
|
/// <para>I valori arrivano annullabili di proposito: finché non si è connessi, o
|
|
/// finché una risposta non è arrivata, la barra mostra un trattino invece di uno
|
|
/// zero. Uno zero inventato è peggio di un dato mancante — è esattamente l'errore
|
|
/// per cui le aste da confermare risultavano sempre nessuna.</para>
|
|
/// </summary>
|
|
public void UpdateAccountStatus(int? remainingBids, decimal? shopCredit, int? auctionsToConfirm)
|
|
{
|
|
RemainingBidsText.Text = remainingBids?.ToString("N0") ?? "—";
|
|
|
|
ShopCreditText.Text = shopCredit.HasValue ? $"{shopCredit.Value:N2} €" : "— €";
|
|
|
|
if (auctionsToConfirm is > 0)
|
|
{
|
|
BannerAsteDaRiscattare.Text = auctionsToConfirm.Value.ToString("N0");
|
|
ToConfirmPill.Visibility = Visibility.Visible;
|
|
ToConfirmPill.ToolTip = auctionsToConfirm.Value == 1
|
|
? "1 asta vinta in attesa di conferma su Bidoo"
|
|
: $"{auctionsToConfirm.Value} aste vinte in attesa di conferma su Bidoo";
|
|
}
|
|
else
|
|
{
|
|
ToConfirmPill.Visibility = Visibility.Collapsed;
|
|
}
|
|
}
|
|
|
|
/// <summary>Contatori del motore relativi alla sola asta selezionata.</summary>
|
|
public void UpdateSelectedStats(int resets, int myBids, double avgPingMs, long polls, long pollErrors)
|
|
{
|
|
StatResets.Text = resets.ToString();
|
|
StatMyBids.Text = myBids.ToString();
|
|
StatPing.Text = avgPingMs > 0 ? $"{avgPingMs:F0} ms" : "—";
|
|
StatPolls.Text = polls.ToString("N0");
|
|
StatPollErrors.Text = pollErrors.ToString("N0");
|
|
StatPollErrors.SetResourceReference(ForegroundProperty,
|
|
pollErrors > 0 ? "Brush.Warning" : "Brush.Text");
|
|
}
|
|
|
|
/// <summary>Verdetto di convenienza nella scheda Prodotto.</summary>
|
|
public void SetVerdict(string label, string value, string tone)
|
|
{
|
|
VerdictLabel.Text = label;
|
|
VerdictText.Text = value;
|
|
VerdictText.SetResourceReference(ForegroundProperty, tone switch
|
|
{
|
|
"ok" => "Brush.Success",
|
|
"danger" => "Brush.Danger",
|
|
_ => "Brush.Text"
|
|
});
|
|
}
|
|
|
|
private void MultiAuctionsGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
// Forza il focus sul DataGrid quando viene selezionata una riga
|
|
// Questo assicura che il tasto Canc venga catturato
|
|
if (sender is DataGrid grid && grid.SelectedItem != null)
|
|
{
|
|
// Attende che il rendering sia completo prima di dare il focus
|
|
grid.Dispatcher.BeginInvoke(new Action(() =>
|
|
{
|
|
if (!grid.IsFocused)
|
|
{
|
|
grid.Focus();
|
|
System.Diagnostics.Debug.WriteLine("[FOCUS] DataGrid ora ha il focus keyboard");
|
|
}
|
|
}), System.Windows.Threading.DispatcherPriority.Background);
|
|
}
|
|
|
|
RaiseEvent(new RoutedEventArgs(AuctionSelectionChangedEvent, this));
|
|
}
|
|
|
|
// Usato PreviewKeyDown invece di KeyDown per catturare l'evento prima che venga consumato
|
|
private void MultiAuctionsGrid_PreviewKeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
if (e.Key == Key.Delete && MultiAuctionsGrid.SelectedItem != null)
|
|
{
|
|
System.Diagnostics.Debug.WriteLine("[DELETE KEY] Tasto Canc premuto su asta selezionata");
|
|
|
|
// Lancia direttamente l'evento senza chiedere conferma
|
|
// La conferma verr� mostrata dal gestore RemoveUrlButton_Click
|
|
System.Diagnostics.Debug.WriteLine("[DELETE KEY] Lancio evento RemoveUrlClicked");
|
|
RaiseEvent(new RoutedEventArgs(RemoveUrlClickedEvent, this));
|
|
|
|
// Previeni che l'evento venga gestito da altri controlli
|
|
e.Handled = true;
|
|
}
|
|
// NUOVO: Gestione esplicita frecce Su/Gi� per navigazione
|
|
else if (e.Key == Key.Up && MultiAuctionsGrid.Items.Count > 0)
|
|
{
|
|
int currentIndex = MultiAuctionsGrid.SelectedIndex;
|
|
if (currentIndex > 0)
|
|
{
|
|
MultiAuctionsGrid.SelectedIndex = currentIndex - 1;
|
|
MultiAuctionsGrid.ScrollIntoView(MultiAuctionsGrid.SelectedItem);
|
|
e.Handled = true; // Previeni ridimensionamento pannelli
|
|
}
|
|
}
|
|
else if (e.Key == Key.Down && MultiAuctionsGrid.Items.Count > 0)
|
|
{
|
|
int currentIndex = MultiAuctionsGrid.SelectedIndex;
|
|
if (currentIndex < MultiAuctionsGrid.Items.Count - 1)
|
|
{
|
|
MultiAuctionsGrid.SelectedIndex = currentIndex + 1;
|
|
MultiAuctionsGrid.ScrollIntoView(MultiAuctionsGrid.SelectedItem);
|
|
e.Handled = true; // Previeni ridimensionamento pannelli
|
|
}
|
|
}
|
|
}
|
|
|
|
private void MoveUpButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(MoveUpClickedEvent, this));
|
|
}
|
|
|
|
private void MoveDownButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(MoveDownClickedEvent, this));
|
|
}
|
|
|
|
private void CopyAuctionUrlButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(CopyUrlClickedEvent, this));
|
|
}
|
|
|
|
private void ResetSettingsButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(ResetSettingsClickedEvent, this));
|
|
}
|
|
|
|
private void ClearBiddersButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(ClearBiddersClickedEvent, this));
|
|
}
|
|
|
|
private void ClearLogButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(ClearLogClickedEvent, this));
|
|
}
|
|
|
|
private void ClearGlobalLogButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(ClearGlobalLogClickedEvent, this));
|
|
}
|
|
|
|
private void OpenAuctionInternalButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(OpenAuctionInternalClickedEvent, this));
|
|
}
|
|
|
|
private void OpenAuctionExternalButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(OpenAuctionExternalClickedEvent, this));
|
|
}
|
|
|
|
private void ExportAuctionButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(ExportAuctionClickedEvent, this));
|
|
}
|
|
|
|
private void RefreshProductInfoButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(RefreshProductInfoClickedEvent, this));
|
|
}
|
|
|
|
private void ConnectionStatusButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(ConnectionStatusClickedEvent, this));
|
|
}
|
|
|
|
private void SelectedBidBeforeDeadlineMs_TextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(BidBeforeDeadlineMsChangedEvent, this));
|
|
}
|
|
|
|
private void SelectedMinPrice_TextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(MinPriceChangedEvent, this));
|
|
}
|
|
|
|
private void SelectedMaxPrice_TextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(MaxPriceChangedEvent, this));
|
|
}
|
|
|
|
private void SelectedMaxClicks_TextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(MaxClicksChangedEvent, this));
|
|
}
|
|
|
|
private void SelectedMaxSpend_TextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(MaxSpendChangedEvent, this));
|
|
}
|
|
|
|
private void SelectedStopAtBreakEven_Changed(object sender, RoutedEventArgs e)
|
|
{
|
|
RaiseEvent(new RoutedEventArgs(BreakEvenChangedEvent, this));
|
|
}
|
|
|
|
// Routed Events
|
|
public static readonly RoutedEvent MaxSpendChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"MaxSpendChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent BreakEvenChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"BreakEvenChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent StartClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"StartClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent PauseAllClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"PauseAllClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent StopClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"StopClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent AddUrlClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"AddUrlClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent RemoveUrlClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"RemoveUrlClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent RemoveFinishedClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"RemoveFinishedClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent RemoveAllClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"RemoveAllClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent ExportClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"ExportClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent AuctionSelectionChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"AuctionSelectionChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent CopyUrlClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"CopyUrlClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent ResetSettingsClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"ResetSettingsClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent ClearBiddersClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"ClearBiddersClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent ClearLogClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"ClearLogClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent ClearGlobalLogClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"ClearGlobalLogClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent BidBeforeDeadlineMsChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"BidBeforeDeadlineMsChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent MinPriceChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"MinPriceChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent MaxPriceChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"MaxPriceChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent MaxClicksChangedEvent = EventManager.RegisterRoutedEvent(
|
|
"MaxClicksChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent OpenAuctionInternalClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"OpenAuctionInternalClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent OpenAuctionExternalClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"OpenAuctionExternalClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent ExportAuctionClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"ExportAuctionClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent RefreshProductInfoClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"RefreshProductInfoClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent ConnectionStatusClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"ConnectionStatusClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
// NUOVO: Eventi per riordinamento aste
|
|
public static readonly RoutedEvent MoveUpClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"MoveUpClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public static readonly RoutedEvent MoveDownClickedEvent = EventManager.RegisterRoutedEvent(
|
|
"MoveDownClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AuctionMonitorControl));
|
|
|
|
public event RoutedEventHandler StartClicked
|
|
{
|
|
add { AddHandler(StartClickedEvent, value); }
|
|
remove { RemoveHandler(StartClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler PauseAllClicked
|
|
{
|
|
add { AddHandler(PauseAllClickedEvent, value); }
|
|
remove { RemoveHandler(PauseAllClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler StopClicked
|
|
{
|
|
add { AddHandler(StopClickedEvent, value); }
|
|
remove { RemoveHandler(StopClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler AddUrlClicked
|
|
{
|
|
add { AddHandler(AddUrlClickedEvent, value); }
|
|
remove { RemoveHandler(AddUrlClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler RemoveUrlClicked
|
|
{
|
|
add { AddHandler(RemoveUrlClickedEvent, value); }
|
|
remove { RemoveHandler(RemoveUrlClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler RemoveAllClicked
|
|
{
|
|
add { AddHandler(RemoveAllClickedEvent, value); }
|
|
remove { RemoveHandler(RemoveAllClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler RemoveFinishedClicked
|
|
{
|
|
add { AddHandler(RemoveFinishedClickedEvent, value); }
|
|
remove { RemoveHandler(RemoveFinishedClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler ExportClicked
|
|
{
|
|
add { AddHandler(ExportClickedEvent, value); }
|
|
remove { RemoveHandler(ExportClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler AuctionSelectionChanged
|
|
{
|
|
add { AddHandler(AuctionSelectionChangedEvent, value); }
|
|
remove { RemoveHandler(AuctionSelectionChangedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler CopyUrlClicked
|
|
{
|
|
add { AddHandler(CopyUrlClickedEvent, value); }
|
|
remove { RemoveHandler(CopyUrlClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler ResetSettingsClicked
|
|
{
|
|
add { AddHandler(ResetSettingsClickedEvent, value); }
|
|
remove { RemoveHandler(ResetSettingsClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler ClearBiddersClicked
|
|
{
|
|
add { AddHandler(ClearBiddersClickedEvent, value); }
|
|
remove { RemoveHandler(ClearBiddersClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler ClearLogClicked
|
|
{
|
|
add { AddHandler(ClearLogClickedEvent, value); }
|
|
remove { RemoveHandler(ClearLogClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler ClearGlobalLogClicked
|
|
{
|
|
add { AddHandler(ClearGlobalLogClickedEvent, value); }
|
|
remove { RemoveHandler(ClearGlobalLogClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler BidBeforeDeadlineMsChanged
|
|
{
|
|
add { AddHandler(BidBeforeDeadlineMsChangedEvent, value); }
|
|
remove { RemoveHandler(BidBeforeDeadlineMsChangedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler MinPriceChanged
|
|
{
|
|
add { AddHandler(MinPriceChangedEvent, value); }
|
|
remove { RemoveHandler(MinPriceChangedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler MaxPriceChanged
|
|
{
|
|
add { AddHandler(MaxPriceChangedEvent, value); }
|
|
remove { RemoveHandler(MaxPriceChangedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler MaxClicksChanged
|
|
{
|
|
add { AddHandler(MaxClicksChangedEvent, value); }
|
|
remove { RemoveHandler(MaxClicksChangedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler MaxSpendChanged
|
|
{
|
|
add { AddHandler(MaxSpendChangedEvent, value); }
|
|
remove { RemoveHandler(MaxSpendChangedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler BreakEvenChanged
|
|
{
|
|
add { AddHandler(BreakEvenChangedEvent, value); }
|
|
remove { RemoveHandler(BreakEvenChangedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler OpenAuctionInternalClicked
|
|
{
|
|
add { AddHandler(OpenAuctionInternalClickedEvent, value); }
|
|
remove { RemoveHandler(OpenAuctionInternalClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler OpenAuctionExternalClicked
|
|
{
|
|
add { AddHandler(OpenAuctionExternalClickedEvent, value); }
|
|
remove { RemoveHandler(OpenAuctionExternalClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler ExportAuctionClicked
|
|
{
|
|
add { AddHandler(ExportAuctionClickedEvent, value); }
|
|
remove { RemoveHandler(ExportAuctionClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler RefreshProductInfoClicked
|
|
{
|
|
add { AddHandler(RefreshProductInfoClickedEvent, value); }
|
|
remove { RemoveHandler(RefreshProductInfoClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler ConnectionStatusClicked
|
|
{
|
|
add { AddHandler(ConnectionStatusClickedEvent, value); }
|
|
remove { RemoveHandler(ConnectionStatusClickedEvent, value); }
|
|
}
|
|
|
|
// NUOVO: Handler per eventi riordinamento
|
|
public event RoutedEventHandler MoveUpClicked
|
|
{
|
|
add { AddHandler(MoveUpClickedEvent, value); }
|
|
remove { RemoveHandler(MoveUpClickedEvent, value); }
|
|
}
|
|
|
|
public event RoutedEventHandler MoveDownClicked
|
|
{
|
|
add { AddHandler(MoveDownClickedEvent, value); }
|
|
remove { RemoveHandler(MoveDownClickedEvent, value); }
|
|
}
|
|
}
|
|
}
|