Added basic text elements layout

This commit is contained in:
Thorsten Sommer 2022-07-11 19:52:15 +02:00
parent 5416e404fd
commit 3bbff31fe0
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
8 changed files with 297 additions and 1 deletions

View File

@ -33,12 +33,14 @@
this.splitContainerLR = new System.Windows.Forms.SplitContainer(); this.splitContainerLR = new System.Windows.Forms.SplitContainer();
this.sectionTree = new UI_WinForms.Components.SectionTree(); this.sectionTree = new UI_WinForms.Components.SectionTree();
this.splitContainerRTB = new System.Windows.Forms.SplitContainer(); this.splitContainerRTB = new System.Windows.Forms.SplitContainer();
this.textElements = new UI_WinForms.Components.TextElements();
this.tableLayout.SuspendLayout(); this.tableLayout.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainerLR)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerLR)).BeginInit();
this.splitContainerLR.Panel1.SuspendLayout(); this.splitContainerLR.Panel1.SuspendLayout();
this.splitContainerLR.Panel2.SuspendLayout(); this.splitContainerLR.Panel2.SuspendLayout();
this.splitContainerLR.SuspendLayout(); this.splitContainerLR.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainerRTB)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerRTB)).BeginInit();
this.splitContainerRTB.Panel1.SuspendLayout();
this.splitContainerRTB.SuspendLayout(); this.splitContainerRTB.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -104,11 +106,24 @@
this.splitContainerRTB.Location = new System.Drawing.Point(0, 0); this.splitContainerRTB.Location = new System.Drawing.Point(0, 0);
this.splitContainerRTB.Name = "splitContainerRTB"; this.splitContainerRTB.Name = "splitContainerRTB";
this.splitContainerRTB.Orientation = System.Windows.Forms.Orientation.Horizontal; this.splitContainerRTB.Orientation = System.Windows.Forms.Orientation.Horizontal;
this.splitContainerRTB.Panel1MinSize = 190; //
// splitContainerRTB.Panel1
//
this.splitContainerRTB.Panel1.Controls.Add(this.textElements);
this.splitContainerRTB.Panel1MinSize = 200;
this.splitContainerRTB.Size = new System.Drawing.Size(636, 531); this.splitContainerRTB.Size = new System.Drawing.Size(636, 531);
this.splitContainerRTB.SplitterDistance = 211; this.splitContainerRTB.SplitterDistance = 211;
this.splitContainerRTB.TabIndex = 0; this.splitContainerRTB.TabIndex = 0;
// //
// textElements
//
this.textElements.Dock = System.Windows.Forms.DockStyle.Fill;
this.textElements.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.textElements.Location = new System.Drawing.Point(0, 0);
this.textElements.Name = "textElements";
this.textElements.Size = new System.Drawing.Size(634, 209);
this.textElements.TabIndex = 0;
//
// Main // Main
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F); this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
@ -122,6 +137,7 @@
this.splitContainerLR.Panel2.ResumeLayout(false); this.splitContainerLR.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainerLR)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerLR)).EndInit();
this.splitContainerLR.ResumeLayout(false); this.splitContainerLR.ResumeLayout(false);
this.splitContainerRTB.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainerRTB)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerRTB)).EndInit();
this.splitContainerRTB.ResumeLayout(false); this.splitContainerRTB.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
@ -135,5 +151,6 @@
private SplitContainer splitContainerLR; private SplitContainer splitContainerLR;
private SplitContainer splitContainerRTB; private SplitContainer splitContainerRTB;
private SectionTree sectionTree; private SectionTree sectionTree;
private TextElements textElements;
} }
} }

View File

