Added: add group in main menu

This commit is contained in:
Ray 2021-08-01 16:00:20 +01:00
parent 928adf8f04
commit 596ca930b9
5 changed files with 84 additions and 91 deletions

View File

@ -1,11 +1,9 @@
using FizzyLauncher.Models;
using FizzyLauncher.Text.Json;
using FizzyLauncher.Windows.Forms;
using RyzStudio.Windows.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
@ -170,6 +168,7 @@ namespace FizzyLauncher
sessionFilename = null;
}
protected async Task collapseWindow(int width, int increment = 6)
{
await Task.Run(() =>
@ -560,13 +559,12 @@ namespace FizzyLauncher
/// <param name="e"></param>
private void addGroupToolStripMenuItem_Click(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(sessionFilename))
{
return;
}
//if (string.IsNullOrWhiteSpace(sessionFilename))
//{
// return;
//}
tileContainer1.Add();
}

View File

@ -40,10 +40,10 @@ namespace FizzyLauncher.Windows.Forms
this.pickerBox1 = new RyzStudio.Windows.ThemedForms.TPickerBox();
this.horizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator();
this.SuspendLayout();
//
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.Color.Transparent;
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -55,9 +55,9 @@ namespace FizzyLauncher.Windows.Forms
this.textBox1.SubmitButton = null;
this.textBox1.TabIndex = 152;
this.textBox1.UseSystemPasswordChar = false;
//
//
// label2
//
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
@ -68,9 +68,9 @@ namespace FizzyLauncher.Windows.Forms
this.label2.TabIndex = 155;
this.label2.Text = "Show Only Expanded";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// label1
//
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
@ -82,9 +82,9 @@ namespace FizzyLauncher.Windows.Forms
this.label1.TabIndex = 153;
this.label1.Text = "Title";
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;
@ -99,9 +99,9 @@ namespace FizzyLauncher.Windows.Forms
this.button1.Size = new System.Drawing.Size(128, 32);
this.button1.TabIndex = 173;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
//
// pickerBox1
//
//
this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
this.pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -112,10 +112,10 @@ namespace FizzyLauncher.Windows.Forms
this.pickerBox1.Size = new System.Drawing.Size(84, 34);
this.pickerBox1.SubmitButton = null;
this.pickerBox1.TabIndex = 174;
//
//
// horizontalSeparator2
//
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
//
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
@ -128,9 +128,9 @@ namespace FizzyLauncher.Windows.Forms
this.horizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
this.horizontalSeparator2.TabIndex = 182;
//
//
// EditGroupForm
//
//
this.ClientSize = new System.Drawing.Size(384, 521);
this.Controls.Add(this.horizontalSeparator2);
this.Controls.Add(this.pickerBox1);

View File

@ -63,10 +63,10 @@ namespace FizzyLauncher.Windows.Forms
this.label2 = new System.Windows.Forms.Label();
this.tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
this.SuspendLayout();
//
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.Color.Transparent;
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -78,9 +78,9 @@ namespace FizzyLauncher.Windows.Forms
this.textBox1.SubmitButton = null;
this.textBox1.TabIndex = 152;
this.textBox1.UseSystemPasswordChar = false;
//
//
// label1
//
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
@ -92,9 +92,9 @@ namespace FizzyLauncher.Windows.Forms
this.label1.TabIndex = 153;
this.label1.Text = "Title";
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;
@ -109,10 +109,10 @@ namespace FizzyLauncher.Windows.Forms
this.button1.Size = new System.Drawing.Size(128, 32);
this.button1.TabIndex = 173;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
//
// horizontalSeparator2
//
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
@ -125,12 +125,12 @@ namespace FizzyLauncher.Windows.Forms
this.horizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
this.horizontalSeparator2.TabIndex = 177;
//
//
// listBox1
//
//
this.listBox1.AllowDrop = true;
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.BackColor = System.Drawing.Color.Transparent;
this.listBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -145,9 +145,9 @@ namespace FizzyLauncher.Windows.Forms
this.listBox1.OnEdit += new System.EventHandler(this.listBox1_OnEdit);
this.listBox1.DragDrop += new System.Windows.Forms.DragEventHandler(this.listBox1_DragDrop);
this.listBox1.DragOver += new System.Windows.Forms.DragEventHandler(this.listBox1_DragOver);
//
//
// label2
//
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
@ -158,10 +158,10 @@ namespace FizzyLauncher.Windows.Forms
this.label2.TabIndex = 181;
this.label2.Text = "List";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// tHorizontalSeparator1
//
this.tHorizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
//
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);
@ -174,9 +174,9 @@ namespace FizzyLauncher.Windows.Forms
this.tHorizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.tHorizontalSeparator1.Size = new System.Drawing.Size(364, 22);
this.tHorizontalSeparator1.TabIndex = 182;
//
//
// EditTileFolderForm
//
//
this.ClientSize = new System.Drawing.Size(384, 521);
this.Controls.Add(this.tHorizontalSeparator1);
this.Controls.Add(this.label2);
@ -238,10 +238,11 @@ namespace FizzyLauncher.Windows.Forms
switch (dialogMode)
{
case DialogModeType.Add:
this.Text = "Add Tile List";
this.Text = "Add Folder";
textBox1.Text = "New Folder";
break;
case DialogModeType.Edit:
this.Text = "Edit Tile List";
this.Text = "Edit Folder";
break;
default: break;
}

View File

@ -98,10 +98,10 @@ namespace FizzyLauncher.Windows.Forms
this.horizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
this.horizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator();
this.SuspendLayout();
//
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.BackColor = System.Drawing.Color.Transparent;
this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -113,9 +113,9 @@ namespace FizzyLauncher.Windows.Forms
this.textBox1.SubmitButton = null;
this.textBox1.TabIndex = 152;
this.textBox1.UseSystemPasswordChar = false;
//
//
// label6
//
//
this.label6.AutoSize = true;
this.label6.BackColor = System.Drawing.Color.Transparent;
this.label6.ForeColor = System.Drawing.SystemColors.ControlText;
@ -126,9 +126,9 @@ namespace FizzyLauncher.Windows.Forms
this.label6.TabIndex = 163;
this.label6.Text = "Run As Admin";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// label7
//
//
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.Color.Transparent;
this.label7.ForeColor = System.Drawing.SystemColors.ControlText;
@ -139,9 +139,9 @@ namespace FizzyLauncher.Windows.Forms
this.label7.TabIndex = 161;
this.label7.Text = "Window Style";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// label4
//
//
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.ForeColor = System.Drawing.SystemColors.ControlText;
@ -152,9 +152,9 @@ namespace FizzyLauncher.Windows.Forms
this.label4.TabIndex = 159;
this.label4.Text = "Working Directory";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// label3
//
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
@ -165,9 +165,9 @@ namespace FizzyLauncher.Windows.Forms
this.label3.TabIndex = 157;
this.label3.Text = "Argument";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// label2
//
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
@ -178,9 +178,9 @@ namespace FizzyLauncher.Windows.Forms
this.label2.TabIndex = 155;
this.label2.Text = "Filename";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// label1
//
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
@ -192,10 +192,10 @@ namespace FizzyLauncher.Windows.Forms
this.label1.TabIndex = 153;
this.label1.Text = "Title";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox2.BackColor = System.Drawing.Color.Transparent;
this.textBox2.FileDialog = null;
@ -210,10 +210,10 @@ namespace FizzyLauncher.Windows.Forms
this.textBox2.SubmitButton = null;
this.textBox2.TabIndex = 170;
this.textBox2.UseSystemPasswordChar = false;
//
//
// textBox3
//
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox3.BackColor = System.Drawing.Color.Transparent;
this.textBox3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -225,10 +225,10 @@ namespace FizzyLauncher.Windows.Forms
this.textBox3.SubmitButton = null;
this.textBox3.TabIndex = 171;
this.textBox3.UseSystemPasswordChar = false;
//
//
// textBox4
//
this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox4.BackColor = System.Drawing.Color.Transparent;
this.textBox4.FolderDialog = null;
@ -243,9 +243,9 @@ namespace FizzyLauncher.Windows.Forms
this.textBox4.SubmitButton = null;
this.textBox4.TabIndex = 172;
this.textBox4.UseSystemPasswordChar = false;
//
//
// 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;
@ -260,9 +260,9 @@ namespace FizzyLauncher.Windows.Forms
this.button1.Size = new System.Drawing.Size(128, 32);
this.button1.TabIndex = 173;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
//
// pickerBox1
//
//
this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
this.pickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -273,9 +273,9 @@ namespace FizzyLauncher.Windows.Forms
this.pickerBox1.Size = new System.Drawing.Size(128, 34);
this.pickerBox1.SubmitButton = null;
this.pickerBox1.TabIndex = 174;
//
//
// pickerBox2
//
//
this.pickerBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pickerBox2.BackColor = System.Drawing.Color.Transparent;
this.pickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
@ -286,10 +286,10 @@ namespace FizzyLauncher.Windows.Forms
this.pickerBox2.Size = new System.Drawing.Size(84, 34);
this.pickerBox2.SubmitButton = null;
this.pickerBox2.TabIndex = 175;
//
//
// horizontalSeparator1
//
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.horizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.horizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
@ -302,10 +302,10 @@ namespace FizzyLauncher.Windows.Forms
this.horizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.horizontalSeparator1.Size = new System.Drawing.Size(364, 22);
this.horizontalSeparator1.TabIndex = 176;
//
//
// horizontalSeparator2
//
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
//
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
@ -318,9 +318,9 @@ namespace FizzyLauncher.Windows.Forms
this.horizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
this.horizontalSeparator2.TabIndex = 177;
//
//
// EditTileForm
//
//
this.ClientSize = new System.Drawing.Size(384, 521);
this.Controls.Add(this.horizontalSeparator2);
this.Controls.Add(this.horizontalSeparator1);

View File

@ -4,9 +4,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FizzyLauncher.Windows.Forms
@ -148,8 +145,5 @@ namespace FizzyLauncher.Windows.Forms
InvalidateColumnSize();
}
}
}