Added: user can set number of columns with new session

This commit is contained in:
Ray 2021-08-01 15:25:33 +01:00
parent 9c293dd4f0
commit 472dd3ba20
13 changed files with 573 additions and 101 deletions

View File

@ -69,6 +69,9 @@
<AutoGen>True</AutoGen>
<DependentUpon>AppResource.resx</DependentUpon>
</Compile>
<Compile Update="NewForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="RyzStudio\Windows\ThemedForms\TextBox\TKeyCodeTextBox.cs">
<SubType>UserControl</SubType>
</Compile>

View File

@ -162,6 +162,14 @@ namespace FizzyLauncher
public LauncherSession CurrentSession { get; set; } = null;
public void Clear(int columnCount)
{
tileContainer1.Clear();
tileContainer1.Add(columnCount);
sessionFilename = null;
}
protected async Task collapseWindow(int width, int increment = 6)
{
await Task.Run(() =>
@ -232,7 +240,8 @@ namespace FizzyLauncher
protected void newSession()
{
tileContainer1.Clear(true);
NewForm form = new NewForm(this);
form.ShowDialog();
}
protected async Task loadFile(string filename)
@ -392,6 +401,11 @@ namespace FizzyLauncher
#region main menu
/// <summary>
/// New
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(sessionFilename))
@ -407,15 +421,11 @@ namespace FizzyLauncher
if (rv)
{
newSession();
sessionFilename = null;
}
}
else if (dr == DialogResult.No)
{
newSession();
sessionFilename = null;
}
else if (dr == DialogResult.Cancel)
{
@ -424,6 +434,11 @@ namespace FizzyLauncher
}
}
/// <summary>
/// Open
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void openToolStripMenuItem_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(sessionFilename))
@ -461,6 +476,11 @@ namespace FizzyLauncher
}
}
/// <summary>
/// Close
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void closeToolStripMenuItem_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(sessionFilename))
@ -493,6 +513,11 @@ namespace FizzyLauncher
}
}
/// <summary>
/// Save
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(sessionFilename))
@ -505,11 +530,21 @@ namespace FizzyLauncher
}
}
/// <summary>
/// Save As
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
{
saveAsFile();
}
/// <summary>
/// Exit
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void exitToolStripMenuItem2_Click(object sender, EventArgs e)
{
requestExit = true;
@ -535,6 +570,11 @@ namespace FizzyLauncher
}
/// <summary>
/// Show big icons
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void showBigIconsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.CurrentSession == null)
@ -547,6 +587,11 @@ namespace FizzyLauncher
showBigIconsToolStripMenuItem.Checked = this.CurrentSession.EnableBigIconInFolder;
}
/// <summary>
/// Enable animations
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void enableAnimationsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.CurrentSession == null)
@ -559,12 +604,22 @@ namespace FizzyLauncher
enableAnimationsToolStripMenuItem.Checked = this.CurrentSession.EnableAnimation;
}
/// <summary>
/// Always on top
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void alwaysOnTopToolStripMenuItem_Click(object sender, EventArgs e)
{
this.TopMost = !this.TopMost;
}
/// <summary>
/// Options
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (optionsForm == null) optionsForm = new OptionsForm(this);
@ -574,6 +629,11 @@ namespace FizzyLauncher
}
/// <summary>
/// View help
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void viewHelpToolStripMenuItem1_Click(object sender, EventArgs e)
{
try
@ -586,6 +646,11 @@ namespace FizzyLauncher
}
}
/// <summary>
/// About
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
{
MessageBox.Show(Application.ProductName + " v" + Application.ProductVersion, "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
@ -598,7 +663,6 @@ namespace FizzyLauncher
saveAsToolStripMenuItem.Enabled = !string.IsNullOrWhiteSpace(sessionFilename);
}
#endregion
#region notification icon

126
NewForm.cs Normal file
View File

@ -0,0 +1,126 @@
using RyzStudio.Windows.ThemedForms;
using System;
namespace FizzyLauncher
{
public class NewForm : TDialogForm
{
private System.Windows.Forms.Label label1;
private TButton button1;
private TNumericBox numericBox1;
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1;
public NewForm(MainForm parent) : base()
{
InitializeComponent();
parentForm = parent;
numericBox1.InnerControl.Minimum = 4;
numericBox1.InnerControl.Maximum = 24;
numericBox1.InnerControl.Value = 6;
}
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new RyzStudio.Windows.ThemedForms.TButton();
this.tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
this.numericBox1 = new RyzStudio.Windows.ThemedForms.TNumericBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
this.label1.Location = new System.Drawing.Point(10, 21);
this.label1.Margin = new System.Windows.Forms.Padding(0);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
this.label1.Size = new System.Drawing.Size(137, 34);
this.label1.TabIndex = 153;
this.label1.Text = "Number of Tiles Per Row";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.BackColor = System.Drawing.Color.Transparent;
this.button1.DefaultImage = null;
this.button1.DownImage = null;
this.button1.IsSelected = false;
this.button1.LabelText = "&Save";
this.button1.Location = new System.Drawing.Point(241, 109);
this.button1.Margin = new System.Windows.Forms.Padding(10);
this.button1.Name = "button1";
this.button1.OverImage = null;
this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.button1.Size = new System.Drawing.Size(128, 32);
this.button1.TabIndex = 173;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// tHorizontalSeparator1
//
this.tHorizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tHorizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
this.tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent;
this.tHorizontalSeparator1.Location = new System.Drawing.Point(10, 77);
this.tHorizontalSeparator1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
this.tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
this.tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22);
this.tHorizontalSeparator1.Name = "tHorizontalSeparator1";
this.tHorizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.tHorizontalSeparator1.Size = new System.Drawing.Size(364, 22);
this.tHorizontalSeparator1.TabIndex = 188;
//
// numericBox1
//
this.numericBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.numericBox1.BackColor = System.Drawing.Color.Transparent;
this.numericBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.numericBox1.Location = new System.Drawing.Point(285, 20);
this.numericBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
this.numericBox1.Name = "numericBox1";
this.numericBox1.Padding = new System.Windows.Forms.Padding(8, 8, 7, 7);
this.numericBox1.Size = new System.Drawing.Size(84, 34);
this.numericBox1.SubmitButton = null;
this.numericBox1.TabIndex = 189;
this.numericBox1.Value = 0;
//
// NewForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(384, 161);
this.Controls.Add(this.numericBox1);
this.Controls.Add(this.tHorizontalSeparator1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.MinimumSize = new System.Drawing.Size(400, 200);
this.Name = "NewForm";
this.Text = "New";
this.ResumeLayout(false);
this.PerformLayout();
}
public MainForm parentForm { get; set; } = null;
private void button1_Click(object sender, EventArgs e)
{
if (parentForm != null)
{
parentForm.Clear(numericBox1.Value);
}
this.Close();
}
}
}

60
NewForm.resx Normal file
View File

@ -0,0 +1,60 @@
<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>
</root>

View File

@ -61,7 +61,7 @@
<data name="textBox1.HighlightImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vQAADr0BR/uQrQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAClSURBVDhP7dI/
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAClSURBVDhP7dI/
DgFBGIbxSVTKjcRx3MLqXYCOjkocQcMF3MAZOIKaE5AthOexf2QnbJQKb/JLJvO9XzLFhCgtbHDBveB5
DWcfM8ANC0wKnr1LUUsbHXSxxBlJxDtnduy6E04on/Utd0IPOxwxxBT9iHfO7Nh155kV9vmxMXbsVvkv
vvIji4f82Bg7tcUxrpih/NyxOeyMUMVPu0WGd39TzuzQDeEB5/ZKvTSyulEAAAAASUVORK5CYII=
@ -70,7 +70,7 @@
<data name="textBox1.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vQAADr0BR/uQrQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADTSURBVDhP7ZI7
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADTSURBVDhP7ZI7
CsJQEEUfWFmK4HLchdpnA9ppp5W4BBtdQNyBC0ilRf6VdVyBwUL03JdXxC/YWThwmDcz94YJjKmH7/uN
OI7XaZqekiS5Cr1hpZmTPQemAeILeU4eC/dWr+9kVQRB0MzzvB2GYQfBAsExiqJWHfU0k0ZaeQyNAuxa
X1CYLMu6/MOW4kD2YAK9B9TznGYrj12XVZY0drb4ENJI68q/sR4/YoS9K9+GNHdGLmIEJV+cku1xP4Jh

View File

@ -0,0 +1,99 @@
using RyzStudio.Drawing;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace RyzStudio.Windows.ThemedForms
{
public partial class TNumericBox : RyzStudio.Windows.ThemedForms.TUserControl
{
protected readonly Padding textboxPadding = new Padding(4, 4, 4, 4);
public TNumericBox() : base()
{
InitializeComponent();
this.Margin = new Padding(10, 6, 10, 6);
this.Font = new Font(this.Font, FontStyle.Regular);
numericUpDown1.Font = this.Font;
numericUpDown1.PreviewKeyDown += textBox_PreviewKeyDown;
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
this.Height = numericUpDown1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom);
this.Invalidate();
}
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
numericUpDown1.Focus();
}
protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Enter:
if (this.SubmitButton != null)
{
this.SubmitButton.PerformClick();
}
break;
case Keys.Escape:
close();
break;
default: break;
}
}
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
[Category("Appearance")]
public System.Windows.Forms.NumericUpDown InnerControl { get => numericUpDown1; set => numericUpDown1 = value; }
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
[Category("Appearance")]
public int Value
{
get => (int)numericUpDown1.Value;
set
{
numericUpDown1.Value = value;
}
}
//[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
//[Category("Appearance")]
//public bool UseSystemPasswordChar { get => textBox1.UseSystemPasswordChar; set => textBox1.UseSystemPasswordChar = value; }
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
[Category("Appearance")]
public TButton SubmitButton { get; set; } = null;
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } }
protected override void updateBackground(Graphics g, ThemeStyle style)
{
int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom));
Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
}
}
}

View File

@ -0,0 +1,60 @@
namespace RyzStudio.Windows.ThemedForms
{
partial class TNumericBox
{
/// <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.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// numericUpDown1
//
this.numericUpDown1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.numericUpDown1.Dock = System.Windows.Forms.DockStyle.Fill;
this.numericUpDown1.Location = new System.Drawing.Point(4, 4);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(121, 19);
this.numericUpDown1.TabIndex = 0;
//
// TNumericBox
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.numericUpDown1);
this.Name = "TNumericBox";
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
this.Size = new System.Drawing.Size(128, 32);
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.NumericUpDown numericUpDown1;
}
}

View File

@ -0,0 +1,60 @@
<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>
</root>

View File

@ -90,7 +90,7 @@ namespace FizzyLauncher.Windows.Forms
this.button1.DefaultImage = null;
this.button1.DownImage = null;
this.button1.IsSelected = false;
this.button1.LabelText = "&OK";
this.button1.LabelText = "&Save";
this.button1.Location = new System.Drawing.Point(241, 469);
this.button1.Margin = new System.Windows.Forms.Padding(10);
this.button1.Name = "button1";
@ -131,7 +131,6 @@ namespace FizzyLauncher.Windows.Forms
//
// EditGroupForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.ClientSize = new System.Drawing.Size(384, 521);
this.Controls.Add(this.horizontalSeparator2);
this.Controls.Add(this.pickerBox1);

View File