@ -0,0 +1,181 @@
namespace UI_WinForms.Components
{
partial class TextElements
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tableLayout = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutToolbar = new System.Windows.Forms.FlowLayoutPanel();
this.buttonAdd = new System.Windows.Forms.Button();
this.buttonRemove = new System.Windows.Forms.Button();
this.buttonRename = new System.Windows.Forms.Button();
this.listTextElements = new System.Windows.Forms.ListBox();
this.textBoxFilter = new System.Windows.Forms.TextBox();
this.labelFilter = new System.Windows.Forms.Label();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.tableLayout.SuspendLayout();
this.flowLayoutToolbar.SuspendLayout();
this.SuspendLayout();
//
// tableLayout
//
this.tableLayout.ColumnCount = 3;
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 66F));
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayout.RowCount = 2;
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayout.Controls.Add(this.flowLayoutToolbar, 0, 0);
this.tableLayout.Controls.Add(this.listTextElements, 1, 0);
this.tableLayout.Controls.Add(this.textBoxFilter, 2, 1);
this.tableLayout.Controls.Add(this.labelFilter, 1, 1);
this.tableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayout.Location = new System.Drawing.Point(0, 0);
this.tableLayout.Name = "tableLayout";
this.tableLayout.Size = new System.Drawing.Size(706, 201);
this.tableLayout.TabIndex = 0;
//
// flowLayoutToolbar
//
this.flowLayoutToolbar.Controls.Add(this.buttonAdd);
this.flowLayoutToolbar.Controls.Add(this.buttonRemove);
this.flowLayoutToolbar.Controls.Add(this.buttonRename);
this.flowLayoutToolbar.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutToolbar.FlowDirection = System.Windows.Forms.FlowDirection.BottomUp;
this.flowLayoutToolbar.Location = new System.Drawing.Point(0, 0);
this.flowLayoutToolbar.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutToolbar.Name = "flowLayoutToolbar";
this.tableLayout.SetRowSpan(this.flowLayoutToolbar, 2);
this.flowLayoutToolbar.Size = new System.Drawing.Size(66, 201);
this.flowLayoutToolbar.TabIndex = 0;
//
// buttonAdd
//
this.buttonAdd.FlatAppearance.BorderSize = 0;
this.buttonAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonAdd.Image = global::UI_WinForms.Resources.Icons.icons8_add_tag_512;
this.buttonAdd.Location = new System.Drawing.Point(3, 138);
this.buttonAdd.Name = "buttonAdd";
this.buttonAdd.Size = new System.Drawing.Size(60, 60);
this.buttonAdd.TabIndex = 0;
this.toolTip.SetToolTip(this.buttonAdd, "Add text element to selected section");
this.buttonAdd.UseVisualStyleBackColor = true;
//
// buttonRemove
//
this.buttonRemove.FlatAppearance.BorderSize = 0;
this.buttonRemove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonRemove.Image = global::UI_WinForms.Resources.Icons.icons8_remove_tag_512;
this.buttonRemove.Location = new System.Drawing.Point(3, 72);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(60, 60);
this.buttonRemove.TabIndex = 2;
this.toolTip.SetToolTip(this.buttonRemove, "Delete this text element");
this.buttonRemove.UseVisualStyleBackColor = true;
//
// buttonRename
//
this.buttonRename.FlatAppearance.BorderSize = 0;
this.buttonRename.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonRename.Image = global::UI_WinForms.Resources.Icons.icons8_rename_512;
this.buttonRename.Location = new System.Drawing.Point(3, 6);
this.buttonRename.Name = "buttonRename";
this.buttonRename.Size = new System.Drawing.Size(60, 60);
this.buttonRename.TabIndex = 1;
this.toolTip.SetToolTip(this.buttonRename, "Rename this text element");
this.buttonRename.UseVisualStyleBackColor = true;
//
// listTextElements
//
this.tableLayout.SetColumnSpan(this.listTextElements, 2);
this.listTextElements.Dock = System.Windows.Forms.DockStyle.Fill;
this.listTextElements.FormattingEnabled = true;
this.listTextElements.ItemHeight = 28;
this.listTextElements.Location = new System.Drawing.Point(69, 3);
this.listTextElements.Name = "listTextElements";
this.listTextElements.ScrollAlwaysVisible = true;
this.listTextElements.Size = new System.Drawing.Size(634, 200);
this.listTextElements.TabIndex = 1;
//
// textBoxFilter
//
this.textBoxFilter.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxFilter.Location = new System.Drawing.Point(149, 164);
this.textBoxFilter.Name = "textBoxFilter";
this.textBoxFilter.Size = new System.Drawing.Size(554, 34);
this.textBoxFilter.TabIndex = 2;
this.textBoxFilter.WordWrap = false;
//
// labelFilter
//
this.labelFilter.AutoSize = true;
this.labelFilter.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelFilter.Location = new System.Drawing.Point(69, 161);
this.labelFilter.Name = "labelFilter";
this.labelFilter.Size = new System.Drawing.Size(74, 40);
this.labelFilter.TabIndex = 3;
this.labelFilter.Text = "Filter:";
this.labelFilter.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// toolTip
//
this.toolTip.AutoPopDelay = 30000;
this.toolTip.InitialDelay = 500;
this.toolTip.ReshowDelay = 100;
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.toolTip.ToolTipTitle = "Help";
//
// TextElements
//
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.tableLayout);
this.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.Name = "TextElements";
this.Size = new System.Drawing.Size(706, 201);
this.tableLayout.ResumeLayout(false);
this.tableLayout.PerformLayout();
this.flowLayoutToolbar.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private TableLayoutPanel tableLayout;
private FlowLayoutPanel flowLayoutToolbar;
private Button buttonAdd;
private Button buttonRename;
private Button buttonRemove;
private ToolTip toolTip;
private ListBox listTextElements;
private TextBox textBoxFilter;
private Label labelFilter;
}
}

View File

@ -0,0 +1,9 @@
namespace UI_WinForms.Components;
public partial class TextElements : UserControl
{
public TextElements()
{
this.InitializeComponent();
}
}

View File

@ -0,0 +1,63 @@
<root>
<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="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -70,6 +70,16 @@ namespace UI_WinForms.Resources {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_add_tag_512 {
get {
object obj = ResourceManager.GetObject("icons8_add_tag_512", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -160,6 +170,16 @@ namespace UI_WinForms.Resources {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_remove_tag_512 {
get {
object obj = ResourceManager.GetObject("icons8_remove_tag_512", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View File

@ -121,6 +121,9 @@
<data name="icons8_add_folder_512" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8_add_folder_512" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons8-add-folder-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>icons8-add-folder-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8_add_tag_512" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons8-add-tag-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_browse_folder_512" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8_browse_folder_512" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons8-browse-folder-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>icons8-browse-folder-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -148,6 +151,9 @@
<data name="icons8_open_file_under_cursor_512" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8_open_file_under_cursor_512" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons8-open-file-under-cursor-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>icons8-open-file-under-cursor-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="icons8_remove_tag_512" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons8-remove-tag-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icons8_rename_512" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icons8_rename_512" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>icons8-rename-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>icons8-rename-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB