UI Slice 3: CopyTrading - Zeilenfaerbung, Filter, Offene-Trades-Tab, Master-Grid-Fix

- Geschlossene Trades: Zeilenfaerbung nach PnL-% (TradeRowColoring, pur+getestet: <0 rot,
  0-10% hellgruen, >10% gruen) via DataBindingComplete. Filter-Panel (Designer): Markt (Text),
  Master-Trader (Combo, dynamisch), Ergebnis (Alle/Gewinner/Verlierer), Von/Bis (optionale
  DateTimePicker mit Checkbox), Zuruecksetzen. Summary zeigt gefiltert/gesamt.
- Neuer Tab 'Offene Trades' (OpenTradesView, designerfaehig): alle offenen Positionen aus dem
  Laufzeit-State mit Entry/Aktuell/Wert/Buchgewinn/-% und Status (offen/Exit laeuft), Zeilenfaerbung
  nach Buchgewinn-%, Summenzeile. In CopyTradingMainForm zwischen Master-Trader und Geschlossene eingehaengt.
- Master-Trader-Grid: AutoSizeColumnsMode=Fill + FillWeights -> Spaltenbreiten teilen sich immer die
  Breite (Fix der 'verbuggten' Breiten); RowHeader war bereits aus.

Tests: +8 (TradeRowColoring-Schwellen). Build 0 Fehler, 396 Tests gruen, --smoke-ui gruen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-07-20 20:49:41 +02:00
co-authored by Claude Opus 4.8
parent 25f0d34042
commit 0725a81dbd
13 changed files with 694 additions and 9 deletions
@@ -35,9 +35,22 @@ namespace PolyTrader.Modules.CopyTrading.Ui
this.colClosedAt = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.statusPanel = new System.Windows.Forms.Panel();
this.lblSummary = new System.Windows.Forms.Label();
this.pnlFilters = new System.Windows.Forms.Panel();
this.lblMarkt = new System.Windows.Forms.Label();
this.tbMarket = new System.Windows.Forms.TextBox();
this.lblMaster = new System.Windows.Forms.Label();
this.cbMaster = new System.Windows.Forms.ComboBox();
this.lblErgebnis = new System.Windows.Forms.Label();
this.cbResult = new System.Windows.Forms.ComboBox();
this.lblVon = new System.Windows.Forms.Label();
this.dtFrom = new System.Windows.Forms.DateTimePicker();
this.lblBis = new System.Windows.Forms.Label();
this.dtTo = new System.Windows.Forms.DateTimePicker();
this.btnReset = new System.Windows.Forms.Button();
this.toolbar.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvTrades)).BeginInit();
this.statusPanel.SuspendLayout();
this.pnlFilters.SuspendLayout();
this.SuspendLayout();
//
// toolbar
@@ -210,12 +223,126 @@ namespace PolyTrader.Modules.CopyTrading.Ui
this.lblSummary.Text = "—";
this.lblSummary.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pnlFilters
//
this.pnlFilters.Controls.Add(this.lblMarkt);
this.pnlFilters.Controls.Add(this.tbMarket);
this.pnlFilters.Controls.Add(this.lblMaster);
this.pnlFilters.Controls.Add(this.cbMaster);
this.pnlFilters.Controls.Add(this.lblErgebnis);
this.pnlFilters.Controls.Add(this.cbResult);
this.pnlFilters.Controls.Add(this.lblVon);
this.pnlFilters.Controls.Add(this.dtFrom);
this.pnlFilters.Controls.Add(this.lblBis);
this.pnlFilters.Controls.Add(this.dtTo);
this.pnlFilters.Controls.Add(this.btnReset);
this.pnlFilters.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlFilters.Location = new System.Drawing.Point(0, 25);
this.pnlFilters.Name = "pnlFilters";
this.pnlFilters.Size = new System.Drawing.Size(1100, 34);
this.pnlFilters.TabIndex = 3;
//
// lblMarkt
//
this.lblMarkt.AutoSize = true;
this.lblMarkt.Location = new System.Drawing.Point(6, 9);
this.lblMarkt.Name = "lblMarkt";
this.lblMarkt.Size = new System.Drawing.Size(41, 15);
this.lblMarkt.Text = "Markt:";
//
// tbMarket
//
this.tbMarket.Location = new System.Drawing.Point(51, 6);
this.tbMarket.Name = "tbMarket";
this.tbMarket.PlaceholderText = "Suchtext …";
this.tbMarket.Size = new System.Drawing.Size(200, 23);
this.tbMarket.TabIndex = 0;
//
// lblMaster
//
this.lblMaster.AutoSize = true;
this.lblMaster.Location = new System.Drawing.Point(263, 9);
this.lblMaster.Name = "lblMaster";
this.lblMaster.Size = new System.Drawing.Size(48, 15);
this.lblMaster.Text = "Master:";
//
// cbMaster
//
this.cbMaster.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbMaster.Location = new System.Drawing.Point(315, 6);
this.cbMaster.Name = "cbMaster";
this.cbMaster.Size = new System.Drawing.Size(170, 23);
this.cbMaster.TabIndex = 1;
//
// lblErgebnis
//
this.lblErgebnis.AutoSize = true;
this.lblErgebnis.Location = new System.Drawing.Point(497, 9);
this.lblErgebnis.Name = "lblErgebnis";
this.lblErgebnis.Size = new System.Drawing.Size(58, 15);
this.lblErgebnis.Text = "Ergebnis:";
//
// cbResult
//
this.cbResult.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbResult.Items.AddRange(new object[] { "Alle", "Gewinner", "Verlierer" });
this.cbResult.Location = new System.Drawing.Point(559, 6);
this.cbResult.Name = "cbResult";
this.cbResult.Size = new System.Drawing.Size(110, 23);
this.cbResult.TabIndex = 2;
//
// lblVon
//
this.lblVon.AutoSize = true;
this.lblVon.Location = new System.Drawing.Point(681, 9);
this.lblVon.Name = "lblVon";
this.lblVon.Size = new System.Drawing.Size(31, 15);
this.lblVon.Text = "Von:";
//
// dtFrom
//
this.dtFrom.Checked = false;
this.dtFrom.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dtFrom.Location = new System.Drawing.Point(714, 6);
this.dtFrom.Name = "dtFrom";
this.dtFrom.ShowCheckBox = true;
this.dtFrom.Size = new System.Drawing.Size(120, 23);
this.dtFrom.TabIndex = 3;
//
// lblBis
//
this.lblBis.AutoSize = true;
this.lblBis.Location = new System.Drawing.Point(840, 9);
this.lblBis.Name = "lblBis";
this.lblBis.Size = new System.Drawing.Size(26, 15);
this.lblBis.Text = "Bis:";
//
// dtTo
//
this.dtTo.Checked = false;
this.dtTo.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dtTo.Location = new System.Drawing.Point(868, 6);
this.dtTo.Name = "dtTo";
this.dtTo.ShowCheckBox = true;
this.dtTo.Size = new System.Drawing.Size(120, 23);
this.dtTo.TabIndex = 4;
//
// btnReset
//
this.btnReset.Location = new System.Drawing.Point(994, 5);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(90, 25);
this.btnReset.TabIndex = 5;
this.btnReset.Text = "Zurücksetzen";
this.btnReset.UseVisualStyleBackColor = true;
//
// ClosedTradesView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.dgvTrades);
this.Controls.Add(this.statusPanel);
this.Controls.Add(this.pnlFilters);
this.Controls.Add(this.toolbar);
this.Name = "ClosedTradesView";
this.Size = new System.Drawing.Size(1100, 600);
@@ -223,6 +350,8 @@ namespace PolyTrader.Modules.CopyTrading.Ui
this.toolbar.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvTrades)).EndInit();
this.statusPanel.ResumeLayout(false);
this.pnlFilters.ResumeLayout(false);
this.pnlFilters.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -247,5 +376,17 @@ namespace PolyTrader.Modules.CopyTrading.Ui
private System.Windows.Forms.DataGridViewTextBoxColumn colClosedAt;
private System.Windows.Forms.Panel statusPanel;
private System.Windows.Forms.Label lblSummary;
private System.Windows.Forms.Panel pnlFilters;
private System.Windows.Forms.Label lblMarkt;
private System.Windows.Forms.TextBox tbMarket;
private System.Windows.Forms.Label lblMaster;
private System.Windows.Forms.ComboBox cbMaster;
private System.Windows.Forms.Label lblErgebnis;
private System.Windows.Forms.ComboBox cbResult;
private System.Windows.Forms.Label lblVon;
private System.Windows.Forms.DateTimePicker dtFrom;
private System.Windows.Forms.Label lblBis;
private System.Windows.Forms.DateTimePicker dtTo;
private System.Windows.Forms.Button btnReset;
}
}