Merge branch 'feature/tile-usability-improvements' into 'release/0.2.3.006'
Feature/tile usability improvements See merge request SympatheticFire/linear-app-launcher!31
This commit is contained in:
commit
be7cdca3b7
@ -12,9 +12,9 @@
|
||||
<Company>Hi, I'm Ray</Company>
|
||||
<Product>Fizzy Launcher</Product>
|
||||
<Copyright>Ray Lam</Copyright>
|
||||
<AssemblyVersion>0.2.2.018</AssemblyVersion>
|
||||
<FileVersion>0.2.2.018</FileVersion>
|
||||
<Version>0.2.2.018</Version>
|
||||
<AssemblyVersion>0.2.3.006</AssemblyVersion>
|
||||
<FileVersion>0.2.3.006</FileVersion>
|
||||
<Version>0.2.3.006</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@ -58,12 +58,20 @@
|
||||
<EmbeddedResource Remove="RyzStudio\Windows\ThemedForms\BorderlessToolForm.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="installer-64.iss" />
|
||||
<None Remove="installer-86.iss" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="AppResource.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<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>
|
||||
|
102
MainForm.Designer.cs
generated
102
MainForm.Designer.cs
generated
@ -1,4 +1,6 @@
|
||||
namespace FizzyLauncher
|
||||
using FizzyLauncher.Windows.Forms;
|
||||
|
||||
namespace FizzyLauncher
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
@ -46,6 +48,8 @@
|
||||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.showBigIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.enableAnimationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -56,11 +60,9 @@
|
||||
this.viewHelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.tileContainer1 = new FizzyLauncher.Windows.Forms.TileContainer();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// saveFileDialog1
|
||||
@ -99,6 +101,7 @@
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.toolStripMenuItem1,
|
||||
this.viewToolStripMenuItem,
|
||||
this.toolsToolStripMenuItem,
|
||||
this.helpToolStripMenuItem1});
|
||||
@ -129,7 +132,7 @@
|
||||
this.newToolStripMenuItem.Image = global::FizzyLauncher.UIResource.file2;
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.newToolStripMenuItem.Text = "&New";
|
||||
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
|
||||
//
|
||||
@ -138,55 +141,70 @@
|
||||
this.openToolStripMenuItem.Image = global::FizzyLauncher.UIResource.folder2;
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.openToolStripMenuItem.Text = "&Open";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem13
|
||||
//
|
||||
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
|
||||
this.toolStripMenuItem13.Size = new System.Drawing.Size(177, 6);
|
||||
this.toolStripMenuItem13.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// closeToolStripMenuItem
|
||||
//
|
||||
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
|
||||
this.closeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.closeToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.closeToolStripMenuItem.Text = "&Close";
|
||||
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem14
|
||||
//
|
||||
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
|
||||
this.toolStripMenuItem14.Size = new System.Drawing.Size(177, 6);
|
||||
this.toolStripMenuItem14.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Image = global::FizzyLauncher.UIResource.disk2;
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// saveAsToolStripMenuItem
|
||||
//
|
||||
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.saveAsToolStripMenuItem.Text = "Save &As...";
|
||||
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem15
|
||||
//
|
||||
this.toolStripMenuItem15.Name = "toolStripMenuItem15";
|
||||
this.toolStripMenuItem15.Size = new System.Drawing.Size(177, 6);
|
||||
this.toolStripMenuItem15.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// exitToolStripMenuItem2
|
||||
//
|
||||
this.exitToolStripMenuItem2.Name = "exitToolStripMenuItem2";
|
||||
this.exitToolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
|
||||
this.exitToolStripMenuItem2.Size = new System.Drawing.Size(146, 22);
|
||||
this.exitToolStripMenuItem2.Text = "E&xit";
|
||||
this.exitToolStripMenuItem2.Click += new System.EventHandler(this.exitToolStripMenuItem2_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addGroupToolStripMenuItem});
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(39, 20);
|
||||
this.toolStripMenuItem1.Text = "&Edit";
|
||||
//
|
||||
// addGroupToolStripMenuItem
|
||||
//
|
||||
this.addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem";
|
||||
this.addGroupToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||
this.addGroupToolStripMenuItem.Text = "&Add Group";
|
||||
this.addGroupToolStripMenuItem.Click += new System.EventHandler(this.addGroupToolStripMenuItem_Click);
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -200,21 +218,21 @@
|
||||
// showBigIconsToolStripMenuItem
|
||||
//
|
||||
this.showBigIconsToolStripMenuItem.Name = "showBigIconsToolStripMenuItem";
|
||||
this.showBigIconsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.showBigIconsToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.showBigIconsToolStripMenuItem.Text = "Show &Big Icons";
|
||||
this.showBigIconsToolStripMenuItem.Click += new System.EventHandler(this.showBigIconsToolStripMenuItem_Click);
|
||||
//
|
||||
// enableAnimationsToolStripMenuItem
|
||||
//
|
||||
this.enableAnimationsToolStripMenuItem.Name = "enableAnimationsToolStripMenuItem";
|
||||
this.enableAnimationsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.enableAnimationsToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.enableAnimationsToolStripMenuItem.Text = "Enable &Animations";
|
||||
this.enableAnimationsToolStripMenuItem.Click += new System.EventHandler(this.enableAnimationsToolStripMenuItem_Click);
|
||||
//
|
||||
// alwaysOnTopToolStripMenuItem
|
||||
//
|
||||
this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
|
||||
this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.alwaysOnTopToolStripMenuItem.Text = "Always On &Top";
|
||||
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
|
||||
//
|
||||
@ -231,7 +249,7 @@
|
||||
this.optionsToolStripMenuItem.Image = global::FizzyLauncher.UIResource.cog2;
|
||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
this.optionsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12)));
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
this.optionsToolStripMenuItem.Text = "&Options";
|
||||
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
|
||||
//
|
||||
@ -250,49 +268,34 @@
|
||||
this.viewHelpToolStripMenuItem1.Image = global::FizzyLauncher.UIResource.help2;
|
||||
this.viewHelpToolStripMenuItem1.Name = "viewHelpToolStripMenuItem1";
|
||||
this.viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||
this.viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
|
||||
this.viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||
this.viewHelpToolStripMenuItem1.Text = "&View Help";
|
||||
this.viewHelpToolStripMenuItem1.Click += new System.EventHandler(this.viewHelpToolStripMenuItem1_Click);
|
||||
//
|
||||
// toolStripMenuItem16
|
||||
//
|
||||
this.toolStripMenuItem16.Name = "toolStripMenuItem16";
|
||||
this.toolStripMenuItem16.Size = new System.Drawing.Size(177, 6);
|
||||
this.toolStripMenuItem16.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// aboutToolStripMenuItem1
|
||||
//
|
||||
this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
|
||||
this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
|
||||
this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||
this.aboutToolStripMenuItem1.Text = "&About";
|
||||
this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.AutoScroll = true;
|
||||
this.panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.flowLayoutPanel1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 24);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Padding = new System.Windows.Forms.Padding(10, 10, 10, 20);
|
||||
this.panel1.Size = new System.Drawing.Size(633, 376);
|
||||
this.panel1.TabIndex = 3;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
this.flowLayoutPanel1.AutoSize = true;
|
||||
this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(10, 10);
|
||||
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 20);
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(0, 20);
|
||||
this.flowLayoutPanel1.TabIndex = 29;
|
||||
this.flowLayoutPanel1.WrapContents = false;
|
||||
this.tileContainer1.AutoScroll = true;
|
||||
this.tileContainer1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.tileContainer1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tileContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tileContainer1.Location = new System.Drawing.Point(0, 24);
|
||||
this.tileContainer1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.tileContainer1.Name = "panel1";
|
||||
this.tileContainer1.Padding = new System.Windows.Forms.Padding(10, 10, 10, 20);
|
||||
this.tileContainer1.Size = new System.Drawing.Size(633, 376);
|
||||
this.tileContainer1.TabIndex = 3;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
@ -301,7 +304,7 @@
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250)))));
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.ClientSize = new System.Drawing.Size(633, 400);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.tileContainer1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.DoubleBuffered = true;
|
||||
this.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
@ -315,8 +318,6 @@
|
||||
this.contextMenuStrip2.ResumeLayout(false);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -333,8 +334,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private TileContainer tileContainer1;
|
||||
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem13;
|
||||
@ -351,6 +351,8 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem viewHelpToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem16;
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem addGroupToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
170
MainForm.cs
170
MainForm.cs
@ -1,12 +1,11 @@
|
||||
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;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
@ -39,6 +38,7 @@ namespace FizzyLauncher
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
tileContainer1.OnColumnSizeChanged += tileContainer1_OnSizeChanged;
|
||||
notifyIcon1.Text = Application.ProductName;
|
||||
|
||||
this.AutoScaleMode = AutoScaleMode.None;
|
||||
@ -160,6 +160,15 @@ 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(() =>
|
||||
@ -230,15 +239,8 @@ namespace FizzyLauncher
|
||||
|
||||
protected void newSession()
|
||||
{
|
||||
flowLayoutPanel1.Controls.Clear();
|
||||
flowLayoutPanel1.Controls.Add(new TilePanelLayout(new TileGroupModel()
|
||||
{
|
||||
Title = "New Group",
|
||||
IsExpanded = true,
|
||||
GridSize = new Size(6, 1)
|
||||
}));
|
||||
|
||||
InvalidateWidth(6);
|
||||
NewForm form = new NewForm(this);
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
protected async Task loadFile(string filename)
|
||||
@ -300,23 +302,7 @@ namespace FizzyLauncher
|
||||
}
|
||||
|
||||
// load tiles
|
||||
int maxTileWidth = 0;
|
||||
ThreadControl.Clear(flowLayoutPanel1);
|
||||
|
||||
if (this.CurrentSession.Groups != null)
|
||||
{
|
||||
foreach (TileGroupModel item in this.CurrentSession.Groups)
|
||||
{
|
||||
maxTileWidth = Math.Max(maxTileWidth, item.GridSize.Width);
|
||||
|
||||
TilePanelLayout panel = new TilePanelLayout(item);
|
||||
|
||||
ThreadControl.Add(flowLayoutPanel1, panel);
|
||||
}
|
||||
}
|
||||
|
||||
// resize
|
||||
InvalidateSize(maxTileWidth);
|
||||
tileContainer1.Load(this.CurrentSession.Groups);
|
||||
|
||||
// reposition
|
||||
if (!this.CurrentSession.StartPosition.IsEmpty) ThreadControl.SetLocation(this, this.CurrentSession.StartPosition);
|
||||
@ -326,6 +312,7 @@ namespace FizzyLauncher
|
||||
ThreadControl.SetVisible(this, true);
|
||||
ThreadControl.SetChecked(enableAnimationsToolStripMenuItem, this.CurrentSession.EnableAnimation);
|
||||
ThreadControl.SetChecked(showBigIconsToolStripMenuItem, this.CurrentSession.EnableBigIconInFolder);
|
||||
ThreadControl.SetClientHeight(this, this.CurrentSession.DefaultHeight);
|
||||
|
||||
ThreadControl.SetFocus(this);
|
||||
|
||||
@ -347,7 +334,7 @@ namespace FizzyLauncher
|
||||
return false;
|
||||
}
|
||||
|
||||
if (flowLayoutPanel1.Controls.Count <= 0)
|
||||
if (tileContainer1.GroupCount <= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -363,19 +350,7 @@ namespace FizzyLauncher
|
||||
this.CurrentSession.DefaultHeight = this.Height;
|
||||
this.CurrentSession.AlwaysOnTop = this.TopMost;
|
||||
this.CurrentSession.StartPosition = this.Location;
|
||||
|
||||
// save
|
||||
this.CurrentSession.Groups = new List<TileGroupModel>();
|
||||
for (int i = 0; i < flowLayoutPanel1.Controls.Count; i++)
|
||||
{
|
||||
if (flowLayoutPanel1.Controls[i].GetType() != typeof(TilePanelLayout))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
TilePanelLayout container = flowLayoutPanel1.Controls[i] as TilePanelLayout;
|
||||
this.CurrentSession.Groups.Add(container.Model);
|
||||
}
|
||||
this.CurrentSession.Groups = tileContainer1.GroupModels?.ToList() ?? new List<TileGroupModel>();
|
||||
|
||||
var options = new JsonSerializerOptions();
|
||||
options.Converters.Add(new JsonPointConverter());
|
||||
@ -423,30 +398,13 @@ namespace FizzyLauncher
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
protected void InvalidateSize(int columnWidth)
|
||||
{
|
||||
int newWidth = TilePanelLayout.CalcWidth(columnWidth);
|
||||
newWidth += SystemInformation.VerticalScrollBarWidth;
|
||||
newWidth += flowLayoutPanel1.Padding.Horizontal + flowLayoutPanel1.Margin.Horizontal;
|
||||
newWidth += panel1.Left + panel1.Padding.Horizontal + panel1.Margin.Horizontal;
|
||||
newWidth += this.Padding.Horizontal;
|
||||
|
||||
ThreadControl.ClientSize(this, newWidth, this.CurrentSession.DefaultHeight);
|
||||
}
|
||||
|
||||
protected void InvalidateWidth(int columnWidth)
|
||||
{
|
||||
int newWidth = TilePanelLayout.CalcWidth(columnWidth);
|
||||
newWidth += SystemInformation.VerticalScrollBarWidth;
|
||||
newWidth += panel1.Left + panel1.Padding.Horizontal + this.Padding.Horizontal + flowLayoutPanel1.Padding.Horizontal + flowLayoutPanel1.Left;
|
||||
|
||||
ThreadControl.SetClientWidth(this, newWidth);
|
||||
}
|
||||
|
||||
|
||||
#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))
|
||||
@ -462,15 +420,11 @@ namespace FizzyLauncher
|
||||
if (rv)
|
||||
{
|
||||
newSession();
|
||||
|
||||
sessionFilename = null;
|
||||
}
|
||||
}
|
||||
else if (dr == DialogResult.No)
|
||||
{
|
||||
newSession();
|
||||
|
||||
sessionFilename = null;
|
||||
}
|
||||
else if (dr == DialogResult.Cancel)
|
||||
{
|
||||
@ -479,6 +433,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))
|
||||
@ -516,11 +475,16 @@ 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))
|
||||
{
|
||||
flowLayoutPanel1.Controls.Clear();
|
||||
tileContainer1.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -530,14 +494,14 @@ namespace FizzyLauncher
|
||||
bool rv = saveFile(sessionFilename, false);
|
||||
if (rv)
|
||||
{
|
||||
flowLayoutPanel1.Controls.Clear();
|
||||
tileContainer1.Clear();
|
||||
|
||||
sessionFilename = null;
|
||||
}
|
||||
}
|
||||
else if (dr == DialogResult.No)
|
||||
{
|
||||
flowLayoutPanel1.Controls.Clear();
|
||||
tileContainer1.Clear();
|
||||
|
||||
sessionFilename = null;
|
||||
}
|
||||
@ -548,6 +512,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))
|
||||
@ -560,11 +529,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;
|
||||
@ -573,6 +552,22 @@ namespace FizzyLauncher
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Add group
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void addGroupToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
tileContainer1.Add();
|
||||
}
|
||||
|
||||
|
||||
/// <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)
|
||||
@ -585,6 +580,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)
|
||||
@ -597,12 +597,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);
|
||||
@ -612,6 +622,11 @@ namespace FizzyLauncher
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// View help
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void viewHelpToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
@ -624,6 +639,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);
|
||||
@ -636,7 +656,6 @@ namespace FizzyLauncher
|
||||
saveAsToolStripMenuItem.Enabled = !string.IsNullOrWhiteSpace(sessionFilename);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region notification icon
|
||||
@ -656,9 +675,14 @@ namespace FizzyLauncher
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
private void tileContainer1_OnSizeChanged(object sender, EventArgs e)
|
||||
{
|
||||
int newWidth = this.Padding.Horizontal + SystemInformation.VerticalScrollBarWidth + tileContainer1.CalcWidth;
|
||||
|
||||
ThreadControl.SetClientWidth(this, newWidth);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
126
NewForm.cs
Normal file
126
NewForm.cs
Normal 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
60
NewForm.resx
Normal 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>
|
@ -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
|
||||
|
@ -399,9 +399,9 @@ namespace RyzStudio.Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
public static void ClientSize(Control control, int width, int height) => ClientSize(control, new Size(width, height));
|
||||
public static void SetClientSize(Control control, int width, int height) => SetClientSize(control, new Size(width, height));
|
||||
|
||||
public static void ClientSize(Control control, Size value)
|
||||
public static void SetClientSize(Control control, Size value)
|
||||
{
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
@ -415,6 +415,20 @@ namespace RyzStudio.Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetClientHeight(Control control, int value)
|
||||
{
|
||||
if (control.InvokeRequired)
|
||||
{
|
||||
control.Invoke(new MethodInvoker(() => {
|
||||
control.ClientSize = new Size(control.ClientSize.Width, value);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
control.ClientSize = new Size(control.ClientSize.Width, value);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetSize(Control control, int width, int height) => SetSize(control, new Size(width, height));
|
||||
|
||||
public static void SetSize(Control control, Size value)
|
||||
|
99
RyzStudio/Windows/ThemedForms/TNumericBox.cs
Normal file
99
RyzStudio/Windows/ThemedForms/TNumericBox.cs
Normal 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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
RyzStudio/Windows/ThemedForms/TNumericBox.designer.cs
generated
Normal file
60
RyzStudio/Windows/ThemedForms/TNumericBox.designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
60
RyzStudio/Windows/ThemedForms/TNumericBox.resx
Normal file
60
RyzStudio/Windows/ThemedForms/TNumericBox.resx
Normal 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>
|
@ -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);
|
||||
|
@ -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();
|
||||
@ -239,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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
149
Windows/Forms/TileContainer.cs
Normal file
149
Windows/Forms/TileContainer.cs
Normal file
@ -0,0 +1,149 @@
|
||||
using FizzyLauncher.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
public class TileContainer : Panel
|
||||
{
|
||||
protected const int DEFAULT_COLUMN = 6;
|
||||
|
||||
protected FlowLayoutPanel flowLayoutPanel1 = null;
|
||||
|
||||
|
||||
public TileContainer()
|
||||
{
|
||||
flowLayoutPanel1 = new FlowLayoutPanel();
|
||||
flowLayoutPanel1.AutoSize = true;
|
||||
flowLayoutPanel1.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
flowLayoutPanel1.BackColor = Color.Transparent;
|
||||
flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
|
||||
flowLayoutPanel1.Location = new Point(10, 10);
|
||||
flowLayoutPanel1.Margin = new Padding(0);
|
||||
flowLayoutPanel1.Padding = new Padding(0, 0, 0, 20);
|
||||
flowLayoutPanel1.Size = new Size(0, 20);
|
||||
flowLayoutPanel1.WrapContents = false;
|
||||
|
||||
this.AutoScroll = true;
|
||||
this.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Margin = new Padding(0);
|
||||
this.Name = "tileContainer1";
|
||||
this.Padding = new Padding(10, 10, 10, 20);
|
||||
this.Controls.Add(flowLayoutPanel1);
|
||||
}
|
||||
|
||||
|
||||
[Browsable(false)]
|
||||
public event EventHandler OnColumnSizeChanged;
|
||||
|
||||
|
||||
public int CalcWidth
|
||||
{
|
||||
get =>
|
||||
TilePanelLayout.CalcWidth(this.TileWidthCount) +
|
||||
this.Left + this.Padding.Horizontal + this.Margin.Horizontal +
|
||||
flowLayoutPanel1.Padding.Horizontal + flowLayoutPanel1.Margin.Horizontal;
|
||||
}
|
||||
|
||||
public int GroupCount
|
||||
{
|
||||
get => flowLayoutPanel1.Controls.Count;
|
||||
}
|
||||
|
||||
public IEnumerable<TilePanelLayout> Groups
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < flowLayoutPanel1.Controls.Count; i++)
|
||||
{
|
||||
if (flowLayoutPanel1.Controls[i].GetType() != typeof(TilePanelLayout))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
TilePanelLayout container = flowLayoutPanel1.Controls[i] as TilePanelLayout;
|
||||
yield return container;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<TileGroupModel> GroupModels
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (TilePanelLayout item in this.Groups)
|
||||
{
|
||||
yield return item.Model;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int TileWidthCount { get; private set; } = DEFAULT_COLUMN;
|
||||
|
||||
|
||||
public void Add()
|
||||
{
|
||||
this.Add(new TilePanelLayout(new TileGroupModel()
|
||||
{
|
||||
Title = "New Group",
|
||||
IsExpanded = true,
|
||||
GridSize = new Size(this.TileWidthCount, 1)
|
||||
}));
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
InvalidateColumnSize();
|
||||
}
|
||||
|
||||
public void InvalidateColumnSize()
|
||||
{
|
||||
this.OnColumnSizeChanged?.Invoke(this, null);
|
||||
}
|
||||
|
||||
public void Load(List<TileGroupModel> groupList)
|
||||
{
|
||||
this.Clear();
|
||||
|
||||
if (groupList == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (TileGroupModel item in groupList)
|
||||
{
|
||||
this.TileWidthCount = Math.Max(this.TileWidthCount, item.GridSize.Width);
|
||||
|
||||
TilePanelLayout panel = new TilePanelLayout(item);
|
||||
|
||||
this.Add(panel);
|
||||
}
|
||||
|
||||
InvalidateColumnSize();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
120
Windows/Forms/TileContainer.resx
Normal file
120
Windows/Forms/TileContainer.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
4
Windows/Forms/TilePanel.Designer.cs
generated
4
Windows/Forms/TilePanel.Designer.cs
generated
@ -58,7 +58,7 @@
|
||||
this.removeToolStripMenuItem.Text = "&Remove";
|
||||
this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
|
||||
//
|
||||
// TTilePanel
|
||||
// TilePanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
@ -66,7 +66,7 @@
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 3, 0, 0);
|
||||
this.MaximumSize = new System.Drawing.Size(82, 81);
|
||||
this.MinimumSize = new System.Drawing.Size(82, 81);
|
||||
this.Name = "TTilePanel";
|
||||
this.Name = "TilePanel";
|
||||
this.Size = new System.Drawing.Size(82, 81);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
111
Windows/Forms/TilePanelLayout.Designer.cs
generated
111
Windows/Forms/TilePanelLayout.Designer.cs
generated
@ -32,11 +32,11 @@
|
||||
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.removeRowToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.topToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -46,6 +46,10 @@
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.removeRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -54,70 +58,70 @@
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addToolStripMenuItem,
|
||||
this.addListToolStripMenuItem});
|
||||
this.addListToolStripMenuItem,
|
||||
this.toolStripMenuItem6,
|
||||
this.removeRowToolStripMenuItem1});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70);
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(144, 76);
|
||||
//
|
||||
// addToolStripMenuItem
|
||||
//
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
this.addToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.addToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
|
||||
this.addToolStripMenuItem.Text = "&Add Tile";
|
||||
this.addToolStripMenuItem.Click += new System.EventHandler(this.addTileMenuItem_Click);
|
||||
//
|
||||
// addListToolStripMenuItem
|
||||
//
|
||||
this.addListToolStripMenuItem.Name = "addListToolStripMenuItem";
|
||||
this.addListToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.addListToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
|
||||
this.addListToolStripMenuItem.Text = "Add &Folder";
|
||||
this.addListToolStripMenuItem.Click += new System.EventHandler(this.addListTileMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem6
|
||||
//
|
||||
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
|
||||
this.toolStripMenuItem6.Size = new System.Drawing.Size(140, 6);
|
||||
//
|
||||
// removeRowToolStripMenuItem1
|
||||
//
|
||||
this.removeRowToolStripMenuItem1.Name = "removeRowToolStripMenuItem1";
|
||||
this.removeRowToolStripMenuItem1.Size = new System.Drawing.Size(143, 22);
|
||||
this.removeRowToolStripMenuItem1.Text = "&Remove Row";
|
||||
this.removeRowToolStripMenuItem1.Click += new System.EventHandler(this.removeRowToolStripMenuItem_Click_1);
|
||||
//
|
||||
// contextMenuStrip2
|
||||
//
|
||||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem2,
|
||||
this.toolStripMenuItem5,
|
||||
this.toolStripMenuItem1,
|
||||
this.removeRowToolStripMenuItem,
|
||||
this.toolStripSeparator3,
|
||||
this.toolStripMenuItem7,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripMenuItem4,
|
||||
this.toolStripSeparator1,
|
||||
this.toolStripMenuItem3});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip2.Size = new System.Drawing.Size(144, 148);
|
||||
this.contextMenuStrip2.Size = new System.Drawing.Size(181, 154);
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(143, 22);
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem2.Text = "&Add Group";
|
||||
this.toolStripMenuItem2.Click += new System.EventHandler(this.addGroupMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem5
|
||||
//
|
||||
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(143, 22);
|
||||
this.toolStripMenuItem5.Text = "Add &Row";
|
||||
this.toolStripMenuItem5.Click += new System.EventHandler(this.addRowMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(143, 22);
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem1.Text = "&Edit";
|
||||
this.toolStripMenuItem1.Click += new System.EventHandler(this.editGroupMenuItem_Click);
|
||||
//
|
||||
// removeRowToolStripMenuItem
|
||||
//
|
||||
this.removeRowToolStripMenuItem.Name = "removeRowToolStripMenuItem";
|
||||
this.removeRowToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
|
||||
this.removeRowToolStripMenuItem.Text = "Remo&ve Row";
|
||||
this.removeRowToolStripMenuItem.Click += new System.EventHandler(this.removeRowToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(140, 6);
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
@ -127,7 +131,7 @@
|
||||
this.downToolStripMenuItem,
|
||||
this.bottomToolStripMenuItem});
|
||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(143, 22);
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem4.Text = "&Move";
|
||||
//
|
||||
// topToolStripMenuItem
|
||||
@ -161,12 +165,12 @@
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(140, 6);
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(143, 22);
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem3.Text = "&Remove";
|
||||
this.toolStripMenuItem3.Click += new System.EventHandler(this.removeGroupMenuItem3_Click);
|
||||
//
|
||||
@ -176,23 +180,52 @@
|
||||
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.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.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.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.label1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick);
|
||||
this.label1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick);
|
||||
//
|
||||
// TTilePanelLayout
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// toolStripMenuItem7
|
||||
//
|
||||
this.toolStripMenuItem7.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItem5,
|
||||
this.removeRowToolStripMenuItem});
|
||||
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
|
||||
this.toolStripMenuItem7.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem7.Text = "Ro&w";
|
||||
//
|
||||
// toolStripMenuItem5
|
||||
//
|
||||
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
this.toolStripMenuItem5.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem5.Text = "Add &Row";
|
||||
this.toolStripMenuItem5.Click += new System.EventHandler(this.toolStripMenuItem5_Click);
|
||||
//
|
||||
// removeRowToolStripMenuItem
|
||||
//
|
||||
this.removeRowToolStripMenuItem.Name = "removeRowToolStripMenuItem";
|
||||
this.removeRowToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.removeRowToolStripMenuItem.Text = "Remo&ve Row";
|
||||
this.removeRowToolStripMenuItem.Click += new System.EventHandler(this.removeRowToolStripMenuItem_Click_1);
|
||||
//
|
||||
// TilePanelLayout
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "TTilePanelLayout";
|
||||
this.Size = new System.Drawing.Size(370, 150);
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.Name = "TilePanelLayout";
|
||||
this.Size = new System.Drawing.Size(432, 173);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.contextMenuStrip2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
@ -206,7 +239,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem addListToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
|
||||
@ -216,7 +248,12 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem bottomToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeRowToolStripMenuItem;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem6;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeRowToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem7;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeRowToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
@ -764,45 +764,6 @@ namespace FizzyLauncher.Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void addTileMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Point coord = convertLocationToCoord(lastMousePosition.X, lastMousePosition.Y);
|
||||
|
||||
EditTileForm.ShowAddDialog(this, coord);
|
||||
}
|
||||
|
||||
private void addListTileMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Point coord = convertLocationToCoord(lastMousePosition.X, lastMousePosition.Y);
|
||||
|
||||
EditTileFolderForm.ShowAddDialog(this, coord);
|
||||
}
|
||||
|
||||
private void addGroupMenuItem_Click(object sender, EventArgs e) => this.AddGroup();
|
||||
|
||||
private void addRowMenuItem_Click(object sender, EventArgs e) => this.AddRow();
|
||||
|
||||
private void editGroupMenuItem_Click(object sender, EventArgs e) => this.EditGroup();
|
||||
|
||||
private void moveTopMenuItem_Click(object sender, EventArgs e) => this.MoveTop();
|
||||
|
||||
private void moveUpMenuItem_Click(object sender, EventArgs e) => this.MoveUp();
|
||||
|
||||
private void moveDownMenuItem_Click(object sender, EventArgs e) => this.MoveDown();
|
||||
|
||||
private void moveBottomMenuItem_Click(object sender, EventArgs e) => this.MoveBottom();
|
||||
|
||||
private void removeGroupMenuItem3_Click(object sender, EventArgs e) => this.Remove();
|
||||
|
||||
private void removeRowToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool rs = items.Exists(x => x.Coord.Y.Equals(gridSize.Y - 1));
|
||||
if (!rs)
|
||||
{
|
||||
this.SetGridSize(gridSize.X, (gridSize.Y - 1));
|
||||
}
|
||||
}
|
||||
|
||||
private async void label1_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (isAnimating) return;
|
||||
@ -845,5 +806,138 @@ namespace FizzyLauncher.Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
#region tile context menu
|
||||
|
||||
/// <summary>
|
||||
/// Add tile
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void addTileMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Point coord = convertLocationToCoord(lastMousePosition.X, lastMousePosition.Y);
|
||||
|
||||
EditTileForm.ShowAddDialog(this, coord);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add folder
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void addListTileMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Point coord = convertLocationToCoord(lastMousePosition.X, lastMousePosition.Y);
|
||||
|
||||
EditTileFolderForm.ShowAddDialog(this, coord);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region group context menu
|
||||
|
||||
/// <summary>
|
||||
/// Add group
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void addGroupMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.AddGroup();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit group
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void editGroupMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditGroup();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add row
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void toolStripMenuItem5_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.AddRow();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove row
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void removeRowToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
if (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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move to top
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void moveTopMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MoveTop();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move up
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void moveUpMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MoveUp();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move down
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void moveDownMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MoveDown();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move to bottom
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void moveBottomMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MoveBottom();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove group
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void removeGroupMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Remove();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,64 +1,4 @@
|
||||
<?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.
|
||||
-->
|
||||
<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">
|
||||
|
@ -2,7 +2,7 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Fizzy Launcher"
|
||||
#define MyAppVersion "0.2.2.018"
|
||||
#define MyAppVersion "0.2.3.006"
|
||||
#define MyAppPublisher "Hi, I'm Ray"
|
||||
#define MyAppURL "https://www.hiimray.co.uk/software-fizzy-launcher"
|
||||
#define MyAppExeName "fizzylauncher.exe"
|
||||
|
@ -2,7 +2,7 @@
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Fizzy Launcher"
|
||||
#define MyAppVersion "0.2.2.018"
|
||||
#define MyAppVersion "0.2.3.006"
|
||||
#define MyAppPublisher "Hi, I'm Ray"
|
||||
#define MyAppURL "https://www.hiimray.co.uk/software-fizzy-launcher"
|
||||
#define MyAppExeName "fizzylauncher.exe"
|
||||
|
Reference in New Issue
Block a user