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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ad5ba34b56
commit
37f9d0fae2
Generated
+109
-51
@@ -17,67 +17,125 @@ namespace PolyTraderSharp.Ui.Views
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.pnlTop = new System.Windows.Forms.Panel();
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsView));
|
||||||
this.btnReload = new System.Windows.Forms.Button();
|
propertyGrid = new PropertyGrid();
|
||||||
this.btnSave = new System.Windows.Forms.Button();
|
toolStrip1 = new ToolStrip();
|
||||||
this.propertyGrid = new System.Windows.Forms.PropertyGrid();
|
tabControl1 = new TabControl();
|
||||||
this.pnlTop.SuspendLayout();
|
tabPage1 = new TabPage();
|
||||||
this.SuspendLayout();
|
tabPage2 = new TabPage();
|
||||||
//
|
toolStrip2 = new ToolStrip();
|
||||||
// pnlTop
|
btn_save = new ToolStripButton();
|
||||||
//
|
btn_loadsettings = new ToolStripButton();
|
||||||
this.pnlTop.Controls.Add(this.btnReload);
|
tabControl1.SuspendLayout();
|
||||||
this.pnlTop.Controls.Add(this.btnSave);
|
tabPage1.SuspendLayout();
|
||||||
this.pnlTop.Dock = System.Windows.Forms.DockStyle.Top;
|
toolStrip2.SuspendLayout();
|
||||||
this.pnlTop.Location = new System.Drawing.Point(0, 0);
|
SuspendLayout();
|
||||||
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;
|
|
||||||
//
|
//
|
||||||
// propertyGrid
|
// propertyGrid
|
||||||
//
|
//
|
||||||
this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
|
propertyGrid.Dock = DockStyle.Bottom;
|
||||||
this.propertyGrid.Location = new System.Drawing.Point(0, 44);
|
propertyGrid.Location = new Point(3, 610);
|
||||||
this.propertyGrid.Name = "propertyGrid";
|
propertyGrid.Margin = new Padding(4, 25, 4, 5);
|
||||||
this.propertyGrid.Size = new System.Drawing.Size(700, 556);
|
propertyGrid.Name = "propertyGrid";
|
||||||
this.propertyGrid.TabIndex = 1;
|
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
|
// SettingsView
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(10F, 25F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
this.Controls.Add(this.propertyGrid);
|
ClientSize = new Size(1185, 1523);
|
||||||
this.Controls.Add(this.pnlTop);
|
Controls.Add(tabControl1);
|
||||||
this.ClientSize = new System.Drawing.Size(720, 720);
|
Controls.Add(toolStrip1);
|
||||||
this.Name = "SettingsView";
|
Margin = new Padding(4, 5, 4, 5);
|
||||||
this.Text = "Server Settings";
|
Name = "SettingsView";
|
||||||
this.pnlTop.ResumeLayout(false);
|
Text = "Server Settings";
|
||||||
this.ResumeLayout(false);
|
tabControl1.ResumeLayout(false);
|
||||||
|
tabPage1.ResumeLayout(false);
|
||||||
|
tabPage1.PerformLayout();
|
||||||
|
toolStrip2.ResumeLayout(false);
|
||||||
|
toolStrip2.PerformLayout();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ namespace PolyTraderSharp.Ui.Views
|
|||||||
public SettingsView()
|
public SettingsView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
btnSave.Click += (_, _) => Save();
|
btn_save.Click += (_, _) => Save();
|
||||||
btnReload.Click += (_, _) => Reload();
|
btn_loadsettings.Click += (_, _) => Reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialize(ThreemaService threema, MullvadVpnService vpn, TerminalLogger logger)
|
public void Initialize(ThreemaService threema, MullvadVpnService vpn, TerminalLogger logger)
|
||||||
|
|||||||
@@ -0,0 +1,149 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>162, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="btn_save.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAEBSURBVEhL3ZIvC8JAGIf3OTTZ/A62+RXs2g2rFsGi2P0C
|
||||||
|
WlwT02wGMQjLhgVRnAMR/5bVV37CHeduf9TdFQfPDt7wPOy9GWEYkk4MvGzbJsuylAInD2BgmqZS4JQC
|
||||||
|
99tDCcoCl+OBPKdH3qxHe3eiPuAOTFq0CxwWURYQ5QBfojfgKA5sl0Mux7pwJx8H/NOdmvPj64yKs8gM
|
||||||
|
QFqdBlQc7V/nt5HUwDq4cTnj20hiYLW7Unnsv8l/icQGKrVGojwrgpk4lwL1VpdKw40kjCMaYfclzqVA
|
||||||
|
3z1LojSYTPwZ2Bxrzh1gsujPALBmrDt3IA2sG2vXFgBw/lFAJwh0dGLofp4xWrfOyeSKuAAAAABJRU5E
|
||||||
|
rkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btn_loadsettings.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAEBSURBVEhL3ZIvC8JAGIf3OTTZ/A62+RXs2g2rFsGi2P0C
|
||||||
|
WlwT02wGMQjLhgVRnAMR/5bVV37CHeduf9TdFQfPDt7wPOy9GWEYkk4MvGzbJsuylAInD2BgmqZS4JQC
|
||||||
|
99tDCcoCl+OBPKdH3qxHe3eiPuAOTFq0CxwWURYQ5QBfojfgKA5sl0Mux7pwJx8H/NOdmvPj64yKs8gM
|
||||||
|
QFqdBlQc7V/nt5HUwDq4cTnj20hiYLW7Unnsv8l/icQGKrVGojwrgpk4lwL1VpdKw40kjCMaYfclzqVA
|
||||||
|
3z1LojSYTPwZ2Bxrzh1gsujPALBmrDt3IA2sG2vXFgBw/lFAJwh0dGLofp4xWrfOyeSKuAAAAABJRU5E
|
||||||
|
rkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
Reference in New Issue
Block a user