release/0.4.1 #3

Merged
Ray merged 7 commits from release/0.4.1 into master 2026-05-10 12:38:44 +00:00
20 changed files with 794 additions and 301 deletions
Showing only changes of commit afa73a1ab0 - Show all commits

View File

@ -19,7 +19,7 @@ namespace RokettoLaunch {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class AppResource { internal class AppResource {
@ -106,6 +106,26 @@ namespace RokettoLaunch {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap folder_minus {
get {
object obj = ResourceManager.GetObject("folder_minus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap help_circle {
get {
object obj = ResourceManager.GetObject("help_circle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
@ -115,5 +135,45 @@ namespace RokettoLaunch {
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap plus {
get {
object obj = ResourceManager.GetObject("plus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap save {
get {
object obj = ResourceManager.GetObject("save", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap settings {
get {
object obj = ResourceManager.GetObject("settings", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap trash_2 {
get {
object obj = ResourceManager.GetObject("trash_2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
} }
} }

View File

@ -133,7 +133,25 @@
<data name="folder_32" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="folder_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\folder_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Resources\folder_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="folder_minus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\MainMenu\folder-minus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="help_circle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\MainMenu\help-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icon_64" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="icon_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\icon-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>Resources\icon-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\MainMenu\plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\MainMenu\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\MainMenu\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="trash_2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\MainMenu\trash-2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

84
MainForm.Designer.cs generated
View File

@ -35,7 +35,7 @@ namespace RokettoLaunch
saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
notifyIcon1 = new System.Windows.Forms.NotifyIcon(components); notifyIcon1 = new System.Windows.Forms.NotifyIcon(components);
contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(components); trayMenuStrip = new System.Windows.Forms.ContextMenuStrip(components);
exitToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); exitToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
menuStrip1 = new System.Windows.Forms.MenuStrip(); menuStrip1 = new System.Windows.Forms.MenuStrip();
fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -59,7 +59,7 @@ namespace RokettoLaunch
viewHelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); viewHelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
toolStripMenuItem16 = new System.Windows.Forms.ToolStripSeparator(); toolStripMenuItem16 = new System.Windows.Forms.ToolStripSeparator();
aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
tileContainerMenu1 = new System.Windows.Forms.ContextMenuStrip(components); groupMenuStrip = new System.Windows.Forms.ContextMenuStrip(components);
addGroupToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); addGroupToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -74,16 +74,16 @@ namespace RokettoLaunch
removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
panel1 = new System.Windows.Forms.Panel(); panel1 = new System.Windows.Forms.Panel();
tileMenu1 = new System.Windows.Forms.ContextMenuStrip(components); tileMenuStrip = new System.Windows.Forms.ContextMenuStrip(components);
editToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); editToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem(); toolStripMenuItem6 = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
removeToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); removeToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
contextMenuStrip2.SuspendLayout(); trayMenuStrip.SuspendLayout();
menuStrip1.SuspendLayout(); menuStrip1.SuspendLayout();
tileContainerMenu1.SuspendLayout(); groupMenuStrip.SuspendLayout();
panel1.SuspendLayout(); panel1.SuspendLayout();
tileMenu1.SuspendLayout(); tileMenuStrip.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
// saveFileDialog1 // saveFileDialog1
@ -98,17 +98,17 @@ namespace RokettoLaunch
// //
// notifyIcon1 // notifyIcon1
// //
notifyIcon1.ContextMenuStrip = contextMenuStrip2; notifyIcon1.ContextMenuStrip = trayMenuStrip;
notifyIcon1.Icon = (System.Drawing.Icon)resources.GetObject("notifyIcon1.Icon"); notifyIcon1.Icon = (System.Drawing.Icon)resources.GetObject("notifyIcon1.Icon");
notifyIcon1.Text = "notifyIcon1"; notifyIcon1.Text = "notifyIcon1";
notifyIcon1.Visible = true; notifyIcon1.Visible = true;
notifyIcon1.MouseClick += NotifyIcon_MouseClick; notifyIcon1.MouseClick += NotifyIcon_MouseClick;
// //
// contextMenuStrip2 // trayMenuStrip
// //
contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { exitToolStripMenuItem1 }); trayMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { exitToolStripMenuItem1 });
contextMenuStrip2.Name = "contextMenuStrip2"; trayMenuStrip.Name = "contextMenuStrip2";
contextMenuStrip2.Size = new System.Drawing.Size(94, 26); trayMenuStrip.Size = new System.Drawing.Size(94, 26);
// //
// exitToolStripMenuItem1 // exitToolStripMenuItem1
// //
@ -122,7 +122,7 @@ namespace RokettoLaunch
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, toolStripMenuItem1, viewToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem1 }); menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, toolStripMenuItem1, viewToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem1 });
menuStrip1.Location = new System.Drawing.Point(0, 0); menuStrip1.Location = new System.Drawing.Point(0, 0);
menuStrip1.Name = "menuStrip1"; menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new System.Drawing.Size(642, 24); menuStrip1.Size = new System.Drawing.Size(464, 24);
menuStrip1.TabIndex = 2; menuStrip1.TabIndex = 2;
menuStrip1.MenuActivate += MainMenuStrip_MenuActivate; menuStrip1.MenuActivate += MainMenuStrip_MenuActivate;
// //
@ -144,7 +144,7 @@ namespace RokettoLaunch
// //
// openToolStripMenuItem // openToolStripMenuItem
// //
openToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; openToolStripMenuItem.Image = AppResource.folder_minus;
openToolStripMenuItem.Name = "openToolStripMenuItem"; openToolStripMenuItem.Name = "openToolStripMenuItem";
openToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O; openToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O;
openToolStripMenuItem.Size = new System.Drawing.Size(146, 22); openToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
@ -170,7 +170,7 @@ namespace RokettoLaunch
// //
// saveToolStripMenuItem // saveToolStripMenuItem
// //
saveToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; saveToolStripMenuItem.Image = AppResource.save;
saveToolStripMenuItem.Name = "saveToolStripMenuItem"; saveToolStripMenuItem.Name = "saveToolStripMenuItem";
saveToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S; saveToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S;
saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22); saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
@ -205,8 +205,9 @@ namespace RokettoLaunch
// //
// addGroupToolStripMenuItem // addGroupToolStripMenuItem
// //
addGroupToolStripMenuItem.Image = AppResource.plus;
addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem"; addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem";
addGroupToolStripMenuItem.Size = new System.Drawing.Size(180, 22); addGroupToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
addGroupToolStripMenuItem.Text = "&Add Group"; addGroupToolStripMenuItem.Text = "&Add Group";
addGroupToolStripMenuItem.Click += AddGroupToolStripMenuItem_Click; addGroupToolStripMenuItem.Click += AddGroupToolStripMenuItem_Click;
// //
@ -220,14 +221,14 @@ namespace RokettoLaunch
// showBigIconsToolStripMenuItem // showBigIconsToolStripMenuItem
// //
showBigIconsToolStripMenuItem.Name = "showBigIconsToolStripMenuItem"; showBigIconsToolStripMenuItem.Name = "showBigIconsToolStripMenuItem";
showBigIconsToolStripMenuItem.Size = new System.Drawing.Size(180, 22); showBigIconsToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
showBigIconsToolStripMenuItem.Text = "Show &Big Icons"; showBigIconsToolStripMenuItem.Text = "Show &Big Icons";
showBigIconsToolStripMenuItem.Click += ShowBigIconsToolStripMenuItem_Click; showBigIconsToolStripMenuItem.Click += ShowBigIconsToolStripMenuItem_Click;
// //
// alwaysOnTopToolStripMenuItem // alwaysOnTopToolStripMenuItem
// //
alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem"; alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(180, 22); alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
alwaysOnTopToolStripMenuItem.Text = "Always On &Top"; alwaysOnTopToolStripMenuItem.Text = "Always On &Top";
alwaysOnTopToolStripMenuItem.Click += AlwaysOnTopToolStripMenuItem_Click; alwaysOnTopToolStripMenuItem.Click += AlwaysOnTopToolStripMenuItem_Click;
// //
@ -240,7 +241,7 @@ namespace RokettoLaunch
// //
// optionsToolStripMenuItem // optionsToolStripMenuItem
// //
optionsToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; optionsToolStripMenuItem.Image = AppResource.settings;
optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
optionsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12; optionsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12;
optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22); optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
@ -256,7 +257,7 @@ namespace RokettoLaunch
// //
// viewHelpToolStripMenuItem1 // viewHelpToolStripMenuItem1
// //
viewHelpToolStripMenuItem1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; viewHelpToolStripMenuItem1.Image = AppResource.help_circle;
viewHelpToolStripMenuItem1.Name = "viewHelpToolStripMenuItem1"; viewHelpToolStripMenuItem1.Name = "viewHelpToolStripMenuItem1";
viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1; viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1;
viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22); viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
@ -275,14 +276,15 @@ namespace RokettoLaunch
aboutToolStripMenuItem1.Text = "&About"; aboutToolStripMenuItem1.Text = "&About";
aboutToolStripMenuItem1.Click += AboutToolStripMenuItem_Click; aboutToolStripMenuItem1.Click += AboutToolStripMenuItem_Click;
// //
// tileContainerMenu1 // groupMenuStrip
// //
tileContainerMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { addGroupToolStripMenuItem1, toolStripMenuItem4, editToolStripMenuItem, toolStripMenuItem5, toolStripSeparator1, toolStripMenuItem3, toolStripSeparator3, removeToolStripMenuItem }); groupMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { addGroupToolStripMenuItem1, toolStripMenuItem4, editToolStripMenuItem, toolStripMenuItem5, toolStripSeparator1, toolStripMenuItem3, toolStripSeparator3, removeToolStripMenuItem });
tileContainerMenu1.Name = "tileContainerMenu1"; groupMenuStrip.Name = "tileContainerMenu1";
tileContainerMenu1.Size = new System.Drawing.Size(133, 148); groupMenuStrip.Size = new System.Drawing.Size(133, 148);
// //
// addGroupToolStripMenuItem1 // addGroupToolStripMenuItem1
// //
addGroupToolStripMenuItem1.Image = AppResource.plus;
addGroupToolStripMenuItem1.Name = "addGroupToolStripMenuItem1"; addGroupToolStripMenuItem1.Name = "addGroupToolStripMenuItem1";
addGroupToolStripMenuItem1.Size = new System.Drawing.Size(132, 22); addGroupToolStripMenuItem1.Size = new System.Drawing.Size(132, 22);
addGroupToolStripMenuItem1.Text = "&Add Tile"; addGroupToolStripMenuItem1.Text = "&Add Tile";
@ -356,6 +358,7 @@ namespace RokettoLaunch
// //
// removeToolStripMenuItem // removeToolStripMenuItem
// //
removeToolStripMenuItem.Image = AppResource.trash_2;
removeToolStripMenuItem.Name = "removeToolStripMenuItem"; removeToolStripMenuItem.Name = "removeToolStripMenuItem";
removeToolStripMenuItem.Size = new System.Drawing.Size(132, 22); removeToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
removeToolStripMenuItem.Text = "&Remove"; removeToolStripMenuItem.Text = "&Remove";
@ -370,7 +373,7 @@ namespace RokettoLaunch
flowLayoutPanel1.Location = new System.Drawing.Point(10, 0); flowLayoutPanel1.Location = new System.Drawing.Point(10, 0);
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
flowLayoutPanel1.Name = "flowLayoutPanel1"; flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Size = new System.Drawing.Size(632, 540); flowLayoutPanel1.Size = new System.Drawing.Size(454, 257);
flowLayoutPanel1.TabIndex = 8; flowLayoutPanel1.TabIndex = 8;
flowLayoutPanel1.WrapContents = false; flowLayoutPanel1.WrapContents = false;
// //
@ -383,38 +386,39 @@ namespace RokettoLaunch
panel1.Margin = new System.Windows.Forms.Padding(0); panel1.Margin = new System.Windows.Forms.Padding(0);
panel1.Name = "panel1"; panel1.Name = "panel1";
panel1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); panel1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
panel1.Size = new System.Drawing.Size(642, 540); panel1.Size = new System.Drawing.Size(464, 257);
panel1.TabIndex = 9; panel1.TabIndex = 9;
// //
// tileMenu1 // tileMenuStrip
// //
tileMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { editToolStripMenuItem1, toolStripMenuItem6, toolStripSeparator4, removeToolStripMenuItem1 }); tileMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { editToolStripMenuItem1, toolStripMenuItem6, toolStripSeparator4, removeToolStripMenuItem1 });
tileMenu1.Name = "tileMenu1"; tileMenuStrip.Name = "tileMenu1";
tileMenu1.Size = new System.Drawing.Size(127, 76); tileMenuStrip.Size = new System.Drawing.Size(127, 76);
// //
// editToolStripMenuItem1 // editToolStripMenuItem1
// //
editToolStripMenuItem1.Name = "editToolStripMenuItem1"; editToolStripMenuItem1.Name = "editToolStripMenuItem1";
editToolStripMenuItem1.Size = new System.Drawing.Size(126, 22); editToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
editToolStripMenuItem1.Text = "&Edit"; editToolStripMenuItem1.Text = "&Edit";
editToolStripMenuItem1.Click += EditTileToolStripMenuItem_Click; editToolStripMenuItem1.Click += EditTileToolStripMenuItem_Click;
// //
// toolStripMenuItem6 // toolStripMenuItem6
// //
toolStripMenuItem6.Name = "toolStripMenuItem6"; toolStripMenuItem6.Name = "toolStripMenuItem6";
toolStripMenuItem6.Size = new System.Drawing.Size(126, 22); toolStripMenuItem6.Size = new System.Drawing.Size(180, 22);
toolStripMenuItem6.Text = "Copy To..."; toolStripMenuItem6.Text = "Copy To...";
toolStripMenuItem6.Click += CopyToTileToolStripMenuItem_Click; toolStripMenuItem6.Click += CopyToTileToolStripMenuItem_Click;
// //
// toolStripSeparator4 // toolStripSeparator4
// //
toolStripSeparator4.Name = "toolStripSeparator4"; toolStripSeparator4.Name = "toolStripSeparator4";
toolStripSeparator4.Size = new System.Drawing.Size(123, 6); toolStripSeparator4.Size = new System.Drawing.Size(177, 6);
// //
// removeToolStripMenuItem1 // removeToolStripMenuItem1
// //
removeToolStripMenuItem1.Image = AppResource.trash_2;
removeToolStripMenuItem1.Name = "removeToolStripMenuItem1"; removeToolStripMenuItem1.Name = "removeToolStripMenuItem1";
removeToolStripMenuItem1.Size = new System.Drawing.Size(126, 22); removeToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
removeToolStripMenuItem1.Text = "&Remove"; removeToolStripMenuItem1.Text = "&Remove";
removeToolStripMenuItem1.Click += RemoveTileToolStripMenuItem_Click; removeToolStripMenuItem1.Click += RemoveTileToolStripMenuItem_Click;
// //
@ -423,7 +427,7 @@ namespace RokettoLaunch
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
BackColor = System.Drawing.Color.White; BackColor = System.Drawing.Color.White;
BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
ClientSize = new System.Drawing.Size(642, 564); ClientSize = new System.Drawing.Size(464, 281);
Controls.Add(panel1); Controls.Add(panel1);
Controls.Add(menuStrip1); Controls.Add(menuStrip1);
DoubleBuffered = true; DoubleBuffered = true;
@ -434,12 +438,12 @@ namespace RokettoLaunch
MinimizeBox = false; MinimizeBox = false;
MinimumSize = new System.Drawing.Size(300, 320); MinimumSize = new System.Drawing.Size(300, 320);
Name = "MainForm"; Name = "MainForm";
contextMenuStrip2.ResumeLayout(false); trayMenuStrip.ResumeLayout(false);
menuStrip1.ResumeLayout(false); menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout(); menuStrip1.PerformLayout();
tileContainerMenu1.ResumeLayout(false); groupMenuStrip.ResumeLayout(false);
panel1.ResumeLayout(false); panel1.ResumeLayout(false);
tileMenu1.ResumeLayout(false); tileMenuStrip.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }
@ -448,7 +452,7 @@ namespace RokettoLaunch
private System.Windows.Forms.SaveFileDialog saveFileDialog1; private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.NotifyIcon notifyIcon1; private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2; private System.Windows.Forms.ContextMenuStrip trayMenuStrip;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem1;
private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
@ -472,7 +476,7 @@ namespace RokettoLaunch
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem addGroupToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem addGroupToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip tileContainerMenu1; private System.Windows.Forms.ContextMenuStrip groupMenuStrip;
private System.Windows.Forms.ToolStripMenuItem addGroupToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem addGroupToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
@ -487,7 +491,7 @@ namespace RokettoLaunch
private System.Windows.Forms.ToolStripMenuItem bottomToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem bottomToolStripMenuItem;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
private System.Windows.Forms.ContextMenuStrip tileMenu1; private System.Windows.Forms.ContextMenuStrip tileMenuStrip;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem6; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem6;

