Phase 5-UI: Polymarket-Accounts-Tab (allgemeine Account-Verwaltung)
- tabPage2: DataGridView (Name/Wallet/Demo/Aktiv) + Toolstrip (Neuer Account/ Loeschen) + PropertyGrid. Da AccountState jetzt general-only ist, zeigt das PropertyGrid automatisch nur die allgemeinen Felder (Wallet, API-Keys, Payouts). - SettingsView.cs: Accounts laden, Auswahl -> PropertyGrid, Bearbeiten -> speichern (IAccountRepository + TradingState), Neu/Loeschen. - Program.cs: Settings-View bekommt IAccountRepository + TradingState injiziert. - Copytrading-Detail-Limits folgen im Modul-Account-View. - Build 0 Fehler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
095c4b64aa
commit
87dd9a750d
Generated
+109
@@ -26,9 +26,21 @@ namespace PolyTraderSharp.Ui.Views
|
||||
toolStrip2 = new ToolStrip();
|
||||
btn_save = new ToolStripButton();
|
||||
btn_loadsettings = new ToolStripButton();
|
||||
toolStripAccounts = new ToolStrip();
|
||||
btnAccNew = new ToolStripButton();
|
||||
btnAccDelete = new ToolStripButton();
|
||||
dgvAccounts = new DataGridView();
|
||||
colAccName = new DataGridViewTextBoxColumn();
|
||||
colAccWallet = new DataGridViewTextBoxColumn();
|
||||
colAccDemo = new DataGridViewCheckBoxColumn();
|
||||
colAccActive = new DataGridViewCheckBoxColumn();
|
||||
pgAccount = new PropertyGrid();
|
||||
tabControl1.SuspendLayout();
|
||||
tabPage1.SuspendLayout();
|
||||
tabPage2.SuspendLayout();
|
||||
toolStrip2.SuspendLayout();
|
||||
toolStripAccounts.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dgvAccounts).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// propertyGrid
|
||||
@@ -74,6 +86,9 @@ namespace PolyTraderSharp.Ui.Views
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
tabPage2.Controls.Add(pgAccount);
|
||||
tabPage2.Controls.Add(dgvAccounts);
|
||||
tabPage2.Controls.Add(toolStripAccounts);
|
||||
tabPage2.Location = new Point(4, 34);
|
||||
tabPage2.Name = "tabPage2";
|
||||
tabPage2.Padding = new Padding(3);
|
||||
@@ -108,6 +123,86 @@ namespace PolyTraderSharp.Ui.Views
|
||||
btn_loadsettings.Size = new Size(223, 29);
|
||||
btn_loadsettings.Text = "Load Settings from File";
|
||||
//
|
||||
// toolStripAccounts
|
||||
//
|
||||
toolStripAccounts.ImageScalingSize = new Size(24, 24);
|
||||
toolStripAccounts.Items.AddRange(new ToolStripItem[] { btnAccNew, btnAccDelete });
|
||||
toolStripAccounts.Location = new Point(3, 3);
|
||||
toolStripAccounts.Name = "toolStripAccounts";
|
||||
toolStripAccounts.Size = new Size(1171, 34);
|
||||
toolStripAccounts.TabIndex = 0;
|
||||
//
|
||||
// btnAccNew
|
||||
//
|
||||
btnAccNew.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||
btnAccNew.Name = "btnAccNew";
|
||||
btnAccNew.Size = new Size(130, 29);
|
||||
btnAccNew.Text = "Neuer Account";
|
||||
//
|
||||
// btnAccDelete
|
||||
//
|
||||
btnAccDelete.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||
btnAccDelete.Name = "btnAccDelete";
|
||||
btnAccDelete.Size = new Size(90, 29);
|
||||
btnAccDelete.Text = "Löschen";
|
||||
//
|
||||
// dgvAccounts
|
||||
//
|
||||
dgvAccounts.AllowUserToAddRows = false;
|
||||
dgvAccounts.AllowUserToDeleteRows = false;
|
||||
dgvAccounts.AutoGenerateColumns = false;
|
||||
dgvAccounts.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dgvAccounts.Columns.AddRange(new DataGridViewColumn[] { colAccName, colAccWallet, colAccDemo, colAccActive });
|
||||
dgvAccounts.Dock = DockStyle.Left;
|
||||
dgvAccounts.Location = new Point(3, 37);
|
||||
dgvAccounts.MultiSelect = false;
|
||||
dgvAccounts.Name = "dgvAccounts";
|
||||
dgvAccounts.ReadOnly = true;
|
||||
dgvAccounts.RowHeadersVisible = false;
|
||||
dgvAccounts.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
dgvAccounts.Size = new Size(620, 847);
|
||||
dgvAccounts.TabIndex = 1;
|
||||
//
|
||||
// colAccName
|
||||
//
|
||||
colAccName.DataPropertyName = "Name";
|
||||
colAccName.HeaderText = "Name";
|
||||
colAccName.Name = "colAccName";
|
||||
colAccName.ReadOnly = true;
|
||||
colAccName.Width = 200;
|
||||
//
|
||||
// colAccWallet
|
||||
//
|
||||
colAccWallet.DataPropertyName = "WalletAddress";
|
||||
colAccWallet.HeaderText = "Wallet";
|
||||
colAccWallet.Name = "colAccWallet";
|
||||
colAccWallet.ReadOnly = true;
|
||||
colAccWallet.Width = 260;
|
||||
//
|
||||
// colAccDemo
|
||||
//
|
||||
colAccDemo.DataPropertyName = "IsDemo";
|
||||
colAccDemo.HeaderText = "Demo";
|
||||
colAccDemo.Name = "colAccDemo";
|
||||
colAccDemo.ReadOnly = true;
|
||||
colAccDemo.Width = 60;
|
||||
//
|
||||
// colAccActive
|
||||
//
|
||||
colAccActive.DataPropertyName = "IsActive";
|
||||
colAccActive.HeaderText = "Aktiv";
|
||||
colAccActive.Name = "colAccActive";
|
||||
colAccActive.ReadOnly = true;
|
||||
colAccActive.Width = 60;
|
||||
//
|
||||
// pgAccount
|
||||
//
|
||||
pgAccount.Dock = DockStyle.Fill;
|
||||
pgAccount.Location = new Point(623, 37);
|
||||
pgAccount.Name = "pgAccount";
|
||||
pgAccount.Size = new Size(551, 847);
|
||||
pgAccount.TabIndex = 2;
|
||||
//
|
||||
// SettingsView
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(10F, 25F);
|
||||
@@ -121,8 +216,13 @@ namespace PolyTraderSharp.Ui.Views
|
||||
tabControl1.ResumeLayout(false);
|
||||
tabPage1.ResumeLayout(false);
|
||||
tabPage1.PerformLayout();
|
||||
tabPage2.ResumeLayout(false);
|
||||
tabPage2.PerformLayout();
|
||||
toolStrip2.ResumeLayout(false);
|
||||
toolStrip2.PerformLayout();
|
||||
toolStripAccounts.ResumeLayout(false);
|
||||
toolStripAccounts.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dgvAccounts).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
@@ -137,5 +237,14 @@ namespace PolyTraderSharp.Ui.Views
|
||||
private TabPage tabPage2;
|
||||
private ToolStripButton btn_save;
|
||||
private ToolStripButton btn_loadsettings;
|
||||
private ToolStrip toolStripAccounts;
|
||||
private ToolStripButton btnAccNew;
|
||||
private ToolStripButton btnAccDelete;
|
||||
private DataGridView dgvAccounts;
|
||||
private DataGridViewTextBoxColumn colAccName;
|
||||
private DataGridViewTextBoxColumn colAccWallet;
|
||||
private DataGridViewCheckBoxColumn colAccDemo;
|
||||
private DataGridViewCheckBoxColumn colAccActive;
|
||||
private PropertyGrid pgAccount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user