@ -100,7 +100,7 @@ namespace FizzyLauncher.Windows.Forms
this.button1.DefaultImage = null;
this.button1.DownImage = null;
this.button1.IsSelected = false;
this.button1.LabelText = "&OK";
this.button1.LabelText = "&Save";
this.button1.Location = new System.Drawing.Point(241, 469);
this.button1.Margin = new System.Windows.Forms.Padding(10);
this.button1.Name = "button1";
@ -175,9 +175,8 @@ namespace FizzyLauncher.Windows.Forms
this.tHorizontalSeparator1.Size = new System.Drawing.Size(364, 22);
this.tHorizontalSeparator1.TabIndex = 182;
//
// AddTileFolderForm
// EditTileFolderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.ClientSize = new System.Drawing.Size(384, 521);
this.Controls.Add(this.tHorizontalSeparator1);
this.Controls.Add(this.label2);
@ -187,7 +186,7 @@ namespace FizzyLauncher.Windows.Forms
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.MinimumSize = new System.Drawing.Size(400, 560);
this.Name = "AddTileFolderForm";
this.Name = "EditTileFolderForm";
this.Text = "Add List Tile";
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -251,7 +251,7 @@ namespace FizzyLauncher.Windows.Forms
this.button1.DefaultImage = null;
this.button1.DownImage = null;
this.button1.IsSelected = false;
this.button1.LabelText = "&OK";
this.button1.LabelText = "&Save";
this.button1.Location = new System.Drawing.Point(241, 469);
this.button1.Margin = new System.Windows.Forms.Padding(10);
this.button1.Name = "button1";
@ -319,9 +319,8 @@ namespace FizzyLauncher.Windows.Forms
this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
this.horizontalSeparator2.TabIndex = 177;
//
// AddTileForm
// EditTileForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.ClientSize = new System.Drawing.Size(384, 521);
this.Controls.Add(this.horizontalSeparator2);
this.Controls.Add(this.horizontalSeparator1);
@ -339,7 +338,7 @@ namespace FizzyLauncher.Windows.Forms
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.MinimumSize = new System.Drawing.Size(400, 560);
this.Name = "AddTileForm";
this.Name = "EditTileForm";
this.Text = "Add Tile";
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -61,7 +61,7 @@
<data name="textBox2.HighlightImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vwAADr8BOAVTJAAAAK9JREFUOE/t0zsKwkAURuGp1BWJK3EhIrgAV+EOLLWwtRQLwQdiIbbiIkwynj+O
vgAADr4B6kKxwAAAAK9JREFUOE/t0zsKwkAURuGp1BWJK3EhIrgAV+EOLLWwtRQLwQdiIbbiIkwynj+O
IVwnyhR2XvjyInNIkXHee8f0cEQBPbDOaKEarSvXhsAJO4wirlB4jipiA3phoIvIrLFChhnKiA3o8Ckw
RR93LNBODVwwwRL62kNKYIxNzQ1FSsDOEHk08HrYJMw/8KtA06/cCef6KJDZgDbTFrHNZO3x9idqOyui
m2+07bvPgHcPXOhtG3D6cUIAAAAASUVORK5CYII=
@ -70,7 +70,7 @@
<data name="textBox2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vwAADr8BOAVTJAAAAMZJREFUOE/tk7sNwjAQQF3BRohJGAQhMQBTsAElFLSUiAKJTxIXhBZlCILNuyRG
vgAADr4B6kKxwAAAAMZJREFUOE/tk7sNwjAQQF3BRohJGAQhMQBTsAElFLSUiAKJTxIXhBZlCILNuyRG
iXEQKeg46fmsO/slhU9Za5XWehiXYcD6JElygZ6qhdwTioVDGo4wDXDjsohXdYkvMDTHVa8R9Hb0tpCz
XzqJL5Df/CRYRFE0Yn8nr9M07XcSwBXmXN6QDfncRTCjt6+Rgfla4Adfn3D+ERS4Yht/wY8FxVN2xTac
gLP5qyYLAhmmA4SGyeeEoPkSq3EWydsoB4gRDEqBVU/p15ajstHKCgAAAABJRU5ErkJggg==
@ -79,7 +79,7 @@
<data name="textBox4.HighlightImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wQAADsEBuJFr7QAAAJtJREFUOE/t0zEKwkAQheEpvILHSLySlTeJ6AnEzpPYi0ERPIKWKtZKNv9LNS5x
wAAADsABataJCQAAAJtJREFUOE/t0zEKwkAQheEpvILHSLySlTeJ6AnEzpPYi0ERPIKWKtZKNv9LNS5x
E6xS+OCDJew8tsgYmeCECsGZo1dKXLBwtnghQ2fe0JDPGHecsW6xwgwjNM8tdIgyxQ0qij2gORV9LejK
Bk8dfi3QjGY/C0IISS7/gkEVtP3KfbKEZm0PLZM++IVK0d0rdrAcR8TrnKK7BzPLa7Wb+WX/Nb8PAAAA
AElFTkSuQmCC
@ -88,7 +88,7 @@
<data name="textBox4.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wQAADsEBuJFr7QAAALZJREFUOE/tkzEKwjAYRjt4BY9hvZKTN1HsCYqbJzGzKBGb9gY6qjgrxvdJK7ZS
wAAADsABataJCQAAALZJREFUOE/tkzEKwjAYRjt4BY9hvZKTN1HsCYqbJzGzKBGb9gY6qjgrxvdJK7ZS
Gpwc/ODBnzTvg0AT5Xk+hB3cwVc456ZRSIqi2MAeafbGEq5Zlg3KY+1Bvkkql89Ya/vsnUCZN8FJYWyM
6ekKnsWkdF9hb8S3I6ioyRnkpa0FXcFbwOXrAjlyawXe+06q/At+qoDh41cOCU4iV8OaQY8pUVEgOnuA
VcSzjRm2UHvOHeisdc7FDwDnJKIbLgP9AAAAAElFTkSuQmCC

View File

@ -86,35 +86,42 @@ namespace FizzyLauncher.Windows.Forms
public int TileWidthCount { get; private set; } = DEFAULT_COLUMN;
public void Add(TilePanelLayout tilePanelLayout)
{
ThreadControl.Add(flowLayoutPanel1, tilePanelLayout);
}
public void Add()
{
ThreadControl.Add(flowLayoutPanel1, new TilePanelLayout(new TileGroupModel()
this.Add(new TilePanelLayout(new TileGroupModel()
{
Title = "New Group",
IsExpanded = true,
GridSize = new Size(6, 1)
GridSize = new Size(this.TileWidthCount, 1)
}));
this.TileWidthCount = Math.Max(this.TileWidthCount, 6);
}
public void Clear(bool addDefault = false)
public void Add(TilePanelLayout tilePanelLayout)
{
ThreadControl.Add(flowLayoutPanel1, tilePanelLayout);
this.InvalidateColumnSize();
}
public void Add(int columnCount)
{
this.TileWidthCount = ((columnCount <= 0) ? DEFAULT_COLUMN : columnCount);
this.Add();
}
public void Clear()
{
ThreadControl.Clear(flowLayoutPanel1);
this.TileWidthCount = DEFAULT_COLUMN;
if (addDefault)
{
this.Add();
}
InvalidateColumnSize();
}
ColumnSizeChanged();
public void InvalidateColumnSize()
{
this.OnColumnSizeChanged?.Invoke(this, null);
}
public void Load(List<TileGroupModel> groupList)
@ -135,14 +142,10 @@ namespace FizzyLauncher.Windows.Forms
this.Add(panel);
}
ColumnSizeChanged();
InvalidateColumnSize();
}
protected void ColumnSizeChanged()
{
this.OnColumnSizeChanged?.Invoke(this, null);
}
}