From 37f9d0fae2fe1ff63ad16ea074d8d46f92e889e2 Mon Sep 17 00:00:00 2001 From: Richard Date: Fri, 3 Jul 2026 10:23:53 +0200 Subject: [PATCH] Phase 5-UI: SettingsView an Nutzer-Redesign angepasst (TabControl + Toolstrip) - Altes pnlTop-Panel samt btnSave/btnReload entfernt. - Neue Toolstrip-Buttons verdrahtet: btn_save -> Speichern, btn_loadsettings -> Neu laden. - Nutzer-Layout (TabControl: General Settings / Polymarket Accounts, toolStrip1/2, PropertyGrid in tabPage1) beibehalten. - Build 0 Fehler. Co-Authored-By: Claude Opus 4.8 --- Ui/Views/SettingsView.Designer.cs | 160 ++++++++++++++++++++---------- Ui/Views/SettingsView.cs | 4 +- Ui/Views/SettingsView.resx | 149 ++++++++++++++++++++++++++++ 3 files changed, 260 insertions(+), 53 deletions(-) create mode 100644 Ui/Views/SettingsView.resx diff --git a/Ui/Views/SettingsView.Designer.cs b/Ui/Views/SettingsView.Designer.cs index 7eb9303..a927c86 100644 --- a/Ui/Views/SettingsView.Designer.cs +++ b/Ui/Views/SettingsView.Designer.cs @@ -17,67 +17,125 @@ namespace PolyTraderSharp.Ui.Views private void InitializeComponent() { - this.pnlTop = new System.Windows.Forms.Panel(); - this.btnReload = new System.Windows.Forms.Button(); - this.btnSave = new System.Windows.Forms.Button(); - this.propertyGrid = new System.Windows.Forms.PropertyGrid(); - this.pnlTop.SuspendLayout(); - this.SuspendLayout(); - // - // pnlTop - // - this.pnlTop.Controls.Add(this.btnReload); - this.pnlTop.Controls.Add(this.btnSave); - this.pnlTop.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlTop.Location = new System.Drawing.Point(0, 0); - this.pnlTop.Name = "pnlTop"; - this.pnlTop.Size = new System.Drawing.Size(700, 44); - this.pnlTop.TabIndex = 0; - // - // btnReload - // - this.btnReload.Location = new System.Drawing.Point(140, 8); - this.btnReload.Name = "btnReload"; - this.btnReload.Size = new System.Drawing.Size(120, 28); - this.btnReload.TabIndex = 1; - this.btnReload.Text = "Neu laden"; - this.btnReload.UseVisualStyleBackColor = true; - // - // btnSave - // - this.btnSave.Location = new System.Drawing.Point(12, 8); - this.btnSave.Name = "btnSave"; - this.btnSave.Size = new System.Drawing.Size(120, 28); - this.btnSave.TabIndex = 0; - this.btnSave.Text = "Speichern"; - this.btnSave.UseVisualStyleBackColor = true; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsView)); + propertyGrid = new PropertyGrid(); + toolStrip1 = new ToolStrip(); + tabControl1 = new TabControl(); + tabPage1 = new TabPage(); + tabPage2 = new TabPage(); + toolStrip2 = new ToolStrip(); + btn_save = new ToolStripButton(); + btn_loadsettings = new ToolStripButton(); + tabControl1.SuspendLayout(); + tabPage1.SuspendLayout(); + toolStrip2.SuspendLayout(); + SuspendLayout(); // // propertyGrid // - this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.propertyGrid.Location = new System.Drawing.Point(0, 44); - this.propertyGrid.Name = "propertyGrid"; - this.propertyGrid.Size = new System.Drawing.Size(700, 556); - this.propertyGrid.TabIndex = 1; + propertyGrid.Dock = DockStyle.Bottom; + propertyGrid.Location = new Point(3, 610); + propertyGrid.Margin = new Padding(4, 25, 4, 5); + propertyGrid.Name = "propertyGrid"; + propertyGrid.Size = new Size(1171, 274); + propertyGrid.TabIndex = 1; + // + // toolStrip1 + // + toolStrip1.ImageScalingSize = new Size(24, 24); + toolStrip1.Location = new Point(0, 0); + toolStrip1.Name = "toolStrip1"; + toolStrip1.Size = new Size(1185, 25); + toolStrip1.TabIndex = 2; + toolStrip1.Text = "toolStrip1"; + // + // tabControl1 + // + tabControl1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + tabControl1.Controls.Add(tabPage1); + tabControl1.Controls.Add(tabPage2); + tabControl1.Location = new Point(0, 24); + tabControl1.Name = "tabControl1"; + tabControl1.SelectedIndex = 0; + tabControl1.Size = new Size(1185, 925); + tabControl1.TabIndex = 3; + // + // tabPage1 + // + tabPage1.Controls.Add(toolStrip2); + tabPage1.Controls.Add(propertyGrid); + tabPage1.Location = new Point(4, 34); + tabPage1.Name = "tabPage1"; + tabPage1.Padding = new Padding(3); + tabPage1.Size = new Size(1177, 887); + tabPage1.TabIndex = 0; + tabPage1.Text = "General Settings"; + tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + tabPage2.Location = new Point(4, 34); + tabPage2.Name = "tabPage2"; + tabPage2.Padding = new Padding(3); + tabPage2.Size = new Size(1177, 887); + tabPage2.TabIndex = 1; + tabPage2.Text = "Polymarket Accounts"; + tabPage2.UseVisualStyleBackColor = true; + // + // toolStrip2 + // + toolStrip2.ImageScalingSize = new Size(24, 24); + toolStrip2.Items.AddRange(new ToolStripItem[] { btn_save, btn_loadsettings }); + toolStrip2.Location = new Point(3, 3); + toolStrip2.Name = "toolStrip2"; + toolStrip2.Size = new Size(1171, 34); + toolStrip2.TabIndex = 0; + toolStrip2.Text = "toolStrip2"; + // + // btn_save + // + btn_save.Image = (Image)resources.GetObject("btn_save.Image"); + btn_save.ImageTransparentColor = Color.Magenta; + btn_save.Name = "btn_save"; + btn_save.Size = new Size(150, 29); + btn_save.Text = "Save Changes"; + // + // btn_loadsettings + // + btn_loadsettings.Image = (Image)resources.GetObject("btn_loadsettings.Image"); + btn_loadsettings.ImageTransparentColor = Color.Magenta; + btn_loadsettings.Name = "btn_loadsettings"; + btn_loadsettings.Size = new Size(223, 29); + btn_loadsettings.Text = "Load Settings from File"; // // SettingsView // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.propertyGrid); - this.Controls.Add(this.pnlTop); - this.ClientSize = new System.Drawing.Size(720, 720); - this.Name = "SettingsView"; - this.Text = "Server Settings"; - this.pnlTop.ResumeLayout(false); - this.ResumeLayout(false); + AutoScaleDimensions = new SizeF(10F, 25F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1185, 1523); + Controls.Add(tabControl1); + Controls.Add(toolStrip1); + Margin = new Padding(4, 5, 4, 5); + Name = "SettingsView"; + Text = "Server Settings"; + tabControl1.ResumeLayout(false); + tabPage1.ResumeLayout(false); + tabPage1.PerformLayout(); + toolStrip2.ResumeLayout(false); + toolStrip2.PerformLayout(); + ResumeLayout(false); + PerformLayout(); } #endregion - private System.Windows.Forms.Panel pnlTop; - private System.Windows.Forms.Button btnSave; - private System.Windows.Forms.Button btnReload; private System.Windows.Forms.PropertyGrid propertyGrid; + private ToolStrip toolStrip1; + private TabControl tabControl1; + private TabPage tabPage1; + private ToolStrip toolStrip2; + private TabPage tabPage2; + private ToolStripButton btn_save; + private ToolStripButton btn_loadsettings; } } diff --git a/Ui/Views/SettingsView.cs b/Ui/Views/SettingsView.cs index 3b125f7..cb59f3e 100644 --- a/Ui/Views/SettingsView.cs +++ b/Ui/Views/SettingsView.cs @@ -22,8 +22,8 @@ namespace PolyTraderSharp.Ui.Views public SettingsView() { InitializeComponent(); - btnSave.Click += (_, _) => Save(); - btnReload.Click += (_, _) => Reload(); + btn_save.Click += (_, _) => Save(); + btn_loadsettings.Click += (_, _) => Reload(); } public void Initialize(ThreemaService threema, MullvadVpnService vpn, TerminalLogger logger) diff --git a/Ui/Views/SettingsView.resx b/Ui/Views/SettingsView.resx new file mode 100644 index 0000000..be2d855 --- /dev/null +++ b/Ui/Views/SettingsView.resx @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 162, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAEBSURBVEhL3ZIvC8JAGIf3OTTZ/A62+RXs2g2rFsGi2P0C + WlwT02wGMQjLhgVRnAMR/5bVV37CHeduf9TdFQfPDt7wPOy9GWEYkk4MvGzbJsuylAInD2BgmqZS4JQC + 99tDCcoCl+OBPKdH3qxHe3eiPuAOTFq0CxwWURYQ5QBfojfgKA5sl0Mux7pwJx8H/NOdmvPj64yKs8gM + QFqdBlQc7V/nt5HUwDq4cTnj20hiYLW7Unnsv8l/icQGKrVGojwrgpk4lwL1VpdKw40kjCMaYfclzqVA + 3z1LojSYTPwZ2Bxrzh1gsujPALBmrDt3IA2sG2vXFgBw/lFAJwh0dGLofp4xWrfOyeSKuAAAAABJRU5E + rkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAEBSURBVEhL3ZIvC8JAGIf3OTTZ/A62+RXs2g2rFsGi2P0C + WlwT02wGMQjLhgVRnAMR/5bVV37CHeduf9TdFQfPDt7wPOy9GWEYkk4MvGzbJsuylAInD2BgmqZS4JQC + 99tDCcoCl+OBPKdH3qxHe3eiPuAOTFq0CxwWURYQ5QBfojfgKA5sl0Mux7pwJx8H/NOdmvPj64yKs8gM + QFqdBlQc7V/nt5HUwDq4cTnj20hiYLW7Unnsv8l/icQGKrVGojwrgpk4lwL1VpdKw40kjCMaYfclzqVA + 3z1LojSYTPwZ2Bxrzh1gsujPALBmrDt3IA2sG2vXFgBw/lFAJwh0dGLofp4xWrfOyeSKuAAAAABJRU5E + rkJggg== + + + \ No newline at end of file