release/0.3.0.153 #2
45
AppResource.Designer.cs
generated
45
AppResource.Designer.cs
generated
@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FizzyLauncher {
|
||||
namespace RokettoLaunch {
|
||||
using System;
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ namespace FizzyLauncher {
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FizzyLauncher.AppResource", typeof(AppResource).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RokettoLaunch.AppResource", typeof(AppResource).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
@ -60,6 +60,24 @@ namespace FizzyLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to .
|
||||
/// </summary>
|
||||
internal static string AppAuthorURL {
|
||||
get {
|
||||
return ResourceManager.GetString("AppAuthorURL", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to https://www.hiimray.co.uk.
|
||||
/// </summary>
|
||||
internal static string AppCompanyURL {
|
||||
get {
|
||||
return ResourceManager.GetString("AppCompanyURL", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to https://www.hiimray.co.uk/software-fizzy-launcher.
|
||||
/// </summary>
|
||||
@ -69,6 +87,15 @@ namespace FizzyLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to https://www.hiimray.co.uk/software-fizzy-launcher.
|
||||
/// </summary>
|
||||
internal static string AppProductURL {
|
||||
get {
|
||||
return ResourceManager.GetString("AppProductURL", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
@ -132,19 +159,9 @@ namespace FizzyLauncher {
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap toggle_left_ea_16 {
|
||||
internal static System.Drawing.Bitmap icon_64 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("toggle_left_ea_16", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap toggle_right_ea_16 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("toggle_right_ea_16", resourceCulture);
|
||||
object obj = ResourceManager.GetObject("icon_64", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
@ -117,9 +117,18 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AppAuthorURL" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="AppCompanyURL" xml:space="preserve">
|
||||
<value>https://www.hiimray.co.uk</value>
|
||||
</data>
|
||||
<data name="AppHelpURL" xml:space="preserve">
|
||||
<value>https://www.hiimray.co.uk/software-fizzy-launcher</value>
|
||||
</data>
|
||||
<data name="AppProductURL" xml:space="preserve">
|
||||
<value>https://www.hiimray.co.uk/software-fizzy-launcher</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="cog2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\cog2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -139,10 +148,7 @@
|
||||
<data name="help2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\help2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="toggle_left_ea_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\toggle-left-ea-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="toggle_right_ea_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\toggle-right-ea-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<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>
|
||||
</data>
|
||||
</root>
|
186
EditGroupForm.cs
Normal file
186
EditGroupForm.cs
Normal file
@ -0,0 +1,186 @@
|
||||
using System.Windows.Forms;
|
||||
using RokettoLaunch.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||
using RyzStudio.Windows.ThemedForms.PickerBox;
|
||||
|
||||
namespace RokettoLaunch
|
||||
{
|
||||
public class EditGroupForm : TDialog
|
||||
{
|
||||
private Label label2;
|
||||
private Label label1;
|
||||
private ThButton button1;
|
||||
private ThYesNoPickerBox pickerBox1;
|
||||
private THorizontalSeparator horizontalSeparator2;
|
||||
private ThClearableTextBox textBox1;
|
||||
|
||||
private TileGroupModel result = null;
|
||||
|
||||
|
||||
public EditGroupForm(TileGroupModel model = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
result = model;
|
||||
|
||||
StartPosition = FormStartPosition.WindowsDefaultLocation;
|
||||
Text = result == null ? "Add Group" : "Edit Group";
|
||||
OkButton = button1;
|
||||
|
||||
pickerBox1.ComboBox.Items.Clear();
|
||||
pickerBox1.ComboBox.Items.AddRange(new string[] { "No", "Yes" });
|
||||
if (pickerBox1.ComboBox.Items.Count > 0)
|
||||
{
|
||||
pickerBox1.ComboBox.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
textBox1.Text = result.Title?.Trim() ?? string.Empty;
|
||||
pickerBox1.Value = result.IsExpanded;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditGroupForm));
|
||||
textBox1 = new ThClearableTextBox();
|
||||
label2 = new Label();
|
||||
label1 = new Label();
|
||||
button1 = new ThButton();
|
||||
pickerBox1 = new ThYesNoPickerBox();
|
||||
horizontalSeparator2 = new THorizontalSeparator();
|
||||
SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
textBox1.AcceptButton = null;
|
||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
textBox1.ClearedValue = "";
|
||||
textBox1.EnableReactiveVisual = true;
|
||||
textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
textBox1.HighlightImage = (System.Drawing.Image)resources.GetObject("textBox1.HighlightImage");
|
||||
textBox1.Location = new System.Drawing.Point(192, 20);
|
||||
textBox1.Margin = new Padding(10, 10, 10, 0);
|
||||
textBox1.Name = "textBox1";
|
||||
textBox1.NormalImage = (System.Drawing.Image)resources.GetObject("textBox1.NormalImage");
|
||||
textBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
textBox1.Size = new System.Drawing.Size(177, 32);
|
||||
textBox1.TabIndex = 152;
|
||||
textBox1.TabStop = false;
|
||||
textBox1.UseSystemPasswordChar = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.BackColor = System.Drawing.Color.Transparent;
|
||||
label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label2.Location = new System.Drawing.Point(10, 62);
|
||||
label2.Name = "label2";
|
||||
label2.Padding = new Padding(0, 9, 0, 10);
|
||||
label2.Size = new System.Drawing.Size(91, 34);
|
||||
label2.TabIndex = 155;
|
||||
label2.Text = "Show Expanded";
|
||||
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.BackColor = System.Drawing.Color.Transparent;
|
||||
label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label1.Location = new System.Drawing.Point(10, 21);
|
||||
label1.Margin = new Padding(0);
|
||||
label1.Name = "label1";
|
||||
label1.Padding = new Padding(0, 9, 0, 10);
|
||||
label1.Size = new System.Drawing.Size(29, 34);
|
||||
label1.TabIndex = 153;
|
||||
label1.Text = "Title";
|
||||
label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.AcceptButton = null;
|
||||
button1.ActiveImage = null;
|
||||
button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
button1.BackColor = System.Drawing.Color.Transparent;
|
||||
button1.EnableMenuOnClick = false;
|
||||
button1.EnableReactiveVisual = true;
|
||||
button1.HoverImage = null;
|
||||
button1.IdleImage = null;
|
||||
button1.LabelText = "&Save";
|
||||
button1.Location = new System.Drawing.Point(241, 469);
|
||||
button1.Margin = new Padding(10, 10, 10, 0);
|
||||
button1.Name = "button1";
|
||||
button1.Padding = new Padding(4, 4, 3, 3);
|
||||
button1.Size = new System.Drawing.Size(128, 32);
|
||||
button1.TabIndex = 173;
|
||||
button1.TabStop = false;
|
||||
//
|
||||
// pickerBox1
|
||||
//
|
||||
pickerBox1.AcceptButton = null;
|
||||
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
pickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
pickerBox1.EnableReactiveVisual = true;
|
||||
pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
||||
pickerBox1.Location = new System.Drawing.Point(285, 62);
|
||||
pickerBox1.Name = "pickerBox1";
|
||||
pickerBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
pickerBox1.SelectedIndex = 0;
|
||||
pickerBox1.Size = new System.Drawing.Size(84, 34);
|
||||
pickerBox1.TabIndex = 174;
|
||||
pickerBox1.TabStop = false;
|
||||
pickerBox1.Value = false;
|
||||
//
|
||||
// horizontalSeparator2
|
||||
//
|
||||
horizontalSeparator2.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
horizontalSeparator2.BackColor = System.Drawing.Color.Transparent;
|
||||
horizontalSeparator2.Location = new System.Drawing.Point(10, 437);
|
||||
horizontalSeparator2.Margin = new Padding(0, 10, 0, 0);
|
||||
horizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||
horizontalSeparator2.MinimumSize = new System.Drawing.Size(0, 22);
|
||||
horizontalSeparator2.Name = "horizontalSeparator2";
|
||||
horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
|
||||
horizontalSeparator2.TabIndex = 182;
|
||||
horizontalSeparator2.TabStop = false;
|
||||
//
|
||||
// EditGroupForm
|
||||
//
|
||||
ClientSize = new System.Drawing.Size(384, 521);
|
||||
Controls.Add(horizontalSeparator2);
|
||||
Controls.Add(pickerBox1);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(textBox1);
|
||||
MinimumSize = new System.Drawing.Size(400, 560);
|
||||
Name = "EditGroupForm";
|
||||
Text = "Edit Group";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
public TileGroupModel Result
|
||||
{
|
||||
get
|
||||
{
|
||||
if (result == null)
|
||||
{
|
||||
result = new TileGroupModel();
|
||||
}
|
||||
|
||||
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
||||
result.IsExpanded = pickerBox1.Value;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
141
EditGroupForm.resx
Normal file
141
EditGroupForm.resx
Normal file
@ -0,0 +1,141 @@
|
||||
<?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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="textBox1.HighlightImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAAN5JREFUOE/tUzsKwkAUXLCyFMHjeIvdB4Gk8ALamU4rsbLaTWz0AOYGOYMewTqe
|
||||
QLEQnZc8WRMSsBYHhrzPzJBin2pC60PPGLs3xl3Bp5DrHe9E1g2tHUH8QMjKmGReketyZkRWh9abfhTZ
|
||||
YRimI4jWRPYSBMngkzzjHWtYyx6xK4X0Anz/7rcsxM4BdoxBTuTOqCdEaUyU6DrTuNqxxuXsEXsFDLfg
|
||||
UdpOsIa10nr8A34p4CRtJ1jTGoC3PsPiBi78ETXplqzBwU3F5sHHgWWGJ3rHt+3tg+Uu84ek1AsYYd8q
|
||||
EsfwCwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="textBox1.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAANFJREFUOE/tkzEKAjEURANWliJ4HG+h9l5AO7fTSjyCxWpCIBB2b+AZ9AjW6wlc
|
||||
LGSdWb9Elw1YiwOP/Pw/E1Ikqqksyzpa670x5goqgfWOM7HFhfAE5jvWNdYFkZq9sdg+laZp13vfBwOY
|
||||
NjBfnHO9d9jjjB56mZG4UhgW4HXdbykkXl97iMYBnFFPrbUJGDVIOKOHXmYk/hSaW3CUbVT00CvboP8B
|
||||
v3TASbZR0RM7YA5KsAT1J2phBUq8wpnEgvg5MMwxvGFte/uVzPLwkZR6AInAKK6aICfTAAAAAElFTkSu
|
||||
QmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
325
EditTileFolderForm.cs
Normal file
325
EditTileFolderForm.cs
Normal file
@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using RokettoLaunch.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||
|
||||
namespace RokettoLaunch
|
||||
{
|
||||
public class EditTileFolderForm : TDialog
|
||||
{
|
||||
private Label label1;
|
||||
private ThButton button1;
|
||||
private THorizontalSeparator horizontalSeparator2;
|
||||
private ThClearableTextBox textBox1;
|
||||
private ThListBox listBox1;
|
||||
private THorizontalSeparator tHorizontalSeparator1;
|
||||
private Label label2;
|
||||
|
||||
private TileModel result = null;
|
||||
|
||||
|
||||
public EditTileFolderForm(TileModel model = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
StartPosition = FormStartPosition.WindowsDefaultLocation;
|
||||
OkButton = button1;
|
||||
|
||||
result = model;
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
Text = "Edit Folder";
|
||||
|
||||
textBox1.Text = result?.Title ?? string.Empty;
|
||||
|
||||
foreach (TileModel item in result.Items ?? new List<TileModel>())
|
||||
{
|
||||
if (item.IsGroup)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
listBox1.ListBox.Items.Add(item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = "Add Folder";
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
textBox1 = new ThClearableTextBox();
|
||||
label1 = new Label();
|
||||
button1 = new ThButton();
|
||||
horizontalSeparator2 = new THorizontalSeparator();
|
||||
listBox1 = new ThListBox();
|
||||
label2 = new Label();
|
||||
tHorizontalSeparator1 = new THorizontalSeparator();
|
||||
SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
textBox1.BackColor = Color.Transparent;
|
||||
textBox1.EnableReactiveVisual = true;
|
||||
textBox1.Font = new Font("Microsoft Sans Serif", 8.25F);
|
||||
textBox1.Location = new Point(109, 20);
|
||||
textBox1.Name = "textBox1";
|
||||
textBox1.Size = new Size(260, 35);
|
||||
textBox1.TabIndex = 152;
|
||||
textBox1.TabStop = false;
|
||||
textBox1.UseSystemPasswordChar = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.BackColor = Color.Transparent;
|
||||
label1.ForeColor = SystemColors.ControlText;
|
||||
label1.Location = new Point(10, 21);
|
||||
label1.Margin = new Padding(0);
|
||||
label1.Name = "label1";
|
||||
label1.Padding = new Padding(0, 9, 0, 10);
|
||||
label1.Size = new Size(29, 34);
|
||||
label1.TabIndex = 153;
|
||||
label1.Text = "Title";
|
||||
label1.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.AcceptButton = null;
|
||||
button1.ActiveImage = null;
|
||||
button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
button1.BackColor = Color.Transparent;
|
||||
button1.EnableMenuOnClick = false;
|
||||
button1.EnableReactiveVisual = true;
|
||||
button1.HoverImage = null;
|
||||
button1.IdleImage = null;
|
||||
button1.LabelText = "&Save";
|
||||
button1.Location = new Point(241, 469);
|
||||
button1.Margin = new Padding(10, 10, 10, 0);
|
||||
button1.Name = "button1";
|
||||
button1.Padding = new Padding(4, 4, 3, 3);
|
||||
button1.Size = new Size(128, 32);
|
||||
button1.TabIndex = 173;
|
||||
button1.TabStop = false;
|
||||
//
|
||||
// horizontalSeparator2
|
||||
//
|
||||
horizontalSeparator2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
horizontalSeparator2.AutoScrollMargin = new Size(0, 0);
|
||||
horizontalSeparator2.AutoScrollMinSize = new Size(0, 0);
|
||||
horizontalSeparator2.BackColor = Color.Transparent;
|
||||
horizontalSeparator2.Location = new Point(10, 61);
|
||||
horizontalSeparator2.Margin = new Padding(0, 10, 0, 0);
|
||||
horizontalSeparator2.MaximumSize = new Size(4920, 2);
|
||||
horizontalSeparator2.MinimumSize = new Size(0, 22);
|
||||
horizontalSeparator2.Name = "horizontalSeparator2";
|
||||
horizontalSeparator2.Size = new Size(364, 22);
|
||||
horizontalSeparator2.TabIndex = 177;
|
||||
horizontalSeparator2.TabStop = false;
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
listBox1.AcceptButton = null;
|
||||
listBox1.AllowDrop = true;
|
||||
listBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
listBox1.BackColor = Color.Transparent;
|
||||
listBox1.EnableReactiveVisual = true;
|
||||
listBox1.Font = new Font("Microsoft Sans Serif", 8.25F);
|
||||
listBox1.Location = new Point(109, 87);
|
||||
listBox1.Margin = new Padding(10, 10, 10, 0);
|
||||
listBox1.Name = "listBox1";
|
||||
listBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
listBox1.Size = new Size(260, 346);
|
||||
listBox1.TabIndex = 180;
|
||||
listBox1.OnAdd += listBox1_OnAdd;
|
||||
listBox1.OnEdit += listBox1_OnEdit;
|
||||
listBox1.DragDrop += listBox1_DragDrop;
|
||||
listBox1.DragOver += listBox1_DragOver;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.BackColor = Color.Transparent;
|
||||
label2.ForeColor = SystemColors.ControlText;
|
||||
label2.Location = new Point(8, 87);
|
||||
label2.Name = "label2";
|
||||
label2.Padding = new Padding(0, 9, 0, 10);
|
||||
label2.Size = new Size(30, 34);
|
||||
label2.TabIndex = 181;
|
||||
label2.Text = "Tiles";
|
||||
label2.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// tHorizontalSeparator1
|
||||
//
|
||||
tHorizontalSeparator1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tHorizontalSeparator1.AutoScrollMargin = new Size(0, 0);
|
||||
tHorizontalSeparator1.AutoScrollMinSize = new Size(0, 0);
|
||||
tHorizontalSeparator1.BackColor = Color.Transparent;
|
||||
tHorizontalSeparator1.Location = new Point(10, 437);
|
||||
tHorizontalSeparator1.Margin = new Padding(0, 10, 0, 0);
|
||||
tHorizontalSeparator1.MaximumSize = new Size(4920, 2);
|
||||
tHorizontalSeparator1.MinimumSize = new Size(0, 22);
|
||||
tHorizontalSeparator1.Name = "tHorizontalSeparator1";
|
||||
tHorizontalSeparator1.Size = new Size(364, 22);
|
||||
tHorizontalSeparator1.TabIndex = 182;
|
||||
tHorizontalSeparator1.TabStop = false;
|
||||
//
|
||||
// EditTileFolderForm
|
||||
//
|
||||
ClientSize = new Size(384, 521);
|
||||
Controls.Add(tHorizontalSeparator1);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(listBox1);
|
||||
Controls.Add(horizontalSeparator2);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(textBox1);
|
||||
MinimumSize = new Size(400, 560);
|
||||
Name = "EditTileFolderForm";
|
||||
Text = "Add List Tile";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
|
||||
public TileModel Result
|
||||
{
|
||||
get
|
||||
{
|
||||
if (result == null)
|
||||
{
|
||||
result = new TileModel();
|
||||
}
|
||||
|
||||
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
||||
result.IsGroup = true;
|
||||
result.Items = new List<TileModel>();
|
||||
|
||||
foreach (TileModel item in listBox1.ListBox.Items.OfType<TileModel>())
|
||||
{
|
||||
if (item.IsGroup)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
result.Items.Add(item);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void listBox1_OnAdd(object sender, EventArgs e)
|
||||
{
|
||||
var form = new EditTileForm();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
listBox1.ListBox.Items.Add(form.Result);
|
||||
};
|
||||
}
|
||||
|
||||
private void listBox1_OnEdit(object sender, EventArgs e)
|
||||
{
|
||||
if (listBox1.ListBox.Items.Count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var n = listBox1.ListBox.SelectedIndex;
|
||||
if (n < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (listBox1.ListBox.SelectedItem == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var form = new EditTileForm((TileModel)listBox1.ListBox.SelectedItem);
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
listBox1.ListBox.Items.RemoveAt(n);
|
||||
listBox1.ListBox.Items.Insert(n, form.Result);
|
||||
};
|
||||
}
|
||||
|
||||
private void listBox1_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
{
|
||||
e.Effect = DragDropEffects.Link;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Effect = DragDropEffects.None;
|
||||
}
|
||||
}
|
||||
|
||||
private void listBox1_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
var fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
||||
if (fileList == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (fileList.Length <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(fileList[0]))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var model = new TileModel()
|
||||
{
|
||||
ProcessFilename = fileList[0],
|
||||
Title = Path.GetFileName(fileList[0])
|
||||
};
|
||||
|
||||
// exe
|
||||
if (Path.GetExtension(fileList[0]).Equals(".exe", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
if (File.Exists(fileList[0]))
|
||||
{
|
||||
try
|
||||
{
|
||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(fileList[0]);
|
||||
if (fvi != null)
|
||||
{
|
||||
model.Title = fvi.ProductName;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model.Title))
|
||||
{
|
||||
model.Title = Path.GetFileNameWithoutExtension(fileList[0]);
|
||||
}
|
||||
}
|
||||
|
||||
listBox1.ListBox.Items.Add(model);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
341
EditTileForm.cs
Normal file
341
EditTileForm.cs
Normal file
@ -0,0 +1,341 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using RokettoLaunch.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||
using RyzStudio.Windows.ThemedForms.PickerBox;
|
||||
|
||||
namespace RokettoLaunch
|
||||
{
|
||||
public class EditTileForm : TDialog
|
||||
{
|
||||
private Label label6;
|
||||
private Label label7;
|
||||
private Label label4;
|
||||
private Label label3;
|
||||
private Label label2;
|
||||
private Label label1;
|
||||
private ThPathDialogTextBox textBox2;
|
||||
private ThClearableTextBox textBox3;
|
||||
private ThPathDialogTextBox textBox4;
|
||||
private ThButton button1;
|
||||
private ThPickerBox pickerBox1;
|
||||
private ThYesNoPickerBox pickerBox2;
|
||||
private THorizontalSeparator horizontalSeparator1;
|
||||
private THorizontalSeparator horizontalSeparator2;
|
||||
private ThClearableTextBox textBox1;
|
||||
|
||||
private TileModel result = null;
|
||||
|
||||
|
||||
public EditTileForm(TileModel model = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
StartPosition = FormStartPosition.WindowsDefaultLocation;
|
||||
OkButton = button1;
|
||||
|
||||
result = model;
|
||||
|
||||
pickerBox1.ComboBox.Items.Clear();
|
||||
pickerBox1.ComboBox.Items.AddRange(new string[] { "Normal", "Hidden", "Minimized", "Maximized" });
|
||||
if (pickerBox1.ComboBox.Items.Count > 0)
|
||||
{
|
||||
pickerBox1.ComboBox.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
Text = "Edit Tile";
|
||||
|
||||
textBox1.Text = result?.Title ?? string.Empty;
|
||||
textBox2.Text = result?.ProcessFilename ?? string.Empty;
|
||||
textBox3.Text = result?.ProcessArgument ?? string.Empty;
|
||||
textBox4.Text = result?.ProcessWorkingDirectory ?? string.Empty;
|
||||
pickerBox1.ComboBox.SelectedIndex = (int)result.ProcessWindowStyle;
|
||||
pickerBox2.Value = result.ProcessAsAdmin;
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = "Add Tile";
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
textBox1 = new ThClearableTextBox();
|
||||
label6 = new Label();
|
||||
label7 = new Label();
|
||||
label4 = new Label();
|
||||
label3 = new Label();
|
||||
label2 = new Label();
|
||||
label1 = new Label();
|
||||
textBox2 = new ThPathDialogTextBox();
|
||||
textBox3 = new ThClearableTextBox();
|
||||
textBox4 = new ThPathDialogTextBox();
|
||||
button1 = new ThButton();
|
||||
pickerBox1 = new ThPickerBox();
|
||||
pickerBox2 = new ThYesNoPickerBox();
|
||||
horizontalSeparator1 = new THorizontalSeparator();
|
||||
horizontalSeparator2 = new THorizontalSeparator();
|
||||
SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
textBox1.BackColor = Color.Transparent;
|
||||
textBox1.EnableReactiveVisual = true;
|
||||
textBox1.Font = new Font("Segoe UI", 9F);
|
||||
textBox1.Location = new Point(126, 20);
|
||||
textBox1.Name = "textBox1";
|
||||
textBox1.Size = new Size(243, 35);
|
||||
textBox1.TabIndex = 152;
|
||||
textBox1.TabStop = false;
|
||||
textBox1.UseSystemPasswordChar = false;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.BackColor = Color.Transparent;
|
||||
label6.ForeColor = SystemColors.ControlText;
|
||||
label6.Location = new Point(10, 250);
|
||||
label6.Name = "label6";
|
||||
label6.Padding = new Padding(0, 9, 0, 10);
|
||||
label6.Size = new Size(83, 34);
|
||||
label6.TabIndex = 163;
|
||||
label6.Text = "Run As Admin";
|
||||
label6.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.AutoSize = true;
|
||||
label7.BackColor = Color.Transparent;
|
||||
label7.ForeColor = SystemColors.ControlText;
|
||||
label7.Location = new Point(10, 209);
|
||||
label7.Name = "label7";
|
||||
label7.Padding = new Padding(0, 9, 0, 10);
|
||||
label7.Size = new Size(79, 34);
|
||||
label7.TabIndex = 161;
|
||||
label7.Text = "Window Style";
|
||||
label7.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.BackColor = Color.Transparent;
|
||||
label4.ForeColor = SystemColors.ControlText;
|
||||
label4.Location = new Point(10, 144);
|
||||
label4.Name = "label4";
|
||||
label4.Padding = new Padding(0, 9, 0, 10);
|
||||
label4.Size = new Size(103, 34);
|
||||
label4.TabIndex = 159;
|
||||
label4.Text = "Working Directory";
|
||||
label4.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.BackColor = Color.Transparent;
|
||||
label3.ForeColor = SystemColors.ControlText;
|
||||
label3.Location = new Point(10, 103);
|
||||
label3.Name = "label3";
|
||||
label3.Padding = new Padding(0, 9, 0, 10);
|
||||
label3.Size = new Size(61, 34);
|
||||
label3.TabIndex = 157;
|
||||
label3.Text = "Argument";
|
||||
label3.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.BackColor = Color.Transparent;
|
||||
label2.ForeColor = SystemColors.ControlText;
|
||||
label2.Location = new Point(10, 62);
|
||||
label2.Name = "label2";
|
||||
label2.Padding = new Padding(0, 9, 0, 10);
|
||||
label2.Size = new Size(55, 34);
|
||||
label2.TabIndex = 155;
|
||||
label2.Text = "Filename";
|
||||
label2.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.BackColor = Color.Transparent;
|
||||
label1.ForeColor = SystemColors.ControlText;
|
||||
label1.Location = new Point(10, 21);
|
||||
label1.Margin = new Padding(0);
|
||||
label1.Name = "label1";
|
||||
label1.Padding = new Padding(0, 9, 0, 10);
|
||||
label1.Size = new Size(29, 34);
|
||||
label1.TabIndex = 153;
|
||||
label1.Text = "Title";
|
||||
label1.TextAlign = ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
textBox2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
textBox2.BackColor = Color.Transparent;
|
||||
textBox2.DialogMode = ThPathDialogTextBox.DialogType.OpenFile;
|
||||
textBox2.EnableReactiveVisual = true;
|
||||
textBox2.Font = new Font("Segoe UI", 9F);
|
||||
textBox2.Location = new Point(126, 61);
|
||||
textBox2.Margin = new Padding(10, 10, 10, 0);
|
||||
textBox2.Name = "textBox2";
|
||||
textBox2.Size = new Size(243, 32);
|
||||
textBox2.TabIndex = 170;
|
||||
textBox2.TabStop = false;
|
||||
textBox2.UseSystemPasswordChar = false;
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
textBox3.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
textBox3.BackColor = Color.Transparent;
|
||||
textBox3.EnableReactiveVisual = true;
|
||||
textBox3.Font = new Font("Segoe UI", 9F);
|
||||
textBox3.Location = new Point(147, 102);
|
||||
textBox3.Name = "textBox3";
|
||||
textBox3.Size = new Size(222, 35);
|
||||
textBox3.TabIndex = 171;
|
||||
textBox3.TabStop = false;
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
textBox4.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
textBox4.BackColor = Color.Transparent;
|
||||
textBox4.DialogMode = ThPathDialogTextBox.DialogType.FolderBrowser;
|
||||
textBox4.EnableReactiveVisual = true;
|
||||
textBox4.Font = new Font("Segoe UI", 9F);
|
||||
textBox4.Location = new Point(147, 143);
|
||||
textBox4.Name = "textBox4";
|
||||
textBox4.Size = new Size(222, 32);
|
||||
textBox4.TabIndex = 172;
|
||||
textBox4.TabStop = false;
|
||||
textBox4.UseSystemPasswordChar = false;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.AcceptButton = null;
|
||||
button1.ActiveImage = null;
|
||||
button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
button1.BackColor = Color.Transparent;
|
||||
button1.EnableMenuOnClick = false;
|
||||
button1.EnableReactiveVisual = true;
|
||||
button1.HoverImage = null;
|
||||
button1.IdleImage = null;
|
||||
button1.LabelText = "&Save";
|
||||
button1.Location = new Point(241, 469);
|
||||
button1.Margin = new Padding(10, 10, 10, 0);
|
||||
button1.Name = "button1";
|
||||
button1.Padding = new Padding(4, 4, 3, 3);
|
||||
button1.Size = new Size(128, 32);
|
||||
button1.TabIndex = 173;
|
||||
button1.TabStop = false;
|
||||
//
|
||||
// pickerBox1
|
||||
//
|
||||
pickerBox1.AcceptButton = null;
|
||||
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
pickerBox1.BackColor = Color.Transparent;
|
||||
pickerBox1.EnableReactiveVisual = true;
|
||||
pickerBox1.Font = new Font("Segoe UI", 9F);
|
||||
pickerBox1.Location = new Point(241, 209);
|
||||
pickerBox1.Margin = new Padding(10, 10, 10, 0);
|
||||
pickerBox1.Name = "pickerBox1";
|
||||
pickerBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
pickerBox1.SelectedIndex = -1;
|
||||
pickerBox1.Size = new Size(128, 34);
|
||||
pickerBox1.TabIndex = 174;
|
||||
pickerBox1.TabStop = false;
|
||||
//
|
||||
// pickerBox2
|
||||
//
|
||||
pickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
pickerBox2.BackColor = Color.Transparent;
|
||||
pickerBox2.EnableReactiveVisual = true;
|
||||
pickerBox2.Font = new Font("Segoe UI", 9F);
|
||||
pickerBox2.Location = new Point(285, 250);
|
||||
pickerBox2.Name = "pickerBox2";
|
||||
pickerBox2.Size = new Size(84, 34);
|
||||
pickerBox2.TabIndex = 175;
|
||||
pickerBox2.TabStop = false;
|
||||
//
|
||||
// horizontalSeparator1
|
||||
//
|
||||
horizontalSeparator1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
horizontalSeparator1.AutoScrollMargin = new Size(0, 0);
|
||||
horizontalSeparator1.AutoScrollMinSize = new Size(0, 0);
|
||||
horizontalSeparator1.BackColor = Color.Transparent;
|
||||
horizontalSeparator1.Location = new Point(10, 181);
|
||||
horizontalSeparator1.Margin = new Padding(0, 10, 0, 0);
|
||||
horizontalSeparator1.MaximumSize = new Size(4920, 2);
|
||||
horizontalSeparator1.MinimumSize = new Size(0, 22);
|
||||
horizontalSeparator1.Name = "horizontalSeparator1";
|
||||
horizontalSeparator1.Size = new Size(364, 22);
|
||||
horizontalSeparator1.TabIndex = 176;
|
||||
horizontalSeparator1.TabStop = false;
|
||||
//
|
||||
// horizontalSeparator2
|
||||
//
|
||||
horizontalSeparator2.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
horizontalSeparator2.AutoScrollMargin = new Size(0, 0);
|
||||
horizontalSeparator2.AutoScrollMinSize = new Size(0, 0);
|
||||
horizontalSeparator2.BackColor = Color.Transparent;
|
||||
horizontalSeparator2.Location = new Point(10, 437);
|
||||
horizontalSeparator2.Margin = new Padding(0, 10, 0, 0);
|
||||
horizontalSeparator2.MaximumSize = new Size(4920, 2);
|
||||
horizontalSeparator2.MinimumSize = new Size(0, 22);
|
||||
horizontalSeparator2.Name = "horizontalSeparator2";
|
||||
horizontalSeparator2.Size = new Size(364, 22);
|
||||
horizontalSeparator2.TabIndex = 177;
|
||||
horizontalSeparator2.TabStop = false;
|
||||
//
|
||||
// EditTileForm
|
||||
//
|
||||
ClientSize = new Size(384, 521);
|
||||
Controls.Add(horizontalSeparator2);
|
||||
Controls.Add(horizontalSeparator1);
|
||||
Controls.Add(pickerBox2);
|
||||
Controls.Add(pickerBox1);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(textBox4);
|
||||
Controls.Add(textBox3);
|
||||
Controls.Add(textBox2);
|
||||
Controls.Add(label6);
|
||||
Controls.Add(label7);
|
||||
Controls.Add(label4);
|
||||
Controls.Add(label3);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(textBox1);
|
||||
MinimumSize = new Size(400, 560);
|
||||
Name = "EditTileForm";
|
||||
Text = "Add Tile";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
|
||||
public TileModel Result
|
||||
{
|
||||
get
|
||||
{
|
||||
if (result == null)
|
||||
{
|
||||
result = new TileModel();
|
||||
}
|
||||
|
||||
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
||||
result.ProcessFilename = textBox2.Text?.Trim() ?? string.Empty;
|
||||
result.ProcessArgument = textBox3.Text?.Trim() ?? string.Empty;
|
||||
result.ProcessWorkingDirectory = textBox4.Text?.Trim();
|
||||
result.ProcessWindowStyle = (System.Diagnostics.ProcessWindowStyle)pickerBox1.ComboBox.SelectedIndex;
|
||||
result.ProcessAsAdmin = pickerBox2.Value;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
120
EditTileForm.resx
Normal file
120
EditTileForm.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>
|
544
MainForm.Designer.cs
generated
544
MainForm.Designer.cs
generated
@ -1,6 +1,6 @@
|
||||
using FizzyLauncher.Windows.Forms;
|
||||
using RokettoLaunch.Windows.Forms;
|
||||
|
||||
namespace FizzyLauncher
|
||||
namespace RokettoLaunch
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
@ -30,296 +30,409 @@ namespace FizzyLauncher
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.exitToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem13 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
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();
|
||||
this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewHelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem16 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tileContainer1 = new FizzyLauncher.Windows.Forms.TileContainer();
|
||||
this.contextMenuStrip2.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||
openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
notifyIcon1 = new System.Windows.Forms.NotifyIcon(components);
|
||||
contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(components);
|
||||
exitToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripMenuItem13 = new System.Windows.Forms.ToolStripSeparator();
|
||||
closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripMenuItem14 = new System.Windows.Forms.ToolStripSeparator();
|
||||
saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripMenuItem15 = new System.Windows.Forms.ToolStripSeparator();
|
||||
exitToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
addGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
showBigIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
viewHelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripMenuItem16 = new System.Windows.Forms.ToolStripSeparator();
|
||||
aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
tileContainerMenu1 = new System.Windows.Forms.ContextMenuStrip(components);
|
||||
addGroupToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
addRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
removeRowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
topToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
upToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
downToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
bottomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
|
||||
panel1 = new System.Windows.Forms.Panel();
|
||||
contextMenuStrip2.SuspendLayout();
|
||||
menuStrip1.SuspendLayout();
|
||||
tileContainerMenu1.SuspendLayout();
|
||||
panel1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// saveFileDialog1
|
||||
//
|
||||
this.saveFileDialog1.Filter = "Session files|*.jsonfig";
|
||||
this.saveFileDialog1.Title = "Choose file to save the session";
|
||||
saveFileDialog1.Filter = "Session files|*.jsonfig";
|
||||
saveFileDialog1.Title = "Choose file to save the session";
|
||||
//
|
||||
// openFileDialog1
|
||||
//
|
||||
this.openFileDialog1.Filter = "Session files|*.jsonfig";
|
||||
this.openFileDialog1.Title = "Choose session file";
|
||||
openFileDialog1.Filter = "Session files|*.jsonfig";
|
||||
openFileDialog1.Title = "Choose session file";
|
||||
//
|
||||
// notifyIcon1
|
||||
//
|
||||
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip2;
|
||||
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
|
||||
this.notifyIcon1.Text = "notifyIcon1";
|
||||
this.notifyIcon1.Visible = true;
|
||||
this.notifyIcon1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseClick);
|
||||
notifyIcon1.ContextMenuStrip = contextMenuStrip2;
|
||||
notifyIcon1.Icon = (System.Drawing.Icon)resources.GetObject("notifyIcon1.Icon");
|
||||
notifyIcon1.Text = "notifyIcon1";
|
||||
notifyIcon1.Visible = true;
|
||||
notifyIcon1.MouseClick += notifyIcon1_MouseClick;
|
||||
//
|
||||
// contextMenuStrip2
|
||||
//
|
||||
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.exitToolStripMenuItem1});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip2";
|
||||
this.contextMenuStrip2.Size = new System.Drawing.Size(94, 26);
|
||||
contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { exitToolStripMenuItem1 });
|
||||
contextMenuStrip2.Name = "contextMenuStrip2";
|
||||
contextMenuStrip2.Size = new System.Drawing.Size(94, 26);
|
||||
//
|
||||
// exitToolStripMenuItem1
|
||||
//
|
||||
this.exitToolStripMenuItem1.Name = "exitToolStripMenuItem1";
|
||||
this.exitToolStripMenuItem1.Size = new System.Drawing.Size(93, 22);
|
||||
this.exitToolStripMenuItem1.Text = "E&xit";
|
||||
this.exitToolStripMenuItem1.Click += new System.EventHandler(this.exitToolStripMenuItem1_Click);
|
||||
exitToolStripMenuItem1.Name = "exitToolStripMenuItem1";
|
||||
exitToolStripMenuItem1.Size = new System.Drawing.Size(93, 22);
|
||||
exitToolStripMenuItem1.Text = "E&xit";
|
||||
exitToolStripMenuItem1.Click += exitToolStripMenuItem1_Click;
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.toolStripMenuItem1,
|
||||
this.viewToolStripMenuItem,
|
||||
this.toolsToolStripMenuItem,
|
||||
this.helpToolStripMenuItem1});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(633, 24);
|
||||
this.menuStrip1.TabIndex = 2;
|
||||
this.menuStrip1.MenuActivate += new System.EventHandler(this.menuStrip1_MenuActivate);
|
||||
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, toolStripMenuItem1, viewToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem1 });
|
||||
menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
menuStrip1.Name = "menuStrip1";
|
||||
menuStrip1.Size = new System.Drawing.Size(404, 24);
|
||||
menuStrip1.TabIndex = 2;
|
||||
menuStrip1.MenuActivate += menuStrip1_MenuActivate;
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newToolStripMenuItem,
|
||||
this.openToolStripMenuItem,
|
||||
this.toolStripMenuItem13,
|
||||
this.closeToolStripMenuItem,
|
||||
this.toolStripMenuItem14,
|
||||
this.saveToolStripMenuItem,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.toolStripMenuItem15,
|
||||
this.exitToolStripMenuItem2});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { newToolStripMenuItem, openToolStripMenuItem, toolStripMenuItem13, closeToolStripMenuItem, toolStripMenuItem14, saveToolStripMenuItem, saveAsToolStripMenuItem, toolStripMenuItem15, exitToolStripMenuItem2 });
|
||||
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// newToolStripMenuItem
|
||||
//
|
||||
this.newToolStripMenuItem.Image = AppResource.file;
|
||||
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(146, 22);
|
||||
this.newToolStripMenuItem.Text = "&New";
|
||||
this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
|
||||
newToolStripMenuItem.Image = AppResource.file;
|
||||
newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
newToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N;
|
||||
newToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
newToolStripMenuItem.Text = "&New";
|
||||
newToolStripMenuItem.Click += newToolStripMenuItem_Click;
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
this.openToolStripMenuItem.Image = AppResource.folder;
|
||||
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(146, 22);
|
||||
this.openToolStripMenuItem.Text = "&Open";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
|
||||
openToolStripMenuItem.Image = AppResource.folder;
|
||||
openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
openToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O;
|
||||
openToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
openToolStripMenuItem.Text = "&Open";
|
||||
openToolStripMenuItem.Click += openToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripMenuItem13
|
||||
//
|
||||
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
|
||||
this.toolStripMenuItem13.Size = new System.Drawing.Size(143, 6);
|
||||
toolStripMenuItem13.Name = "toolStripMenuItem13";
|
||||
toolStripMenuItem13.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// closeToolStripMenuItem
|
||||
//
|
||||
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
|
||||
this.closeToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.closeToolStripMenuItem.Text = "&Close";
|
||||
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
|
||||
closeToolStripMenuItem.Name = "closeToolStripMenuItem";
|
||||
closeToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
closeToolStripMenuItem.Text = "&Close";
|
||||
closeToolStripMenuItem.Click += closeToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripMenuItem14
|
||||
//
|
||||
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
|
||||
this.toolStripMenuItem14.Size = new System.Drawing.Size(143, 6);
|
||||
toolStripMenuItem14.Name = "toolStripMenuItem14";
|
||||
toolStripMenuItem14.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Image = AppResource.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(146, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
saveToolStripMenuItem.Image = AppResource.disk2;
|
||||
saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
saveToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S;
|
||||
saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
saveToolStripMenuItem.Text = "&Save";
|
||||
saveToolStripMenuItem.Click += saveToolStripMenuItem_Click;
|
||||
//
|
||||
// saveAsToolStripMenuItem
|
||||
//
|
||||
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.saveAsToolStripMenuItem.Text = "Save &As...";
|
||||
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
|
||||
saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||
saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
saveAsToolStripMenuItem.Text = "Save &As...";
|
||||
saveAsToolStripMenuItem.Click += saveAsToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripMenuItem15
|
||||
//
|
||||
this.toolStripMenuItem15.Name = "toolStripMenuItem15";
|
||||
this.toolStripMenuItem15.Size = new System.Drawing.Size(143, 6);
|
||||
toolStripMenuItem15.Name = "toolStripMenuItem15";
|
||||
toolStripMenuItem15.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// exitToolStripMenuItem2
|
||||
//
|
||||
this.exitToolStripMenuItem2.Name = "exitToolStripMenuItem2";
|
||||
this.exitToolStripMenuItem2.Size = new System.Drawing.Size(146, 22);
|
||||
this.exitToolStripMenuItem2.Text = "E&xit";
|
||||
this.exitToolStripMenuItem2.Click += new System.EventHandler(this.exitToolStripMenuItem2_Click);
|
||||
exitToolStripMenuItem2.Name = "exitToolStripMenuItem2";
|
||||
exitToolStripMenuItem2.Size = new System.Drawing.Size(146, 22);
|
||||
exitToolStripMenuItem2.Text = "E&xit";
|
||||
exitToolStripMenuItem2.Click += 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";
|
||||
toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { addGroupToolStripMenuItem });
|
||||
toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
toolStripMenuItem1.Size = new System.Drawing.Size(39, 20);
|
||||
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);
|
||||
addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem";
|
||||
addGroupToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||
addGroupToolStripMenuItem.Text = "&Add Group";
|
||||
addGroupToolStripMenuItem.Click += addGroupToolStripMenuItem_Click;
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.showBigIconsToolStripMenuItem,
|
||||
this.enableAnimationsToolStripMenuItem,
|
||||
this.alwaysOnTopToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.viewToolStripMenuItem.Text = "&View";
|
||||
viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { showBigIconsToolStripMenuItem, alwaysOnTopToolStripMenuItem });
|
||||
viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
viewToolStripMenuItem.Text = "&View";
|
||||
//
|
||||
// showBigIconsToolStripMenuItem
|
||||
//
|
||||
this.showBigIconsToolStripMenuItem.Name = "showBigIconsToolStripMenuItem";
|
||||
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(173, 22);
|
||||
this.enableAnimationsToolStripMenuItem.Text = "Enable &Animations";
|
||||
this.enableAnimationsToolStripMenuItem.Click += new System.EventHandler(this.enableAnimationsToolStripMenuItem_Click);
|
||||
showBigIconsToolStripMenuItem.Name = "showBigIconsToolStripMenuItem";
|
||||
showBigIconsToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
|
||||
showBigIconsToolStripMenuItem.Text = "Show &Big Icons";
|
||||
showBigIconsToolStripMenuItem.Click += showBigIconsToolStripMenuItem_Click;
|
||||
//
|
||||
// alwaysOnTopToolStripMenuItem
|
||||
//
|
||||
this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
|
||||
this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.alwaysOnTopToolStripMenuItem.Text = "Always On &Top";
|
||||
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
|
||||
alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
|
||||
alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
|
||||
alwaysOnTopToolStripMenuItem.Text = "Always On &Top";
|
||||
alwaysOnTopToolStripMenuItem.Click += alwaysOnTopToolStripMenuItem_Click;
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.optionsToolStripMenuItem});
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20);
|
||||
this.toolsToolStripMenuItem.Text = "&Tools";
|
||||
toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { optionsToolStripMenuItem });
|
||||
toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20);
|
||||
toolsToolStripMenuItem.Text = "&Tools";
|
||||
//
|
||||
// optionsToolStripMenuItem
|
||||
//
|
||||
this.optionsToolStripMenuItem.Image = AppResource.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(168, 22);
|
||||
this.optionsToolStripMenuItem.Text = "&Options";
|
||||
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
|
||||
optionsToolStripMenuItem.Image = AppResource.cog2;
|
||||
optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
optionsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12;
|
||||
optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||
optionsToolStripMenuItem.Text = "&Options";
|
||||
optionsToolStripMenuItem.Click += optionsToolStripMenuItem_Click;
|
||||
//
|
||||
// helpToolStripMenuItem1
|
||||
//
|
||||
this.helpToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.viewHelpToolStripMenuItem1,
|
||||
this.toolStripMenuItem16,
|
||||
this.aboutToolStripMenuItem1});
|
||||
this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
|
||||
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem1.Text = "&Help";
|
||||
helpToolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { viewHelpToolStripMenuItem1, toolStripMenuItem16, aboutToolStripMenuItem1 });
|
||||
helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
|
||||
helpToolStripMenuItem1.Size = new System.Drawing.Size(44, 20);
|
||||
helpToolStripMenuItem1.Text = "&Help";
|
||||
//
|
||||
// viewHelpToolStripMenuItem1
|
||||
//
|
||||
this.viewHelpToolStripMenuItem1.Image = AppResource.help2;
|
||||
this.viewHelpToolStripMenuItem1.Name = "viewHelpToolStripMenuItem1";
|
||||
this.viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||
this.viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||
this.viewHelpToolStripMenuItem1.Text = "&View Help";
|
||||
this.viewHelpToolStripMenuItem1.Click += new System.EventHandler(this.viewHelpToolStripMenuItem1_Click);
|
||||
viewHelpToolStripMenuItem1.Image = AppResource.help2;
|
||||
viewHelpToolStripMenuItem1.Name = "viewHelpToolStripMenuItem1";
|
||||
viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||
viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||
viewHelpToolStripMenuItem1.Text = "&View Help";
|
||||
viewHelpToolStripMenuItem1.Click += viewHelpToolStripMenuItem1_Click;
|
||||
//
|
||||
// toolStripMenuItem16
|
||||
//
|
||||
this.toolStripMenuItem16.Name = "toolStripMenuItem16";
|
||||
this.toolStripMenuItem16.Size = new System.Drawing.Size(143, 6);
|
||||
toolStripMenuItem16.Name = "toolStripMenuItem16";
|
||||
toolStripMenuItem16.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// aboutToolStripMenuItem1
|
||||
//
|
||||
this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
|
||||
this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||
this.aboutToolStripMenuItem1.Text = "&About";
|
||||
this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutToolStripMenuItem1_Click);
|
||||
aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
|
||||
aboutToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||
aboutToolStripMenuItem1.Text = "&About";
|
||||
aboutToolStripMenuItem1.Click += aboutToolStripMenuItem1_Click;
|
||||
//
|
||||
// tileContainer1
|
||||
// tileContainerMenu1
|
||||
//
|
||||
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 = "tileContainer1";
|
||||
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;
|
||||
tileContainerMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { addGroupToolStripMenuItem1, toolStripMenuItem4, editToolStripMenuItem, toolStripMenuItem5, toolStripSeparator1, toolStripMenuItem2, toolStripSeparator2, toolStripMenuItem3, toolStripSeparator3, removeToolStripMenuItem });
|
||||
tileContainerMenu1.Name = "tileContainerMenu1";
|
||||
tileContainerMenu1.Size = new System.Drawing.Size(133, 176);
|
||||
//
|
||||
// addGroupToolStripMenuItem1
|
||||
//
|
||||
addGroupToolStripMenuItem1.Name = "addGroupToolStripMenuItem1";
|
||||
addGroupToolStripMenuItem1.Size = new System.Drawing.Size(132, 22);
|
||||
addGroupToolStripMenuItem1.Text = "&Add Tile";
|
||||
addGroupToolStripMenuItem1.Click += addGroupToolStripMenuItem1_Click;
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
toolStripMenuItem4.Size = new System.Drawing.Size(132, 22);
|
||||
toolStripMenuItem4.Text = "Add &Group";
|
||||
toolStripMenuItem4.Click += toolStripMenuItem4_Click;
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
editToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||
editToolStripMenuItem.Text = "&Edit";
|
||||
editToolStripMenuItem.Click += editToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripMenuItem5
|
||||
//
|
||||
toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||
toolStripMenuItem5.Size = new System.Drawing.Size(132, 22);
|
||||
toolStripMenuItem5.Text = "&Duplicate";
|
||||
toolStripMenuItem5.Click += toolStripMenuItem5_Click;
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
toolStripSeparator1.Size = new System.Drawing.Size(129, 6);
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
toolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { addRowToolStripMenuItem, removeRowToolStripMenuItem });
|
||||
toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
toolStripMenuItem2.Size = new System.Drawing.Size(132, 22);
|
||||
toolStripMenuItem2.Text = "Ro&w";
|
||||
//
|
||||
// addRowToolStripMenuItem
|
||||
//
|
||||
addRowToolStripMenuItem.Name = "addRowToolStripMenuItem";
|
||||
addRowToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
|
||||
addRowToolStripMenuItem.Text = "A&dd Row";
|
||||
addRowToolStripMenuItem.Click += addRowToolStripMenuItem_Click;
|
||||
//
|
||||
// removeRowToolStripMenuItem
|
||||
//
|
||||
removeRowToolStripMenuItem.Name = "removeRowToolStripMenuItem";
|
||||
removeRowToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
|
||||
removeRowToolStripMenuItem.Text = "Remo&ve Row";
|
||||
removeRowToolStripMenuItem.Click += removeRowToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
toolStripSeparator2.Size = new System.Drawing.Size(129, 6);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
toolStripMenuItem3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { topToolStripMenuItem, upToolStripMenuItem, downToolStripMenuItem, bottomToolStripMenuItem });
|
||||
toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
toolStripMenuItem3.Size = new System.Drawing.Size(132, 22);
|
||||
toolStripMenuItem3.Text = "&Move";
|
||||
//
|
||||
// topToolStripMenuItem
|
||||
//
|
||||
topToolStripMenuItem.Name = "topToolStripMenuItem";
|
||||
topToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
topToolStripMenuItem.Text = "&Top";
|
||||
topToolStripMenuItem.Click += topToolStripMenuItem_Click;
|
||||
//
|
||||
// upToolStripMenuItem
|
||||
//
|
||||
upToolStripMenuItem.Name = "upToolStripMenuItem";
|
||||
upToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
upToolStripMenuItem.Text = "&Up";
|
||||
upToolStripMenuItem.Click += upToolStripMenuItem_Click;
|
||||
//
|
||||
// downToolStripMenuItem
|
||||
//
|
||||
downToolStripMenuItem.Name = "downToolStripMenuItem";
|
||||
downToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
downToolStripMenuItem.Text = "&Down";
|
||||
downToolStripMenuItem.Click += downToolStripMenuItem_Click;
|
||||
//
|
||||
// bottomToolStripMenuItem
|
||||
//
|
||||
bottomToolStripMenuItem.Name = "bottomToolStripMenuItem";
|
||||
bottomToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
bottomToolStripMenuItem.Text = "&Bottom";
|
||||
bottomToolStripMenuItem.Click += bottomToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
toolStripSeparator3.Size = new System.Drawing.Size(129, 6);
|
||||
//
|
||||
// removeToolStripMenuItem
|
||||
//
|
||||
removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
||||
removeToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||
removeToolStripMenuItem.Text = "&Remove";
|
||||
removeToolStripMenuItem.Click += removeToolStripMenuItem_Click;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
flowLayoutPanel1.AutoScroll = true;
|
||||
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
flowLayoutPanel1.Location = new System.Drawing.Point(6, 0);
|
||||
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
flowLayoutPanel1.Size = new System.Drawing.Size(398, 417);
|
||||
flowLayoutPanel1.TabIndex = 8;
|
||||
flowLayoutPanel1.WrapContents = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
panel1.Controls.Add(flowLayoutPanel1);
|
||||
panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
panel1.Location = new System.Drawing.Point(0, 24);
|
||||
panel1.Margin = new System.Windows.Forms.Padding(0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Padding = new System.Windows.Forms.Padding(6, 0, 0, 0);
|
||||
panel1.Size = new System.Drawing.Size(404, 417);
|
||||
panel1.TabIndex = 9;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
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.tileContainer1);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.DoubleBuffered = true;
|
||||
this.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(420, 280);
|
||||
this.Name = "MainForm";
|
||||
this.Text = "Fizzy Launcher";
|
||||
this.contextMenuStrip2.ResumeLayout(false);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
BackColor = System.Drawing.Color.FromArgb(250, 250, 250);
|
||||
BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
ClientSize = new System.Drawing.Size(404, 441);
|
||||
Controls.Add(panel1);
|
||||
Controls.Add(menuStrip1);
|
||||
DoubleBuffered = true;
|
||||
ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||
MainMenuStrip = menuStrip1;
|
||||
MaximizeBox = false;
|
||||
MinimizeBox = false;
|
||||
MinimumSize = new System.Drawing.Size(300, 320);
|
||||
Name = "MainForm";
|
||||
contextMenuStrip2.ResumeLayout(false);
|
||||
menuStrip1.ResumeLayout(false);
|
||||
menuStrip1.PerformLayout();
|
||||
tileContainerMenu1.ResumeLayout(false);
|
||||
panel1.ResumeLayout(false);
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -333,7 +446,6 @@ namespace FizzyLauncher
|
||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem1;
|
||||
private TileContainer tileContainer1;
|
||||
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem13;
|
||||
@ -344,7 +456,6 @@ namespace FizzyLauncher
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem15;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem showBigIconsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem enableAnimationsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem alwaysOnTopToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewHelpToolStripMenuItem1;
|
||||
@ -352,6 +463,25 @@ namespace FizzyLauncher
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem addGroupToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip tileContainerMenu1;
|
||||
private System.Windows.Forms.ToolStripMenuItem addGroupToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
|
||||
private System.Windows.Forms.ToolStripMenuItem addRowToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem removeRowToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem topToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem upToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem downToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem bottomToolStripMenuItem;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
|
||||
}
|
||||
}
|
||||
|
||||
|
1083
MainForm.cs
1083
MainForm.cs
File diff suppressed because it is too large
Load Diff
1181
MainForm.resx
1181
MainForm.resx
File diff suppressed because it is too large
Load Diff
27
Models/AppOptions.cs
Normal file
27
Models/AppOptions.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
namespace RokettoLaunch.Models
|
||||
{
|
||||
public class AppOptions
|
||||
{
|
||||
public int TilesPerRow { get; set; } = 8;
|
||||
|
||||
public bool ShowBigIcons { get; set; } = true;
|
||||
|
||||
public RyzStudio.Windows.ThemedForms.ButtonTextBox.ThKeyCodeTextBox.Results ShowToggleHotkey { get; set; } = null;
|
||||
|
||||
public bool HideOnClose { get; set; } = true;
|
||||
|
||||
public bool HideOnExecute { get; set; } = true;
|
||||
|
||||
public bool AlwaysOnTop { get; set; } = false;
|
||||
|
||||
public List<TileGroupModel> Groups { get; set; } = new List<TileGroupModel>();
|
||||
|
||||
public Point StartPosition { get; set; } = Point.Empty;
|
||||
|
||||
public int Height { get; set; } = 280;
|
||||
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
namespace FizzyLauncher.Models
|
||||
{
|
||||
public class LauncherSession
|
||||
{
|
||||
public class HotKeyOptions
|
||||
{
|
||||
public bool IsCtrl { get; set; } = false;
|
||||
public bool IsAlt { get; set; } = false;
|
||||
public bool IsShift { get; set; } = false;
|
||||
public int Key { get; set; } = (int)System.Windows.Forms.Keys.None;
|
||||
|
||||
public int ModifierCode => ((this.IsAlt ? 1 : 0) + (this.IsCtrl ? 2 : 0) + (this.IsShift ? 4 : 0));
|
||||
|
||||
public System.Windows.Forms.Keys KeyCode => (System.Windows.Forms.Keys)this.Key;
|
||||
}
|
||||
|
||||
public enum AutoSaveOption
|
||||
{
|
||||
Prompt = 0,
|
||||
Yes,
|
||||
No
|
||||
}
|
||||
|
||||
public int DefaultHeight { get; set; } = 280;
|
||||
public HotKeyOptions HotKey { get; set; } = null;
|
||||
|
||||
public bool AlwaysOnTop { get; set; } = false;
|
||||
public bool EnableAnimation { get; set; } = false;
|
||||
public bool EnableBigIconInFolder { get; set; } = false;
|
||||
|
||||
public bool HideOnClose { get; set; } = false;
|
||||
public bool HideOnClick { get; set; } = false;
|
||||
public AutoSaveOption AutoSave { get; set; } = AutoSaveOption.Prompt;
|
||||
public List<TileGroupModel> Groups { get; set; } = new List<TileGroupModel>();
|
||||
|
||||
public Point StartPosition { get; set; } = Point.Empty;
|
||||
|
||||
}
|
||||
}
|
10
Models/NewFormModel.cs
Normal file
10
Models/NewFormModel.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace RokettoLaunch.Models
|
||||
{
|
||||
public class NewFormModel
|
||||
{
|
||||
public int ColumnCount { get; set; } = 8;
|
||||
|
||||
public int GroupCount { get; set; } = 1;
|
||||
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
using System.Drawing;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace FizzyLauncher.Models
|
||||
namespace RokettoLaunch.Models
|
||||
{
|
||||
public class TileGroupModel
|
||||
{
|
||||
@ -10,8 +10,6 @@ namespace FizzyLauncher.Models
|
||||
|
||||
public bool IsExpanded { get; set; } = false;
|
||||
|
||||
public bool IsExclusive { get; set; } = false;
|
||||
|
||||
public List<TileModel> Items { get; set; } = new List<TileModel>();
|
||||
|
||||
[JsonConverter(typeof(RyzStudio.Text.Json.JsonSizeConverter))]
|
||||
|
@ -4,7 +4,7 @@ using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace FizzyLauncher.Models
|
||||
namespace RokettoLaunch.Models
|
||||
{
|
||||
public class TileModel
|
||||
{
|
||||
|
212
NewForm.cs
212
NewForm.cs
@ -1,124 +1,168 @@
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using RokettoLaunch.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
|
||||
namespace FizzyLauncher
|
||||
namespace RokettoLaunch
|
||||
{
|
||||
public class NewForm : TDialogForm
|
||||
public class NewForm : TDialog
|
||||
{
|
||||
private System.Windows.Forms.Label label1;
|
||||
private TButton button1;
|
||||
private TNumericBox numericBox1;
|
||||
private ThButton button1;
|
||||
private ThNumericBox numericBox1;
|
||||
private ThNumericBox numericBox2;
|
||||
private Label label2;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1;
|
||||
|
||||
|
||||
public NewForm(MainForm parent) : base()
|
||||
public NewForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
parentForm = parent;
|
||||
this.OkButton = button1;
|
||||
|
||||
numericBox1.Minimum = 4;
|
||||
numericBox1.Maximum = 24;
|
||||
numericBox1.Value = 6;
|
||||
numericBox1.Value = 8;
|
||||
numericBox2.Minimum = 1;
|
||||
numericBox2.Maximum = 8;
|
||||
numericBox2.Value = 1;
|
||||
}
|
||||
|
||||
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 = new Label();
|
||||
button1 = new ThButton();
|
||||
tHorizontalSeparator1 = new THorizontalSeparator();
|
||||
numericBox1 = new ThNumericBox();
|
||||
numericBox2 = new ThNumericBox();
|
||||
label2 = new Label();
|
||||
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;
|
||||
label1.AutoSize = true;
|
||||
label1.BackColor = System.Drawing.Color.Transparent;
|
||||
label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label1.Location = new System.Drawing.Point(10, 21);
|
||||
label1.Margin = new Padding(0);
|
||||
label1.Name = "label1";
|
||||
label1.Padding = new Padding(0, 9, 0, 10);
|
||||
label1.Size = new System.Drawing.Size(76, 34);
|
||||
label1.TabIndex = 153;
|
||||
label1.Text = "Tiles Per Row";
|
||||
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.IdleImage = null;
|
||||
this.button1.ActiveImage = null;
|
||||
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.HoverImage = 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);
|
||||
button1.AcceptButton = null;
|
||||
button1.ActiveImage = null;
|
||||
button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
button1.BackColor = System.Drawing.Color.Transparent;
|
||||
button1.EnableMenuOnClick = false;
|
||||
button1.EnableReactiveVisual = true;
|
||||
button1.HoverImage = null;
|
||||
button1.IdleImage = null;
|
||||
button1.LabelText = "&OK";
|
||||
button1.Location = new System.Drawing.Point(241, 369);
|
||||
button1.Margin = new Padding(10, 10, 10, 0);
|
||||
button1.Name = "button1";
|
||||
button1.Padding = new Padding(4, 4, 3, 3);
|
||||
button1.Size = new System.Drawing.Size(128, 32);
|
||||
button1.TabIndex = 173;
|
||||
button1.TabStop = false;
|
||||
//
|
||||
// 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;
|
||||
tHorizontalSeparator1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tHorizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent;
|
||||
tHorizontalSeparator1.Location = new System.Drawing.Point(10, 337);
|
||||
tHorizontalSeparator1.Margin = new Padding(0, 10, 0, 0);
|
||||
tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||
tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22);
|
||||
tHorizontalSeparator1.Name = "tHorizontalSeparator1";
|
||||
tHorizontalSeparator1.Size = new System.Drawing.Size(364, 22);
|
||||
tHorizontalSeparator1.TabIndex = 188;
|
||||
tHorizontalSeparator1.TabStop = false;
|
||||
//
|
||||
// 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.AcceptButton = null;
|
||||
this.numericBox1.TabIndex = 189;
|
||||
this.numericBox1.Value = 0;
|
||||
numericBox1.AcceptButton = null;
|
||||
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
numericBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
numericBox1.EnableReactiveVisual = true;
|
||||
numericBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
numericBox1.Location = new System.Drawing.Point(285, 20);
|
||||
numericBox1.Margin = new Padding(10, 10, 10, 0);
|
||||
numericBox1.Maximum = 100;
|
||||
numericBox1.Minimum = 1;
|
||||
numericBox1.Name = "numericBox1";
|
||||
numericBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
numericBox1.Size = new System.Drawing.Size(84, 32);
|
||||
numericBox1.TabIndex = 189;
|
||||
numericBox1.TabStop = false;
|
||||
numericBox1.Value = 1;
|
||||
//
|
||||
// numericBox2
|
||||
//
|
||||
numericBox2.AcceptButton = null;
|
||||
numericBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
numericBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
numericBox2.EnableReactiveVisual = true;
|
||||
numericBox2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
numericBox2.Location = new System.Drawing.Point(285, 62);
|
||||
numericBox2.Margin = new Padding(10, 10, 10, 0);
|
||||
numericBox2.Maximum = 100;
|
||||
numericBox2.Minimum = 1;
|
||||
numericBox2.Name = "numericBox2";
|
||||
numericBox2.Padding = new Padding(4, 4, 3, 3);
|
||||
numericBox2.Size = new System.Drawing.Size(84, 32);
|
||||
numericBox2.TabIndex = 191;
|
||||
numericBox2.TabStop = false;
|
||||
numericBox2.Value = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.BackColor = System.Drawing.Color.Transparent;
|
||||
label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label2.Location = new System.Drawing.Point(10, 63);
|
||||
label2.Margin = new Padding(0);
|
||||
label2.Name = "label2";
|
||||
label2.Padding = new Padding(0, 9, 0, 10);
|
||||
label2.Size = new System.Drawing.Size(106, 34);
|
||||
label2.TabIndex = 190;
|
||||
label2.Text = "Number of Groups";
|
||||
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// 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();
|
||||
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(384, 421);
|
||||
Controls.Add(numericBox2);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(numericBox1);
|
||||
Controls.Add(tHorizontalSeparator1);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(label1);
|
||||
MinimumSize = new System.Drawing.Size(400, 200);
|
||||
Name = "NewForm";
|
||||
Text = "New";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
|
||||
public MainForm parentForm { get; set; } = null;
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
public NewFormModel Result
|
||||
{
|
||||
if (parentForm != null)
|
||||
get => new NewFormModel()
|
||||
{
|
||||
parentForm.Clear(numericBox1.Value);
|
||||
}
|
||||
|
||||
this.Close();
|
||||
ColumnCount = numericBox1.Value,
|
||||
GroupCount = numericBox2.Value
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
62
NewForm.resx
62
NewForm.resx
@ -1,4 +1,64 @@
|
||||
<root>
|
||||
<?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">
|
||||
|
572
OptionsForm.cs
572
OptionsForm.cs
@ -1,279 +1,429 @@
|
||||
using FizzyLauncher.Models;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using RokettoLaunch.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||
using RyzStudio.Windows.ThemedForms.PickerBox;
|
||||
using System;
|
||||
|
||||
namespace FizzyLauncher
|
||||
namespace RokettoLaunch
|
||||
{
|
||||
public class OptionsForm : TDialogForm
|
||||
public class OptionsForm : TDialog
|
||||
{
|
||||
private System.Windows.Forms.Label label1;
|
||||
private TButton button1;
|
||||
private TYesNoPickerBox pickerBox2;
|
||||
private ThButton button1;
|
||||
private ThYesNoPickerBox yesNoPickerBox2;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private TYesNoPickerBox pickerBox3;
|
||||
private ThYesNoPickerBox yesNoPickerBox3;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private TPickerBox pickerBox1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1;
|
||||
private TKeyCodeTextBox textBox1;
|
||||
private ThKeyCodeTextBox textBox1;
|
||||
private ThNumericBox numericBox1;
|
||||
private Label label4;
|
||||
private FlowLayoutPanel flowLayoutPanel1;
|
||||
private TTogglePanel tTogglePanel1;
|
||||
private TTogglePanel tTogglePanel2;
|
||||
private ThYesNoPickerBox yesNoPickerBox1;
|
||||
private Label label2;
|
||||
private ThYesNoPickerBox yesNoPickerBox4;
|
||||
private Label label3;
|
||||
|
||||
private AppOptions _appSession = null;
|
||||
|
||||
|
||||
public OptionsForm(MainForm parent) : base()
|
||||
public OptionsForm(AppOptions appSession)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
parentForm = parent;
|
||||
this.OkButton = button1;
|
||||
|
||||
pickerBox1.ComboBox.Items.Clear();
|
||||
foreach (string item in Enum.GetNames(typeof(LauncherSession.AutoSaveOption)))
|
||||
numericBox1.Minimum = 4;
|
||||
numericBox1.Maximum = 24;
|
||||
|
||||
_appSession = appSession;
|
||||
|
||||
if (_appSession != null)
|
||||
{
|
||||
pickerBox1.ComboBox.Items.Add(item);
|
||||
numericBox1.Value = _appSession.TilesPerRow;
|
||||
yesNoPickerBox1.Value = _appSession.ShowBigIcons;
|
||||
textBox1.UpdateKeyCode(_appSession?.ShowToggleHotkey ?? new ThKeyCodeTextBox.Results());
|
||||
yesNoPickerBox2.Value = _appSession.HideOnClose;
|
||||
yesNoPickerBox3.Value = _appSession.HideOnExecute;
|
||||
yesNoPickerBox4.Value = _appSession.AlwaysOnTop;
|
||||
}
|
||||
|
||||
if (pickerBox1.ComboBox.Items.Count > 0) pickerBox1.ComboBox.SelectedIndex = 0;
|
||||
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionsForm));
|
||||
TKeyCodeTextBox.Results results1 = new TKeyCodeTextBox.Results();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.button1 = new TButton();
|
||||
this.pickerBox2 = new TYesNoPickerBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.pickerBox3 = new TYesNoPickerBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.pickerBox1 = new TPickerBox();
|
||||
this.tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
|
||||
this.textBox1 = new TKeyCodeTextBox();
|
||||
this.SuspendLayout();
|
||||
ThKeyCodeTextBox.Results results1 = new ThKeyCodeTextBox.Results();
|
||||
label1 = new Label();
|
||||
button1 = new ThButton();
|
||||
yesNoPickerBox2 = new ThYesNoPickerBox();
|
||||
label6 = new Label();
|
||||
yesNoPickerBox3 = new ThYesNoPickerBox();
|
||||
label7 = new Label();
|
||||
tHorizontalSeparator1 = new THorizontalSeparator();
|
||||
textBox1 = new ThKeyCodeTextBox();
|
||||
numericBox1 = new ThNumericBox();
|
||||
label4 = new Label();
|
||||
flowLayoutPanel1 = new FlowLayoutPanel();
|
||||
tTogglePanel1 = new TTogglePanel();
|
||||
yesNoPickerBox1 = new ThYesNoPickerBox();
|
||||
label2 = new Label();
|
||||
tTogglePanel2 = new TTogglePanel();
|
||||
yesNoPickerBox4 = new ThYesNoPickerBox();
|
||||
label3 = new Label();
|
||||
flowLayoutPanel1.SuspendLayout();
|
||||
tTogglePanel1.SuspendLayout();
|
||||
tTogglePanel2.SuspendLayout();
|
||||
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(107, 34);
|
||||
this.label1.TabIndex = 153;
|
||||
this.label1.Text = "Show/Hide Hotkey";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
label1.AutoSize = true;
|
||||
label1.BackColor = System.Drawing.Color.Transparent;
|
||||
label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label1.Location = new System.Drawing.Point(1, 22);
|
||||
label1.Margin = new Padding(0);
|
||||
label1.Name = "label1";
|
||||
label1.Padding = new Padding(0, 8, 0, 0);
|
||||
label1.Size = new System.Drawing.Size(115, 23);
|
||||
label1.TabIndex = 153;
|
||||
label1.Text = "Show Toggle Hotkey";
|
||||
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.IdleImage = null;
|
||||
this.button1.ActiveImage = null;
|
||||
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";
|
||||
this.button1.HoverImage = 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);
|
||||
button1.AcceptButton = null;
|
||||
button1.ActiveImage = null;
|
||||
button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
button1.BackColor = System.Drawing.Color.Transparent;
|
||||
button1.EnableMenuOnClick = false;
|
||||
button1.EnableReactiveVisual = true;
|
||||
button1.HoverImage = null;
|
||||
button1.IdleImage = null;
|
||||
button1.LabelText = "&Save";
|
||||
button1.Location = new System.Drawing.Point(301, 469);
|
||||
button1.Margin = new Padding(10, 10, 10, 0);
|
||||
button1.Name = "button1";
|
||||
button1.Padding = new Padding(4, 4, 3, 3);
|
||||
button1.Size = new System.Drawing.Size(128, 32);
|
||||
button1.TabIndex = 173;
|
||||
button1.TabStop = false;
|
||||
//
|
||||
// pickerBox2
|
||||
// yesNoPickerBox2
|
||||
//
|
||||
this.pickerBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pickerBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.pickerBox2.Location = new System.Drawing.Point(285, 103);
|
||||
this.pickerBox2.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
|
||||
this.pickerBox2.Name = "pickerBox2";
|
||||
this.pickerBox2.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
|
||||
this.pickerBox2.Size = new System.Drawing.Size(84, 34);
|
||||
this.pickerBox2.AcceptButton = null;
|
||||
this.pickerBox2.TabIndex = 183;
|
||||
this.pickerBox2.Value = true;
|
||||
yesNoPickerBox2.AcceptButton = null;
|
||||
yesNoPickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
yesNoPickerBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
yesNoPickerBox2.EnableReactiveVisual = true;
|
||||
yesNoPickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
yesNoPickerBox2.Location = new System.Drawing.Point(307, 63);
|
||||
yesNoPickerBox2.Margin = new Padding(10, 10, 10, 0);
|
||||
yesNoPickerBox2.Name = "yesNoPickerBox2";
|
||||
yesNoPickerBox2.Padding = new Padding(4, 4, 3, 3);
|
||||
yesNoPickerBox2.SelectedIndex = 1;
|
||||
yesNoPickerBox2.Size = new System.Drawing.Size(84, 34);
|
||||
yesNoPickerBox2.TabIndex = 183;
|
||||
yesNoPickerBox2.TabStop = false;
|
||||
yesNoPickerBox2.Value = true;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label6.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label6.Location = new System.Drawing.Point(10, 103);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label6.Size = new System.Drawing.Size(83, 34);
|
||||
this.label6.TabIndex = 182;
|
||||
this.label6.Text = "Hide On Close";
|
||||
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
label6.AutoSize = true;
|
||||
label6.BackColor = System.Drawing.Color.Transparent;
|
||||
label6.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label6.Location = new System.Drawing.Point(1, 63);
|
||||
label6.Margin = new Padding(0);
|
||||
label6.Name = "label6";
|
||||
label6.Padding = new Padding(0, 8, 0, 0);
|
||||
label6.Size = new System.Drawing.Size(83, 23);
|
||||
label6.TabIndex = 182;
|
||||
label6.Text = "Hide On Close";
|
||||
label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// pickerBox3
|
||||
// yesNoPickerBox3
|
||||
//
|
||||
this.pickerBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pickerBox3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pickerBox3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.pickerBox3.Location = new System.Drawing.Point(285, 144);
|
||||
this.pickerBox3.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
|
||||
this.pickerBox3.Name = "pickerBox3";
|
||||
this.pickerBox3.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
|
||||
this.pickerBox3.Size = new System.Drawing.Size(84, 34);
|
||||
this.pickerBox3.AcceptButton = null;
|
||||
this.pickerBox3.TabIndex = 185;
|
||||
this.pickerBox3.Value = true;
|
||||
yesNoPickerBox3.AcceptButton = null;
|
||||
yesNoPickerBox3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
yesNoPickerBox3.BackColor = System.Drawing.Color.Transparent;
|
||||
yesNoPickerBox3.EnableReactiveVisual = true;
|
||||
yesNoPickerBox3.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
yesNoPickerBox3.Location = new System.Drawing.Point(307, 107);
|
||||
yesNoPickerBox3.Margin = new Padding(10, 10, 10, 0);
|
||||
yesNoPickerBox3.Name = "yesNoPickerBox3";
|
||||
yesNoPickerBox3.Padding = new Padding(4, 4, 3, 3);
|
||||
yesNoPickerBox3.SelectedIndex = 1;
|
||||
yesNoPickerBox3.Size = new System.Drawing.Size(84, 34);
|
||||
yesNoPickerBox3.TabIndex = 185;
|
||||
yesNoPickerBox3.TabStop = false;
|
||||
yesNoPickerBox3.Value = true;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label7.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label7.Location = new System.Drawing.Point(10, 144);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label7.Size = new System.Drawing.Size(95, 34);
|
||||
this.label7.TabIndex = 184;
|
||||
this.label7.Text = "Hide On Execute";
|
||||
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label8.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label8.Location = new System.Drawing.Point(10, 62);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label8.Size = new System.Drawing.Size(60, 34);
|
||||
this.label8.TabIndex = 186;
|
||||
this.label8.Text = "Auto Save";
|
||||
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// pickerBox1
|
||||
//
|
||||
this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.pickerBox1.Location = new System.Drawing.Point(285, 62);
|
||||
this.pickerBox1.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
|
||||
this.pickerBox1.Name = "pickerBox1";
|
||||
this.pickerBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
|
||||
this.pickerBox1.Size = new System.Drawing.Size(84, 34);
|
||||
this.pickerBox1.AcceptButton = null;
|
||||
this.pickerBox1.TabIndex = 187;
|
||||
label7.AutoSize = true;
|
||||
label7.BackColor = System.Drawing.Color.Transparent;
|
||||
label7.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label7.Location = new System.Drawing.Point(1, 107);
|
||||
label7.Margin = new Padding(0);
|
||||
label7.Name = "label7";
|
||||
label7.Padding = new Padding(0, 8, 0, 0);
|
||||
label7.Size = new System.Drawing.Size(95, 23);
|
||||
label7.TabIndex = 184;
|
||||
label7.Text = "Hide On Execute";
|
||||
label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// 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, 437);
|
||||
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;
|
||||
tHorizontalSeparator1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
tHorizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent;
|
||||
tHorizontalSeparator1.Location = new System.Drawing.Point(10, 437);
|
||||
tHorizontalSeparator1.Margin = new Padding(0, 10, 0, 0);
|
||||
tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||
tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22);
|
||||
tHorizontalSeparator1.Name = "tHorizontalSeparator1";
|
||||
tHorizontalSeparator1.Size = new System.Drawing.Size(424, 22);
|
||||
tHorizontalSeparator1.TabIndex = 188;
|
||||
tHorizontalSeparator1.TabStop = false;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.textBox1.HighlightImage = ((System.Drawing.Image)(resources.GetObject("textBox1.HighlightImage")));
|
||||
textBox1.AcceptButton = null;
|
||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
textBox1.EnableReactiveVisual = true;
|
||||
textBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
textBox1.HighlightImage = (System.Drawing.Image)resources.GetObject("textBox1.HighlightImage");
|
||||
results1.IsAlt = false;
|
||||
results1.IsCtrl = false;
|
||||
results1.IsShift = false;
|
||||
results1.Key = System.Windows.Forms.Keys.None;
|
||||
this.textBox1.KeyCodeResults = results1;
|
||||
this.textBox1.Location = new System.Drawing.Point(192, 20);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.NormalImage = ((System.Drawing.Image)(resources.GetObject("textBox1.NormalImage")));
|
||||
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||
this.textBox1.Size = new System.Drawing.Size(177, 35);
|
||||
this.textBox1.AcceptButton = null;
|
||||
this.textBox1.TabIndex = 189;
|
||||
this.textBox1.UseSystemPasswordChar = false;
|
||||
results1.Key = Keys.None;
|
||||
textBox1.KeyCodeResults = results1;
|
||||
textBox1.Location = new System.Drawing.Point(192, 21);
|
||||
textBox1.Margin = new Padding(10, 10, 10, 0);
|
||||
textBox1.Name = "textBox1";
|
||||
textBox1.NormalImage = (System.Drawing.Image)resources.GetObject("textBox1.NormalImage");
|
||||
textBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
textBox1.Size = new System.Drawing.Size(199, 32);
|
||||
textBox1.TabIndex = 189;
|
||||
textBox1.TabStop = false;
|
||||
textBox1.UseSystemPasswordChar = false;
|
||||
//
|
||||
// numericBox1
|
||||
//
|
||||
numericBox1.AcceptButton = null;
|
||||
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
numericBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
numericBox1.EnableReactiveVisual = true;
|
||||
numericBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
numericBox1.Location = new System.Drawing.Point(252, 22);
|
||||
numericBox1.Margin = new Padding(10, 10, 10, 0);
|
||||
numericBox1.Maximum = 100;
|
||||
numericBox1.Minimum = 1;
|
||||
numericBox1.Name = "numericBox1";
|
||||
numericBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
numericBox1.Size = new System.Drawing.Size(139, 32);
|
||||
numericBox1.TabIndex = 192;
|
||||
numericBox1.TabStop = false;
|
||||
numericBox1.Value = 1;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.AutoSize = true;
|
||||
label4.BackColor = System.Drawing.Color.Transparent;
|
||||
label4.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label4.Location = new System.Drawing.Point(1, 22);
|
||||
label4.Margin = new Padding(0);
|
||||
label4.Name = "label4";
|
||||
label4.Padding = new Padding(0, 8, 0, 0);
|
||||
label4.Size = new System.Drawing.Size(76, 23);
|
||||
label4.TabIndex = 193;
|
||||
label4.Text = "Tiles Per Row";
|
||||
label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// flowLayoutPanel1
|
||||
//
|
||||
flowLayoutPanel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
flowLayoutPanel1.AutoScroll = true;
|
||||
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||
flowLayoutPanel1.Controls.Add(tTogglePanel1);
|
||||
flowLayoutPanel1.Controls.Add(tTogglePanel2);
|
||||
flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
|
||||
flowLayoutPanel1.Location = new System.Drawing.Point(8, 12);
|
||||
flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
flowLayoutPanel1.Size = new System.Drawing.Size(436, 412);
|
||||
flowLayoutPanel1.TabIndex = 194;
|
||||
flowLayoutPanel1.WrapContents = false;
|
||||
flowLayoutPanel1.Resize += flowLayoutPanel1_Resize;
|
||||
//
|
||||
// tTogglePanel1
|
||||
//
|
||||
tTogglePanel1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
tTogglePanel1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
tTogglePanel1.Controls.Add(yesNoPickerBox1);
|
||||
tTogglePanel1.Controls.Add(label2);
|
||||
tTogglePanel1.Controls.Add(label4);
|
||||
tTogglePanel1.Controls.Add(numericBox1);
|
||||
tTogglePanel1.ExpandedHeight = 100;
|
||||
tTogglePanel1.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
||||
tTogglePanel1.IsOpen = true;
|
||||
tTogglePanel1.Location = new System.Drawing.Point(0, 0);
|
||||
tTogglePanel1.Margin = new Padding(0);
|
||||
tTogglePanel1.Name = "tTogglePanel1";
|
||||
tTogglePanel1.Padding = new Padding(0, 22, 0, 0);
|
||||
tTogglePanel1.Size = new System.Drawing.Size(401, 119);
|
||||
tTogglePanel1.TabIndex = 0;
|
||||
tTogglePanel1.Title = "Appearance";
|
||||
tTogglePanel1.TitleContextMenuStrip = null;
|
||||
tTogglePanel1.TitleCursor = Cursors.Default;
|
||||
tTogglePanel1.TitlePadding = new Padding(4, 4, 0, 2);
|
||||
//
|
||||
// yesNoPickerBox1
|
||||
//
|
||||
yesNoPickerBox1.AcceptButton = null;
|
||||
yesNoPickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
yesNoPickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
yesNoPickerBox1.EnableReactiveVisual = true;
|
||||
yesNoPickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
yesNoPickerBox1.Location = new System.Drawing.Point(307, 64);
|
||||
yesNoPickerBox1.Margin = new Padding(10, 10, 10, 0);
|
||||
yesNoPickerBox1.Name = "yesNoPickerBox1";
|
||||
yesNoPickerBox1.Padding = new Padding(4, 4, 3, 3);
|
||||
yesNoPickerBox1.SelectedIndex = 1;
|
||||
yesNoPickerBox1.Size = new System.Drawing.Size(84, 34);
|
||||
yesNoPickerBox1.TabIndex = 195;
|
||||
yesNoPickerBox1.TabStop = false;
|
||||
yesNoPickerBox1.Value = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.BackColor = System.Drawing.Color.Transparent;
|
||||
label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label2.Location = new System.Drawing.Point(1, 64);
|
||||
label2.Margin = new Padding(0);
|
||||
label2.Name = "label2";
|
||||
label2.Padding = new Padding(0, 8, 0, 0);
|
||||
label2.Size = new System.Drawing.Size(87, 23);
|
||||
label2.TabIndex = 194;
|
||||
label2.Text = "Show Big Icons";
|
||||
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// tTogglePanel2
|
||||
//
|
||||
tTogglePanel2.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
tTogglePanel2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
tTogglePanel2.Controls.Add(yesNoPickerBox4);
|
||||
tTogglePanel2.Controls.Add(label3);
|
||||
tTogglePanel2.Controls.Add(label1);
|
||||
tTogglePanel2.Controls.Add(textBox1);
|
||||
tTogglePanel2.Controls.Add(yesNoPickerBox2);
|
||||
tTogglePanel2.Controls.Add(yesNoPickerBox3);
|
||||
tTogglePanel2.Controls.Add(label6);
|
||||
tTogglePanel2.Controls.Add(label7);
|
||||
tTogglePanel2.ExpandedHeight = 100;
|
||||
tTogglePanel2.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
||||
tTogglePanel2.IsOpen = true;
|
||||
tTogglePanel2.Location = new System.Drawing.Point(0, 119);
|
||||
tTogglePanel2.Margin = new Padding(0);
|
||||
tTogglePanel2.Name = "tTogglePanel2";
|
||||
tTogglePanel2.Padding = new Padding(0, 22, 0, 0);
|
||||
tTogglePanel2.Size = new System.Drawing.Size(401, 206);
|
||||
tTogglePanel2.TabIndex = 1;
|
||||
tTogglePanel2.Title = "Behaviour";
|
||||
tTogglePanel2.TitleContextMenuStrip = null;
|
||||
tTogglePanel2.TitleCursor = Cursors.Default;
|
||||
tTogglePanel2.TitlePadding = new Padding(4, 4, 0, 2);
|
||||
//
|
||||
// yesNoPickerBox4
|
||||
//
|
||||
yesNoPickerBox4.AcceptButton = null;
|
||||
yesNoPickerBox4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
yesNoPickerBox4.BackColor = System.Drawing.Color.Transparent;
|
||||
yesNoPickerBox4.EnableReactiveVisual = true;
|
||||
yesNoPickerBox4.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
yesNoPickerBox4.Location = new System.Drawing.Point(307, 151);
|
||||
yesNoPickerBox4.Margin = new Padding(10, 10, 10, 0);
|
||||
yesNoPickerBox4.Name = "yesNoPickerBox4";
|
||||
yesNoPickerBox4.Padding = new Padding(4, 4, 3, 3);
|
||||
yesNoPickerBox4.SelectedIndex = 1;
|
||||
yesNoPickerBox4.Size = new System.Drawing.Size(84, 34);
|
||||
yesNoPickerBox4.TabIndex = 191;
|
||||
yesNoPickerBox4.TabStop = false;
|
||||
yesNoPickerBox4.Value = true;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.AutoSize = true;
|
||||
label3.BackColor = System.Drawing.Color.Transparent;
|
||||
label3.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
label3.Location = new System.Drawing.Point(1, 151);
|
||||
label3.Margin = new Padding(0);
|
||||
label3.Name = "label3";
|
||||
label3.Padding = new Padding(0, 8, 0, 0);
|
||||
label3.Size = new System.Drawing.Size(85, 23);
|
||||
label3.TabIndex = 190;
|
||||
label3.Text = "Always On Top";
|
||||
label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// OptionsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(384, 521);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.tHorizontalSeparator1);
|
||||
this.Controls.Add(this.pickerBox1);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.pickerBox3);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.pickerBox2);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 560);
|
||||
this.Name = "OptionsForm";
|
||||
this.Text = "Options";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(444, 521);
|
||||
Controls.Add(flowLayoutPanel1);
|
||||
Controls.Add(tHorizontalSeparator1);
|
||||
Controls.Add(button1);
|
||||
MinimumSize = new System.Drawing.Size(460, 560);
|
||||
Name = "OptionsForm";
|
||||
Text = "Options";
|
||||
flowLayoutPanel1.ResumeLayout(false);
|
||||
tTogglePanel1.ResumeLayout(false);
|
||||
tTogglePanel1.PerformLayout();
|
||||
tTogglePanel2.ResumeLayout(false);
|
||||
tTogglePanel2.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
base.OnLoad(e);
|
||||
|
||||
if (parentForm == null)
|
||||
flowLayoutPanel1_Resize(null, e);
|
||||
}
|
||||
|
||||
private void flowLayoutPanel1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var width = flowLayoutPanel1.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth;
|
||||
|
||||
if (parentForm.CurrentSession == null)
|
||||
foreach (var item in flowLayoutPanel1.Controls.OfType<Control>())
|
||||
{
|
||||
return;
|
||||
item.Width = width;
|
||||
}
|
||||
}
|
||||
|
||||
// hotkey
|
||||
if (parentForm.CurrentSession.HotKey != null)
|
||||
public AppOptions Result
|
||||
{
|
||||
textBox1.UpdateKeyCode(parentForm.CurrentSession.HotKey.IsCtrl, parentForm.CurrentSession.HotKey.IsAlt, parentForm.CurrentSession.HotKey.IsShift, parentForm.CurrentSession.HotKey.KeyCode);
|
||||
}
|
||||
|
||||
pickerBox1.ComboBox.SelectedIndex = (int)parentForm.CurrentSession.AutoSave;
|
||||
pickerBox2.Value = parentForm.CurrentSession.HideOnClose;
|
||||
pickerBox3.Value = parentForm.CurrentSession.HideOnClick;
|
||||
}
|
||||
|
||||
|
||||
public MainForm parentForm { get; set; } = null;
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
get
|
||||
{
|
||||
if (parentForm != null)
|
||||
if (_appSession == null)
|
||||
{
|
||||
if (parentForm.CurrentSession == null) parentForm.CurrentSession = new LauncherSession();
|
||||
if (parentForm.CurrentSession.HotKey == null) parentForm.CurrentSession.HotKey = new LauncherSession.HotKeyOptions();
|
||||
|
||||
parentForm.CurrentSession.HotKey.IsCtrl = textBox1.KeyCodeResults.IsCtrl;
|
||||
parentForm.CurrentSession.HotKey.IsAlt = textBox1.KeyCodeResults.IsAlt;
|
||||
parentForm.CurrentSession.HotKey.IsShift = textBox1.KeyCodeResults.IsShift;
|
||||
parentForm.CurrentSession.HotKey.Key = textBox1.KeyCodeResults.KeyCode;
|
||||
|
||||
parentForm.CurrentSession.AutoSave = (LauncherSession.AutoSaveOption)pickerBox1.ComboBox.SelectedIndex;
|
||||
parentForm.CurrentSession.HideOnClose = pickerBox2.Value;
|
||||
parentForm.CurrentSession.HideOnClick = pickerBox3.Value;
|
||||
|
||||
_appSession = new AppOptions();
|
||||
}
|
||||
|
||||
this.Close();
|
||||
_appSession.TilesPerRow = numericBox1.Value;
|
||||
_appSession.ShowBigIcons = yesNoPickerBox1.Value;
|
||||
_appSession.ShowToggleHotkey = textBox1.KeyCodeResults;
|
||||
_appSession.HideOnClose = yesNoPickerBox2.Value;
|
||||
_appSession.HideOnExecute = yesNoPickerBox3.Value;
|
||||
_appSession.AlwaysOnTop = yesNoPickerBox4.Value;
|
||||
|
||||
return _appSession;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,64 @@
|
||||
<root>
|
||||
<?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">
|
||||
@ -60,21 +120,22 @@
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="textBox1.HighlightImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAClSURBVDhP7dI/
|
||||
DgFBGIbxSVTKjcRx3MLqXYCOjkocQcMF3MAZOIKaE5AthOexf2QnbJQKb/JLJvO9XzLFhCgtbHDBveB5
|
||||
DWcfM8ANC0wKnr1LUUsbHXSxxBlJxDtnduy6E04on/Utd0IPOxwxxBT9iHfO7Nh155kV9vmxMXbsVvkv
|
||||
vvIji4f82Bg7tcUxrpih/NyxOeyMUMVPu0WGd39TzuzQDeEB5/ZKvTSyulEAAAAASUVORK5CYII=
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAAN5JREFUOE/tUzsKwkAUXLCyFMHjeIvdB4Gk8ALamU4rsbLaTWz0AOYGOYMewTqe
|
||||
QLEQnZc8WRMSsBYHhrzPzJBin2pC60PPGLs3xl3Bp5DrHe9E1g2tHUH8QMjKmGReketyZkRWh9abfhTZ
|
||||
YRimI4jWRPYSBMngkzzjHWtYyx6xK4X0Anz/7rcsxM4BdoxBTuTOqCdEaUyU6DrTuNqxxuXsEXsFDLfg
|
||||
UdpOsIa10nr8A34p4CRtJ1jTGoC3PsPiBi78ETXplqzBwU3F5sHHgWWGJ3rHt+3tg+Uu84ek1AsYYd8q
|
||||
EsfwCwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="textBox1.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADTSURBVDhP7ZI7
|
||||
CsJQEEUfWFmK4HLchdpnA9ppp5W4BBtdQNyBC0ilRf6VdVyBwUL03JdXxC/YWThwmDcz94YJjKmH7/uN
|
||||
OI7XaZqekiS5Cr1hpZmTPQemAeILeU4eC/dWr+9kVQRB0MzzvB2GYQfBAsExiqJWHfU0k0ZaeQyNAuxa
|
||||
X1CYLMu6/MOW4kD2YAK9B9TznGYrj12XVZY0drb4ENJI68q/sR4/YoS9K9+GNHdGLmIEJV+cku1xP4Jh
|
||||
Ri7JQ2erDp3mBs7w6jaFZht74MaYGwmLbkeRGexGAAAAAElFTkSuQmCC
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAANFJREFUOE/tkzEKAjEURANWliJ4HG+h9l5AO7fTSjyCxWpCIBB2b+AZ9AjW6wlc
|
||||
LGSdWb9Elw1YiwOP/Pw/E1Ikqqksyzpa670x5goqgfWOM7HFhfAE5jvWNdYFkZq9sdg+laZp13vfBwOY
|
||||
NjBfnHO9d9jjjB56mZG4UhgW4HXdbykkXl97iMYBnFFPrbUJGDVIOKOHXmYk/hSaW3CUbVT00CvboP8B
|
||||
v3TASbZR0RM7YA5KsAT1J2phBUq8wpnEgvg5MMwxvGFte/uVzPLwkZR6AInAKK6aICfTAAAAAElFTkSu
|
||||
QmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FizzyLauncher
|
||||
namespace RokettoLaunch
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
|
Binary file not shown.
@ -1,75 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0/win-x64",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {},
|
||||
".NETCoreApp,Version=v6.0/win-x64": {
|
||||
"Ryz3core/0.1.5.035": {
|
||||
"dependencies": {
|
||||
"HtmlAgilityPack": "1.11.46",
|
||||
"System.Data.SQLite.Core": "1.0.117"
|
||||
},
|
||||
"runtime": {
|
||||
"Ryz3core.dll": {}
|
||||
}
|
||||
},
|
||||
"HtmlAgilityPack/1.11.46": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/HtmlAgilityPack.dll": {
|
||||
"assemblyVersion": "1.11.46.0",
|
||||
"fileVersion": "1.11.46.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Stub.System.Data.SQLite.Core.NetStandard/1.0.117": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.1/System.Data.SQLite.dll": {
|
||||
"assemblyVersion": "1.0.117.0",
|
||||
"fileVersion": "1.0.117.0"
|
||||
}
|
||||
},
|
||||
"native": {
|
||||
"runtimes/win-x64/native/SQLite.Interop.dll": {
|
||||
"fileVersion": "1.0.117.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Data.SQLite.Core/1.0.117": {
|
||||
"dependencies": {
|
||||
"Stub.System.Data.SQLite.Core.NetStandard": "1.0.117"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Ryz3core/0.1.5.035": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"HtmlAgilityPack/1.11.46": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dLMn4EVfJBHWmWK4Uh0XGD76FPLHI0qr2Tm0s1m/xmgiHb1JUb9zB8AzO8HtrkBBlMN6JfCUBYddhqC0hZNR+g==",
|
||||
"path": "htmlagilitypack/1.11.46",
|
||||
"hashPath": "htmlagilitypack.1.11.46.nupkg.sha512"
|
||||
},
|
||||
"Stub.System.Data.SQLite.Core.NetStandard/1.0.117": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-x1zzPC/A4MmiKGDLoxLE6O5KLu7Kz7dyzhPQzlqYFTFcXmXAtM7hNNWpGw5yLEz833AnGbd/kxoitXArgR4YyA==",
|
||||
"path": "stub.system.data.sqlite.core.netstandard/1.0.117",
|
||||
"hashPath": "stub.system.data.sqlite.core.netstandard.1.0.117.nupkg.sha512"
|
||||
},
|
||||
"System.Data.SQLite.Core/1.0.117": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-lGfOhA3QQod9XhdWYqLgNgbgq5uZnVG6DtnhDAdPisbLpTTgZBNbeGnp+GWt8C+3EyaqBYTGJWXcxHlHKwo05A==",
|
||||
"path": "system.data.sqlite.core/1.0.117",
|
||||
"hashPath": "system.data.sqlite.core.1.0.117.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
BIN
References/RyzStudio.8.1.2.244.nupkg
Normal file
BIN
References/RyzStudio.8.1.2.244.nupkg
Normal file
Binary file not shown.
BIN
References/RyzStudio.Windows.Forms.8.1.2.246.nupkg
Normal file
BIN
References/RyzStudio.Windows.Forms.8.1.2.246.nupkg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Resources/icon-128.png
Normal file
BIN
Resources/icon-128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
BIN
Resources/icon-64.png
Normal file
BIN
Resources/icon-64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 506 B |
Binary file not shown.
Before Width: | Height: | Size: 502 B |
@ -2,21 +2,22 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<TargetFramework>net8.0-windows8.0</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<NoWin32Manifest>true</NoWin32Manifest>
|
||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<AssemblyName>fizzylauncher</AssemblyName>
|
||||
<AssemblyName>rokettolaunch</AssemblyName>
|
||||
<Authors>Ray Lam</Authors>
|
||||
<Company>Hi, I'm Ray</Company>
|
||||
<Product>Fizzy Launcher</Product>
|
||||
<Product>RokettoLaunch</Product>
|
||||
<Copyright>Ray Lam</Copyright>
|
||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0.0</FileVersion>
|
||||
<Version>0.2.5.058</Version>
|
||||
<Version>0.3.0.153</Version>
|
||||
<EnableNETAnalyzers>False</EnableNETAnalyzers>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<PackageIcon>icon-128.png</PackageIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@ -45,10 +46,28 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="UIResource.Designer.cs" />
|
||||
<Compile Remove="Windows\Forms\TileContainer.cs" />
|
||||
<Compile Remove="Windows\Forms\TilePanelLayout.cs" />
|
||||
<Compile Remove="Windows\Forms\TilePanelLayout.Designer.cs" />
|
||||
<Compile Remove="Windows\GridTableLayout.cs" />
|
||||
<Compile Remove="Windows\GridTableLayout.Designer.cs" />
|
||||
<Compile Remove="Windows\TileGridPanel.cs" />
|
||||
<Compile Remove="Windows\TileGridPanel.Designer.cs" />
|
||||
<Compile Remove="Windows\TileGridPanelLayout.cs" />
|
||||
<Compile Remove="Windows\TileGridPanelLayout.Designer.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="C:\Users\rxl\.nuget\packages\ryzstudio.windows.forms\8.1.2.244\contentFiles\any\net8.0-windows8.0\Resources\triangle-right-6.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Remove="UIResource.resx" />
|
||||
<EmbeddedResource Remove="Windows\Forms\TileContainer.resx" />
|
||||
<EmbeddedResource Remove="Windows\Forms\TilePanelLayout.resx" />
|
||||
<EmbeddedResource Remove="Windows\GridTableLayout.resx" />
|
||||
<EmbeddedResource Remove="Windows\TileGridPanel.resx" />
|
||||
<EmbeddedResource Remove="Windows\TileGridPanelLayout.resx" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -59,12 +78,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Ryz3core">
|
||||
<HintPath>References\Ryz3core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ryz3ui">
|
||||
<HintPath>References\Ryz3ui.dll</HintPath>
|
||||
</Reference>
|
||||
<PackageReference Include="RyzStudio" Version="8.1.2.244" />
|
||||
<PackageReference Include="RyzStudio.Windows.Forms" Version="8.1.2.246" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -83,4 +98,11 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Resources\icon-128.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,175 +0,0 @@
|
||||
using FizzyLauncher.Models;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using System;
|
||||
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
public class EditGroupForm : TDialogForm
|
||||
{
|
||||
public static void ShowDialog(TilePanelLayout control)
|
||||
{
|
||||
EditGroupForm form = new EditGroupForm();
|
||||
form.TilePanelLayout = control;
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private TButton button1;
|
||||
private TPickerBox pickerBox1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator2;
|
||||
private TTextBox textBox1;
|
||||
|
||||
|
||||
public EditGroupForm() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
pickerBox1.ComboBox.Items.Clear();
|
||||
pickerBox1.ComboBox.Items.AddRange(new string[] { "No", "Yes" });
|
||||
if (pickerBox1.ComboBox.Items.Count > 0) pickerBox1.ComboBox.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox1 = new RyzStudio.Windows.ThemedForms.TTextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.button1 = new RyzStudio.Windows.ThemedForms.TButton();
|
||||
this.pickerBox1 = new RyzStudio.Windows.ThemedForms.TPickerBox();
|
||||
this.horizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.textBox1.Location = new System.Drawing.Point(192, 20);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||
this.textBox1.Size = new System.Drawing.Size(177, 35);
|
||||
this.textBox1.AcceptButton = null;
|
||||
this.textBox1.TabIndex = 152;
|
||||
this.textBox1.UseSystemPasswordChar = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label2.Location = new System.Drawing.Point(10, 62);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label2.Size = new System.Drawing.Size(119, 34);
|
||||
this.label2.TabIndex = 155;
|
||||
this.label2.Text = "Show Only Expanded";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
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(29, 34);
|
||||
this.label1.TabIndex = 153;
|
||||
this.label1.Text = "Title";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.IdleImage = null;
|
||||
this.button1.ActiveImage = null;
|
||||
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";
|
||||
this.button1.HoverImage = 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);
|
||||
//
|
||||
// pickerBox1
|
||||
//
|
||||
this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.pickerBox1.Location = new System.Drawing.Point(285, 62);
|
||||
this.pickerBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||
this.pickerBox1.Name = "pickerBox1";
|
||||
this.pickerBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
|
||||
this.pickerBox1.Size = new System.Drawing.Size(84, 34);
|
||||
this.pickerBox1.AcceptButton = null;
|
||||
this.pickerBox1.TabIndex = 174;
|
||||
//
|
||||
// horizontalSeparator2
|
||||
//
|
||||
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.horizontalSeparator2.Location = new System.Drawing.Point(10, 437);
|
||||
this.horizontalSeparator2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
|
||||
this.horizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||
this.horizontalSeparator2.MinimumSize = new System.Drawing.Size(0, 22);
|
||||
this.horizontalSeparator2.Name = "horizontalSeparator2";
|
||||
this.horizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
|
||||
this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
|
||||
this.horizontalSeparator2.TabIndex = 182;
|
||||
//
|
||||
// EditGroupForm
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(384, 521);
|
||||
this.Controls.Add(this.horizontalSeparator2);
|
||||
this.Controls.Add(this.pickerBox1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 560);
|
||||
this.Name = "EditGroupForm";
|
||||
this.Text = "Edit Group";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
|
||||
if (this.TilePanelLayout != null)
|
||||
{
|
||||
textBox1.Text = this.TilePanelLayout.Model.Title;
|
||||
pickerBox1.ComboBox.SelectedIndex = (this.TilePanelLayout.Model.IsExclusive ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public TilePanelLayout TilePanelLayout { get; set; } = null;
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
TileGroupModel model = this.TilePanelLayout.Model;
|
||||
model.Title = textBox1.Text?.Trim();
|
||||
model.IsExclusive = (pickerBox1.ComboBox.SelectedIndex == 1);
|
||||
|
||||
this.TilePanelLayout.UpdateModel(model);
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
<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>
|
@ -1,393 +0,0 @@
|
||||
using FizzyLauncher.Models;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
public class EditTileFolderForm : TDialogForm
|
||||
{
|
||||
public static void ShowAddDialog(TilePanelLayout control, Point coord)
|
||||
{
|
||||
EditTileFolderForm form = new EditTileFolderForm(DialogModeType.Add);
|
||||
form.TilePanelLayout = control;
|
||||
form.AimCoord = coord;
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
public static void ShowEditDialog(TilePanel control)
|
||||
{
|
||||
EditTileFolderForm form = new EditTileFolderForm(DialogModeType.Edit);
|
||||
form.TilePanel = control;
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private TButton button1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator2;
|
||||
private TTextBox textBox1;
|
||||
private TListBox listBox1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
|
||||
|
||||
public enum DialogModeType
|
||||
{
|
||||
Add = 0,
|
||||
Edit
|
||||
}
|
||||
|
||||
|
||||
protected DialogModeType dialogMode = DialogModeType.Add;
|
||||
|
||||
|
||||
public EditTileFolderForm(DialogModeType dialogMode) : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DialogMode = dialogMode;
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox1 = new RyzStudio.Windows.ThemedForms.TTextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.button1 = new RyzStudio.Windows.ThemedForms.TButton();
|
||||
this.horizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator();
|
||||
this.listBox1 = new RyzStudio.Windows.ThemedForms.TListBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.textBox1.Location = new System.Drawing.Point(192, 20);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||
this.textBox1.Size = new System.Drawing.Size(177, 35);
|
||||
this.textBox1.AcceptButton = null;
|
||||
this.textBox1.TabIndex = 152;
|
||||
this.textBox1.UseSystemPasswordChar = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
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(29, 34);
|
||||
this.label1.TabIndex = 153;
|
||||
this.label1.Text = "Title";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.IdleImage = null;
|
||||
this.button1.ActiveImage = null;
|
||||
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";
|
||||
this.button1.HoverImage = 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);
|
||||
//
|
||||
// horizontalSeparator2
|
||||
//
|
||||
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.horizontalSeparator2.Location = new System.Drawing.Point(10, 61);
|
||||
this.horizontalSeparator2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
|
||||
this.horizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||
this.horizontalSeparator2.MinimumSize = new System.Drawing.Size(0, 22);
|
||||
this.horizontalSeparator2.Name = "horizontalSeparator2";
|
||||
this.horizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
|
||||
this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
|
||||
this.horizontalSeparator2.TabIndex = 177;
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.AllowDrop = true;
|
||||
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.listBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.listBox1.Location = new System.Drawing.Point(109, 87);
|
||||
this.listBox1.Margin = new System.Windows.Forms.Padding(10, 4, 10, 4);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
|
||||
this.listBox1.Size = new System.Drawing.Size(260, 346);
|
||||
this.listBox1.AcceptButton = null;
|
||||
this.listBox1.TabIndex = 180;
|
||||
this.listBox1.OnAdd += new System.EventHandler(this.listBox1_OnAdd);
|
||||
this.listBox1.OnEdit += new System.EventHandler(this.listBox1_OnEdit);
|
||||
this.listBox1.DragDrop += new System.Windows.Forms.DragEventHandler(this.listBox1_DragDrop);
|
||||
this.listBox1.DragOver += new System.Windows.Forms.DragEventHandler(this.listBox1_DragOver);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label2.Location = new System.Drawing.Point(8, 87);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label2.Size = new System.Drawing.Size(25, 34);
|
||||
this.label2.TabIndex = 181;
|
||||
this.label2.Text = "List";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// tHorizontalSeparator1
|
||||
//
|
||||
this.tHorizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| 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, 437);
|
||||
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 = 182;
|
||||
//
|
||||
// EditTileFolderForm
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(384, 521);
|
||||
this.Controls.Add(this.tHorizontalSeparator1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.listBox1);
|
||||
this.Controls.Add(this.horizontalSeparator2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 560);
|
||||
this.Name = "EditTileFolderForm";
|
||||
this.Text = "Add List Tile";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
|
||||
if (this.DialogMode == DialogModeType.Edit)
|
||||
{
|
||||
listBox1.ListBox.Items.Clear();
|
||||
|
||||
if (this.TilePanel == null) return;
|
||||
if (this.TilePanel.ModelInfo == null) return;
|
||||
|
||||
textBox1.Text = this.TilePanel.ModelInfo.Title;
|
||||
|
||||
if (this.TilePanel.ModelInfo.Items != null)
|
||||
{
|
||||
foreach (TileModel item in this.TilePanel.ModelInfo.Items)
|
||||
{
|
||||
if (item.IsGroup)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
listBox1.ListBox.Items.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public TilePanelLayout TilePanelLayout { get; set; } = null;
|
||||
|
||||
public TilePanel TilePanel { get; set; } = null;
|
||||
|
||||
public Point AimCoord { get; set; } = new Point(-1, -1);
|
||||
|
||||
public DialogModeType DialogMode
|
||||
{
|
||||
get => dialogMode;
|
||||
set
|
||||
{
|
||||
dialogMode = value;
|
||||
|
||||
switch (dialogMode)
|
||||
{
|
||||
case DialogModeType.Add:
|
||||
this.Text = "Add Folder";
|
||||
textBox1.Text = "New Folder";
|
||||
break;
|
||||
case DialogModeType.Edit:
|
||||
this.Text = "Edit Folder";
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
TileModel model = new TileModel()
|
||||
{
|
||||
Title = textBox1.Text?.Trim(),
|
||||
IsGroup = true
|
||||
};
|
||||
|
||||
switch (this.DialogMode)
|
||||
{
|
||||
case DialogModeType.Add:
|
||||
if (!this.AimCoord.Equals(new Point(-1, -1)))
|
||||
{
|
||||
model.Position = this.AimCoord;
|
||||
}
|
||||
|
||||
model.Items = new System.Collections.Generic.List<TileModel>();
|
||||
|
||||
foreach (TileModel item in listBox1.ListBox.Items.OfType<TileModel>())
|
||||
{
|
||||
if (item.IsGroup)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
model.Items.Add(item);
|
||||
}
|
||||
|
||||
this.TilePanelLayout.AddTile(model);
|
||||
|
||||
break;
|
||||
case DialogModeType.Edit:
|
||||
model.Items = new System.Collections.Generic.List<TileModel>();
|
||||
|
||||
foreach (TileModel item in listBox1.ListBox.Items.OfType<TileModel>())
|
||||
{
|
||||
if (item.IsGroup)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
model.Items.Add(item);
|
||||
}
|
||||
|
||||
this.TilePanel.LoadInfo(model);
|
||||
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void listBox1_OnAdd(object sender, EventArgs e) => EditTileForm.ShowAddDialog(listBox1);
|
||||
|
||||
private void listBox1_OnEdit(object sender, EventArgs e)
|
||||
{
|
||||
if (listBox1.ListBox.Items.Count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (listBox1.ListBox.SelectedIndex < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (listBox1.ListBox.SelectedItem == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditTileForm.ShowEditDialog(listBox1);
|
||||
}
|
||||
|
||||
private void listBox1_DragOver(object sender, System.Windows.Forms.DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
{
|
||||
e.Effect = DragDropEffects.Link;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Effect = DragDropEffects.None;
|
||||
}
|
||||
}
|
||||
|
||||
private void listBox1_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
||||
if (fileList == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (fileList.Length <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(fileList[0]))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileModel model = new TileModel()
|
||||
{
|
||||
ProcessFilename = fileList[0],
|
||||
Title = Path.GetFileName(fileList[0])
|
||||
};
|
||||
|
||||
// exe
|
||||
if (Path.GetExtension(fileList[0]).Equals(".exe", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
if (File.Exists(fileList[0]))
|
||||
{
|
||||
try
|
||||
{
|
||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(fileList[0]);
|
||||
if (fvi != null)
|
||||
{
|
||||
model.Title = fvi.ProductName;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model.Title))
|
||||
{
|
||||
model.Title = Path.GetFileNameWithoutExtension(fileList[0]);
|
||||
}
|
||||
}
|
||||
|
||||
listBox1.ListBox.Items.Add(model);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
<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>
|
@ -1,482 +0,0 @@
|
||||
using FizzyLauncher.Models;
|
||||
using RyzStudio.Windows.ThemedForms;
|
||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
public class EditTileForm : TDialogForm
|
||||
{
|
||||
public static void ShowAddDialog(TilePanelLayout control, Point coord)
|
||||
{
|
||||
EditTileForm form = new EditTileForm(DialogModeType.Add);
|
||||
form.TilePanelLayout = control;
|
||||
form.AimCoord = coord;
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
public static void ShowAddDialog(TListBox control)
|
||||
{
|
||||
EditTileForm form = new EditTileForm(DialogModeType.Add);
|
||||
form.ListBox = control;
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
public static void ShowEditDialog(TilePanel control)
|
||||
{
|
||||
EditTileForm form = new EditTileForm(DialogModeType.Edit);
|
||||
form.TilePanel = control;
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
public static void ShowEditDialog(TListBox control)
|
||||
{
|
||||
EditTileForm form = new EditTileForm(DialogModeType.Edit);
|
||||
form.ListBox = control;
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private TOpenFileTextBox textBox2;
|
||||
private TTextBox textBox3;
|
||||
private TFolderTextBox textBox4;
|
||||
private TButton button1;
|
||||
private TPickerBox pickerBox1;
|
||||
private TPickerBox pickerBox2;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator1;
|
||||
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator2;
|
||||
private TTextBox textBox1;
|
||||
|
||||
|
||||
public enum DialogModeType
|
||||
{
|
||||
Add = 0,
|
||||
Edit
|
||||
}
|
||||
|
||||
|
||||
protected DialogModeType dialogMode = DialogModeType.Add;
|
||||
|
||||
|
||||
public EditTileForm(DialogModeType dialogMode) : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DialogMode = dialogMode;
|
||||
|
||||
pickerBox1.ComboBox.Items.Clear();
|
||||
pickerBox1.ComboBox.Items.AddRange(new string[] { "Normal", "Hidden", "Minimized", "Maximized" });
|
||||
if (pickerBox1.ComboBox.Items.Count > 0) pickerBox1.ComboBox.SelectedIndex = 0;
|
||||
|
||||
pickerBox2.ComboBox.Items.Clear();
|
||||
pickerBox2.ComboBox.Items.AddRange(new string[] { "No", "Yes" });
|
||||
if (pickerBox2.ComboBox.Items.Count > 0) pickerBox2.ComboBox.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditTileForm));
|
||||
this.textBox1 = new TTextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox2 = new TOpenFileTextBox();
|
||||
this.textBox3 = new TTextBox();
|
||||
this.textBox4 = new TFolderTextBox();
|
||||
this.button1 = new TButton();
|
||||
this.pickerBox1 = new TPickerBox();
|
||||
this.pickerBox2 = new TPickerBox();
|
||||
this.horizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
|
||||
this.horizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.textBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.textBox1.Location = new System.Drawing.Point(192, 20);
|
||||
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||
this.textBox1.Size = new System.Drawing.Size(177, 35);
|
||||
this.textBox1.AcceptButton = null;
|
||||
this.textBox1.TabIndex = 152;
|
||||
this.textBox1.UseSystemPasswordChar = false;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label6.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label6.Location = new System.Drawing.Point(10, 250);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label6.Size = new System.Drawing.Size(83, 34);
|
||||
this.label6.TabIndex = 163;
|
||||
this.label6.Text = "Run As Admin";
|
||||
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label7.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label7.Location = new System.Drawing.Point(10, 209);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label7.Size = new System.Drawing.Size(79, 34);
|
||||
this.label7.TabIndex = 161;
|
||||
this.label7.Text = "Window Style";
|
||||
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label4.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label4.Location = new System.Drawing.Point(10, 144);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label4.Size = new System.Drawing.Size(103, 34);
|
||||
this.label4.TabIndex = 159;
|
||||
this.label4.Text = "Working Directory";
|
||||
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label3.Location = new System.Drawing.Point(10, 103);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label3.Size = new System.Drawing.Size(61, 34);
|
||||
this.label3.TabIndex = 157;
|
||||
this.label3.Text = "Argument";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.label2.Location = new System.Drawing.Point(10, 62);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Padding = new System.Windows.Forms.Padding(0, 9, 0, 10);
|
||||
this.label2.Size = new System.Drawing.Size(55, 34);
|
||||
this.label2.TabIndex = 155;
|
||||
this.label2.Text = "Filename";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
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(29, 34);
|
||||
this.label1.TabIndex = 153;
|
||||
this.label1.Text = "Title";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.textBox2.FileDialog = null;
|
||||
this.textBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.textBox2.HighlightImage = ((System.Drawing.Image)(resources.GetObject("textBox2.HighlightImage")));
|
||||
this.textBox2.Location = new System.Drawing.Point(192, 61);
|
||||
this.textBox2.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.NormalImage = ((System.Drawing.Image)(resources.GetObject("textBox2.NormalImage")));
|
||||
this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||
this.textBox2.Size = new System.Drawing.Size(177, 35);
|
||||
this.textBox2.AcceptButton = null;
|
||||
this.textBox2.TabIndex = 170;
|
||||
this.textBox2.UseSystemPasswordChar = false;
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.textBox3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.textBox3.Location = new System.Drawing.Point(192, 102);
|
||||
this.textBox3.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||
this.textBox3.Size = new System.Drawing.Size(177, 35);
|
||||
this.textBox3.AcceptButton = null;
|
||||
this.textBox3.TabIndex = 171;
|
||||
this.textBox3.UseSystemPasswordChar = false;
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.textBox4.FolderDialog = null;
|
||||
this.textBox4.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.textBox4.HighlightImage = ((System.Drawing.Image)(resources.GetObject("textBox4.HighlightImage")));
|
||||
this.textBox4.Location = new System.Drawing.Point(192, 143);
|
||||
this.textBox4.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.NormalImage = ((System.Drawing.Image)(resources.GetObject("textBox4.NormalImage")));
|
||||
this.textBox4.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
||||
this.textBox4.Size = new System.Drawing.Size(177, 35);
|
||||
this.textBox4.AcceptButton = null;
|
||||
this.textBox4.TabIndex = 172;
|
||||
this.textBox4.UseSystemPasswordChar = false;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.button1.IdleImage = null;
|
||||
this.button1.ActiveImage = null;
|
||||
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";
|
||||
this.button1.HoverImage = 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);
|
||||
//
|
||||
// pickerBox1
|
||||
//
|
||||
this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.pickerBox1.Location = new System.Drawing.Point(241, 209);
|
||||
this.pickerBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||
this.pickerBox1.Name = "pickerBox1";
|
||||
this.pickerBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
|
||||
this.pickerBox1.Size = new System.Drawing.Size(128, 34);
|
||||
this.pickerBox1.AcceptButton = null;
|
||||
this.pickerBox1.TabIndex = 174;
|
||||
//
|
||||
// pickerBox2
|
||||
//
|
||||
this.pickerBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pickerBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||
this.pickerBox2.Location = new System.Drawing.Point(285, 250);
|
||||
this.pickerBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
||||
this.pickerBox2.Name = "pickerBox2";
|
||||
this.pickerBox2.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
|
||||
this.pickerBox2.Size = new System.Drawing.Size(84, 34);
|
||||
this.pickerBox2.AcceptButton = null;
|
||||
this.pickerBox2.TabIndex = 175;
|
||||
//
|
||||
// horizontalSeparator1
|
||||
//
|
||||
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.horizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.horizontalSeparator1.Location = new System.Drawing.Point(10, 181);
|
||||
this.horizontalSeparator1.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
|
||||
this.horizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||
this.horizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22);
|
||||
this.horizontalSeparator1.Name = "horizontalSeparator1";
|
||||
this.horizontalSeparator1.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
|
||||
this.horizontalSeparator1.Size = new System.Drawing.Size(364, 22);
|
||||
this.horizontalSeparator1.TabIndex = 176;
|
||||
//
|
||||
// horizontalSeparator2
|
||||
//
|
||||
this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
this.horizontalSeparator2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.horizontalSeparator2.Location = new System.Drawing.Point(10, 437);
|
||||
this.horizontalSeparator2.Margin = new System.Windows.Forms.Padding(10, 0, 10, 0);
|
||||
this.horizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2);
|
||||
this.horizontalSeparator2.MinimumSize = new System.Drawing.Size(0, 22);
|
||||
this.horizontalSeparator2.Name = "horizontalSeparator2";
|
||||
this.horizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10);
|
||||
this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22);
|
||||
this.horizontalSeparator2.TabIndex = 177;
|
||||
//
|
||||
// EditTileForm
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(384, 521);
|
||||
this.Controls.Add(this.horizontalSeparator2);
|
||||
this.Controls.Add(this.horizontalSeparator1);
|
||||
this.Controls.Add(this.pickerBox2);
|
||||
this.Controls.Add(this.pickerBox1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.textBox4);
|
||||
this.Controls.Add(this.textBox3);
|
||||
this.Controls.Add(this.textBox2);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 560);
|
||||
this.Name = "EditTileForm";
|
||||
this.Text = "Add Tile";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
|
||||
if (this.DialogMode == DialogModeType.Edit)
|
||||
{
|
||||
if (this.TilePanel != null)
|
||||
{
|
||||
updateModel(this.TilePanel.ModelInfo);
|
||||
}
|
||||
else if (this.ListBox != null)
|
||||
{
|
||||
if (this.ListBox.ListBox.SelectedItem != null)
|
||||
{
|
||||
TileModel model = (this.ListBox.ListBox.SelectedItem as TileModel);
|
||||
if (model != null)
|
||||
{
|
||||
updateModel(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public TilePanelLayout TilePanelLayout { get; set; } = null;
|
||||
|
||||
public TilePanel TilePanel { get; set; } = null;
|
||||
|
||||
public TListBox ListBox { get; set; } = null;
|
||||
|
||||
public Point AimCoord { get; set; } = new Point(-1, -1);
|
||||
|
||||
public DialogModeType DialogMode
|
||||
{
|
||||
get => dialogMode;
|
||||
set
|
||||
{
|
||||
dialogMode = value;
|
||||
|
||||
switch (dialogMode)
|
||||
{
|
||||
case DialogModeType.Add:
|
||||
this.Text = "Add Tile";
|
||||
break;
|
||||
case DialogModeType.Edit:
|
||||
this.Text = "Edit Tile";
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
TileModel model = buildModel();
|
||||
|
||||
switch (this.DialogMode)
|
||||
{
|
||||
case DialogModeType.Add:
|
||||
if (this.TilePanelLayout != null)
|
||||
{
|
||||
this.TilePanelLayout.AddTile(model);
|
||||
}
|
||||
else if (this.ListBox != null)
|
||||
{
|
||||
int n = this.ListBox.ListBox.Items.Add(model);
|
||||
this.ListBox.ListBox.SelectedIndex = n;
|
||||
}
|
||||
|
||||
break;
|
||||
case DialogModeType.Edit:
|
||||
if (this.TilePanel != null)
|
||||
{
|
||||
this.TilePanel.LoadInfo(model);
|
||||
}
|
||||
else if (this.ListBox != null)
|
||||
{
|
||||
int n = this.ListBox.ListBox.SelectedIndex;
|
||||
if (n >= 0)
|
||||
{
|
||||
this.ListBox.ListBox.Items.RemoveAt(n);
|
||||
this.ListBox.ListBox.Items.Insert(n, model);
|
||||
this.ListBox.ListBox.SelectedIndex = n;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
protected TileModel buildModel()
|
||||
{
|
||||
TileModel rs = new TileModel()
|
||||
{
|
||||
Title = textBox1.Text?.Trim(),
|
||||
ProcessFilename = textBox2.Text?.Trim(),
|
||||
ProcessArgument = textBox3.Text?.Trim(),
|
||||
ProcessWorkingDirectory = textBox4.Text?.Trim(),
|
||||
ProcessWindowStyle = (System.Diagnostics.ProcessWindowStyle)pickerBox1.ComboBox.SelectedIndex,
|
||||
ProcessAsAdmin = (pickerBox2.ComboBox.SelectedIndex == 1)
|
||||
};
|
||||
|
||||
if (this.DialogMode == DialogModeType.Add)
|
||||
{
|
||||
if (!this.AimCoord.Equals(new Point(-1, -1)))
|
||||
{
|
||||
rs.Position = this.AimCoord;
|
||||
}
|
||||
}
|
||||
|
||||
return rs;
|
||||
}
|
||||
|
||||
protected void updateModel(TileModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
textBox1.Text = model.Title;
|
||||
textBox2.Text = model.ProcessFilename;
|
||||
textBox3.Text = model.ProcessArgument;
|
||||
textBox4.Text = model.ProcessWorkingDirectory;
|
||||
pickerBox1.ComboBox.SelectedIndex = (int)model.ProcessWindowStyle;
|
||||
pickerBox2.ComboBox.SelectedIndex = (model.ProcessAsAdmin ? 1 : 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
<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>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="textBox2.HighlightImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vgAADr4B6kKxwAAAAK9JREFUOE/t0zsKwkAURuGp1BWJK3EhIrgAV+EOLLWwtRQLwQdiIbbiIkwynj+O
|
||||
IVwnyhR2XvjyInNIkXHee8f0cEQBPbDOaKEarSvXhsAJO4wirlB4jipiA3phoIvIrLFChhnKiA3o8Ckw
|
||||
RR93LNBODVwwwRL62kNKYIxNzQ1FSsDOEHk08HrYJMw/8KtA06/cCef6KJDZgDbTFrHNZO3x9idqOyui
|
||||
m2+07bvPgHcPXOhtG3D6cUIAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="textBox2.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vgAADr4B6kKxwAAAAMZJREFUOE/tk7sNwjAQQF3BRohJGAQhMQBTsAElFLSUiAKJTxIXhBZlCILNuyRG
|
||||
iXEQKeg46fmsO/slhU9Za5XWehiXYcD6JElygZ6qhdwTioVDGo4wDXDjsohXdYkvMDTHVa8R9Hb0tpCz
|
||||
XzqJL5Df/CRYRFE0Yn8nr9M07XcSwBXmXN6QDfncRTCjt6+Rgfla4Adfn3D+ERS4Yht/wY8FxVN2xTac
|
||||
gLP5qyYLAhmmA4SGyeeEoPkSq3EWydsoB4gRDEqBVU/p15ajstHKCgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="textBox4.HighlightImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wAAADsABataJCQAAAJtJREFUOE/t0zEKwkAQheEpvILHSLySlTeJ6AnEzpPYi0ERPIKWKtZKNv9LNS5x
|
||||
E6xS+OCDJew8tsgYmeCECsGZo1dKXLBwtnghQ2fe0JDPGHecsW6xwgwjNM8tdIgyxQ0qij2gORV9LejK
|
||||
Bk8dfi3QjGY/C0IISS7/gkEVtP3KfbKEZm0PLZM++IVK0d0rdrAcR8TrnKK7BzPLa7Wb+WX/Nb8PAAAA
|
||||
AElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="textBox4.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wAAADsABataJCQAAALZJREFUOE/tkzEKwjAYRjt4BY9hvZKTN1HsCYqbJzGzKBGb9gY6qjgrxvdJK7ZS
|
||||
Gpwc/ODBnzTvg0AT5Xk+hB3cwVc456ZRSIqi2MAeafbGEq5Zlg3KY+1Bvkkql89Ya/vsnUCZN8FJYWyM
|
||||
6ekKnsWkdF9hb8S3I6ioyRnkpa0FXcFbwOXrAjlyawXe+06q/At+qoDh41cOCU4iV8OaQY8pUVEgOnuA
|
||||
VcSzjRm2UHvOHeisdc7FDwDnJKIbLgP9AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@ -1,149 +0,0 @@
|
||||
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)
|
||||
{
|
||||
UIControl.Add(flowLayoutPanel1, tilePanelLayout);
|
||||
|
||||
this.InvalidateColumnSize();
|
||||
}
|
||||
|
||||
public void Add(int columnCount)
|
||||
{
|
||||
this.TileWidthCount = ((columnCount <= 0) ? DEFAULT_COLUMN : columnCount);
|
||||
|
||||
this.Add();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
UIControl.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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
9
Windows/Forms/TilePanel.Designer.cs
generated
9
Windows/Forms/TilePanel.Designer.cs
generated
@ -1,4 +1,4 @@
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
namespace RokettoLaunch.Windows.Forms
|
||||
{
|
||||
partial class TilePanel
|
||||
{
|
||||
@ -61,16 +61,9 @@
|
||||
// TilePanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234)))));
|
||||
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 = "TilePanel";
|
||||
this.Size = new System.Drawing.Size(82, 81);
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -4,130 +4,43 @@ using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using FizzyLauncher.Models;
|
||||
using RokettoLaunch.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
namespace RokettoLaunch.Windows.Forms
|
||||
{
|
||||
public partial class TilePanel : RyzStudio.Windows.Forms.TC1UserControl
|
||||
public partial class TilePanel : RyzStudio.Windows.TileForms.Tile
|
||||
{
|
||||
protected bool isDragging = false;
|
||||
protected Point startPosition = new Point();
|
||||
|
||||
protected int imageLeft = 0;
|
||||
protected int imageTop = 11;
|
||||
protected int labelMargin = 3;
|
||||
protected int labelTop = 47;
|
||||
protected Rectangle labelRectangle = new Rectangle();
|
||||
|
||||
protected string title = "";
|
||||
protected Image icon = null;
|
||||
protected ContextMenuStrip groupContextMenu = null;
|
||||
protected TileModel modelInfo = new TileModel();
|
||||
|
||||
|
||||
public TilePanel() : base()
|
||||
public TilePanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.AllowDrop = true;
|
||||
this.AutoSize = false;
|
||||
this.BackColor = Color.FromArgb(250, 250, 250);
|
||||
this.ContextMenuStrip = contextMenuStrip1;
|
||||
this.DoubleBuffered = true;
|
||||
this.Font = new Font(this.Font.FontFamily, 8.25F);
|
||||
this.ForeColor = Color.FromArgb(99, 105, 119);
|
||||
this.Size = new Size(70, 70);
|
||||
this.MaximumSize = this.MinimumSize = this.Size;
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
this.AllowDrop = true;
|
||||
this.AutoSize = false;
|
||||
this.BackColor = Color.FromArgb(250, 250, 250);
|
||||
this.ContextMenuStrip = contextMenuStrip1;
|
||||
this.DoubleBuffered = true;
|
||||
this.Font = new Font(this.Font.FontFamily, 8.25F);
|
||||
this.Size = new Size(70, 70);
|
||||
this.MaximumSize = this.MinimumSize = this.Size;
|
||||
}
|
||||
this.AutoScaleMode = AutoScaleMode.None;
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
|
||||
|
||||
if (this.Image != null)
|
||||
{
|
||||
g.DrawImage(this.Image, new Point(imageLeft, imageTop));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Title))
|
||||
{
|
||||
TextRenderer.DrawText(e.Graphics, this.Title, this.Font, labelRectangle, this.ForeColor, TextFormatFlags.HorizontalCenter | TextFormatFlags.NoPadding | TextFormatFlags.EndEllipsis);
|
||||
}
|
||||
|
||||
g.DrawRectangle(new Pen(Color.FromArgb(204, 206, 218), 1), new Rectangle(this.DisplayRectangle.X, this.DisplayRectangle.Y, (this.DisplayRectangle.Width - 1), (this.DisplayRectangle.Height - 1)));
|
||||
|
||||
}
|
||||
|
||||
[Category("Tile"), Browsable(true)]
|
||||
public Image Image
|
||||
{
|
||||
get => icon;
|
||||
protected set
|
||||
{
|
||||
icon = value;
|
||||
|
||||
if (icon == null)
|
||||
{
|
||||
imageLeft = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
imageLeft = (this.Width - icon.Width) / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Category("Tile"), Browsable(true)]
|
||||
public string Title
|
||||
{
|
||||
get => title;
|
||||
protected set
|
||||
{
|
||||
title = value;
|
||||
|
||||
labelRectangle = new Rectangle(labelMargin, labelTop, (this.Width - (labelMargin * 2)), (this.Height - labelTop - 1));
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
this.EnableMovable = true;
|
||||
}
|
||||
|
||||
|
||||
[Browsable(false)]
|
||||
public TileModel ModelInfo => modelInfo;
|
||||
|
||||
public TilePanelLayout PanelContainer
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.Parent == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public RyzStudio.Windows.TileForms.TileContainer TileContainer { get => UIControl.GetParentsUntil<RyzStudio.Windows.TileForms.TileContainer>(this); }
|
||||
|
||||
if (this.Parent.GetType() != typeof(TilePanelLayout))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
protected MainForm MainForm { get => UIControl.GetParentsUntil<MainForm>(this); }
|
||||
|
||||
return (TilePanelLayout)this.Parent;
|
||||
}
|
||||
|
||||
protected override void OnDragOver(DragEventArgs e)
|
||||
{
|
||||
base.OnDragDrop(e);
|
||||
|
||||
e.Effect = (e.Data.GetDataPresent(DataFormats.FileDrop)) ? DragDropEffects.Link : DragDropEffects.None;
|
||||
}
|
||||
|
||||
protected override void OnDragDrop(DragEventArgs e)
|
||||
@ -138,67 +51,27 @@ namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
this.DropFileList(fileList);
|
||||
|
||||
invalidateGroupMenu(this.ModelInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.PanelContainer != null)
|
||||
{
|
||||
this.PanelContainer.DropFileList(fileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDragOver(DragEventArgs e)
|
||||
{
|
||||
base.OnDragDrop(e);
|
||||
|
||||
e.Effect = (e.Data.GetDataPresent(DataFormats.FileDrop)) ? DragDropEffects.Link : DragDropEffects.None;
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
isDragging = false;
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
TilePanelLayout container = this.PanelContainer;
|
||||
if (container == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.BringToFront();
|
||||
|
||||
if (((e.Button == MouseButtons.Left) && (Control.ModifierKeys == Keys.Control)) || (e.Button == MouseButtons.Right))
|
||||
{
|
||||
isDragging = true;
|
||||
startPosition = e.Location;
|
||||
InvalidateGroupMenu(this.ModelInfo);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseClick(e);
|
||||
if (Control.ModifierKeys == Keys.Control)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Control.ModifierKeys == Keys.Control) return;
|
||||
if (this.ModelInfo == null) return;
|
||||
if (this.ModelInfo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (this.ModelInfo.IsGroup)
|
||||
{
|
||||
if (groupContextMenu != null)
|
||||
{
|
||||
invalidateGroupMenuSize();
|
||||
|
||||
groupContextMenu.Show(this, e.Location);
|
||||
}
|
||||
this.LeftContextMenuStrip?.Show(this, e.Location);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -211,33 +84,57 @@ namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
base.OnMouseDoubleClick(e);
|
||||
|
||||
if (Control.ModifierKeys == Keys.Control) return;
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
execute(this.ModelInfo);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
if (isDragging)
|
||||
{
|
||||
TilePanelLayout layoutPanel = this.PanelContainer;
|
||||
if (layoutPanel == null)
|
||||
if (Control.ModifierKeys == Keys.Control)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int x = (this.Location.X + (e.Location.X - startPosition.X));
|
||||
int y = (this.Location.Y + (e.Location.Y - startPosition.Y));
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
Execute(this.ModelInfo);
|
||||
}
|
||||
}
|
||||
|
||||
layoutPanel.MoveTile(this, x, y);
|
||||
|
||||
#region Context Menu
|
||||
|
||||
/// <summary>
|
||||
/// Edit
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void editToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ModelInfo.IsGroup)
|
||||
{
|
||||
var form = new EditTileFolderForm(this.ModelInfo);
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.LoadInfo(form.Result);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
var form = new EditTileForm(this.ModelInfo);
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.LoadInfo(form.Result);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void removeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.TileContainer?.Controls?.Remove(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public void DropFileList(string[] fileList)
|
||||
{
|
||||
@ -294,46 +191,24 @@ namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
this.modelInfo = model;
|
||||
|
||||
this.Image = null;
|
||||
this.LargeIcon = null;
|
||||
this.Title = model.Title;
|
||||
|
||||
if (this.modelInfo.IsGroup)
|
||||
{
|
||||
this.Image = AppResource.folder_32;
|
||||
this.LargeIcon = AppResource.folder_32;
|
||||
|
||||
invalidateGroupMenu(this.modelInfo);
|
||||
InvalidateGroupMenu(this.modelInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Image = getIcon(model);
|
||||
this.LargeIcon = RyzStudio.IO.File.GetIcon(model.CleanProcessFilename);
|
||||
}
|
||||
|
||||
toolTip1.SetToolTip(this, this.Title);
|
||||
}
|
||||
|
||||
private void editToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ModelInfo.IsGroup)
|
||||
{
|
||||
EditTileFolderForm.ShowEditDialog(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditTileForm.ShowEditDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void removeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.PanelContainer == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.PanelContainer.Remove(this);
|
||||
}
|
||||
|
||||
protected void execute(TileModel model)
|
||||
protected void Execute(TileModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
@ -345,159 +220,51 @@ namespace FizzyLauncher.Windows.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model.CleanProcessFilename))
|
||||
if (this.MainForm != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!File.Exists(model.CleanProcessFilename))
|
||||
if (this.MainForm.CurrentSession?.HideOnExecute ?? true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ProcessStartInfo p = new ProcessStartInfo();
|
||||
p.FileName = model.CleanProcessFilename;
|
||||
p.WindowStyle = model.ProcessWindowStyle;
|
||||
p.UseShellExecute = true;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessArgument))
|
||||
{
|
||||
p.Arguments = model.CleanProcessArgument;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessWorkingDirectory))
|
||||
{
|
||||
p.WorkingDirectory = model.CleanProcessWorkingDirectory;
|
||||
}
|
||||
|
||||
if (model.ProcessAsAdmin)
|
||||
{
|
||||
p.Verb = "runas";
|
||||
}
|
||||
|
||||
MainForm parentForm = findMainForm();
|
||||
if (parentForm != null)
|
||||
{
|
||||
if (parentForm.CurrentSession != null)
|
||||
{
|
||||
if (parentForm.CurrentSession.HideOnClick)
|
||||
{
|
||||
parentForm.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Process.Start(p);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
MessageBox.Show(exc.Message);
|
||||
this.MainForm.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected Image getIcon(TileModel model)
|
||||
{
|
||||
if (!File.Exists(model.CleanProcessFilename))
|
||||
{
|
||||
return null;
|
||||
RyzStudio.Diagnostics.Process.Execute(model.CleanProcessFilename, model.CleanProcessWorkingDirectory, model.CleanProcessArgument, model.ProcessWindowStyle, model.ProcessAsAdmin);
|
||||
}
|
||||
|
||||
try
|
||||
protected void InvalidateGroupMenu(TileModel model)
|
||||
{
|
||||
return Icon.ExtractAssociatedIcon(model.CleanProcessFilename)?.ToBitmap();
|
||||
}
|
||||
catch
|
||||
var iconSize = ((this.MainForm?.CurrentSession?.ShowBigIcons ?? true) ? 24 : 16);
|
||||
|
||||
if (this.LeftContextMenuStrip == null)
|
||||
{
|
||||
// do nothing
|
||||
this.LeftContextMenuStrip = new ContextMenuStrip();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
this.LeftContextMenuStrip.ImageScalingSize = new Size(iconSize, iconSize);
|
||||
this.LeftContextMenuStrip.Items.Clear();
|
||||
|
||||
protected void invalidateGroupMenu(TileModel model)
|
||||
foreach (TileModel item in model?.Items ?? new System.Collections.Generic.List<TileModel>())
|
||||
{
|
||||
if (groupContextMenu == null)
|
||||
{
|
||||
groupContextMenu = new ContextMenuStrip();
|
||||
}
|
||||
|
||||
groupContextMenu.Items.Clear();
|
||||
|
||||
if (model.Items == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (TileModel item in model.Items)
|
||||
{
|
||||
ToolStripItem toolItem = groupContextMenu.Items.Add(item.Title);
|
||||
toolItem.Image = getIcon(item);
|
||||
ToolStripItem toolItem = this.LeftContextMenuStrip.Items.Add(item.Title);
|
||||
toolItem.Image = RyzStudio.IO.File.GetIcon(item.CleanProcessFilename);
|
||||
toolItem.Tag = item;
|
||||
toolItem.Click += toolItem_Click;
|
||||
}
|
||||
}
|
||||
|
||||
protected void invalidateGroupMenuSize()
|
||||
toolItem.Click += (object sender, EventArgs e) =>
|
||||
{
|
||||
if (this.PanelContainer != null)
|
||||
{
|
||||
if (this.PanelContainer.MainForm != null)
|
||||
{
|
||||
if (this.PanelContainer.MainForm.CurrentSession != null)
|
||||
{
|
||||
if (this.PanelContainer.MainForm.CurrentSession.EnableBigIconInFolder)
|
||||
{
|
||||
groupContextMenu.ImageScalingSize = new Size(24, 24);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
groupContextMenu.ImageScalingSize = new Size(16, 16);
|
||||
}
|
||||
|
||||
protected MainForm findMainForm()
|
||||
{
|
||||
Control item = this;
|
||||
|
||||
while (true)
|
||||
{
|
||||
item = item.Parent;
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (item.GetType() == typeof(MainForm))
|
||||
{
|
||||
return (item as MainForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void toolItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (sender.GetType() != typeof(ToolStripMenuItem))
|
||||
var menuItem = (System.Windows.Forms.ToolStripMenuItem)sender;
|
||||
if (menuItem == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ToolStripMenuItem item = (sender as ToolStripMenuItem);
|
||||
if (item.Tag == null)
|
||||
var model = (menuItem.Tag as TileModel);
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.Tag.GetType() != typeof(TileModel))
|
||||
{
|
||||
return;
|
||||
Execute(model);
|
||||
};
|
||||
}
|
||||
|
||||
TileModel model = (item.Tag as TileModel);
|
||||
execute(model);
|
||||
}
|
||||
|
||||
}
|
||||
|
259
Windows/Forms/TilePanelLayout.Designer.cs
generated
259
Windows/Forms/TilePanelLayout.Designer.cs
generated
@ -1,259 +0,0 @@
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
partial class TilePanelLayout
|
||||
{
|
||||
/// <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.components = new System.ComponentModel.Container();
|
||||
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.toolStripMenuItem1 = 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();
|
||||
this.upToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.downToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bottomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
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();
|
||||
//
|
||||
// contextMenuStrip1
|
||||
//
|
||||
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.addToolStripMenuItem,
|
||||
this.addListToolStripMenuItem,
|
||||
this.toolStripMenuItem6,
|
||||
this.removeRowToolStripMenuItem1});
|
||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip1.Size = new System.Drawing.Size(144, 76);
|
||||
//
|
||||
// addToolStripMenuItem
|
||||
//
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
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(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.toolStripMenuItem1,
|
||||
this.toolStripSeparator3,
|
||||
this.toolStripMenuItem7,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripMenuItem4,
|
||||
this.toolStripSeparator1,
|
||||
this.toolStripMenuItem3});
|
||||
this.contextMenuStrip2.Name = "contextMenuStrip1";
|
||||
this.contextMenuStrip2.Size = new System.Drawing.Size(181, 154);
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem2.Text = "&Add Group";
|
||||
this.toolStripMenuItem2.Click += new System.EventHandler(this.addGroupMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem1.Text = "&Edit";
|
||||
this.toolStripMenuItem1.Click += new System.EventHandler(this.editGroupMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
this.toolStripMenuItem4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.topToolStripMenuItem,
|
||||
this.upToolStripMenuItem,
|
||||
this.downToolStripMenuItem,
|
||||
this.bottomToolStripMenuItem});
|
||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem4.Text = "&Move";
|
||||
//
|
||||
// topToolStripMenuItem
|
||||
//
|
||||
this.topToolStripMenuItem.Name = "topToolStripMenuItem";
|
||||
this.topToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
this.topToolStripMenuItem.Text = "&Top";
|
||||
this.topToolStripMenuItem.Click += new System.EventHandler(this.moveTopMenuItem_Click);
|
||||
//
|
||||
// upToolStripMenuItem
|
||||
//
|
||||
this.upToolStripMenuItem.Name = "upToolStripMenuItem";
|
||||
this.upToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
this.upToolStripMenuItem.Text = "&Up";
|
||||
this.upToolStripMenuItem.Click += new System.EventHandler(this.moveUpMenuItem_Click);
|
||||
//
|
||||
// downToolStripMenuItem
|
||||
//
|
||||
this.downToolStripMenuItem.Name = "downToolStripMenuItem";
|
||||
this.downToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
this.downToolStripMenuItem.Text = "&Down";
|
||||
this.downToolStripMenuItem.Click += new System.EventHandler(this.moveDownMenuItem_Click);
|
||||
//
|
||||
// bottomToolStripMenuItem
|
||||
//
|
||||
this.bottomToolStripMenuItem.Name = "bottomToolStripMenuItem";
|
||||
this.bottomToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||
this.bottomToolStripMenuItem.Text = "&Bottom";
|
||||
this.bottomToolStripMenuItem.Click += new System.EventHandler(this.moveBottomMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 22);
|
||||
this.toolStripMenuItem3.Text = "&Remove";
|
||||
this.toolStripMenuItem3.Click += new System.EventHandler(this.removeGroupMenuItem3_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
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(265, 83);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.label1.Name = "label1";
|
||||
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);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
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.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);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem addListToolStripMenuItem;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
|
||||
private System.Windows.Forms.ToolStripMenuItem topToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem upToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem downToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem bottomToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
|
||||
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;
|
||||
}
|
||||
}
|
@ -1,942 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using FizzyLauncher.Models;
|
||||
using RyzStudio.Windows.Forms;
|
||||
|
||||
namespace FizzyLauncher.Windows.Forms
|
||||
{
|
||||
public partial class TilePanelLayout : RyzStudio.Windows.Forms.TC1UserControl
|
||||
{
|
||||
public static int CalcWidth(int tileCount) => (tileCount * tileSize) + ((tileCount - 1) * margin);
|
||||
|
||||
|
||||
public class Item
|
||||
{
|
||||
public TilePanel Tile { get; set; }
|
||||
public Point Coord { get; set; } = new Point(0, 0);
|
||||
}
|
||||
|
||||
|
||||
protected const int tileSize = 70;
|
||||
protected const int margin = 3;
|
||||
protected const int labelHeight = 20;
|
||||
protected const int collapseIncrement = 6;
|
||||
protected const int expandIncrement = 8;
|
||||
|
||||
protected TileGroupModel groupModel = null;
|
||||
protected List<Item> items = new List<Item>();
|
||||
|
||||
protected int collapseHeight = 0;
|
||||
protected int expandedHeight = 0;
|
||||
|
||||
protected bool isAnimating = false;
|
||||
protected bool isChecked = true;
|
||||
protected Point lastMousePosition = new Point();
|
||||
protected Point gridSize = new Point();
|
||||
|
||||
|
||||
public TilePanelLayout(TileGroupModel model) : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.AllowDrop = true;
|
||||
this.BackColor = Color.Transparent;
|
||||
|
||||
this.LoadModel(model);
|
||||
|
||||
label1.Location = new Point(0, 4);
|
||||
label1.Margin = new Padding(0);
|
||||
label1.Padding = new Padding(0);
|
||||
}
|
||||
|
||||
protected override void OnDragDrop(DragEventArgs e)
|
||||
{
|
||||
string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
||||
|
||||
this.DropFileList(fileList);
|
||||
}
|
||||
|
||||
protected override void OnDragOver(DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
{
|
||||
e.Effect = DragDropEffects.Link;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Effect = DragDropEffects.None;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
this.Margin = new Padding(0);
|
||||
this.Padding = new Padding(0, 0, 0, 10);
|
||||
}
|
||||
|
||||
protected override async void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
await this.InvalidateContainer();
|
||||
}
|
||||
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseClick(e);
|
||||
|
||||
lastMousePosition = e.Location;
|
||||
|
||||
bool isLabel = ((e.Location.X >= 0) && (e.Location.X <= this.Width) && (e.Location.Y >= 0) && (e.Location.Y <= 20));
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
if (isLabel)
|
||||
{
|
||||
contextMenuStrip2.Show(this, e.Location);
|
||||
}
|
||||
else
|
||||
{
|
||||
contextMenuStrip1.Show(this, e.Location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e) => base.OnMouseClick(e);
|
||||
|
||||
public Point GridSize
|
||||
{
|
||||
get => gridSize;
|
||||
}
|
||||
|
||||
public bool EnableAnimation
|
||||
{
|
||||
get
|
||||
{
|
||||
MainForm mainForm = this.MainForm;
|
||||
if (mainForm == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mainForm.CurrentSession == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return mainForm.CurrentSession.EnableAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
public int CollapseHeight => labelHeight + collapseHeight;
|
||||
|
||||
public int ExpandedHeight => expandedHeight + this.Padding.Bottom;
|
||||
|
||||
public void DropFileList(string[] fileList)
|
||||
{
|
||||
if (fileList == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (fileList.Length <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(fileList[0]))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileModel model = new TileModel()
|
||||
{
|
||||
ProcessFilename = fileList[0],
|
||||
Title = Path.GetFileName(fileList[0])
|
||||
};
|
||||
|
||||
// exe
|
||||
if (Path.GetExtension(fileList[0]).Equals(".exe", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
if (File.Exists(fileList[0]))
|
||||
{
|
||||
try
|
||||
{
|
||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(fileList[0]);
|
||||
if (fvi != null)
|
||||
{
|
||||
model.Title = fvi.ProductName;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model.Title))
|
||||
{
|
||||
model.Title = Path.GetFileNameWithoutExtension(fileList[0]);
|
||||
}
|
||||
}
|
||||
|
||||
this.AddTile(model);
|
||||
}
|
||||
|
||||
public TileGroupModel Model
|
||||
{
|
||||
get
|
||||
{
|
||||
TileGroupModel rs = new TileGroupModel()
|
||||
{
|
||||
Title = groupModel.Title,
|
||||
GridSize = new Size(this.GridSize.X, this.GridSize.Y),
|
||||
IsExpanded = isChecked,
|
||||
IsExclusive = groupModel.IsExclusive,
|
||||
Items = this.Tiles
|
||||
};
|
||||
|
||||
return rs;
|
||||
}
|
||||
}
|
||||
|
||||
public FlowLayoutPanel FlowLayoutPanel
|
||||
{
|
||||
get
|
||||
{
|
||||
Control parentControl = this.Parent;
|
||||
while (true)
|
||||
{
|
||||
if (parentControl == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (parentControl.GetType() == typeof(FlowLayoutPanel))
|
||||
{
|
||||
return parentControl as FlowLayoutPanel;
|
||||
}
|
||||
|
||||
parentControl = parentControl.Parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MainForm MainForm
|
||||
{
|
||||
get
|
||||
{
|
||||
Control parentControl = this.FlowLayoutPanel;
|
||||
while (true)
|
||||
{
|
||||
if (parentControl == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (parentControl.GetType() == typeof(MainForm))
|
||||
{
|
||||
return parentControl as MainForm;
|
||||
}
|
||||
|
||||
parentControl = parentControl.Parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<TileModel> Tiles
|
||||
{
|
||||
get
|
||||
{
|
||||
List<TileModel> rs = new List<TileModel>();
|
||||
foreach (Item item in items)
|
||||
{
|
||||
TileModel model = item.Tile.ModelInfo;
|
||||
model.Position = item.Coord;
|
||||
|
||||
rs.Add(model);
|
||||
}
|
||||
|
||||
return rs;
|
||||
}
|
||||
}
|
||||
|
||||
public int TileSize => (tileSize + margin);
|
||||
|
||||
public void AddTile(TileModel tile)
|
||||
{
|
||||
Point gridSize = this.GridSize;
|
||||
|
||||
if (items.Count >= (gridSize.X * gridSize.Y))
|
||||
{
|
||||
this.SetGridSize(gridSize.X, (gridSize.Y + 1));
|
||||
}
|
||||
|
||||
Point? newCoord = tile.Position;
|
||||
if ((newCoord == null) || hasTile(tile.Position))
|
||||
{
|
||||
newCoord = findLastFreeCoord();
|
||||
}
|
||||
|
||||
if (newCoord == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
tile.Position = newCoord.Value;
|
||||
|
||||
TilePanel panel = new TilePanel();
|
||||
panel.LoadInfo(tile);
|
||||
panel.Location = convertCoordToLocation(tile.Position);
|
||||
|
||||
items.Add(new Item()
|
||||
{
|
||||
Tile = panel,
|
||||
Coord = tile.Position
|
||||
});
|
||||
|
||||
this.Controls.Add(panel);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
this.Controls.Clear();
|
||||
}
|
||||
|
||||
public async Task Collapse()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if (isAnimating) return;
|
||||
|
||||
isAnimating = true;
|
||||
isChecked = false;
|
||||
|
||||
if (this.EnableAnimation)
|
||||
{
|
||||
while (this.Height > this.CollapseHeight)
|
||||
{
|
||||
UIControl.SetHeight(this, (this.Height - collapseIncrement));
|
||||
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
UIControl.SetHeight(this, this.CollapseHeight);
|
||||
|
||||
isAnimating = false;
|
||||
|
||||
this.Invalidate(this.DisplayRectangle, false);
|
||||
});
|
||||
}
|
||||
|
||||
public async Task Expand()
|
||||
{
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if (isAnimating) return;
|
||||
|
||||
isAnimating = true;
|
||||
isChecked = true;
|
||||
|
||||
if (this.EnableAnimation)
|
||||
{
|
||||
while (this.Height < this.ExpandedHeight)
|
||||
{
|
||||
UIControl.SetHeight(this, (this.Height + expandIncrement));
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
UIControl.SetHeight(this, this.ExpandedHeight);
|
||||
|
||||
isAnimating = false;
|
||||
|
||||
this.Invalidate(this.DisplayRectangle, false);
|
||||
});
|
||||
}
|
||||
|
||||
public Point GetTilePosition(int posX, int posY)
|
||||
{
|
||||
int x = (int)Math.Round(decimal.Divide(posX, this.TileSize));
|
||||
int y = (int)Math.Round(decimal.Divide((posY - labelHeight), this.TileSize));
|
||||
|
||||
if (x < 0) x = 0;
|
||||
if (y < 0) y = 0;
|
||||
|
||||
return new Point((x * this.TileSize), ((y * this.TileSize) + labelHeight));
|
||||
}
|
||||
|
||||
public async Task InvalidateContainer()
|
||||
{
|
||||
if (isAnimating)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (isChecked)
|
||||
{
|
||||
await this.Expand();
|
||||
}
|
||||
else
|
||||
{
|
||||
await this.Collapse();
|
||||
}
|
||||
}
|
||||
|
||||
public void AddGroup()
|
||||
{
|
||||
if (this.FlowLayoutPanel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.FlowLayoutPanel.Controls.Add(new TilePanelLayout(new TileGroupModel()
|
||||
{
|
||||
Title = "New Group",
|
||||
GridSize = new Size(8, 1)
|
||||
}));
|
||||
}
|
||||
|
||||
public void AddRow() => this.SetGridSize(gridSize.X, (gridSize.Y + 1));
|
||||
|
||||
public void EditGroup() => EditGroupForm.ShowDialog(this);
|
||||
|
||||
public void LoadModel(TileGroupModel model)
|
||||
{
|
||||
groupModel = model;
|
||||
|
||||
isChecked = groupModel.IsExpanded;
|
||||
|
||||
label1.Text = " " + groupModel?.Title;
|
||||
label1.Image = (isChecked ? AppResource.toggle_right_ea_16 : AppResource.toggle_left_ea_16);
|
||||
|
||||
this.SetGridSize(groupModel.GridSize.Width, groupModel.GridSize.Height);
|
||||
this.LoadTiles(model.Items);
|
||||
this.SetGridSize(groupModel.GridSize.Width, groupModel.GridSize.Height);
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
public void UpdateModel(TileGroupModel model)
|
||||
{
|
||||
groupModel = model;
|
||||
isChecked = groupModel.IsExpanded;
|
||||
|
||||
label1.Text = " " + groupModel?.Title;
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
public void LoadTiles(List<TileModel> tiles)
|
||||
{
|
||||
if (tiles == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (tiles.Count() <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (TileModel item in tiles)
|
||||
{
|
||||
// resolve final grid position
|
||||
Point? confirmedPosition = resolveCoord(item.Position);
|
||||
if (confirmedPosition == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// place control
|
||||
TilePanel panel = new TilePanel();
|
||||
panel.LoadInfo(item);
|
||||
panel.Location = convertCoordToLocation(confirmedPosition.Value);
|
||||
|
||||
items.Add(new Item()
|
||||
{
|
||||
Tile = panel,
|
||||
Coord = confirmedPosition.Value
|
||||
});
|
||||
|
||||
this.Controls.Add(panel);
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveTile(TilePanel panel, int posX, int posY)
|
||||
{
|
||||
Item item = items.Where(x => x.Tile.Equals(panel)).FirstOrDefault();
|
||||
if (item == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Point newPosition = convertLocationToCoord_Nearest(posX, posY);
|
||||
if (!isTileInBounds(newPosition))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasTile(newPosition))
|
||||
{
|
||||
Item swapItem = items.Where(x => x.Coord.Equals(newPosition)).FirstOrDefault();
|
||||
if (swapItem != null)
|
||||
{
|
||||
swapItem.Coord = item.Coord;
|
||||
swapItem.Tile.Location = convertCoordToLocation(item.Coord);
|
||||
}
|
||||
|
||||
item.Coord = newPosition;
|
||||
panel.Location = convertCoordToLocation(newPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Coord = newPosition;
|
||||
panel.Location = convertCoordToLocation(newPosition);
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveTop()
|
||||
{
|
||||
if (this.FlowLayoutPanel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.FlowLayoutPanel.Controls.SetChildIndex(this, 0);
|
||||
}
|
||||
|
||||
public void MoveUp()
|
||||
{
|
||||
if (this.FlowLayoutPanel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int pos = this.FlowLayoutPanel.Controls.GetChildIndex(this);
|
||||
if (pos <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.FlowLayoutPanel.Controls.SetChildIndex(this, (pos - 1));
|
||||
}
|
||||
|
||||
public void MoveDown()
|
||||
{
|
||||
if (this.FlowLayoutPanel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int pos = this.FlowLayoutPanel.Controls.GetChildIndex(this);
|
||||
if (pos >= (this.FlowLayoutPanel.Controls.Count - 1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.FlowLayoutPanel.Controls.SetChildIndex(this, (pos + 1));
|
||||
}
|
||||
|
||||
public void MoveBottom()
|
||||
{
|
||||
if (this.FlowLayoutPanel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.FlowLayoutPanel.Controls.SetChildIndex(this, (this.FlowLayoutPanel.Controls.Count - 1));
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
if (this.FlowLayoutPanel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.FlowLayoutPanel.Controls.Remove(this);
|
||||
}
|
||||
|
||||
public void Remove(TilePanel panel)
|
||||
{
|
||||
Item m = items.Where(x => x.Tile.Equals(panel)).FirstOrDefault();
|
||||
if (m != null)
|
||||
{
|
||||
items.Remove(m);
|
||||
}
|
||||
|
||||
this.Controls.Remove(panel);
|
||||
}
|
||||
|
||||
public void SetGridSize(int width, int height)
|
||||
{
|
||||
gridSize = new Point(width, height);
|
||||
|
||||
groupModel.GridSize = new Size(groupModel.GridSize.Width, height);
|
||||
|
||||
expandedHeight = (this.TileSize * height) + labelHeight;
|
||||
|
||||
int w = CalcWidth(gridSize.X);
|
||||
|
||||
this.Size = new Size(w, (isChecked ? this.ExpandedHeight : this.CollapseHeight));
|
||||
}
|
||||
|
||||
protected Point convertCoordToLocation(Point position) => new Point((position.X * this.TileSize), ((position.Y * this.TileSize) + labelHeight));
|
||||
|
||||
protected Point convertLocationToCoord(int posX, int posY)
|
||||
{
|
||||
int x = (int)Math.Ceiling(decimal.Divide(posX, this.TileSize));
|
||||
int y = (int)Math.Ceiling(decimal.Divide((posY - labelHeight), this.TileSize));
|
||||
|
||||
x--;
|
||||
y--;
|
||||
|
||||
if (x < 0) x = 0;
|
||||
if (y < 0) y = 0;
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
protected Point convertLocationToCoord_Nearest(int posX, int posY)
|
||||
{
|
||||
int x = (int)Math.Round(decimal.Divide(posX, this.TileSize));
|
||||
int y = (int)Math.Round(decimal.Divide((posY - labelHeight), this.TileSize));
|
||||
|
||||
if (x < 0) x = 0;
|
||||
if (y < 0) y = 0;
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
protected Point? findFirstFreeCoord()
|
||||
{
|
||||
Point gridSize = this.GridSize;
|
||||
|
||||
for (int y = 0; y < gridSize.Y; y++)
|
||||
{
|
||||
for (int x = 0; x < gridSize.X; x++)
|
||||
{
|
||||
if (hasTile(new Point(x, y)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return new Point(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected Point? findLastFreeCoord()
|
||||
{
|
||||
Point gridSize = this.GridSize;
|
||||
|
||||
// none available
|
||||
if (items.Count >= (gridSize.X * gridSize.Y))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (items.Count <= 0)
|
||||
{
|
||||
return findFirstFreeCoord();
|
||||
}
|
||||
|
||||
// only one available
|
||||
if (items.Count >= ((gridSize.X * gridSize.Y) - 1))
|
||||
{
|
||||
return findFirstFreeCoord();
|
||||
}
|
||||
|
||||
Point? rv = null;
|
||||
|
||||
for (int y = (gridSize.Y - 1); y >= 0; y--)
|
||||
{
|
||||
for (int x = (gridSize.X - 1); x >= 0; x--)
|
||||
{
|
||||
if (hasTile(new Point(x, y)))
|
||||
{
|
||||
if (rv.HasValue)
|
||||
{
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rv = new Point(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected bool hasTile(Point position)
|
||||
{
|
||||
if (items == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (items.Count <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (items.Count(x => x.Coord.Equals(position)) > 0);
|
||||
}
|
||||
|
||||
protected bool isTileInBounds(Point position)
|
||||
{
|
||||
Point gridSize = this.GridSize;
|
||||
|
||||
if (position.X >= gridSize.X)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (position.Y >= gridSize.Y)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected Point? resolveCoord(Point coord)
|
||||
{
|
||||
if (!isTileInBounds(coord))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!hasTile(coord))
|
||||
{
|
||||
return coord;
|
||||
}
|
||||
|
||||
return resolveNextCoord(coord);
|
||||
}
|
||||
|
||||
protected Point? resolveNextCoord(Point coord)
|
||||
{
|
||||
Point gridSize = this.GridSize;
|
||||
Point newCoord = coord;
|
||||
|
||||
while (true)
|
||||
{
|
||||
newCoord.X++;
|
||||
|
||||
if (newCoord.X >= gridSize.X)
|
||||
{
|
||||
newCoord.Y++;
|
||||
newCoord.X = 0;
|
||||
}
|
||||
|
||||
if (!isTileInBounds(newCoord))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (hasTile(newCoord))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return newCoord;
|
||||
}
|
||||
}
|
||||
|
||||
private async void label1_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (isAnimating) return;
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
isChecked = !isChecked;
|
||||
|
||||
label1.Image = (isChecked ? AppResource.toggle_right_ea_16 : AppResource.toggle_left_ea_16);
|
||||
|
||||
this.Invalidate();
|
||||
|
||||
await this.InvalidateContainer();
|
||||
|
||||
// exclusivity
|
||||
if (isChecked)
|
||||
{
|
||||
if (this.Model.IsExclusive)
|
||||
{
|
||||
if (this.FlowLayoutPanel != null)
|
||||
{
|
||||
foreach (TilePanelLayout item in this.FlowLayoutPanel.Controls.OfType<TilePanelLayout>())
|
||||
{
|
||||
if (item.Equals(this))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
await item.Collapse();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
label1.Image = (isChecked ? AppResource.toggle_right_ea_16 : AppResource.toggle_left_ea_16);
|
||||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
contextMenuStrip2.Show(this, e.Location);
|
||||
}
|
||||
}
|
||||
|
||||
#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,66 +0,0 @@
|
||||
<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>
|
||||
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>172, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -1,15 +1,15 @@
|
||||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Fizzy Launcher"
|
||||
#define MyAppVersion "0.2.5.058"
|
||||
#define MyAppName "RokettoLaunch"
|
||||
#define MyAppVersion "0.3.0.153"
|
||||
#define MyAppPublisher "Hi, I'm Ray"
|
||||
#define MyAppURL "https://www.hiimray.co.uk/software-fizzy-launcher"
|
||||
#define MyAppExeName "fizzylauncher.exe"
|
||||
#define MyAppExeName "rokettolaunch.exe"
|
||||
|
||||
#define AppSourcePath "L:\gitea-hiimray\linear-app-launcher\bin\Release\64"
|
||||
#define AppReleasePath "L:\gitea-hiimray\linear-app-launcher\bin\Release"
|
||||
#define AppReleaseName "fizzy-launcher"
|
||||
#define AppSourcePath "L:\gitea-hiimray\linear-app-launcher\bin"
|
||||
#define AppReleasePath "L:\gitea-hiimray\linear-app-launcher\bin"
|
||||
#define AppReleaseName "rokettolaunch-installer"
|
||||
|
||||
|
||||
[Setup]
|
||||
@ -41,7 +41,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "{#AppSourcePath}\fizzylauncher.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{#AppSourcePath}\rokettolaunch.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
|
19
build.bat
19
build.bat
@ -1,10 +1,17 @@
|
||||
rmdir /s /q "bin\Release\"
|
||||
dotnet publish skye.sln -r win-x64 -c Release /p:PublishSingleFile=true /p:SelfContained=false /p:PublishReadyToRunfalse=true /p:PublishDir="bin\Release\64\"
|
||||
RMDIR /s /q "bin\"
|
||||
RMDIR /s /q "obj\"
|
||||
|
||||
##rmdir /s /q "bin\Release\86\"
|
||||
##dotnet publish skye.sln -r win-x86 -c Release /p:PublishSingleFile=true /p:SelfContained=false /p:PublishReadyToRunfalse=true /p:PublishDir="bin\Release\"
|
||||
MKDIR bin
|
||||
|
||||
dotnet restore skye.sln
|
||||
dotnet publish skye.sln -r win-x64 -c Release /p:PublishSingleFile=true /p:SelfContained=false /p:PublishReadyToRunfalse=true /p:PublishDir="bin\"
|
||||
|
||||
"C:\B\Portable Files (dev)\Inno Setup\v6.0.4-2\app\ISCC.exe" "build-installer.iss"
|
||||
|
||||
cd "bin\Release\64\"
|
||||
"C:\B\Portable Files\PeaZip (Portable)\v6.5.1\App\PeaZip\res\7z\7z.exe" a -t7z "..\fizzy-launcher.7z" "*" -mx9
|
||||
"C:\B\Portable Files\7-Zip (Portable)\23.01\App\7-Zip64\7z.exe" a -t7z "bin\rokettolaunch.7z" ".\bin\rokettolaunch.exe" -mx9
|
||||
|
||||
RMDIR /s /q "bin\debug"
|
||||
RMDIR /s /q "bin\release"
|
||||
RMDIR /s /q "obj\"
|
||||
|
||||
PAUSE
|
BIN
favicon.ico
BIN
favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
2
skye.sln
2
skye.sln
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33205.214
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FizzyLauncher", "FizzyLauncher.csproj", "{4833FB27-0817-4720-A54B-180369B0C374}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RokettoLaunch", "RokettoLaunch.csproj", "{4833FB27-0817-4720-A54B-180369B0C374}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
Reference in New Issue
Block a user