Changed: minimum 1 row per group + extra menu item entry

This commit is contained in:
Ray 2021-07-31 17:09:43 +01:00
parent dc1002c108
commit b037e8c0bd
3 changed files with 45 additions and 72 deletions

View File

@ -46,6 +46,8 @@
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
this.removeRowToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.contextMenuStrip2.SuspendLayout(); this.contextMenuStrip2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -54,9 +56,11 @@
// //
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addToolStripMenuItem, this.addToolStripMenuItem,
this.addListToolStripMenuItem}); this.addListToolStripMenuItem,
this.toolStripMenuItem6,
this.removeRowToolStripMenuItem1});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70); this.contextMenuStrip1.Size = new System.Drawing.Size(181, 98);
// //
// addToolStripMenuItem // addToolStripMenuItem
// //
@ -176,23 +180,36 @@
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(99)))), ((int)(((byte)(105)))), ((int)(((byte)(119))))); this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(99)))), ((int)(((byte)(105)))), ((int)(((byte)(119)))));
this.label1.Image = global::FizzyLauncher.AppResource.toggle_left_ea_16; this.label1.Image = global::FizzyLauncher.AppResource.toggle_left_ea_16;
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label1.Location = new System.Drawing.Point(227, 72); this.label1.Location = new System.Drawing.Point(265, 83);
this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(0, 13); this.label1.Size = new System.Drawing.Size(0, 15);
this.label1.TabIndex = 2; this.label1.TabIndex = 2;
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.label1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick); this.label1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick);
this.label1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick); this.label1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick);
// //
// TTilePanelLayout // toolStripMenuItem6
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(177, 6);
//
// removeRowToolStripMenuItem1
//
this.removeRowToolStripMenuItem1.Name = "removeRowToolStripMenuItem1";
this.removeRowToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
this.removeRowToolStripMenuItem1.Text = "&Remove Row";
this.removeRowToolStripMenuItem1.Click += new System.EventHandler(this.removeRowToolStripMenuItem1_Click);
//
// TilePanelLayout
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent; this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Name = "TTilePanelLayout"; this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.Size = new System.Drawing.Size(370, 150); this.Name = "TilePanelLayout";
this.Size = new System.Drawing.Size(432, 173);
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
this.contextMenuStrip2.ResumeLayout(false); this.contextMenuStrip2.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
@ -218,5 +235,7 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripMenuItem removeRowToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem removeRowToolStripMenuItem;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem6;
private System.Windows.Forms.ToolStripMenuItem removeRowToolStripMenuItem1;
} }
} }

View File

@ -796,11 +796,18 @@ namespace FizzyLauncher.Windows.Forms
private void removeRowToolStripMenuItem_Click(object sender, EventArgs e) private void removeRowToolStripMenuItem_Click(object sender, EventArgs e)
{ {
bool rs = items.Exists(x => x.Coord.Y.Equals(gridSize.Y - 1)); if (gridSize.Y <= 1)
if (!rs)
{ {
this.SetGridSize(gridSize.X, (gridSize.Y - 1)); return;
} }
bool rs = items.Exists(x => x.Coord.Y.Equals(gridSize.Y - 1));
if (rs)
{
return;
}
this.SetGridSize(gridSize.X, (gridSize.Y - 1));
} }
private async void label1_MouseClick(object sender, MouseEventArgs e) private async void label1_MouseClick(object sender, MouseEventArgs e)
@ -845,5 +852,12 @@ namespace FizzyLauncher.Windows.Forms
} }
} }
/// <summary>
/// Remove row
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void removeRowToolStripMenuItem1_Click(object sender, EventArgs e) => removeRowToolStripMenuItem_Click(sender, e);
} }
} }

View File

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<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: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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">