View File

@ -13,14 +13,15 @@ using RyzStudio;
using RyzStudio.Windows.Forms; using RyzStudio.Windows.Forms;
using RyzStudio.Windows.ThemedForms; using RyzStudio.Windows.ThemedForms;
using RyzStudio.Windows.ThemedForms.ButtonTextBox; using RyzStudio.Windows.ThemedForms.ButtonTextBox;
using RyzStudio.Windows.TileForms;
namespace RokettoLaunch namespace RokettoLaunch
{ {
public partial class MainForm : Form public partial class MainForm : Form
{ {
private const int MIN_COLUMNS = 4; //private const int MIN_COLUMNS = 4;
private const int TILE_SIZE = 70; //private const int TILE_SIZE = 70;
private const int TILE_PADDING = 3; //private const int TILE_PADDING = 3;
private readonly IServiceProvider _provider; private readonly IServiceProvider _provider;
private readonly IFileSessionManager _fileSessionManager; private readonly IFileSessionManager _fileSessionManager;
@ -42,12 +43,6 @@ namespace RokettoLaunch
//flowLayoutPanel1.BackColor = Color.LightGreen; //flowLayoutPanel1.BackColor = Color.LightGreen;
//#endif //#endif
newToolStripMenuItem.Image = RyzStudio.Windows.ThemedForms.DefaultVisualStyle.Icon.Small.GetImage("a");
openToolStripMenuItem.Image = RyzStudio.Windows.ThemedForms.DefaultVisualStyle.Icon.Small.GetImage("b");
saveToolStripMenuItem.Image = RyzStudio.Windows.ThemedForms.DefaultVisualStyle.Icon.Small.GetImage("c");
optionsToolStripMenuItem.Image = RyzStudio.Windows.ThemedForms.DefaultVisualStyle.Icon.Small.GetImage("i");
viewHelpToolStripMenuItem1.Image = RyzStudio.Windows.ThemedForms.DefaultVisualStyle.Icon.Small.GetImage("j");
notifyIcon1.Text = Application.ProductName; notifyIcon1.Text = Application.ProductName;
} }
@ -161,6 +156,11 @@ namespace RokettoLaunch
UIControl.SetLocation(this, this.CurrentSession.StartPosition); UIControl.SetLocation(this, this.CurrentSession.StartPosition);
} }
if (this.CurrentSession.Width > 0)
{
UIControl.SetClientWidth(this, this.CurrentSession.Width);
}
if (this.CurrentSession.Height > 0) if (this.CurrentSession.Height > 0)
{ {
UIControl.SetClientHeight(this, this.CurrentSession.Height); UIControl.SetClientHeight(this, this.CurrentSession.Height);
@ -184,8 +184,6 @@ namespace RokettoLaunch
} }
#endif #endif
//AutoResizeWidth();
UIControl.SetTopMost(this, this.CurrentSession.AlwaysOnTop); UIControl.SetTopMost(this, this.CurrentSession.AlwaysOnTop);
} }
@ -305,14 +303,12 @@ namespace RokettoLaunch
/// <param name="e"></param> /// <param name="e"></param>
private async void AddGroupToolStripMenuItem_Click(object sender, EventArgs e) private async void AddGroupToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var maxColumn = Math.Max(MIN_COLUMNS, this.CurrentSession.TilesPerRow);
var group = new App4Options.Group() var group = new App4Options.Group()
{ {
Id = Guid.NewGuid(), Id = Guid.NewGuid(),
Title = "New Group", Title = "New Group",
IsOpen = true, IsOpen = true,
GridSize = new Size(maxColumn, 1) GridSize = new Size(this.CurrentSession.TilesPerRow, 1)
}; };
this.CurrentSession.Groups.Add(group); this.CurrentSession.Groups.Add(group);
@ -431,7 +427,7 @@ namespace RokettoLaunch
private async Task<bool> fileSessionManager_OnNewSession(FileSessionManager sender) private async Task<bool> fileSessionManager_OnNewSession(FileSessionManager sender)
{ {
// Enforce minimum number of rows // Enforce minimum number of rows
this.CurrentSession.TilesPerRow = Math.Max(this.CurrentSession.TilesPerRow, MIN_COLUMNS); this.CurrentSession.TilesPerRow = Math.Max(this.CurrentSession.TilesPerRow, TileLayoutPanel.MIN_COLUMNS);
UIControl.Clear(flowLayoutPanel1); UIControl.Clear(flowLayoutPanel1);
@ -461,11 +457,11 @@ namespace RokettoLaunch
foreach (var group in this.CurrentSession.Groups ?? new List<App4Options.Group>()) foreach (var group in this.CurrentSession.Groups ?? new List<App4Options.Group>())
{ {
var gridSize = group.GetMaxGridSize(); var gridSize = group.GetMaxGridSize();
gridSize.Width = Math.Max(gridSize.Width, MIN_COLUMNS); gridSize.Width = Math.Max(gridSize.Width, TileLayoutPanel.MIN_COLUMNS);
group.GridSize = new Size(gridSize.Width, gridSize.Height); group.GridSize = new Size(gridSize.Width, gridSize.Height);
AddGroup(group); this.AddGroup(group);
} }
}); });
@ -496,6 +492,7 @@ namespace RokettoLaunch
} }
this.CurrentSession.StartPosition = this.Location; this.CurrentSession.StartPosition = this.Location;
this.CurrentSession.Width = this.DisplayRectangle.Width;
this.CurrentSession.Height = this.DisplayRectangle.Height; this.CurrentSession.Height = this.DisplayRectangle.Height;
var result = GenericResult.Create(); var result = GenericResult.Create();
@ -608,7 +605,14 @@ namespace RokettoLaunch
Position = new Point(-1, -1) Position = new Point(-1, -1)
}; };
this.AddTile((TableLayoutPanel)panel.ToggleControl, groupInfo.Id, newTileInfo); newTileInfo = groupInfo.AddItem(newTileInfo);
// Update table layout
var newTilePanel = CreateTile(newTileInfo);
var tableLayout = (TileLayoutPanel)panel.ToggleControl;
tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
tableLayout.SetGridSize(groupInfo.GridSize);
_fileSessionManager.HasChanged = true; _fileSessionManager.HasChanged = true;
} }
@ -645,7 +649,14 @@ namespace RokettoLaunch
Position = new Point(-1, -1) Position = new Point(-1, -1)
}; };
this.AddTile((TableLayoutPanel)panel.ToggleControl, groupInfo.Id, newTileInfo); newTileInfo = groupInfo.AddItem(newTileInfo);
// Update table layout
var newTilePanel = CreateTile(newTileInfo);
var tableLayout = (TileLayoutPanel)panel.ToggleControl;
tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
tableLayout.SetGridSize(groupInfo.GridSize);
_fileSessionManager.HasChanged = true; _fileSessionManager.HasChanged = true;
} }
@ -926,33 +937,14 @@ namespace RokettoLaunch
return; return;
} }
App4Options.Item resultTileInfo = null;
if (tileInfo.IsGroup) if (tileInfo.IsGroup)
{ {
var editFolderForm = new EditFolderForm(tileInfo); var editFolderForm = new EditFolderForm(tileInfo);
if (editFolderForm.ShowDialog() == DialogResult.OK) if (editFolderForm.ShowDialog() == DialogResult.OK)
{ {
var newTileInfo = editFolderForm.Result; resultTileInfo = editFolderForm.Result;
var result = this.CurrentSession.Update(newTileInfo);
if (result)
{
var updatedTileInfo = this.CurrentSession.FindById(tileInfo.Id);
tilePanel.Title = updatedTileInfo.Title;
if (tilePanel.TileContextMenu == null)
{
tilePanel.TileContextMenu = new ContextMenuStrip();
}
this.UpdateContextMenu(tilePanel.TileContextMenu, updatedTileInfo.Items);
_fileSessionManager.HasChanged = true;
}
else
{
MessageBox.Show(this, "Unable to update tile", "Edit Tile", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
} }
} }
else else
@ -960,26 +952,22 @@ namespace RokettoLaunch
var editForm = new EditTileForm(tileInfo); var editForm = new EditTileForm(tileInfo);
if (editForm.ShowDialog() == DialogResult.OK) if (editForm.ShowDialog() == DialogResult.OK)
{ {
var newTileInfo = editForm.Result; resultTileInfo = editForm.Result;
newTileInfo.ResolvePaths(); }
}
var result = this.CurrentSession.Update(newTileInfo); if (resultTileInfo == null)
if (result)
{ {
var updatedTileInfo = this.CurrentSession.FindById(tileInfo.Id); return;
}
tilePanel.Title = updatedTileInfo.Title; var updatedTileInfo = this.CurrentSession.FindById(tileInfo.Id);
tilePanel.LargeIcon = RyzStudio.IO.File.GetIcon(updatedTileInfo.ResolvedTargetPath); updatedTileInfo.Load(resultTileInfo);
this.UpdateTile(tilePanel, updatedTileInfo);
_fileSessionManager.HasChanged = true; _fileSessionManager.HasChanged = true;
} }
else
{
MessageBox.Show(this, "Unable to update tile", "Edit Tile", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
/// <summary> /// <summary>
/// Copy To /// Copy To
@ -1012,7 +1000,15 @@ namespace RokettoLaunch
{ {
if (n >= 0 && n <= (headers.Count - 1)) if (n >= 0 && n <= (headers.Count - 1))
{ {
this.AddTile((TableLayoutPanel)headers[n].ToggleControl, this.CurrentSession.Groups[n].Id, newTileInfo); // Add to group
newTileInfo = this.CurrentSession.Groups[n].AddItem(newTileInfo);
// Update table layout
var newTilePanel = CreateTile(newTileInfo);
var tableLayout = (TileLayoutPanel)headers[n].ToggleControl;
tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
tableLayout.SetGridSize(this.CurrentSession.Groups[n].GridSize);
} }
} }
@ -1059,68 +1055,28 @@ namespace RokettoLaunch
#endregion #endregion
private void AddGroup(App4Options.Group group) private void AddGroup(App4Options.Group groupInfo)
{ {
var table = CreateTable(group.GridSize); var tableLayout = CreateTable(groupInfo.GridSize);
var header = CreateHeader(group); var header = CreateHeader(groupInfo);
header.ToggleControlId = group.Id; header.ToggleControlId = groupInfo.Id;
header.ToggleControl = table; header.ToggleControl = tableLayout;
UIControl.Add(flowLayoutPanel1, header); UIControl.Add(flowLayoutPanel1, header);
UIControl.Add(flowLayoutPanel1, table); UIControl.Add(flowLayoutPanel1, tableLayout);
foreach (var item in group.Items ?? new List<App4Options.Item>()) foreach (var item in groupInfo.Items ?? new List<App4Options.Item>())
{ {
AddTile(table, item); var tilePanel = CreateTile(item);
}
tableLayout.AddTilePanel(tilePanel, item.Position.X, item.Position.Y);
} }
private void AddTile(TableLayoutPanel table, App4Options.Item item) tableLayout.SetGridSize(groupInfo.GridSize);
{
var icon = (item.IsGroup ? null : RyzStudio.IO.File.GetIcon(item.ResolvedTargetPath));
var tile = CreateTile(item.Id, item.Title, item.IsGroup, icon);
if (item.IsGroup)
{
tile.TileContextMenu = new ContextMenuStrip();
this.UpdateContextMenu(tile.TileContextMenu, item.Items);
} }
UIControl.Add(table, tile, item.Position.X, item.Position.Y); private void AddToFolder(App4Options.Item item, List<string> paths, bool appendTo = true)
}
private void AddTile(TableLayoutPanel table, Guid groupId, App4Options.Item item)
{
var groupInfo = this.CurrentSession.Groups.Where(x => x.Id == groupId).FirstOrDefault();
if (groupInfo == null)
{
return;
}
var canPosition = groupInfo.CanPosition(item);
if (!canPosition)
{
// Find next available position
item.Position = groupInfo.GetNextPosition();
}
// Resize-expand table
if ((item.Position.Y + 1) > groupInfo.GridSize.Height)
{
groupInfo.GridSize = new Size(groupInfo.GridSize.Width, (item.Position.Y + 1));
this.UpdateTable(table, groupInfo.GridSize);
}
// Add tile
groupInfo.Items.Add(item);
this.AddTile(table, item);
}
private void AddToTile(App4Options.Item item, List<string> paths, bool appendTo = true)
{ {
item.IsGroup = true; item.IsGroup = true;
@ -1145,47 +1101,44 @@ namespace RokettoLaunch
} }
} }
private TableLayoutPanel CreateTable(Size gridSize) private TileLayoutPanel CreateTable(Size gridSize)
{ {
var result = new TableLayoutPanel(); var layoutPanel = new TileLayoutPanel();
result.Margin = new Padding(0); layoutPanel.SetGridSize(gridSize);
result.Padding = new Padding(0);
result.ColumnCount = 0;
result.RowCount = 0;
return this.UpdateTable(result, gridSize); return layoutPanel;
} }
private TToggleHeaderPanel CreateHeader(App4Options.Group group) private TToggleHeaderPanel CreateHeader(App4Options.Group group)
{ {
var result = new TToggleHeaderPanel(); var width = (TileLayoutPanel.TILE_SIZE + TileLayoutPanel.TILE_PADDING);
result.ContextMenuStrip = tileContainerMenu1;
result.Height = 20;
result.Padding = new Padding(0, 0, 0, 0);
result.Title = group.Title;
result.IsOpen = group.IsOpen;
return result; var headerPanel = new TToggleHeaderPanel();
headerPanel.ContextMenuStrip = groupMenuStrip;
headerPanel.Height = 20;
headerPanel.Padding = new Padding(0, 0, 0, 0);
headerPanel.Width = (group.GridSize.Width * width);
headerPanel.Title = group.Title;
headerPanel.IsOpen = group.IsOpen;
return headerPanel;
} }
private TilePanel CreateTile(Guid id, string title, bool isGroup, Image icon = null) private TilePanel CreateTile(App4Options.Item item)
{ {
var result = new TilePanel(); var tilePanel = new TilePanel();
result.ContextMenuStrip = tileMenu1; tilePanel.ContextMenuStrip = tileMenuStrip;
result.Dock = DockStyle.Fill; tilePanel.Dock = DockStyle.Fill;
result.Margin = new Padding(0, 0, 3, 3); tilePanel.Margin = new Padding(0, 0, 3, 3);
result.Padding = new Padding(0); tilePanel.Padding = new Padding(0);
result.TileId = id; tilePanel.MouseClick += TilePanel_MouseClick;
result.Title = title; tilePanel.MouseDoubleClick += TilePanel_MouseClick;
result.IsGroup = isGroup; tilePanel.OnFileDrop += TilePanel_OnFileDrop;
result.LargeIcon = (isGroup ? AppResource.folder_32 : icon);
result.MouseClick += TilePanel_MouseClick; this.UpdateTile(tilePanel, item);
result.MouseDoubleClick += TilePanel_MouseClick;
result.OnFileDrop += TilePanel_OnFileDrop;
return result; return tilePanel;
} }
private App4Options.Item GetTileInfo(object sender) private App4Options.Item GetTileInfo(object sender)
@ -1221,11 +1174,31 @@ namespace RokettoLaunch
return result; return result;
} }
private ContextMenuStrip UpdateContextMenu(ContextMenuStrip contextMenu, List<App4Options.Item> items) private void UpdateTile(TilePanel tilePanel, App4Options.Item item)
{
tilePanel.TileId = item.Id;
tilePanel.Title = item.Title;
tilePanel.IsGroup = item.IsGroup;
if (item.IsGroup)
{ {
var iconSize = this.CurrentSession.ShowBigIcons ? 24 : 16; var iconSize = this.CurrentSession.ShowBigIcons ? 24 : 16;
contextMenu.ImageScalingSize = new Size(iconSize, iconSize); tilePanel.LargeIcon = AppResource.folder_32;
tilePanel.TileContextMenu = new ContextMenuStrip();
tilePanel.TileContextMenu!.ImageScalingSize = new Size(iconSize, iconSize);
this.UpdateContextMenu(tilePanel.TileContextMenu, item.Items);
}
else
{
tilePanel.LargeIcon = RyzStudio.IO.File.GetIcon(item.ResolvedTargetPath);
tilePanel.TileContextMenu = null;
}
}
private ContextMenuStrip UpdateContextMenu(ContextMenuStrip contextMenu, List<App4Options.Item> items)
{
contextMenu.Items.Clear(); contextMenu.Items.Clear();
foreach (var item in items ?? new List<App4Options.Item>()) foreach (var item in items ?? new List<App4Options.Item>())
@ -1244,45 +1217,6 @@ namespace RokettoLaunch
return contextMenu; return contextMenu;
} }
private TableLayoutPanel UpdateTable(TableLayoutPanel result, Size gridSize)
{
var addColumns = gridSize.Width - result.ColumnCount;
var addRows = gridSize.Height - result.RowCount;
var width = (TILE_SIZE + TILE_PADDING);
UIControl.Invoke(result, (x) =>
{
result.ColumnCount = gridSize.Width;
result.RowCount = gridSize.Height;
result.Height = (gridSize.Height * width) + TILE_PADDING;
result.Width = (gridSize.Width * width);
foreach (ColumnStyle column in result.ColumnStyles)
{
column.SizeType = SizeType.Absolute;
column.Width = width;
}
foreach (RowStyle row in result.RowStyles)
{
row.SizeType = SizeType.Absolute;
row.Height = width;
}
for (var i = 0; i < addColumns; i++)
{
result.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, width));
}
for (var i = 0; i < addRows; i++)
{
result.RowStyles.Add(new RowStyle(SizeType.Absolute, width));
}
});
return result;
}
private void TilePanel_MouseClick(object sender, MouseEventArgs e) private void TilePanel_MouseClick(object sender, MouseEventArgs e)
{ {
var tilePanel = (sender as TilePanel); var tilePanel = (sender as TilePanel);
@ -1322,6 +1256,8 @@ namespace RokettoLaunch
} }
private async Task TilePanel_OnFileDrop(TilePanel sender, Keys keys, List<string> paths) private async Task TilePanel_OnFileDrop(TilePanel sender, Keys keys, List<string> paths)
{
await Task.Run(() =>
{ {
var tileInfo = this.CurrentSession.FindById(sender.TileId); var tileInfo = this.CurrentSession.FindById(sender.TileId);
@ -1330,7 +1266,7 @@ namespace RokettoLaunch
{ {
if (tileInfo.IsGroup) if (tileInfo.IsGroup)
{ {
this.AddToTile(tileInfo, paths, true); this.AddToFolder(tileInfo, paths, true);
} }
else else
{ {
@ -1346,7 +1282,7 @@ namespace RokettoLaunch
tileInfo.Items.Clear(); tileInfo.Items.Clear();
tileInfo.Items.Add(newTileInfo); tileInfo.Items.Add(newTileInfo);
this.AddToTile(tileInfo, paths, true); this.AddToFolder(tileInfo, paths, true);
tileInfo.ResolvePaths(); tileInfo.ResolvePaths();
} }
@ -1377,27 +1313,16 @@ namespace RokettoLaunch
tileInfo.Items.Clear(); tileInfo.Items.Clear();
this.AddToTile(tileInfo, paths, false); this.AddToFolder(tileInfo, paths, false);
tileInfo.ResolvePaths(); tileInfo.ResolvePaths();
} }
} }
sender.Title = tileInfo.Title; this.UpdateTile(sender, tileInfo);
sender.IsGroup = tileInfo.IsGroup; });
if (tileInfo.IsGroup) _fileSessionManager.HasChanged = true;
{
sender.LargeIcon = AppResource.folder_32;
sender.TileContextMenu = new ContextMenuStrip();
this.UpdateContextMenu(sender.TileContextMenu, tileInfo.Items);
}
else
{
sender.LargeIcon = RyzStudio.IO.File.GetIcon(tileInfo.ResolvedTargetPath);
sender.TileContextMenu = null;
}
} }
private void Execute(App4Options.Item model) private void Execute(App4Options.Item model)

View File

@ -126,7 +126,7 @@
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>448, 17</value> <value>448, 17</value>
</metadata> </metadata>
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="trayMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>561, 17</value> <value>561, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
@ -428,12 +428,12 @@
</value> </value>
</data> </data>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>716, 17</value> <value>46, 13</value>
</metadata> </metadata>
<metadata name="tileContainerMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="groupMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>831, 17</value> <value>831, 17</value>
</metadata> </metadata>
<metadata name="tileMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="tileMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>990, 17</value> <value>990, 17</value>
</metadata> </metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -24,6 +24,30 @@ namespace RokettoLaunch.Models.SaveFile
public Size GridSize { get; set; } = new Size(0, 0); public Size GridSize { get; set; } = new Size(0, 0);
public Item AddItem(Item item)
{
var canPosition = this.CanPosition(item);
if (!canPosition)
{
// Find next available position
item.Position = this.GetNextPosition();
}
// Resize-expand table
if ((item.Position.Y + 1) > this.GridSize.Height)
{
this.GridSize = new Size(this.GridSize.Width, (item.Position.Y + 1));
//this.UpdateTable(table, this.GridSize);
}
// Add item
this.Items.Add(item);
return item;
}
public Group CopyOf() public Group CopyOf()
{ {
var json = JsonSerializer.Serialize(this); var json = JsonSerializer.Serialize(this);
@ -213,6 +237,8 @@ namespace RokettoLaunch.Models.SaveFile
this.ResolvedTargetPath = model.ResolvedTargetPath; this.ResolvedTargetPath = model.ResolvedTargetPath;
this.ResolvedStartPath = model.ResolvedStartPath; this.ResolvedStartPath = model.ResolvedStartPath;
this.ResolvedArgument = model.ResolvedArgument; this.ResolvedArgument = model.ResolvedArgument;
this.ResolvePaths();
} }
public void ResolvePaths() public void ResolvePaths()
@ -303,18 +329,18 @@ namespace RokettoLaunch.Models.SaveFile
return null; return null;
} }
public bool Update(Item value) //public bool Update(Item value)
{ //{
var result = this.FindById(value.Id); // var result = this.FindById(value.Id);
if (result == null) // if (result == null)
{ // {
return false; // return false;
} // }
result.Load(value); // result.Load(value);
return true; // return true;
} //}
public bool Remove(Guid id) public bool Remove(Guid id)
{ {

View File

@ -20,7 +20,8 @@ namespace RokettoLaunch.Models.SaveFile
public Point StartPosition { get; set; } = Point.Empty; public Point StartPosition { get; set; } = Point.Empty;
public int Height { get; set; } = 280; public int Width { get; set; } = 0;
public int Height { get; set; } = 320;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-folder-minus"
version="1.1"
id="svg6"
sodipodi:docname="folder-minus.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
inkscape:export-filename="N:\D\folder-minus.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs10" />
<sodipodi:namedview
id="namedview8"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="17.333333"
inkscape:cx="-3.4903846"
inkscape:cy="17.509615"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg6" />
<path
d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"
id="path2"
style="stroke:#808080;stroke-opacity:1" />
<line
x1="2.9674475"
y1="10"
x2="21.155149"
y2="10"
id="line4"
style="stroke-width:2;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke:#808080;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-help-circle"
version="1.1"
id="svg8"
sodipodi:docname="help-circle.svg"
inkscape:export-filename="N:\D\help-circle.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="24.513035"
inkscape:cx="9.1583926"
inkscape:cy="15.318381"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<circle
cx="12"
cy="12"
r="10"
id="circle2"
style="stroke:#808080;stroke-opacity:1" />
<path
d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"
id="path4"
style="stroke:#808080;stroke-opacity:1" />
<line
x1="12"
y1="17"
x2="12.01"
y2="17"
id="line6"
style="stroke:#808080;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
Resources/MainMenu/plus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-plus"
version="1.1"
id="svg6"
sodipodi:docname="plus.svg"
inkscape:export-filename="N:\D\plus.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs10" />
<sodipodi:namedview
id="namedview8"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="34.666667"
inkscape:cx="11.985577"
inkscape:cy="12.014423"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg6" />
<line
x1="12"
y1="5"
x2="12"
y2="19"
id="line2"
style="stroke:#808080;stroke-opacity:1" />
<line
x1="5"
y1="12"
x2="19"
y2="12"
id="line4"
style="stroke:#808080;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
Resources/MainMenu/save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-save"
version="1.1"
id="svg8"
sodipodi:docname="save.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
inkscape:export-filename="N:\D\save.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="34.666667"
inkscape:cx="11.985577"
inkscape:cy="12.014423"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<path
d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"
id="path2"
style="stroke:#808080;stroke-opacity:1" />
<polyline
points="17 21 17 13 7 13 7 21"
id="polyline4"
style="stroke:#808080;stroke-opacity:1" />
<polyline
points="7 3 7 8 15 8"
id="polyline6"
style="stroke:#808080;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-settings"
version="1.1"
id="svg6"
sodipodi:docname="settings.svg"
inkscape:export-filename="N:\D\settings.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs10" />
<sodipodi:namedview
id="namedview8"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="34.666667"
inkscape:cx="11.985577"
inkscape:cy="12.014423"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg6" />
<circle
cx="12"
cy="12"
r="3"
id="circle2"
style="stroke:#808080;stroke-opacity:1" />
<path
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
id="path4"
style="stroke:#808080;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-trash-2"
version="1.1"
id="svg10"
sodipodi:docname="trash-2.svg"
inkscape:export-filename="N:\D\trash-2.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs14" />
<sodipodi:namedview
id="namedview12"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="34.666667"
inkscape:cx="11.985577"
inkscape:cy="12.014423"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg10" />
<polyline
points="3 6 5 6 21 6"
id="polyline2"
style="stroke:#808080;stroke-opacity:1" />
<path
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
id="path4"
style="stroke:#808080;stroke-opacity:1" />
<line
x1="10"
y1="11"
x2="10"
y2="17"
id="line6"
style="stroke:#808080;stroke-opacity:1" />
<line
x1="14"
y1="11"
x2="14"
y2="17"
id="line8"
style="stroke:#808080;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,115 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using RyzStudio.Windows.Forms;
namespace RokettoLaunch.Windows.Forms
{
public class TileLayoutPanel : System.Windows.Forms.TableLayoutPanel
{
public const int MIN_COLUMNS = 4;
public const int TILE_SIZE = 70;
public const int TILE_PADDING = 3;
public TileLayoutPanel() : base()
{
this.Margin = new Padding(0);
this.Padding = new Padding(0);
this.ColumnCount = 0;
this.RowCount = 0;
}
public void AddTilePanel(TilePanel tilePanel, int x, int y)
{
UIControl.Add(this, tilePanel, x, y);
}
public void SetGridSize(Size gridSize)
{
this.SetGridWidth(gridSize.Width);
this.SetGridHeight(gridSize.Height);
}
public void SetGridWidth(int width)
{
width = Math.Max(MIN_COLUMNS, width);
var diffColumns = width - this.ColumnCount;
var tileWidth = (TILE_SIZE + TILE_PADDING);
UIControl.Invoke(this, (x) =>
{
this.ColumnCount = width;
this.Width = (width * tileWidth);
// Resize columns
if (diffColumns == 0)
{
// Do nothing
}
else if (diffColumns > 0)
{
for (var i = 0; i < diffColumns; i++)
{
this.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, tileWidth));
}
}
else
{
for (var i = 0; i < (diffColumns * -1); i++)
{
this.ColumnStyles.RemoveAt((this.ColumnStyles.Count - 1));
}
}
// Update column width
foreach (ColumnStyle column in this.ColumnStyles)
{
column.SizeType = SizeType.Absolute;
column.Width = tileWidth;
}
});
}
public void SetGridHeight(int height)
{
var diffRows = height - this.RowCount;
var tileHeight = (TILE_SIZE + TILE_PADDING);
UIControl.Invoke(this, (x) =>
{
this.RowCount = height;
this.Height = (height * tileHeight) + TILE_PADDING;
// Resize rows
if (diffRows == 0)
{
// Do nothing
}
else if (diffRows > 0)
{
for (var i = 0; i < diffRows; i++)
{
this.RowStyles.Add(new RowStyle(SizeType.Absolute, tileHeight));
}
}
else
{
for (var i = 0; i < (diffRows * -1); i++)
{
this.RowStyles.RemoveAt((this.RowStyles.Count - 1));
}
}
// Update row height
foreach (RowStyle row in this.RowStyles)
{
row.SizeType = SizeType.Absolute;
row.Height = tileHeight;
}
});
}
}
}