release/0.4.1 #3
105
CopyToTileForm.cs
Normal file
105
CopyToTileForm.cs
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.ThemedForms;
|
||||||
|
|
||||||
|
namespace RokettoLaunch
|
||||||
|
{
|
||||||
|
public class CopyToTileForm : Form
|
||||||
|
{
|
||||||
|
private Label label1;
|
||||||
|
private ThPickerBox pickerBox1;
|
||||||
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
|
||||||
|
|
||||||
|
private List<string> result = null;
|
||||||
|
|
||||||
|
|
||||||
|
public CopyToTileForm(List<string> model = null)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
|
this.Text = "Copy To...";
|
||||||
|
|
||||||
|
result = model;
|
||||||
|
|
||||||
|
pickerBox1.Setup(model, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnShown(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnShown(e);
|
||||||
|
|
||||||
|
pickerBox1.Value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
label1 = new Label();
|
||||||
|
pickerBox1 = new ThPickerBox();
|
||||||
|
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.BackColor = Color.Transparent;
|
||||||
|
label1.ForeColor = SystemColors.ControlText;
|
||||||
|
label1.Location = new Point(10, 20);
|
||||||
|
label1.Margin = new Padding(0);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Padding = new Padding(0, 9, 0, 0);
|
||||||
|
label1.Size = new Size(40, 24);
|
||||||
|
label1.TabIndex = 153;
|
||||||
|
label1.Text = "Group";
|
||||||
|
label1.TextAlign = ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// pickerBox1
|
||||||
|
//
|
||||||
|
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
pickerBox1.BackColor = Color.Transparent;
|
||||||
|
pickerBox1.EnableMovable = false;
|
||||||
|
pickerBox1.Location = new Point(95, 20);
|
||||||
|
pickerBox1.Name = "pickerBox1";
|
||||||
|
pickerBox1.SelectedIndex = -1;
|
||||||
|
pickerBox1.Size = new Size(280, 32);
|
||||||
|
pickerBox1.TabIndex = 174;
|
||||||
|
pickerBox1.TabStop = false;
|
||||||
|
//
|
||||||
|
// dialogFooter1
|
||||||
|
//
|
||||||
|
dialogFooter1.BackColor = Color.FromArgb(240, 240, 240);
|
||||||
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
|
dialogFooter1.EnableMovable = false;
|
||||||
|
dialogFooter1.IsBusy = false;
|
||||||
|
dialogFooter1.Location = new Point(0, 451);
|
||||||
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
|
dialogFooter1.Size = new Size(384, 70);
|
||||||
|
dialogFooter1.TabIndex = 0;
|
||||||
|
dialogFooter1.TabStop = false;
|
||||||
|
//
|
||||||
|
// CopyToTileForm
|
||||||
|
//
|
||||||
|
BackColor = Color.White;
|
||||||
|
ClientSize = new Size(384, 521);
|
||||||
|
Controls.Add(dialogFooter1);
|
||||||
|
Controls.Add(pickerBox1);
|
||||||
|
Controls.Add(label1);
|
||||||
|
MinimumSize = new Size(400, 560);
|
||||||
|
Name = "CopyToTileForm";
|
||||||
|
Text = "Copy To...";
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Result
|
||||||
|
{
|
||||||
|
get => pickerBox1.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,14 +5,14 @@ using System.Drawing;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using RokettoLaunch.Models;
|
using RokettoLaunch.Models.SaveFile;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
using RyzStudio.Windows.ThemedForms;
|
using RyzStudio.Windows.ThemedForms;
|
||||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
|
|
||||||
namespace RokettoLaunch
|
namespace RokettoLaunch
|
||||||
{
|
{
|
||||||
public class EditTileFolderForm : Form
|
public class EditFolderForm : Form
|
||||||
{
|
{
|
||||||
private Label label1;
|
private Label label1;
|
||||||
private ThClearableTextBox textBox1;
|
private ThClearableTextBox textBox1;
|
||||||
@ -21,21 +21,27 @@ namespace RokettoLaunch
|
|||||||
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
|
||||||
|
|
||||||
private TileModel result = null;
|
private App4Options.Item result = null;
|
||||||
|
|
||||||
|
|
||||||
public EditTileFolderForm(TileModel model = null)
|
public EditFolderForm(App4Options.Item model = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
UISetup.Dialog(this);
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = (result == null) ? "Add Folder" : "Edit Folder";
|
this.Text = (result == null) ? "Add Folder" : "Edit Folder";
|
||||||
|
|
||||||
result = model;
|
result = model;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnShown(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnShown(e);
|
||||||
|
|
||||||
textBox1.Text = result?.Title ?? "New Folder";
|
textBox1.Text = result?.Title ?? "New Folder";
|
||||||
foreach (TileModel item in result?.Items ?? new List<TileModel>())
|
|
||||||
|
foreach (var item in result?.Items ?? new List<App4Options.Item>())
|
||||||
{
|
{
|
||||||
if (item.IsGroup)
|
if (item.IsGroup)
|
||||||
{
|
{
|
||||||
@ -60,13 +66,11 @@ namespace RokettoLaunch
|
|||||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
textBox1.BackColor = Color.Transparent;
|
textBox1.BackColor = Color.Transparent;
|
||||||
textBox1.ClearedValue = "";
|
textBox1.ClearedValue = "";
|
||||||
textBox1.EnableReactiveVisual = true;
|
textBox1.EnableMovable = false;
|
||||||
textBox1.Font = new Font("Microsoft Sans Serif", 8.25F);
|
|
||||||
textBox1.Icon = "O";
|
textBox1.Icon = "O";
|
||||||
textBox1.IconSize = 13F;
|
textBox1.IconSize = 13F;
|
||||||
textBox1.Location = new Point(109, 20);
|
textBox1.Location = new Point(115, 20);
|
||||||
textBox1.Name = "textBox1";
|
textBox1.Name = "textBox1";
|
||||||
textBox1.Padding = new Padding(4, 4, 3, 3);
|
|
||||||
textBox1.Size = new Size(260, 32);
|
textBox1.Size = new Size(260, 32);
|
||||||
textBox1.TabIndex = 152;
|
textBox1.TabIndex = 152;
|
||||||
textBox1.TabStop = false;
|
textBox1.TabStop = false;
|
||||||
@ -88,21 +92,18 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
// listBox1
|
// listBox1
|
||||||
//
|
//
|
||||||
listBox1.AllowDrop = true;
|
|
||||||
listBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
listBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
listBox1.BackColor = Color.Transparent;
|
listBox1.BackColor = Color.Transparent;
|
||||||
listBox1.EnableReactiveVisual = true;
|
listBox1.EnableMovable = false;
|
||||||
listBox1.Font = new Font("Microsoft Sans Serif", 8.25F);
|
listBox1.Location = new Point(115, 62);
|
||||||
listBox1.Location = new Point(109, 62);
|
|
||||||
listBox1.Name = "listBox1";
|
listBox1.Name = "listBox1";
|
||||||
listBox1.Padding = new Padding(4, 4, 3, 3);
|
|
||||||
listBox1.Size = new Size(260, 366);
|
listBox1.Size = new Size(260, 366);
|
||||||
listBox1.TabIndex = 180;
|
listBox1.TabIndex = 180;
|
||||||
listBox1.OnAdd += listBox1_OnAdd;
|
listBox1.OnAdd += ListBox_OnAdd;
|
||||||
listBox1.OnEdit += listBox1_OnEdit;
|
listBox1.OnEdit += ListBox_OnEdit;
|
||||||
listBox1.OnCopy += listBox1_OnCopy;
|
listBox1.OnCopy += ListBox_OnCopy;
|
||||||
listBox1.DragDrop += listBox1_DragDrop;
|
listBox1.DragDrop += ListBox_DragDrop;
|
||||||
listBox1.DragOver += listBox1_DragOver;
|
listBox1.DragOver += ListBox_DragOver;
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
@ -113,21 +114,22 @@ namespace RokettoLaunch
|
|||||||
label2.Margin = new Padding(0);
|
label2.Margin = new Padding(0);
|
||||||
label2.Name = "label2";
|
label2.Name = "label2";
|
||||||
label2.Padding = new Padding(0, 9, 0, 0);
|
label2.Padding = new Padding(0, 9, 0, 0);
|
||||||
label2.Size = new Size(82, 24);
|
label2.Size = new Size(30, 24);
|
||||||
label2.TabIndex = 181;
|
label2.TabIndex = 181;
|
||||||
label2.Text = "Tile Collection";
|
label2.Text = "Tiles";
|
||||||
label2.TextAlign = ContentAlignment.MiddleLeft;
|
label2.TextAlign = ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// dialogFooter1
|
// dialogFooter1
|
||||||
//
|
//
|
||||||
dialogFooter1.BackColor = Color.FromArgb(240, 240, 240);
|
dialogFooter1.BackColor = Color.FromArgb(240, 240, 240);
|
||||||
dialogFooter1.Button1Text = "&Save";
|
|
||||||
dialogFooter1.Dialog = this;
|
|
||||||
dialogFooter1.Dock = DockStyle.Bottom;
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
|
dialogFooter1.EnableMovable = false;
|
||||||
dialogFooter1.IsBusy = false;
|
dialogFooter1.IsBusy = false;
|
||||||
dialogFooter1.Location = new Point(0, 437);
|
dialogFooter1.Location = new Point(0, 451);
|
||||||
dialogFooter1.Name = "dialogFooter1";
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
dialogFooter1.Size = new Size(384, 84);
|
dialogFooter1.Size = new Size(384, 70);
|
||||||
|
dialogFooter1.TabIndex = 0;
|
||||||
|
dialogFooter1.TabStop = false;
|
||||||
//
|
//
|
||||||
// EditFolderForm
|
// EditFolderForm
|
||||||
//
|
//
|
||||||
@ -145,20 +147,20 @@ namespace RokettoLaunch
|
|||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileModel Result
|
public App4Options.Item Result
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
result = new TileModel();
|
result = new App4Options.Item();
|
||||||
}
|
}
|
||||||
|
|
||||||
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
||||||
result.IsGroup = true;
|
result.IsGroup = true;
|
||||||
result.Items = new List<TileModel>();
|
result.Items = new List<App4Options.Item>();
|
||||||
|
|
||||||
foreach (TileModel item in listBox1.ListBox.Items.OfType<TileModel>())
|
foreach (var item in listBox1.ListBox.Items.OfType<App4Options.Item>())
|
||||||
{
|
{
|
||||||
if (item.IsGroup)
|
if (item.IsGroup)
|
||||||
{
|
{
|
||||||
@ -173,7 +175,7 @@ namespace RokettoLaunch
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void listBox1_OnAdd(object sender, EventArgs e)
|
private void ListBox_OnAdd(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var form = new EditTileForm();
|
var form = new EditTileForm();
|
||||||
if (form.ShowDialog() == DialogResult.OK)
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
@ -182,7 +184,7 @@ namespace RokettoLaunch
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listBox1_OnEdit(object sender, EventArgs e)
|
private void ListBox_OnEdit(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (listBox1.ListBox.Items.Count <= 0)
|
if (listBox1.ListBox.Items.Count <= 0)
|
||||||
{
|
{
|
||||||
@ -200,7 +202,7 @@ namespace RokettoLaunch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var form = new EditTileForm((TileModel)listBox1.ListBox.SelectedItem);
|
var form = new EditTileForm((App4Options.Item)listBox1.ListBox.SelectedItem);
|
||||||
if (form.ShowDialog() == DialogResult.OK)
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
listBox1.ListBox.Items.RemoveAt(n);
|
listBox1.ListBox.Items.RemoveAt(n);
|
||||||
@ -208,12 +210,12 @@ namespace RokettoLaunch
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listBox1_OnCopy(object sender, EventArgs e)
|
private void ListBox_OnCopy(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
listBox1.ListBox.CopyItem<TileModel>();
|
listBox1.ListBox.CopyItem<App4Options.Item>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listBox1_DragOver(object sender, DragEventArgs e)
|
private void ListBox_DragOver(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||||
{
|
{
|
||||||
@ -225,7 +227,7 @@ namespace RokettoLaunch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listBox1_DragDrop(object sender, DragEventArgs e)
|
private void ListBox_DragDrop(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
var fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
var fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
||||||
if (fileList == null)
|
if (fileList == null)
|
||||||
@ -245,34 +247,12 @@ namespace RokettoLaunch
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var model = new TileModel()
|
var model = new App4Options.Item()
|
||||||
{
|
{
|
||||||
ProcessFilename = item,
|
TargetPath = item,
|
||||||
Title = Path.GetFileName(item)
|
Title = RyzStudio.IO.File.GetName(item)
|
||||||
};
|
};
|
||||||
|
|
||||||
// exe
|
|
||||||
if (Path.GetExtension(item).Equals(".exe", StringComparison.CurrentCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
if (File.Exists(item))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(item);
|
|
||||||
if (fvi != null)
|
|
||||||
{
|
|
||||||
model.Title = fvi.ProductName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
model.Title = (string.IsNullOrWhiteSpace(model.Title) ? "Untitled" : Path.GetFileNameWithoutExtension(item));
|
|
||||||
}
|
|
||||||
|
|
||||||
listBox1.ListBox.Items.Add(model);
|
listBox1.ListBox.Items.Add(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,12 +1,13 @@
|
|||||||
using System.Windows.Forms;
|
using System;
|
||||||
using RokettoLaunch.Models;
|
using System.Windows.Forms;
|
||||||
|
using RokettoLaunch.Models.SaveFile;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
using RyzStudio.Windows.ThemedForms.PickerBox;
|
using RyzStudio.Windows.ThemedForms.PickerBox;
|
||||||
|
|
||||||
namespace RokettoLaunch
|
namespace RokettoLaunch
|
||||||
{
|
{
|
||||||
public class EditSectionForm : Form
|
public class EditGroupForm : Form
|
||||||
{
|
{
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private Label label1;
|
private Label label1;
|
||||||
@ -15,33 +16,31 @@ namespace RokettoLaunch
|
|||||||
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
|
||||||
|
|
||||||
private TileGroupModel result = null;
|
private App4Options.Group result = null;
|
||||||
|
|
||||||
|
|
||||||
public EditSectionForm(TileGroupModel model = null)
|
public EditGroupForm(App4Options.Group model = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
UISetup.Dialog(this);
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = (result == null) ? "Add Group" : "Edit Group";
|
this.Text = (result == null) ? "Add Group" : "Edit Group";
|
||||||
|
|
||||||
result = model;
|
result = model;
|
||||||
|
|
||||||
pickerBox1.ComboBox.Items.Clear();
|
pickerBox1.Setup([ "No", "Yes" ], 0);
|
||||||
pickerBox1.ComboBox.Items.AddRange(new string[] { "No", "Yes" });
|
|
||||||
if (pickerBox1.ComboBox.Items.Count > 0)
|
|
||||||
{
|
|
||||||
pickerBox1.ComboBox.SelectedIndex = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != null)
|
protected override void OnShown(EventArgs e)
|
||||||
{
|
{
|
||||||
textBox1.Text = result.Title?.Trim() ?? string.Empty;
|
base.OnShown(e);
|
||||||
pickerBox1.Value = result.IsExpanded;
|
|
||||||
}
|
textBox1.Text = result?.Title?.Trim() ?? "New Group";
|
||||||
|
pickerBox1.Value = result?.IsOpen ?? true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
textBox1 = new ThClearableTextBox();
|
textBox1 = new ThClearableTextBox();
|
||||||
@ -56,14 +55,12 @@ namespace RokettoLaunch
|
|||||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
textBox1.BackColor = System.Drawing.Color.Transparent;
|
textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
textBox1.ClearedValue = "";
|
textBox1.ClearedValue = "";
|
||||||
textBox1.EnableReactiveVisual = true;
|
textBox1.EnableMovable = false;
|
||||||
textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
|
||||||
textBox1.Icon = "O";
|
textBox1.Icon = "O";
|
||||||
textBox1.IconSize = 13F;
|
textBox1.IconSize = 13F;
|
||||||
textBox1.Location = new System.Drawing.Point(192, 20);
|
textBox1.Location = new System.Drawing.Point(115, 20);
|
||||||
textBox1.Name = "textBox1";
|
textBox1.Name = "textBox1";
|
||||||
textBox1.Padding = new Padding(4, 4, 3, 3);
|
textBox1.Size = new System.Drawing.Size(260, 32);
|
||||||
textBox1.Size = new System.Drawing.Size(177, 32);
|
|
||||||
textBox1.TabIndex = 152;
|
textBox1.TabIndex = 152;
|
||||||
textBox1.TabStop = false;
|
textBox1.TabStop = false;
|
||||||
textBox1.UseSystemPasswordChar = false;
|
textBox1.UseSystemPasswordChar = false;
|
||||||
@ -100,13 +97,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
pickerBox1.BackColor = System.Drawing.Color.Transparent;
|
pickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
pickerBox1.EnableReactiveVisual = true;
|
pickerBox1.EnableMovable = false;
|
||||||
pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
pickerBox1.Location = new System.Drawing.Point(295, 62);
|
||||||
pickerBox1.Location = new System.Drawing.Point(285, 62);
|
|
||||||
pickerBox1.Name = "pickerBox1";
|
pickerBox1.Name = "pickerBox1";
|
||||||
pickerBox1.Padding = new Padding(4, 4, 3, 3);
|
|
||||||
pickerBox1.SelectedIndex = 0;
|
pickerBox1.SelectedIndex = 0;
|
||||||
pickerBox1.Size = new System.Drawing.Size(84, 34);
|
pickerBox1.Size = new System.Drawing.Size(80, 32);
|
||||||
pickerBox1.TabIndex = 174;
|
pickerBox1.TabIndex = 174;
|
||||||
pickerBox1.TabStop = false;
|
pickerBox1.TabStop = false;
|
||||||
pickerBox1.Value = false;
|
pickerBox1.Value = false;
|
||||||
@ -114,15 +109,16 @@ namespace RokettoLaunch
|
|||||||
// dialogFooter1
|
// dialogFooter1
|
||||||
//
|
//
|
||||||
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
|
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
|
||||||
dialogFooter1.Button1Text = "&Save";
|
|
||||||
dialogFooter1.Dialog = this;
|
|
||||||
dialogFooter1.Dock = DockStyle.Bottom;
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
|
dialogFooter1.EnableMovable = false;
|
||||||
dialogFooter1.IsBusy = false;
|
dialogFooter1.IsBusy = false;
|
||||||
dialogFooter1.Location = new System.Drawing.Point(0, 437);
|
dialogFooter1.Location = new System.Drawing.Point(0, 451);
|
||||||
dialogFooter1.Name = "dialogFooter1";
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
dialogFooter1.Size = new System.Drawing.Size(384, 84);
|
dialogFooter1.Size = new System.Drawing.Size(384, 70);
|
||||||
|
dialogFooter1.TabIndex = 0;
|
||||||
|
dialogFooter1.TabStop = false;
|
||||||
//
|
//
|
||||||
// EditSectionForm
|
// EditGroupForm
|
||||||
//
|
//
|
||||||
BackColor = System.Drawing.Color.White;
|
BackColor = System.Drawing.Color.White;
|
||||||
ClientSize = new System.Drawing.Size(384, 521);
|
ClientSize = new System.Drawing.Size(384, 521);
|
||||||
@ -132,23 +128,23 @@ namespace RokettoLaunch
|
|||||||
Controls.Add(label1);
|
Controls.Add(label1);
|
||||||
Controls.Add(textBox1);
|
Controls.Add(textBox1);
|
||||||
MinimumSize = new System.Drawing.Size(400, 560);
|
MinimumSize = new System.Drawing.Size(400, 560);
|
||||||
Name = "EditSectionForm";
|
Name = "EditGroupForm";
|
||||||
Text = "Edit Section";
|
Text = "Edit Section";
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileGroupModel Result
|
public App4Options.Group Result
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
result = new TileGroupModel();
|
result = new App4Options.Group();
|
||||||
}
|
}
|
||||||
|
|
||||||
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
||||||
result.IsExpanded = pickerBox1.Value;
|
result.IsOpen = pickerBox1.Value;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
120
EditGroupForm.resx
Normal file
120
EditGroupForm.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>
|
||||||
133
EditTileForm.cs
133
EditTileForm.cs
@ -1,7 +1,8 @@
|
|||||||
using System.Diagnostics;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using RokettoLaunch.Models;
|
using RokettoLaunch.Models.SaveFile;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
using RyzStudio.Windows.ThemedForms;
|
using RyzStudio.Windows.ThemedForms;
|
||||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
@ -17,9 +18,9 @@ namespace RokettoLaunch
|
|||||||
private Label label3;
|
private Label label3;
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private Label label1;
|
private Label label1;
|
||||||
private ThPathDialogTextBox textBox2;
|
private ThPathTextBox textBox2;
|
||||||
private ThClearableTextBox textBox3;
|
private ThClearableTextBox textBox3;
|
||||||
private ThPathDialogTextBox textBox4;
|
private ThPathTextBox textBox4;
|
||||||
private ThPickerBox pickerBox1;
|
private ThPickerBox pickerBox1;
|
||||||
private ThYesNoPickerBox pickerBox2;
|
private ThYesNoPickerBox pickerBox2;
|
||||||
private THorizontalSeparator horizontalSeparator1;
|
private THorizontalSeparator horizontalSeparator1;
|
||||||
@ -27,32 +28,32 @@ namespace RokettoLaunch
|
|||||||
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
|
||||||
|
|
||||||
private TileModel result = null;
|
private App4Options.Item result = null;
|
||||||
|
|
||||||
|
|
||||||
public EditTileForm(TileModel model = null)
|
public EditTileForm(App4Options.Item model = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
UISetup.Dialog(this);
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = (result == null) ? "Add Tile" : "Edit Tile";
|
this.Text = (result == null) ? "Add Tile" : "Edit Tile";
|
||||||
|
|
||||||
result = model;
|
result = model;
|
||||||
|
|
||||||
pickerBox1.ComboBox.Items.Clear();
|
pickerBox1.Setup([ "Normal", "Hidden", "Minimized", "Maximized" ], 0);
|
||||||
pickerBox1.ComboBox.Items.AddRange(new string[] { "Normal", "Hidden", "Minimized", "Maximized" });
|
|
||||||
if (pickerBox1.ComboBox.Items.Count > 0)
|
|
||||||
{
|
|
||||||
pickerBox1.ComboBox.SelectedIndex = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnShown(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnShown(e);
|
||||||
|
|
||||||
textBox1.Text = result?.Title ?? "New Tile";
|
textBox1.Text = result?.Title ?? "New Tile";
|
||||||
textBox2.Text = result?.ProcessFilename ?? string.Empty;
|
textBox2.Text = result?.TargetPath ?? string.Empty;
|
||||||
textBox3.Text = result?.ProcessArgument ?? string.Empty;
|
textBox3.Text = result?.Argument ?? string.Empty;
|
||||||
textBox4.Text = result?.ProcessWorkingDirectory ?? string.Empty;
|
textBox4.Text = result?.ResolvedStartPath ?? string.Empty;
|
||||||
pickerBox1.ComboBox.SelectedIndex = (int)(result?.ProcessWindowStyle ?? ProcessWindowStyle.Normal);
|
pickerBox1.Value = (int)(result?.WindowStyle ?? ProcessWindowStyle.Normal);
|
||||||
pickerBox2.Value = result?.ProcessAsAdmin ?? false;
|
pickerBox2.Value = result?.RunAsAdmin ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
@ -64,9 +65,9 @@ namespace RokettoLaunch
|
|||||||
label3 = new Label();
|
label3 = new Label();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
textBox2 = new ThPathDialogTextBox();
|
textBox2 = new ThPathTextBox();
|
||||||
textBox3 = new ThClearableTextBox();
|
textBox3 = new ThClearableTextBox();
|
||||||
textBox4 = new ThPathDialogTextBox();
|
textBox4 = new ThPathTextBox();
|
||||||
pickerBox1 = new ThPickerBox();
|
pickerBox1 = new ThPickerBox();
|
||||||
pickerBox2 = new ThYesNoPickerBox();
|
pickerBox2 = new ThYesNoPickerBox();
|
||||||
horizontalSeparator1 = new THorizontalSeparator();
|
horizontalSeparator1 = new THorizontalSeparator();
|
||||||
@ -78,13 +79,12 @@ namespace RokettoLaunch
|
|||||||
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
textBox1.BackColor = Color.Transparent;
|
textBox1.BackColor = Color.Transparent;
|
||||||
textBox1.ClearedValue = "";
|
textBox1.ClearedValue = "";
|
||||||
textBox1.EnableReactiveVisual = true;
|
textBox1.EnableMovable = false;
|
||||||
textBox1.Font = new Font("Segoe UI", 9F);
|
|
||||||
textBox1.Icon = "O";
|
textBox1.Icon = "O";
|
||||||
textBox1.IconSize = 13F;
|
textBox1.IconSize = 13F;
|
||||||
textBox1.Location = new Point(109, 20);
|
textBox1.Location = new Point(95, 20);
|
||||||
textBox1.Name = "textBox1";
|
textBox1.Name = "textBox1";
|
||||||
textBox1.Size = new Size(260, 32);
|
textBox1.Size = new Size(280, 32);
|
||||||
textBox1.TabIndex = 152;
|
textBox1.TabIndex = 152;
|
||||||
textBox1.TabStop = false;
|
textBox1.TabStop = false;
|
||||||
textBox1.UseSystemPasswordChar = false;
|
textBox1.UseSystemPasswordChar = false;
|
||||||
@ -94,7 +94,7 @@ namespace RokettoLaunch
|
|||||||
label6.AutoSize = true;
|
label6.AutoSize = true;
|
||||||
label6.BackColor = Color.Transparent;
|
label6.BackColor = Color.Transparent;
|
||||||
label6.ForeColor = SystemColors.ControlText;
|
label6.ForeColor = SystemColors.ControlText;
|
||||||
label6.Location = new Point(10, 264);
|
label6.Location = new Point(10, 242);
|
||||||
label6.Margin = new Padding(0);
|
label6.Margin = new Padding(0);
|
||||||
label6.Name = "label6";
|
label6.Name = "label6";
|
||||||
label6.Padding = new Padding(0, 9, 0, 0);
|
label6.Padding = new Padding(0, 9, 0, 0);
|
||||||
@ -108,7 +108,7 @@ namespace RokettoLaunch
|
|||||||
label7.AutoSize = true;
|
label7.AutoSize = true;
|
||||||
label7.BackColor = Color.Transparent;
|
label7.BackColor = Color.Transparent;
|
||||||
label7.ForeColor = SystemColors.ControlText;
|
label7.ForeColor = SystemColors.ControlText;
|
||||||
label7.Location = new Point(10, 220);
|
label7.Location = new Point(10, 200);
|
||||||
label7.Margin = new Padding(0);
|
label7.Margin = new Padding(0);
|
||||||
label7.Name = "label7";
|
label7.Name = "label7";
|
||||||
label7.Padding = new Padding(0, 9, 0, 0);
|
label7.Padding = new Padding(0, 9, 0, 0);
|
||||||
@ -126,9 +126,9 @@ namespace RokettoLaunch
|
|||||||
label4.Margin = new Padding(0);
|
label4.Margin = new Padding(0);
|
||||||
label4.Name = "label4";
|
label4.Name = "label4";
|
||||||
label4.Padding = new Padding(0, 9, 0, 0);
|
label4.Padding = new Padding(0, 9, 0, 0);
|
||||||
label4.Size = new Size(103, 24);
|
label4.Size = new Size(82, 24);
|
||||||
label4.TabIndex = 159;
|
label4.TabIndex = 159;
|
||||||
label4.Text = "Working Directory";
|
label4.Text = "Start Directory";
|
||||||
label4.TextAlign = ContentAlignment.MiddleLeft;
|
label4.TextAlign = ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// label3
|
// label3
|
||||||
@ -177,16 +177,13 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
textBox2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
textBox2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
textBox2.BackColor = Color.Transparent;
|
textBox2.BackColor = Color.Transparent;
|
||||||
textBox2.DialogMode = ThPathDialogTextBox.DialogType.OpenFile;
|
textBox2.DialogMode = ThPathTextBox.DialogType.OpenFile;
|
||||||
textBox2.EnableReactiveVisual = true;
|
textBox2.EnableMovable = false;
|
||||||
textBox2.FolderBrowserDialog = null;
|
textBox2.FolderBrowserDialog = null;
|
||||||
textBox2.Font = new Font("Segoe UI", 9F);
|
textBox2.Icon = "D";
|
||||||
textBox2.Icon = "C";
|
|
||||||
textBox2.IconSize = 13F;
|
textBox2.IconSize = 13F;
|
||||||
textBox2.Location = new Point(109, 62);
|
textBox2.Location = new Point(115, 62);
|
||||||
textBox2.Name = "textBox2";
|
textBox2.Name = "textBox2";
|
||||||
textBox2.OpenFileDialog = null;
|
|
||||||
textBox2.SaveFileDialog = null;
|
|
||||||
textBox2.Size = new Size(260, 32);
|
textBox2.Size = new Size(260, 32);
|
||||||
textBox2.TabIndex = 170;
|
textBox2.TabIndex = 170;
|
||||||
textBox2.TabStop = false;
|
textBox2.TabStop = false;
|
||||||
@ -197,13 +194,12 @@ namespace RokettoLaunch
|
|||||||
textBox3.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
textBox3.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
textBox3.BackColor = Color.Transparent;
|
textBox3.BackColor = Color.Transparent;
|
||||||
textBox3.ClearedValue = "";
|
textBox3.ClearedValue = "";
|
||||||
textBox3.EnableReactiveVisual = true;
|
textBox3.EnableMovable = false;
|
||||||
textBox3.Font = new Font("Segoe UI", 9F);
|
|
||||||
textBox3.Icon = "O";
|
textBox3.Icon = "O";
|
||||||
textBox3.IconSize = 13F;
|
textBox3.IconSize = 13F;
|
||||||
textBox3.Location = new Point(149, 104);
|
textBox3.Location = new Point(135, 104);
|
||||||
textBox3.Name = "textBox3";
|
textBox3.Name = "textBox3";
|
||||||
textBox3.Size = new Size(220, 32);
|
textBox3.Size = new Size(240, 32);
|
||||||
textBox3.TabIndex = 171;
|
textBox3.TabIndex = 171;
|
||||||
textBox3.TabStop = false;
|
textBox3.TabStop = false;
|
||||||
textBox3.UseSystemPasswordChar = false;
|
textBox3.UseSystemPasswordChar = false;
|
||||||
@ -212,17 +208,14 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
textBox4.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
textBox4.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
textBox4.BackColor = Color.Transparent;
|
textBox4.BackColor = Color.Transparent;
|
||||||
textBox4.DialogMode = ThPathDialogTextBox.DialogType.FolderBrowser;
|
textBox4.DialogMode = ThPathTextBox.DialogType.FolderBrowser;
|
||||||
textBox4.EnableReactiveVisual = true;
|
textBox4.EnableMovable = false;
|
||||||
textBox4.FolderBrowserDialog = null;
|
textBox4.FolderBrowserDialog = null;
|
||||||
textBox4.Font = new Font("Segoe UI", 9F);
|
|
||||||
textBox4.Icon = "D";
|
textBox4.Icon = "D";
|
||||||
textBox4.IconSize = 13F;
|
textBox4.IconSize = 13F;
|
||||||
textBox4.Location = new Point(149, 146);
|
textBox4.Location = new Point(135, 146);
|
||||||
textBox4.Name = "textBox4";
|
textBox4.Name = "textBox4";
|
||||||
textBox4.OpenFileDialog = null;
|
textBox4.Size = new Size(240, 32);
|
||||||
textBox4.SaveFileDialog = null;
|
|
||||||
textBox4.Size = new Size(220, 32);
|
|
||||||
textBox4.TabIndex = 172;
|
textBox4.TabIndex = 172;
|
||||||
textBox4.TabStop = false;
|
textBox4.TabStop = false;
|
||||||
textBox4.UseSystemPasswordChar = false;
|
textBox4.UseSystemPasswordChar = false;
|
||||||
@ -231,12 +224,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
pickerBox1.BackColor = Color.Transparent;
|
pickerBox1.BackColor = Color.Transparent;
|
||||||
pickerBox1.EnableReactiveVisual = true;
|
pickerBox1.EnableMovable = false;
|
||||||
pickerBox1.Font = new Font("Segoe UI", 9F);
|
pickerBox1.Location = new Point(255, 200);
|
||||||
pickerBox1.Location = new Point(249, 220);
|
|
||||||
pickerBox1.Name = "pickerBox1";
|
pickerBox1.Name = "pickerBox1";
|
||||||
pickerBox1.SelectedIndex = -1;
|
pickerBox1.SelectedIndex = -1;
|
||||||
pickerBox1.Size = new Size(120, 34);
|
pickerBox1.Size = new Size(120, 32);
|
||||||
pickerBox1.TabIndex = 174;
|
pickerBox1.TabIndex = 174;
|
||||||
pickerBox1.TabStop = false;
|
pickerBox1.TabStop = false;
|
||||||
//
|
//
|
||||||
@ -244,12 +236,11 @@ namespace RokettoLaunch
|
|||||||
//
|
//
|
||||||
pickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
pickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
pickerBox2.BackColor = Color.Transparent;
|
pickerBox2.BackColor = Color.Transparent;
|
||||||
pickerBox2.EnableReactiveVisual = true;
|
pickerBox2.EnableMovable = false;
|
||||||
pickerBox2.Font = new Font("Segoe UI", 9F);
|
pickerBox2.Location = new Point(295, 242);
|
||||||
pickerBox2.Location = new Point(289, 264);
|
|
||||||
pickerBox2.Name = "pickerBox2";
|
pickerBox2.Name = "pickerBox2";
|
||||||
pickerBox2.SelectedIndex = 0;
|
pickerBox2.SelectedIndex = 0;
|
||||||
pickerBox2.Size = new Size(80, 34);
|
pickerBox2.Size = new Size(80, 32);
|
||||||
pickerBox2.TabIndex = 175;
|
pickerBox2.TabIndex = 175;
|
||||||
pickerBox2.TabStop = false;
|
pickerBox2.TabStop = false;
|
||||||
pickerBox2.Value = false;
|
pickerBox2.Value = false;
|
||||||
@ -257,27 +248,21 @@ namespace RokettoLaunch
|
|||||||
// horizontalSeparator1
|
// horizontalSeparator1
|
||||||
//
|
//
|
||||||
horizontalSeparator1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
horizontalSeparator1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
horizontalSeparator1.AutoScrollMargin = new Size(0, 0);
|
horizontalSeparator1.Location = new Point(5, 183);
|
||||||
horizontalSeparator1.AutoScrollMinSize = new Size(0, 0);
|
|
||||||
horizontalSeparator1.BackColor = Color.Transparent;
|
|
||||||
horizontalSeparator1.Location = new Point(10, 187);
|
|
||||||
horizontalSeparator1.Margin = new Padding(0, 10, 0, 0);
|
|
||||||
horizontalSeparator1.MaximumSize = new Size(4920, 2);
|
|
||||||
horizontalSeparator1.MinimumSize = new Size(0, 22);
|
|
||||||
horizontalSeparator1.Name = "horizontalSeparator1";
|
horizontalSeparator1.Name = "horizontalSeparator1";
|
||||||
horizontalSeparator1.Size = new Size(364, 22);
|
horizontalSeparator1.Size = new Size(375, 10);
|
||||||
horizontalSeparator1.TabIndex = 176;
|
|
||||||
horizontalSeparator1.TabStop = false;
|
|
||||||
//
|
//
|
||||||
// dialogFooter1
|
// dialogFooter1
|
||||||
//
|
//
|
||||||
dialogFooter1.BackColor = Color.FromArgb(240, 240, 240);
|
dialogFooter1.BackColor = Color.FromArgb(240, 240, 240);
|
||||||
dialogFooter1.Button1Text = "&Save";
|
|
||||||
dialogFooter1.Dialog = this;
|
|
||||||
dialogFooter1.Dock = DockStyle.Bottom;
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
dialogFooter1.Location = new Point(0, 437);
|
dialogFooter1.EnableMovable = false;
|
||||||
|
dialogFooter1.IsBusy = false;
|
||||||
|
dialogFooter1.Location = new Point(0, 451);
|
||||||
dialogFooter1.Name = "dialogFooter1";
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
dialogFooter1.Size = new Size(384, 84);
|
dialogFooter1.Size = new Size(384, 70);
|
||||||
|
dialogFooter1.TabIndex = 0;
|
||||||
|
dialogFooter1.TabStop = false;
|
||||||
//
|
//
|
||||||
// EditTileForm
|
// EditTileForm
|
||||||
//
|
//
|
||||||
@ -304,21 +289,21 @@ namespace RokettoLaunch
|
|||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileModel Result
|
public App4Options.Item Result
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
result = new TileModel();
|
result = new App4Options.Item();
|
||||||
}
|
}
|
||||||
|
|
||||||
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
result.Title = textBox1.Text?.Trim() ?? string.Empty;
|
||||||
result.ProcessFilename = textBox2.Text?.Trim() ?? string.Empty;
|
result.TargetPath = textBox2.Text?.Trim() ?? string.Empty;
|
||||||
result.ProcessArgument = textBox3.Text?.Trim() ?? string.Empty;
|
result.Argument = textBox3.Text?.Trim() ?? string.Empty;
|
||||||
result.ProcessWorkingDirectory = textBox4.Text?.Trim();
|
result.StartPath = textBox4.Text?.Trim();
|
||||||
result.ProcessWindowStyle = (System.Diagnostics.ProcessWindowStyle)pickerBox1.ComboBox.SelectedIndex;
|
result.WindowStyle = (ProcessWindowStyle)pickerBox1.ComboBox.SelectedIndex;
|
||||||
result.ProcessAsAdmin = pickerBox2.Value;
|
result.RunAsAdmin = pickerBox2.Value;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
321
LoadingForm.cs
Normal file
321
LoadingForm.cs
Normal file
@ -0,0 +1,321 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using RokettoLaunch.Models.SaveFile;
|
||||||
|
using RyzStudio.Windows.Forms;
|
||||||
|
|
||||||
|
namespace RokettoLaunch
|
||||||
|
{
|
||||||
|
public class LoadingForm : Form
|
||||||
|
{
|
||||||
|
private TProgressBar progressBar1;
|
||||||
|
private RyzStudio.Windows.ThemedForms.ThUserControl userControl1;
|
||||||
|
private RyzStudio.Windows.ThemedForms.ThUserControl userControl2;
|
||||||
|
private TProgressBar progressBar2;
|
||||||
|
|
||||||
|
private App4Options result = null;
|
||||||
|
private Label label1;
|
||||||
|
private Label label2;
|
||||||
|
private string loadFilename = "";
|
||||||
|
|
||||||
|
|
||||||
|
public LoadingForm()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
|
this.Text = "Loading";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
progressBar1 = new TProgressBar();
|
||||||
|
userControl1 = new RyzStudio.Windows.ThemedForms.ThUserControl();
|
||||||
|
userControl2 = new RyzStudio.Windows.ThemedForms.ThUserControl();
|
||||||
|
progressBar2 = new TProgressBar();
|
||||||
|
label1 = new Label();
|
||||||
|
label2 = new Label();
|
||||||
|
userControl1.SuspendLayout();
|
||||||
|
userControl2.SuspendLayout();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// progressBar1
|
||||||
|
//
|
||||||
|
progressBar1.BarColour = System.Drawing.Color.FromArgb(158, 225, 249);
|
||||||
|
progressBar1.Dock = DockStyle.Fill;
|
||||||
|
progressBar1.EnableMovable = false;
|
||||||
|
progressBar1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
progressBar1.Maximum = 100;
|
||||||
|
progressBar1.Minimum = 0;
|
||||||
|
progressBar1.Name = "progressBar1";
|
||||||
|
progressBar1.OnProgressChanged = null;
|
||||||
|
progressBar1.ShowText = true;
|
||||||
|
progressBar1.Size = new System.Drawing.Size(418, 18);
|
||||||
|
progressBar1.TabIndex = 156;
|
||||||
|
progressBar1.Value = 25;
|
||||||
|
//
|
||||||
|
// userControl1
|
||||||
|
//
|
||||||
|
userControl1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
userControl1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
userControl1.Controls.Add(progressBar1);
|
||||||
|
userControl1.EnableMovable = false;
|
||||||
|
userControl1.Location = new System.Drawing.Point(10, 64);
|
||||||
|
userControl1.Name = "userControl1";
|
||||||
|
userControl1.Size = new System.Drawing.Size(424, 24);
|
||||||
|
userControl1.TabIndex = 157;
|
||||||
|
//
|
||||||
|
// userControl2
|
||||||
|
//
|
||||||
|
userControl2.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
userControl2.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
userControl2.Controls.Add(progressBar2);
|
||||||
|
userControl2.EnableMovable = false;
|
||||||
|
userControl2.Location = new System.Drawing.Point(10, 98);
|
||||||
|
userControl2.Name = "userControl2";
|
||||||
|
userControl2.Size = new System.Drawing.Size(424, 24);
|
||||||
|
userControl2.TabIndex = 158;
|
||||||
|
//
|
||||||
|
// progressBar2
|
||||||
|
//
|
||||||
|
progressBar2.BarColour = System.Drawing.Color.FromArgb(158, 225, 249);
|
||||||
|
progressBar2.Dock = DockStyle.Fill;
|
||||||
|
progressBar2.EnableMovable = false;
|
||||||
|
progressBar2.Location = new System.Drawing.Point(3, 3);
|
||||||
|
progressBar2.Maximum = 100;
|
||||||
|
progressBar2.Minimum = 0;
|
||||||
|
progressBar2.Name = "progressBar2";
|
||||||
|
progressBar2.OnProgressChanged = null;
|
||||||
|
progressBar2.ShowText = true;
|
||||||
|
progressBar2.Size = new System.Drawing.Size(418, 18);
|
||||||
|
progressBar2.TabIndex = 156;
|
||||||
|
progressBar2.Value = 25;
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new System.Drawing.Point(10, 20);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new System.Drawing.Size(59, 15);
|
||||||
|
label1.TabIndex = 159;
|
||||||
|
label1.Text = "Loading...";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new System.Drawing.Point(10, 40);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new System.Drawing.Size(59, 15);
|
||||||
|
label2.TabIndex = 160;
|
||||||
|
label2.Text = "Loading...";
|
||||||
|
//
|
||||||
|
// LoadingForm
|
||||||
|
//
|
||||||
|
BackColor = System.Drawing.Color.White;
|
||||||
|
ClientSize = new System.Drawing.Size(444, 141);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Controls.Add(userControl2);
|
||||||
|
Controls.Add(userControl1);
|
||||||
|
Name = "LoadingForm";
|
||||||
|
Text = "Edit Section";
|
||||||
|
userControl1.ResumeLayout(false);
|
||||||
|
userControl2.ResumeLayout(false);
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async override void OnShown(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnShown(e);
|
||||||
|
|
||||||
|
await Task.Run(async () =>
|
||||||
|
{
|
||||||
|
this.Clear();
|
||||||
|
|
||||||
|
UIControl.SetText(label1, "Loading...");
|
||||||
|
UIControl.SetText(label2, "... " + Path.GetFileName(loadFilename));
|
||||||
|
|
||||||
|
var newSession = await LoadSaveSessionWithVersion(loadFilename);
|
||||||
|
|
||||||
|
// Update progress bars
|
||||||
|
progressBar1.Maximum = newSession.Groups?.Count ?? 0;
|
||||||
|
progressBar2.Maximum = 0;
|
||||||
|
|
||||||
|
UIControl.SetText(label1, "Counting...");
|
||||||
|
UIControl.SetText(label2, "");
|
||||||
|
|
||||||
|
foreach (var group in newSession?.Groups ?? new List<App4Options.Group>())
|
||||||
|
{
|
||||||
|
UIControl.SetText(label2, "... " + group.Title);
|
||||||
|
|
||||||
|
foreach (var item in group?.Items ?? new List<App4Options.Item>())
|
||||||
|
{
|
||||||
|
if (item.IsGroup)
|
||||||
|
{
|
||||||
|
progressBar2.Maximum += item.Items?.Count ?? 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
progressBar2.Maximum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolve paths
|
||||||
|
progressBar2.Value = 0;
|
||||||
|
|
||||||
|
UIControl.SetText(label1, "Seeking...");
|
||||||
|
UIControl.SetText(label2, "");
|
||||||
|
|
||||||
|
// Resolve paths
|
||||||
|
foreach (var group in newSession?.Groups ?? new List<App4Options.Group>())
|
||||||
|
{
|
||||||
|
foreach (var item in group?.Items ?? new List<App4Options.Item>())
|
||||||
|
{
|
||||||
|
progressBar1.Value++;
|
||||||
|
|
||||||
|
UIControl.SetText(label2, "... " + group.Title);
|
||||||
|
|
||||||
|
if (item.IsGroup)
|
||||||
|
{
|
||||||
|
foreach (var subItem in item.Items ?? new List<App4Options.Item>())
|
||||||
|
{
|
||||||
|
progressBar2.Value++;
|
||||||
|
|
||||||
|
UIControl.SetText(label2, "... " + subItem.Title);
|
||||||
|
|
||||||
|
subItem.ResolvePaths();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
progressBar2.Value++;
|
||||||
|
|
||||||
|
UIControl.SetText(label2, "... " + item.Title);
|
||||||
|
|
||||||
|
item.ResolvePaths();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result = newSession;
|
||||||
|
|
||||||
|
UIControl.SetText(label1, "Done");
|
||||||
|
UIControl.SetText(label2, "Done");
|
||||||
|
});
|
||||||
|
|
||||||
|
this.DialogResult = DialogResult.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnFormClosing(e);
|
||||||
|
|
||||||
|
if (this.DialogResult != DialogResult.OK)
|
||||||
|
{
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public App4Options Result
|
||||||
|
{
|
||||||
|
get => result ?? new App4Options();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<DialogResult> ShowDialog(string filename)
|
||||||
|
{
|
||||||
|
loadFilename = filename;
|
||||||
|
|
||||||
|
return this.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Clear()
|
||||||
|
{
|
||||||
|
UIControl.SetText(label1, "Ready");
|
||||||
|
UIControl.SetText(label2, "");
|
||||||
|
|
||||||
|
progressBar1.Value = progressBar1.Maximum = 0;
|
||||||
|
progressBar2.Value = progressBar2.Maximum = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<App4Options> LoadSaveSessionWithVersion(string filename)
|
||||||
|
{
|
||||||
|
var result = new App4Options();
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(filename))
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
var fileExtension = Path.GetExtension(filename?.ToLower()?.Trim() ?? string.Empty);
|
||||||
|
if (string.IsNullOrWhiteSpace(fileExtension))
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load session, assume version 3.
|
||||||
|
App3Options loadSession = null;
|
||||||
|
switch (fileExtension)
|
||||||
|
{
|
||||||
|
case ".json":
|
||||||
|
case ".jsonfig":
|
||||||
|
loadSession = await RyzStudio.Text.Json.JsonSerialiser.DeserialiseFile<App3Options>(filename);
|
||||||
|
break;
|
||||||
|
case ".jsnx":
|
||||||
|
loadSession = await RyzStudio.IO.Compression.ZFile.ReadFile<App3Options>(filename, "Document.json");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loadSession == null)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// File likely not correct schema.
|
||||||
|
if (loadSession.FileVersion <= 0)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load session, if version 4.
|
||||||
|
if (loadSession.FileVersion == 4)
|
||||||
|
{
|
||||||
|
switch (fileExtension)
|
||||||
|
{
|
||||||
|
case ".json":
|
||||||
|
case ".jsonfig":
|
||||||
|
result = await RyzStudio.Text.Json.JsonSerialiser.DeserialiseFile<App4Options>(filename);
|
||||||
|
break;
|
||||||
|
case ".jsnx":
|
||||||
|
result = await RyzStudio.IO.Compression.ZFile.ReadFile<App4Options>(filename, "Document.json");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
return new App4Options();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert version 3 to 4.
|
||||||
|
if (loadSession.FileVersion == 3)
|
||||||
|
{
|
||||||
|
result.Load(loadSession);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
120
LoadingForm.resx
Normal file
120
LoadingForm.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>
|
||||||
109
MainForm.Designer.cs
generated
109
MainForm.Designer.cs
generated
@ -102,7 +102,7 @@ namespace RokettoLaunch
|
|||||||
notifyIcon1.Icon = (System.Drawing.Icon)resources.GetObject("notifyIcon1.Icon");
|
notifyIcon1.Icon = (System.Drawing.Icon)resources.GetObject("notifyIcon1.Icon");
|
||||||
notifyIcon1.Text = "notifyIcon1";
|
notifyIcon1.Text = "notifyIcon1";
|
||||||
notifyIcon1.Visible = true;
|
notifyIcon1.Visible = true;
|
||||||
notifyIcon1.MouseClick += notifyIcon1_MouseClick;
|
notifyIcon1.MouseClick += NotifyIcon_MouseClick;
|
||||||
//
|
//
|
||||||
// contextMenuStrip2
|
// contextMenuStrip2
|
||||||
//
|
//
|
||||||
@ -115,16 +115,16 @@ namespace RokettoLaunch
|
|||||||
exitToolStripMenuItem1.Name = "exitToolStripMenuItem1";
|
exitToolStripMenuItem1.Name = "exitToolStripMenuItem1";
|
||||||
exitToolStripMenuItem1.Size = new System.Drawing.Size(93, 22);
|
exitToolStripMenuItem1.Size = new System.Drawing.Size(93, 22);
|
||||||
exitToolStripMenuItem1.Text = "E&xit";
|
exitToolStripMenuItem1.Text = "E&xit";
|
||||||
exitToolStripMenuItem1.Click += exitToolStripMenuItem1_Click;
|
exitToolStripMenuItem1.Click += NotifyExitToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
//
|
//
|
||||||
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, toolStripMenuItem1, viewToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem1 });
|
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, toolStripMenuItem1, viewToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem1 });
|
||||||
menuStrip1.Location = new System.Drawing.Point(0, 0);
|
menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
menuStrip1.Name = "menuStrip1";
|
menuStrip1.Name = "menuStrip1";
|
||||||
menuStrip1.Size = new System.Drawing.Size(404, 24);
|
menuStrip1.Size = new System.Drawing.Size(642, 24);
|
||||||
menuStrip1.TabIndex = 2;
|
menuStrip1.TabIndex = 2;
|
||||||
menuStrip1.MenuActivate += menuStrip1_MenuActivate;
|
menuStrip1.MenuActivate += MainMenuStrip_MenuActivate;
|
||||||
//
|
//
|
||||||
// fileToolStripMenuItem
|
// fileToolStripMenuItem
|
||||||
//
|
//
|
||||||
@ -140,7 +140,7 @@ namespace RokettoLaunch
|
|||||||
newToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N;
|
newToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N;
|
||||||
newToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
newToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||||
newToolStripMenuItem.Text = "&New";
|
newToolStripMenuItem.Text = "&New";
|
||||||
newToolStripMenuItem.Click += newToolStripMenuItem_Click;
|
newToolStripMenuItem.Click += NewToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// openToolStripMenuItem
|
// openToolStripMenuItem
|
||||||
//
|
//
|
||||||
@ -149,7 +149,7 @@ namespace RokettoLaunch
|
|||||||
openToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O;
|
openToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O;
|
||||||
openToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
openToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||||
openToolStripMenuItem.Text = "&Open";
|
openToolStripMenuItem.Text = "&Open";
|
||||||
openToolStripMenuItem.Click += openToolStripMenuItem_Click;
|
openToolStripMenuItem.Click += OpenToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem13
|
// toolStripMenuItem13
|
||||||
//
|
//
|
||||||
@ -161,7 +161,7 @@ namespace RokettoLaunch
|
|||||||
closeToolStripMenuItem.Name = "closeToolStripMenuItem";
|
closeToolStripMenuItem.Name = "closeToolStripMenuItem";
|
||||||
closeToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
closeToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||||
closeToolStripMenuItem.Text = "&Close";
|
closeToolStripMenuItem.Text = "&Close";
|
||||||
closeToolStripMenuItem.Click += closeToolStripMenuItem_Click;
|
closeToolStripMenuItem.Click += CloseToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem14
|
// toolStripMenuItem14
|
||||||
//
|
//
|
||||||
@ -175,14 +175,14 @@ namespace RokettoLaunch
|
|||||||
saveToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S;
|
saveToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S;
|
||||||
saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
saveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||||
saveToolStripMenuItem.Text = "&Save";
|
saveToolStripMenuItem.Text = "&Save";
|
||||||
saveToolStripMenuItem.Click += saveToolStripMenuItem_Click;
|
saveToolStripMenuItem.Click += SaveToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// saveAsToolStripMenuItem
|
// saveAsToolStripMenuItem
|
||||||
//
|
//
|
||||||
saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||||
saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||||
saveAsToolStripMenuItem.Text = "Save &As...";
|
saveAsToolStripMenuItem.Text = "Save &As...";
|
||||||
saveAsToolStripMenuItem.Click += saveAsToolStripMenuItem_Click;
|
saveAsToolStripMenuItem.Click += SaveAsToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem15
|
// toolStripMenuItem15
|
||||||
//
|
//
|
||||||
@ -194,7 +194,7 @@ namespace RokettoLaunch
|
|||||||
exitToolStripMenuItem2.Name = "exitToolStripMenuItem2";
|
exitToolStripMenuItem2.Name = "exitToolStripMenuItem2";
|
||||||
exitToolStripMenuItem2.Size = new System.Drawing.Size(146, 22);
|
exitToolStripMenuItem2.Size = new System.Drawing.Size(146, 22);
|
||||||
exitToolStripMenuItem2.Text = "E&xit";
|
exitToolStripMenuItem2.Text = "E&xit";
|
||||||
exitToolStripMenuItem2.Click += exitToolStripMenuItem2_Click;
|
exitToolStripMenuItem2.Click += ExitToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem1
|
// toolStripMenuItem1
|
||||||
//
|
//
|
||||||
@ -206,9 +206,9 @@ namespace RokettoLaunch
|
|||||||
// addGroupToolStripMenuItem
|
// addGroupToolStripMenuItem
|
||||||
//
|
//
|
||||||
addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem";
|
addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem";
|
||||||
addGroupToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
|
addGroupToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
addGroupToolStripMenuItem.Text = "&Add Section";
|
addGroupToolStripMenuItem.Text = "&Add Group";
|
||||||
addGroupToolStripMenuItem.Click += addGroupToolStripMenuItem_Click;
|
addGroupToolStripMenuItem.Click += AddGroupToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// viewToolStripMenuItem
|
// viewToolStripMenuItem
|
||||||
//
|
//
|
||||||
@ -220,16 +220,16 @@ namespace RokettoLaunch
|
|||||||
// showBigIconsToolStripMenuItem
|
// showBigIconsToolStripMenuItem
|
||||||
//
|
//
|
||||||
showBigIconsToolStripMenuItem.Name = "showBigIconsToolStripMenuItem";
|
showBigIconsToolStripMenuItem.Name = "showBigIconsToolStripMenuItem";
|
||||||
showBigIconsToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
|
showBigIconsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
showBigIconsToolStripMenuItem.Text = "Show &Big Icons";
|
showBigIconsToolStripMenuItem.Text = "Show &Big Icons";
|
||||||
showBigIconsToolStripMenuItem.Click += showBigIconsToolStripMenuItem_Click;
|
showBigIconsToolStripMenuItem.Click += ShowBigIconsToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// alwaysOnTopToolStripMenuItem
|
// alwaysOnTopToolStripMenuItem
|
||||||
//
|
//
|
||||||
alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
|
alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
|
||||||
alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
|
alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
alwaysOnTopToolStripMenuItem.Text = "Always On &Top";
|
alwaysOnTopToolStripMenuItem.Text = "Always On &Top";
|
||||||
alwaysOnTopToolStripMenuItem.Click += alwaysOnTopToolStripMenuItem_Click;
|
alwaysOnTopToolStripMenuItem.Click += AlwaysOnTopToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolsToolStripMenuItem
|
// toolsToolStripMenuItem
|
||||||
//
|
//
|
||||||
@ -245,7 +245,7 @@ namespace RokettoLaunch
|
|||||||
optionsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12;
|
optionsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12;
|
||||||
optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
|
||||||
optionsToolStripMenuItem.Text = "&Options";
|
optionsToolStripMenuItem.Text = "&Options";
|
||||||
optionsToolStripMenuItem.Click += optionsToolStripMenuItem_Click;
|
optionsToolStripMenuItem.Click += OptionsToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// helpToolStripMenuItem1
|
// helpToolStripMenuItem1
|
||||||
//
|
//
|
||||||
@ -261,7 +261,7 @@ namespace RokettoLaunch
|
|||||||
viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1;
|
||||||
viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||||
viewHelpToolStripMenuItem1.Text = "&View Help";
|
viewHelpToolStripMenuItem1.Text = "&View Help";
|
||||||
viewHelpToolStripMenuItem1.Click += viewHelpToolStripMenuItem1_Click;
|
viewHelpToolStripMenuItem1.Click += ViewHelpToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem16
|
// toolStripMenuItem16
|
||||||
//
|
//
|
||||||
@ -273,93 +273,93 @@ namespace RokettoLaunch
|
|||||||
aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
|
aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
|
||||||
aboutToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
aboutToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
|
||||||
aboutToolStripMenuItem1.Text = "&About";
|
aboutToolStripMenuItem1.Text = "&About";
|
||||||
aboutToolStripMenuItem1.Click += aboutToolStripMenuItem1_Click;
|
aboutToolStripMenuItem1.Click += AboutToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// tileContainerMenu1
|
// tileContainerMenu1
|
||||||
//
|
//
|
||||||
tileContainerMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { addGroupToolStripMenuItem1, toolStripMenuItem4, editToolStripMenuItem, toolStripMenuItem5, toolStripSeparator1, toolStripMenuItem3, toolStripSeparator3, removeToolStripMenuItem });
|
tileContainerMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { addGroupToolStripMenuItem1, toolStripMenuItem4, editToolStripMenuItem, toolStripMenuItem5, toolStripSeparator1, toolStripMenuItem3, toolStripSeparator3, removeToolStripMenuItem });
|
||||||
tileContainerMenu1.Name = "tileContainerMenu1";
|
tileContainerMenu1.Name = "tileContainerMenu1";
|
||||||
tileContainerMenu1.Size = new System.Drawing.Size(181, 170);
|
tileContainerMenu1.Size = new System.Drawing.Size(133, 148);
|
||||||
//
|
//
|
||||||
// addGroupToolStripMenuItem1
|
// addGroupToolStripMenuItem1
|
||||||
//
|
//
|
||||||
addGroupToolStripMenuItem1.Name = "addGroupToolStripMenuItem1";
|
addGroupToolStripMenuItem1.Name = "addGroupToolStripMenuItem1";
|
||||||
addGroupToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
|
addGroupToolStripMenuItem1.Size = new System.Drawing.Size(132, 22);
|
||||||
addGroupToolStripMenuItem1.Text = "&Add Tile";
|
addGroupToolStripMenuItem1.Text = "&Add Tile";
|
||||||
addGroupToolStripMenuItem1.Click += addGroupToolStripMenuItem1_Click;
|
addGroupToolStripMenuItem1.Click += AddTileToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem4
|
// toolStripMenuItem4
|
||||||
//
|
//
|
||||||
toolStripMenuItem4.Name = "toolStripMenuItem4";
|
toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||||
toolStripMenuItem4.Size = new System.Drawing.Size(180, 22);
|
toolStripMenuItem4.Size = new System.Drawing.Size(132, 22);
|
||||||
toolStripMenuItem4.Text = "Add &Folder";
|
toolStripMenuItem4.Text = "Add &Folder";
|
||||||
toolStripMenuItem4.Click += toolStripMenuItem4_Click;
|
toolStripMenuItem4.Click += AddFolderToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// editToolStripMenuItem
|
// editToolStripMenuItem
|
||||||
//
|
//
|
||||||
editToolStripMenuItem.Name = "editToolStripMenuItem";
|
editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||||
editToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
editToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||||
editToolStripMenuItem.Text = "&Edit";
|
editToolStripMenuItem.Text = "&Edit";
|
||||||
editToolStripMenuItem.Click += editToolStripMenuItem_Click;
|
editToolStripMenuItem.Click += EditGroupToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem5
|
// toolStripMenuItem5
|
||||||
//
|
//
|
||||||
toolStripMenuItem5.Name = "toolStripMenuItem5";
|
toolStripMenuItem5.Name = "toolStripMenuItem5";
|
||||||
toolStripMenuItem5.Size = new System.Drawing.Size(180, 22);
|
toolStripMenuItem5.Size = new System.Drawing.Size(132, 22);
|
||||||
toolStripMenuItem5.Text = "&Duplicate";
|
toolStripMenuItem5.Text = "&Duplicate";
|
||||||
toolStripMenuItem5.Click += toolStripMenuItem5_Click;
|
toolStripMenuItem5.Click += toolStripMenuItem5_Click;
|
||||||
//
|
//
|
||||||
// toolStripSeparator1
|
// toolStripSeparator1
|
||||||
//
|
//
|
||||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
|
toolStripSeparator1.Size = new System.Drawing.Size(129, 6);
|
||||||
//
|
//
|
||||||
// toolStripMenuItem3
|
// toolStripMenuItem3
|
||||||
//
|
//
|
||||||
toolStripMenuItem3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { topToolStripMenuItem, upToolStripMenuItem, downToolStripMenuItem, bottomToolStripMenuItem });
|
toolStripMenuItem3.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { topToolStripMenuItem, upToolStripMenuItem, downToolStripMenuItem, bottomToolStripMenuItem });
|
||||||
toolStripMenuItem3.Name = "toolStripMenuItem3";
|
toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||||
toolStripMenuItem3.Size = new System.Drawing.Size(180, 22);
|
toolStripMenuItem3.Size = new System.Drawing.Size(132, 22);
|
||||||
toolStripMenuItem3.Text = "&Move";
|
toolStripMenuItem3.Text = "&Move";
|
||||||
//
|
//
|
||||||
// topToolStripMenuItem
|
// topToolStripMenuItem
|
||||||
//
|
//
|
||||||
topToolStripMenuItem.Name = "topToolStripMenuItem";
|
topToolStripMenuItem.Name = "topToolStripMenuItem";
|
||||||
topToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
topToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||||
topToolStripMenuItem.Text = "&Top";
|
topToolStripMenuItem.Text = "&Top";
|
||||||
topToolStripMenuItem.Click += topToolStripMenuItem_Click;
|
topToolStripMenuItem.Click += MoveTopToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// upToolStripMenuItem
|
// upToolStripMenuItem
|
||||||
//
|
//
|
||||||
upToolStripMenuItem.Name = "upToolStripMenuItem";
|
upToolStripMenuItem.Name = "upToolStripMenuItem";
|
||||||
upToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
upToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||||
upToolStripMenuItem.Text = "&Up";
|
upToolStripMenuItem.Text = "&Up";
|
||||||
upToolStripMenuItem.Click += upToolStripMenuItem_Click;
|
upToolStripMenuItem.Click += MoveUpToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// downToolStripMenuItem
|
// downToolStripMenuItem
|
||||||
//
|
//
|
||||||
downToolStripMenuItem.Name = "downToolStripMenuItem";
|
downToolStripMenuItem.Name = "downToolStripMenuItem";
|
||||||
downToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
downToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||||
downToolStripMenuItem.Text = "&Down";
|
downToolStripMenuItem.Text = "&Down";
|
||||||
downToolStripMenuItem.Click += downToolStripMenuItem_Click;
|
downToolStripMenuItem.Click += MoveDownToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// bottomToolStripMenuItem
|
// bottomToolStripMenuItem
|
||||||
//
|
//
|
||||||
bottomToolStripMenuItem.Name = "bottomToolStripMenuItem";
|
bottomToolStripMenuItem.Name = "bottomToolStripMenuItem";
|
||||||
bottomToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
bottomToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
||||||
bottomToolStripMenuItem.Text = "&Bottom";
|
bottomToolStripMenuItem.Text = "&Bottom";
|
||||||
bottomToolStripMenuItem.Click += bottomToolStripMenuItem_Click;
|
bottomToolStripMenuItem.Click += MoveBottomToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripSeparator3
|
// toolStripSeparator3
|
||||||
//
|
//
|
||||||
toolStripSeparator3.Name = "toolStripSeparator3";
|
toolStripSeparator3.Name = "toolStripSeparator3";
|
||||||
toolStripSeparator3.Size = new System.Drawing.Size(177, 6);
|
toolStripSeparator3.Size = new System.Drawing.Size(129, 6);
|
||||||
//
|
//
|
||||||
// removeToolStripMenuItem
|
// removeToolStripMenuItem
|
||||||
//
|
//
|
||||||
removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
removeToolStripMenuItem.Name = "removeToolStripMenuItem";
|
||||||
removeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
removeToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
|
||||||
removeToolStripMenuItem.Text = "&Remove";
|
removeToolStripMenuItem.Text = "&Remove";
|
||||||
removeToolStripMenuItem.Click += removeToolStripMenuItem_Click;
|
removeToolStripMenuItem.Click += RemoveGroupToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// flowLayoutPanel1
|
// flowLayoutPanel1
|
||||||
//
|
//
|
||||||
@ -367,10 +367,10 @@ namespace RokettoLaunch
|
|||||||
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||||
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||||
flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
flowLayoutPanel1.Location = new System.Drawing.Point(10, 0);
|
||||||
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
|
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
flowLayoutPanel1.Name = "flowLayoutPanel1";
|
flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
flowLayoutPanel1.Size = new System.Drawing.Size(404, 417);
|
flowLayoutPanel1.Size = new System.Drawing.Size(632, 540);
|
||||||
flowLayoutPanel1.TabIndex = 8;
|
flowLayoutPanel1.TabIndex = 8;
|
||||||
flowLayoutPanel1.WrapContents = false;
|
flowLayoutPanel1.WrapContents = false;
|
||||||
//
|
//
|
||||||
@ -382,47 +382,48 @@ namespace RokettoLaunch
|
|||||||
panel1.Location = new System.Drawing.Point(0, 24);
|
panel1.Location = new System.Drawing.Point(0, 24);
|
||||||
panel1.Margin = new System.Windows.Forms.Padding(0);
|
panel1.Margin = new System.Windows.Forms.Padding(0);
|
||||||
panel1.Name = "panel1";
|
panel1.Name = "panel1";
|
||||||
panel1.Size = new System.Drawing.Size(404, 417);
|
panel1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
|
||||||
|
panel1.Size = new System.Drawing.Size(642, 540);
|
||||||
panel1.TabIndex = 9;
|
panel1.TabIndex = 9;
|
||||||
//
|
//
|
||||||
// tileMenu1
|
// tileMenu1
|
||||||
//
|
//
|
||||||
tileMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { editToolStripMenuItem1, toolStripMenuItem6, toolStripSeparator4, removeToolStripMenuItem1 });
|
tileMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { editToolStripMenuItem1, toolStripMenuItem6, toolStripSeparator4, removeToolStripMenuItem1 });
|
||||||
tileMenu1.Name = "tileMenu1";
|
tileMenu1.Name = "tileMenu1";
|
||||||
tileMenu1.Size = new System.Drawing.Size(125, 76);
|
tileMenu1.Size = new System.Drawing.Size(127, 76);
|
||||||
//
|
//
|
||||||
// editToolStripMenuItem1
|
// editToolStripMenuItem1
|
||||||
//
|
//
|
||||||
editToolStripMenuItem1.Name = "editToolStripMenuItem1";
|
editToolStripMenuItem1.Name = "editToolStripMenuItem1";
|
||||||
editToolStripMenuItem1.Size = new System.Drawing.Size(124, 22);
|
editToolStripMenuItem1.Size = new System.Drawing.Size(126, 22);
|
||||||
editToolStripMenuItem1.Text = "&Edit";
|
editToolStripMenuItem1.Text = "&Edit";
|
||||||
editToolStripMenuItem1.Click += editToolStripMenuItem1_Click;
|
editToolStripMenuItem1.Click += EditTileToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripMenuItem6
|
// toolStripMenuItem6
|
||||||
//
|
//
|
||||||
toolStripMenuItem6.Name = "toolStripMenuItem6";
|
toolStripMenuItem6.Name = "toolStripMenuItem6";
|
||||||
toolStripMenuItem6.Size = new System.Drawing.Size(124, 22);
|
toolStripMenuItem6.Size = new System.Drawing.Size(126, 22);
|
||||||
toolStripMenuItem6.Text = "&Duplicate";
|
toolStripMenuItem6.Text = "Copy To...";
|
||||||
toolStripMenuItem6.Click += toolStripMenuItem6_Click;
|
toolStripMenuItem6.Click += CopyToTileToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// toolStripSeparator4
|
// toolStripSeparator4
|
||||||
//
|
//
|
||||||
toolStripSeparator4.Name = "toolStripSeparator4";
|
toolStripSeparator4.Name = "toolStripSeparator4";
|
||||||
toolStripSeparator4.Size = new System.Drawing.Size(121, 6);
|
toolStripSeparator4.Size = new System.Drawing.Size(123, 6);
|
||||||
//
|
//
|
||||||
// removeToolStripMenuItem1
|
// removeToolStripMenuItem1
|
||||||
//
|
//
|
||||||
removeToolStripMenuItem1.Name = "removeToolStripMenuItem1";
|
removeToolStripMenuItem1.Name = "removeToolStripMenuItem1";
|
||||||
removeToolStripMenuItem1.Size = new System.Drawing.Size(124, 22);
|
removeToolStripMenuItem1.Size = new System.Drawing.Size(126, 22);
|
||||||
removeToolStripMenuItem1.Text = "&Remove";
|
removeToolStripMenuItem1.Text = "&Remove";
|
||||||
removeToolStripMenuItem1.Click += removeToolStripMenuItem1_Click;
|
removeToolStripMenuItem1.Click += RemoveTileToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
BackColor = System.Drawing.Color.White;
|
BackColor = System.Drawing.Color.White;
|
||||||
BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||||
ClientSize = new System.Drawing.Size(404, 441);
|
ClientSize = new System.Drawing.Size(642, 564);
|
||||||
Controls.Add(panel1);
|
Controls.Add(panel1);
|
||||||
Controls.Add(menuStrip1);
|
Controls.Add(menuStrip1);
|
||||||
DoubleBuffered = true;
|
DoubleBuffered = true;
|
||||||
|
|||||||
984
MainForm.cs
984
MainForm.cs
File diff suppressed because it is too large
Load Diff
58
Models/SaveFile/App3Options.cs
Normal file
58
Models/SaveFile/App3Options.cs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace RokettoLaunch.Models.SaveFile
|
||||||
|
{
|
||||||
|
public class App3Options : AppOptionsBase
|
||||||
|
{
|
||||||
|
public class Group
|
||||||
|
{
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
public bool IsExpanded { get; set; } = false;
|
||||||
|
|
||||||
|
public List<Item> Items { get; set; } = new List<Item>();
|
||||||
|
|
||||||
|
[JsonConverter(typeof(RyzStudio.Text.Json.JsonSizeConverter))]
|
||||||
|
public Size GridSize { get; set; } = new Size(0, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Item
|
||||||
|
{
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
public string ProcessFilename { get; set; }
|
||||||
|
|
||||||
|
public string ProcessArgument { get; set; }
|
||||||
|
|
||||||
|
public string ProcessWorkingDirectory { get; set; }
|
||||||
|
|
||||||
|
public ProcessWindowStyle ProcessWindowStyle { get; set; } = ProcessWindowStyle.Normal;
|
||||||
|
|
||||||
|
public bool ProcessAsAdmin { get; set; } = false;
|
||||||
|
|
||||||
|
[JsonConverter(typeof(RyzStudio.Text.Json.JsonPointConverter))]
|
||||||
|
public Point Position { get; set; }
|
||||||
|
|
||||||
|
public bool IsGroup { get; set; } = false;
|
||||||
|
|
||||||
|
public List<Item> Items { get; set; } = new List<Item>();
|
||||||
|
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return this.Title?.Trim() ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public new int FileVersion { get; set; } = 3;
|
||||||
|
|
||||||
|
public List<Group> Groups { get; set; } = new List<Group>();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
352
Models/SaveFile/App4Options.cs
Normal file
352
Models/SaveFile/App4Options.cs
Normal file
@ -0,0 +1,352 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace RokettoLaunch.Models.SaveFile
|
||||||
|
{
|
||||||
|
public class App4Options : AppOptionsBase
|
||||||
|
{
|
||||||
|
public class Group
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; } = Guid.NewGuid();
|
||||||
|
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
public bool IsOpen { get; set; } = false;
|
||||||
|
|
||||||
|
public List<Item> Items { get; set; } = new List<Item>();
|
||||||
|
|
||||||
|
[JsonConverter(typeof(RyzStudio.Text.Json.JsonSizeConverter))]
|
||||||
|
public Size GridSize { get; set; } = new Size(0, 0);
|
||||||
|
|
||||||
|
|
||||||
|
public Group CopyOf()
|
||||||
|
{
|
||||||
|
var json = JsonSerializer.Serialize(this);
|
||||||
|
|
||||||
|
var newGroupInfo = JsonSerializer.Deserialize<Group>(json);
|
||||||
|
newGroupInfo.Id = Guid.NewGuid();
|
||||||
|
newGroupInfo.Title = "Copy of " + newGroupInfo.Title;
|
||||||
|
|
||||||
|
// Resolve paths
|
||||||
|
foreach (var item in newGroupInfo.Items ?? new List<Item>())
|
||||||
|
{
|
||||||
|
item.Id = Guid.NewGuid();
|
||||||
|
|
||||||
|
if (item.IsGroup)
|
||||||
|
{
|
||||||
|
foreach (var subItem in item.Items ?? new List<Item>())
|
||||||
|
{
|
||||||
|
subItem.Id = Guid.NewGuid();
|
||||||
|
|
||||||
|
subItem.ResolvePaths();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.ResolvePaths();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newGroupInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Size GetMaxGridSize()
|
||||||
|
{
|
||||||
|
var result = this.GridSize;
|
||||||
|
var maxPosition = this.GetMaxPosition();
|
||||||
|
|
||||||
|
result.Width = Math.Max(result.Width, (maxPosition.X + 1));
|
||||||
|
result.Height = Math.Max(result.Height, (maxPosition.Y + 1));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point GetMaxPosition()
|
||||||
|
{
|
||||||
|
if (this.Items.Count <= 0)
|
||||||
|
{
|
||||||
|
return new Point(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = new Point(0, 0);
|
||||||
|
result.Y = this.Items.Select(x => x.Position.Y).Max();
|
||||||
|
result.X = this.Items.Where(x => x.Position.Y == result.Y)?.Select(x => x.Position.X)?.Max() ?? 0;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point GetNextPosition()
|
||||||
|
{
|
||||||
|
if (this.Items.Count <= 0)
|
||||||
|
{
|
||||||
|
return new Point(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
var pos = this.GetMaxPosition();
|
||||||
|
pos.X++;
|
||||||
|
|
||||||
|
if (pos.X > (this.GridSize.Width - 1))
|
||||||
|
{
|
||||||
|
pos.X = 0;
|
||||||
|
pos.Y++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanPosition(Item tile)
|
||||||
|
{
|
||||||
|
if (tile.Position == new Point(-1, -1))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Items.Count <= 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !Items.Where(x => x.Id != tile.Id && x.Position == tile.Position).Any();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Item
|
||||||
|
{
|
||||||
|
public static Item Create(App3Options.Item model)
|
||||||
|
{
|
||||||
|
var result = new Item();
|
||||||
|
result.Load(model);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Guid Id { get; set; } = Guid.NewGuid();
|
||||||
|
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
|
public string TargetPath { get; set; }
|
||||||
|
|
||||||
|
public string Argument { get; set; }
|
||||||
|
|
||||||
|
public string StartPath { get; set; }
|
||||||
|
|
||||||
|
public ProcessWindowStyle WindowStyle { get; set; } = ProcessWindowStyle.Normal;
|
||||||
|
|
||||||
|
public bool RunAsAdmin { get; set; } = false;
|
||||||
|
|
||||||
|
[JsonConverter(typeof(RyzStudio.Text.Json.JsonPointConverter))]
|
||||||
|
public Point Position { get; set; }
|
||||||
|
|
||||||
|
public bool IsGroup { get; set; } = false;
|
||||||
|
|
||||||
|
public List<Item> Items { get; set; } = new List<Item>();
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public string ResolvedTargetPath { get; private set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public string ResolvedArgument { get; private set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public string ResolvedStartPath { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Item CopyOf()
|
||||||
|
{
|
||||||
|
var json = JsonSerializer.Serialize(this);
|
||||||
|
|
||||||
|
var newTileInfo = JsonSerializer.Deserialize<Item>(json);
|
||||||
|
newTileInfo.Id = Guid.NewGuid();
|
||||||
|
newTileInfo.Title = "Copy of " + newTileInfo.Title;
|
||||||
|
newTileInfo.Position = new Point(-1, -1);
|
||||||
|
|
||||||
|
if (newTileInfo.IsGroup)
|
||||||
|
{
|
||||||
|
foreach (var subItem in newTileInfo.Items ?? new List<Item>())
|
||||||
|
{
|
||||||
|
subItem.Id = Guid.NewGuid();
|
||||||
|
|
||||||
|
subItem.ResolvePaths();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newTileInfo.ResolvePaths();
|
||||||
|
}
|
||||||
|
|
||||||
|
return newTileInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Load(App3Options.Item model)
|
||||||
|
{
|
||||||
|
this.Title = model.Title;
|
||||||
|
this.TargetPath = model.ProcessFilename;
|
||||||
|
this.Argument = model.ProcessArgument;
|
||||||
|
this.StartPath = model.ProcessWorkingDirectory;
|
||||||
|
this.WindowStyle = model.ProcessWindowStyle;
|
||||||
|
this.RunAsAdmin = model.ProcessAsAdmin;
|
||||||
|
this.Position = model.Position;
|
||||||
|
this.IsGroup = model.IsGroup;
|
||||||
|
this.Items = model.Items.Select(x => Item.Create(x))?.ToList() ?? new List<Item>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Load(Item model)
|
||||||
|
{
|
||||||
|
this.Title = model.Title;
|
||||||
|
this.TargetPath = model.TargetPath;
|
||||||
|
this.Argument = model.Argument;
|
||||||
|
this.StartPath = model.StartPath;
|
||||||
|
this.WindowStyle = model.WindowStyle;
|
||||||
|
this.RunAsAdmin = model.RunAsAdmin;
|
||||||
|
this.Position = model.Position;
|
||||||
|
this.IsGroup = model.IsGroup;
|
||||||
|
|
||||||
|
this.Items = model.Items ?? new List<Item>();
|
||||||
|
|
||||||
|
this.ResolvedTargetPath = model.ResolvedTargetPath;
|
||||||
|
this.ResolvedStartPath = model.ResolvedStartPath;
|
||||||
|
this.ResolvedArgument = model.ResolvedArgument;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResolvePaths()
|
||||||
|
{
|
||||||
|
if (this.IsGroup)
|
||||||
|
{
|
||||||
|
foreach (var subItem in this.Items ?? new List<Item>())
|
||||||
|
{
|
||||||
|
subItem.ResolvePaths();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.ResolvedTargetPath = RyzStudio.IO.File.ResolvePath(this.TargetPath);
|
||||||
|
this.ResolvedArgument = RyzStudio.IO.File.ResolvePath(this.Argument);
|
||||||
|
this.ResolvedStartPath = RyzStudio.IO.File.ResolvePath(this.StartPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return this.Title?.Trim() ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public new int FileVersion { get; set; } = 4;
|
||||||
|
|
||||||
|
public List<Group> Groups { get; set; } = new List<Group>();
|
||||||
|
|
||||||
|
public void Load(App3Options options)
|
||||||
|
{
|
||||||
|
this.TilesPerRow = options.TilesPerRow;
|
||||||
|
this.ShowBigIcons = options.ShowBigIcons;
|
||||||
|
this.ShowToggleHotkey = options.ShowToggleHotkey;
|
||||||
|
this.HideOnClose = options.HideOnClose;
|
||||||
|
this.HideOnExecute = options.HideOnExecute;
|
||||||
|
this.AlwaysOnTop = options.AlwaysOnTop;
|
||||||
|
this.StartPosition = options.StartPosition;
|
||||||
|
this.Height = options.Height;
|
||||||
|
|
||||||
|
foreach (var group in options.Groups)
|
||||||
|
{
|
||||||
|
var newGroup = new Group()
|
||||||
|
{
|
||||||
|
Title = group.Title,
|
||||||
|
IsOpen = group.IsExpanded,
|
||||||
|
GridSize = group.GridSize
|
||||||
|
};
|
||||||
|
|
||||||
|
newGroup.Items = group.Items.Select(x => Item.Create(x))?.ToList() ?? new List<Item>();
|
||||||
|
|
||||||
|
this.Groups.Add(newGroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Item FindById(Guid id)
|
||||||
|
{
|
||||||
|
if (id == Guid.Empty)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var group in this.Groups)
|
||||||
|
{
|
||||||
|
foreach (var item in group.Items)
|
||||||
|
{
|
||||||
|
if (item.Id == id)
|
||||||
|
{
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.IsGroup)
|
||||||
|
{
|
||||||
|
foreach (var subItem in item.Items)
|
||||||
|
{
|
||||||
|
if (subItem.Id == id)
|
||||||
|
{
|
||||||
|
return subItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Update(Item value)
|
||||||
|
{
|
||||||
|
var result = this.FindById(value.Id);
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
result.Load(value);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Remove(Guid id)
|
||||||
|
{
|
||||||
|
if (id == Guid.Empty)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var group in this.Groups)
|
||||||
|
{
|
||||||
|
foreach (var item in group.Items)
|
||||||
|
{
|
||||||
|
if (item.Id == id)
|
||||||
|
{
|
||||||
|
return group.Items.Remove(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.IsGroup)
|
||||||
|
{
|
||||||
|
foreach (var subItem in item.Items)
|
||||||
|
{
|
||||||
|
if (subItem.Id == id)
|
||||||
|
{
|
||||||
|
return item.Items.Remove(subItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,10 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using System.Drawing;
|
||||||
using System.Drawing;
|
|
||||||
|
|
||||||
namespace RokettoLaunch.Models
|
namespace RokettoLaunch.Models.SaveFile
|
||||||
{
|
{
|
||||||
public class AppOptions
|
public class AppOptionsBase
|
||||||
{
|
{
|
||||||
|
public int FileVersion { get; set; } = 0;
|
||||||
|
|
||||||
public int TilesPerRow { get; set; } = 8;
|
public int TilesPerRow { get; set; } = 8;
|
||||||
|
|
||||||
public bool ShowBigIcons { get; set; } = true;
|
public bool ShowBigIcons { get; set; } = true;
|
||||||
@ -17,8 +18,6 @@ namespace RokettoLaunch.Models
|
|||||||
|
|
||||||
public bool AlwaysOnTop { get; set; } = false;
|
public bool AlwaysOnTop { get; set; } = false;
|
||||||
|
|
||||||
public List<TileGroupModel> Groups { get; set; } = new List<TileGroupModel>();
|
|
||||||
|
|
||||||
public Point StartPosition { get; set; } = Point.Empty;
|
public Point StartPosition { get; set; } = Point.Empty;
|
||||||
|
|
||||||
public int Height { get; set; } = 280;
|
public int Height { get; set; } = 280;
|
||||||
@ -1,19 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace RokettoLaunch.Models
|
|
||||||
{
|
|
||||||
public class TileGroupModel
|
|
||||||
{
|
|
||||||
public string Title { get; set; }
|
|
||||||
|
|
||||||
public bool IsExpanded { get; set; } = false;
|
|
||||||
|
|
||||||
public List<TileModel> Items { get; set; } = new List<TileModel>();
|
|
||||||
|
|
||||||
[JsonConverter(typeof(RyzStudio.Text.Json.JsonSizeConverter))]
|
|
||||||
public Size GridSize { get; set; } = new Size(0, 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,259 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace RokettoLaunch.Models
|
|
||||||
{
|
|
||||||
public class TileModel
|
|
||||||
{
|
|
||||||
public string Title { get; set; }
|
|
||||||
|
|
||||||
public string ProcessFilename { get; set; }
|
|
||||||
|
|
||||||
public string ProcessArgument { get; set; }
|
|
||||||
|
|
||||||
public string ProcessWorkingDirectory { get; set; }
|
|
||||||
|
|
||||||
public ProcessWindowStyle ProcessWindowStyle { get; set; } = ProcessWindowStyle.Normal;
|
|
||||||
|
|
||||||
public bool ProcessAsAdmin { get; set; } = false;
|
|
||||||
|
|
||||||
[JsonConverter(typeof(RyzStudio.Text.Json.JsonPointConverter))]
|
|
||||||
public Point Position { get; set; }
|
|
||||||
|
|
||||||
public bool IsGroup { get; set; } = false;
|
|
||||||
|
|
||||||
public List<TileModel> Items { get; set; } = new List<TileModel>();
|
|
||||||
|
|
||||||
public string Version { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public override string ToString() => this.Title ?? string.Empty;
|
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public string CleanProcessFilename
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (string.IsNullOrWhiteSpace(this.ProcessFilename) ? string.Empty : ResolvePath(this.ProcessFilename));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public string CleanProcessArgument
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (string.IsNullOrWhiteSpace(this.ProcessArgument) ? string.Empty : ResolvePath(this.ProcessArgument));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public string CleanProcessWorkingDirectory
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (string.IsNullOrWhiteSpace(this.ProcessWorkingDirectory) ? string.Empty : ResolvePath(this.ProcessWorkingDirectory));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private Tuple<string, string> SplitPath(string path, string needle)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(path))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(needle))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!path.Contains(needle))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
string head = path.Substring(0, path.IndexOf(needle));
|
|
||||||
string tail = path.Substring(path.IndexOf(needle) + needle.Length);
|
|
||||||
|
|
||||||
return new Tuple<string, string>(head, tail);
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetFirstPath(string value)
|
|
||||||
{
|
|
||||||
var parts = SplitPath(value, "%FIRST%");
|
|
||||||
if (parts == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
string[] dirList = new string[0];
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
dirList = System.IO.Directory.GetDirectories(parts.Item1, "*", System.IO.SearchOption.TopDirectoryOnly);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dirList.Length <= 0)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return System.IO.Path.GetFileName(dirList[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetLastPath(string value)
|
|
||||||
{
|
|
||||||
var parts = SplitPath(value, "%LAST%");
|
|
||||||
if (parts == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
string[] dirList = new string[0];
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
dirList = System.IO.Directory.GetDirectories(parts.Item1, "*", System.IO.SearchOption.TopDirectoryOnly);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dirList.Length <= 0)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return System.IO.Path.GetFileName(dirList[(dirList.Length - 1)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private string ResolvePath(string path)
|
|
||||||
{
|
|
||||||
var result = Environment.ExpandEnvironmentVariables(path);
|
|
||||||
|
|
||||||
if (result.Contains("%FIRST%"))
|
|
||||||
{
|
|
||||||
result = ResolveFirstPath(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.Contains("%LAST%"))
|
|
||||||
{
|
|
||||||
result = ResolveLastPath(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string ResolveFirstPath(string value)
|
|
||||||
{
|
|
||||||
var parts = SplitPath(value, "%FIRST%");
|
|
||||||
if (parts == null)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!System.IO.Directory.Exists(parts.Item1))
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try cached version
|
|
||||||
if (!string.IsNullOrWhiteSpace(this.Version))
|
|
||||||
{
|
|
||||||
var filename = parts.Item1 + this.Version + parts.Item2;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (System.IO.File.Exists(filename))
|
|
||||||
{
|
|
||||||
return filename;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve version
|
|
||||||
var version = GetFirstPath(value);
|
|
||||||
if (version == null)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.Version = version;
|
|
||||||
|
|
||||||
return parts.Item1 + version + parts.Item2;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string ResolveLastPath(string value)
|
|
||||||
{
|
|
||||||
var parts = SplitPath(value, "%LAST%");
|
|
||||||
if (parts == null)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!System.IO.Directory.Exists(parts.Item1))
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try cached version
|
|
||||||
if (!string.IsNullOrWhiteSpace(this.Version))
|
|
||||||
{
|
|
||||||
var filename = parts.Item1 + this.Version + parts.Item2;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (System.IO.File.Exists(filename))
|
|
||||||
{
|
|
||||||
return filename;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve version
|
|
||||||
var version = GetLastPath(value);
|
|
||||||
if (version == null)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.Version = version;
|
|
||||||
|
|
||||||
return parts.Item1 + version + parts.Item2;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
537
OptionsForm.cs
537
OptionsForm.cs
@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using RokettoLaunch.Models;
|
using RokettoLaunch.Models.SaveFile;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
using RyzStudio.Windows.ThemedForms;
|
using RyzStudio.Windows.ThemedForms;
|
||||||
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
@ -11,247 +10,153 @@ namespace RokettoLaunch
|
|||||||
{
|
{
|
||||||
public class OptionsForm : Form
|
public class OptionsForm : Form
|
||||||
{
|
{
|
||||||
private System.Windows.Forms.Label label1;
|
|
||||||
private ThYesNoPickerBox yesNoPickerBox2;
|
|
||||||
private System.Windows.Forms.Label label6;
|
|
||||||
private ThYesNoPickerBox yesNoPickerBox3;
|
|
||||||
private System.Windows.Forms.Label label7;
|
|
||||||
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 RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
private FlowLayoutPanel flowLayoutPanel1;
|
||||||
|
private TTogglePanel togglePanel1;
|
||||||
|
private Label label2;
|
||||||
|
private Label label4;
|
||||||
|
private TTogglePanel togglePanel2;
|
||||||
|
private Label label3;
|
||||||
|
private Label label1;
|
||||||
|
private Label label6;
|
||||||
|
private Label label7;
|
||||||
|
private ThYesNoPickerBox yesNoPickerBox1;
|
||||||
|
private ThNumericBox numericBox1;
|
||||||
|
private ThYesNoPickerBox yesNoPickerBox4;
|
||||||
|
private ThKeyCodeTextBox textBox1;
|
||||||
|
private ThYesNoPickerBox yesNoPickerBox2;
|
||||||
|
private ThYesNoPickerBox yesNoPickerBox3;
|
||||||
|
private TTogglePanel togglePanel3;
|
||||||
|
|
||||||
|
private App4Options _appSession = null;
|
||||||
|
|
||||||
|
|
||||||
private AppOptions _appSession = null;
|
public OptionsForm(App4Options appSession)
|
||||||
|
|
||||||
|
|
||||||
public OptionsForm(AppOptions appSession)
|
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
UISetup.Dialog(this);
|
UISetup.Dialog(this, true);
|
||||||
|
UISetup.AutoSizeChildren(flowLayoutPanel1);
|
||||||
|
|
||||||
_appSession = appSession;
|
_appSession = appSession;
|
||||||
|
|
||||||
numericBox1.Minimum = 4;
|
numericBox1.Minimum = 4;
|
||||||
numericBox1.Maximum = 24;
|
numericBox1.Maximum = 24;
|
||||||
|
|
||||||
if (_appSession != null)
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnShown(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnShown(e);
|
||||||
|
|
||||||
|
numericBox1.Value = _appSession?.TilesPerRow ?? 4;
|
||||||
|
yesNoPickerBox1.Value = _appSession?.ShowBigIcons ?? true;
|
||||||
|
textBox1.UpdateKeyCode(_appSession?.ShowToggleHotkey ?? new ThKeyCodeTextBox.Results());
|
||||||
|
yesNoPickerBox4.Value = _appSession?.AlwaysOnTop ?? true;
|
||||||
|
yesNoPickerBox2.Value = _appSession?.HideOnClose ?? true;
|
||||||
|
yesNoPickerBox3.Value = _appSession?.HideOnExecute ?? true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
ThKeyCodeTextBox.Results results1 = new ThKeyCodeTextBox.Results();
|
ThKeyCodeTextBox.Results results1 = new ThKeyCodeTextBox.Results();
|
||||||
label1 = new Label();
|
|
||||||
yesNoPickerBox2 = new ThYesNoPickerBox();
|
|
||||||
label6 = new Label();
|
|
||||||
yesNoPickerBox3 = new ThYesNoPickerBox();
|
|
||||||
label7 = new Label();
|
|
||||||
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();
|
|
||||||
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
||||||
|
flowLayoutPanel1 = new FlowLayoutPanel();
|
||||||
|
togglePanel1 = new TTogglePanel();
|
||||||
|
yesNoPickerBox1 = new ThYesNoPickerBox();
|
||||||
|
numericBox1 = new ThNumericBox();
|
||||||
|
label2 = new Label();
|
||||||
|
label4 = new Label();
|
||||||
|
togglePanel2 = new TTogglePanel();
|
||||||
|
label6 = new Label();
|
||||||
|
yesNoPickerBox4 = new ThYesNoPickerBox();
|
||||||
|
textBox1 = new ThKeyCodeTextBox();
|
||||||
|
yesNoPickerBox2 = new ThYesNoPickerBox();
|
||||||
|
label3 = new Label();
|
||||||
|
label1 = new Label();
|
||||||
|
togglePanel3 = new TTogglePanel();
|
||||||
|
label7 = new Label();
|
||||||
|
yesNoPickerBox3 = new ThYesNoPickerBox();
|
||||||
flowLayoutPanel1.SuspendLayout();
|
flowLayoutPanel1.SuspendLayout();
|
||||||
tTogglePanel1.SuspendLayout();
|
togglePanel1.SuspendLayout();
|
||||||
tTogglePanel2.SuspendLayout();
|
togglePanel2.SuspendLayout();
|
||||||
|
togglePanel3.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// label1
|
// dialogFooter1
|
||||||
//
|
//
|
||||||
label1.AutoSize = true;
|
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
|
||||||
label1.BackColor = System.Drawing.Color.Transparent;
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
dialogFooter1.EnableMovable = false;
|
||||||
label1.Location = new System.Drawing.Point(1, 22);
|
dialogFooter1.IsBusy = false;
|
||||||
label1.Margin = new Padding(0);
|
dialogFooter1.Location = new System.Drawing.Point(0, 451);
|
||||||
label1.Name = "label1";
|
dialogFooter1.Name = "dialogFooter1";
|
||||||
label1.Padding = new Padding(0, 8, 0, 0);
|
dialogFooter1.Size = new System.Drawing.Size(444, 70);
|
||||||
label1.Size = new System.Drawing.Size(115, 23);
|
dialogFooter1.TabIndex = 0;
|
||||||
label1.TabIndex = 153;
|
dialogFooter1.TabStop = false;
|
||||||
label1.Text = "Show Toggle Hotkey";
|
|
||||||
label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
||||||
//
|
|
||||||
// yesNoPickerBox2
|
|
||||||
//
|
|
||||||
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.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
|
|
||||||
//
|
|
||||||
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;
|
|
||||||
//
|
|
||||||
// yesNoPickerBox3
|
|
||||||
//
|
|
||||||
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.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
|
|
||||||
//
|
|
||||||
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;
|
|
||||||
//
|
|
||||||
// textBox1
|
|
||||||
//
|
|
||||||
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.Icon = "O";
|
|
||||||
textBox1.IconSize = 13F;
|
|
||||||
results1.IsAlt = false;
|
|
||||||
results1.IsCtrl = false;
|
|
||||||
results1.IsShift = false;
|
|
||||||
results1.Key = Keys.None;
|
|
||||||
textBox1.KeyCodeResults = results1;
|
|
||||||
textBox1.Location = new System.Drawing.Point(192, 21);
|
|
||||||
textBox1.Name = "textBox1";
|
|
||||||
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.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.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
|
||||||
//
|
//
|
||||||
flowLayoutPanel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
|
||||||
flowLayoutPanel1.AutoScroll = true;
|
flowLayoutPanel1.AutoScroll = true;
|
||||||
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||||
flowLayoutPanel1.Controls.Add(tTogglePanel1);
|
flowLayoutPanel1.Controls.Add(togglePanel1);
|
||||||
flowLayoutPanel1.Controls.Add(tTogglePanel2);
|
flowLayoutPanel1.Controls.Add(togglePanel2);
|
||||||
|
flowLayoutPanel1.Controls.Add(togglePanel3);
|
||||||
|
flowLayoutPanel1.Dock = DockStyle.Fill;
|
||||||
flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
|
flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
|
||||||
flowLayoutPanel1.Location = new System.Drawing.Point(8, 12);
|
flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
flowLayoutPanel1.Name = "flowLayoutPanel1";
|
flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||||
flowLayoutPanel1.Size = new System.Drawing.Size(436, 412);
|
flowLayoutPanel1.Padding = new Padding(10, 0, 0, 0);
|
||||||
flowLayoutPanel1.TabIndex = 194;
|
flowLayoutPanel1.Size = new System.Drawing.Size(444, 451);
|
||||||
|
flowLayoutPanel1.TabIndex = 195;
|
||||||
flowLayoutPanel1.WrapContents = false;
|
flowLayoutPanel1.WrapContents = false;
|
||||||
flowLayoutPanel1.Resize += flowLayoutPanel1_Resize;
|
|
||||||
//
|
//
|
||||||
// tTogglePanel1
|
// togglePanel1
|
||||||
//
|
//
|
||||||
tTogglePanel1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
togglePanel1.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
||||||
tTogglePanel1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
togglePanel1.CloseIcon = "H";
|
||||||
tTogglePanel1.Controls.Add(yesNoPickerBox1);
|
togglePanel1.Controls.Add(yesNoPickerBox1);
|
||||||
tTogglePanel1.Controls.Add(label2);
|
togglePanel1.Controls.Add(numericBox1);
|
||||||
tTogglePanel1.Controls.Add(label4);
|
togglePanel1.Controls.Add(label2);
|
||||||
tTogglePanel1.Controls.Add(numericBox1);
|
togglePanel1.Controls.Add(label4);
|
||||||
tTogglePanel1.ExpandedHeight = 119;
|
togglePanel1.EnableMovable = false;
|
||||||
tTogglePanel1.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
togglePanel1.ExpandedHeight = 103;
|
||||||
tTogglePanel1.HeaderPadding = new Padding(4, 0, 0, 2);
|
togglePanel1.HeaderPadding = new Padding(4, 0, 0, 2);
|
||||||
tTogglePanel1.IsOpen = true;
|
togglePanel1.IconWidth = 20;
|
||||||
tTogglePanel1.Location = new System.Drawing.Point(0, 0);
|
togglePanel1.Location = new System.Drawing.Point(10, 0);
|
||||||
tTogglePanel1.Margin = new Padding(0);
|
togglePanel1.Name = "togglePanel1";
|
||||||
tTogglePanel1.Name = "tTogglePanel1";
|
togglePanel1.OpenIcon = "G";
|
||||||
tTogglePanel1.Padding = new Padding(0, 22, 0, 0);
|
togglePanel1.Size = new System.Drawing.Size(401, 103);
|
||||||
tTogglePanel1.Size = new System.Drawing.Size(401, 119);
|
togglePanel1.TabIndex = 0;
|
||||||
tTogglePanel1.TabIndex = 0;
|
togglePanel1.Title = "Appearance";
|
||||||
tTogglePanel1.Title = "Appearance";
|
togglePanel1.TitleContextMenuStrip = null;
|
||||||
tTogglePanel1.TitleContextMenuStrip = null;
|
togglePanel1.TitleCursor = Cursors.Default;
|
||||||
tTogglePanel1.TitleCursor = Cursors.Default;
|
|
||||||
//
|
//
|
||||||
// yesNoPickerBox1
|
// yesNoPickerBox1
|
||||||
//
|
//
|
||||||
yesNoPickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox1.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox1.EnableReactiveVisual = true;
|
yesNoPickerBox1.EnableMovable = false;
|
||||||
yesNoPickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
yesNoPickerBox1.Location = new System.Drawing.Point(311, 61);
|
||||||
yesNoPickerBox1.Location = new System.Drawing.Point(307, 64);
|
|
||||||
yesNoPickerBox1.Name = "yesNoPickerBox1";
|
yesNoPickerBox1.Name = "yesNoPickerBox1";
|
||||||
yesNoPickerBox1.Padding = new Padding(4, 4, 3, 3);
|
yesNoPickerBox1.SelectedIndex = 0;
|
||||||
yesNoPickerBox1.SelectedIndex = 1;
|
yesNoPickerBox1.Size = new System.Drawing.Size(80, 32);
|
||||||
yesNoPickerBox1.Size = new System.Drawing.Size(84, 34);
|
yesNoPickerBox1.TabIndex = 197;
|
||||||
yesNoPickerBox1.TabIndex = 195;
|
|
||||||
yesNoPickerBox1.TabStop = false;
|
yesNoPickerBox1.TabStop = false;
|
||||||
yesNoPickerBox1.Value = true;
|
yesNoPickerBox1.Value = false;
|
||||||
|
//
|
||||||
|
// numericBox1
|
||||||
|
//
|
||||||
|
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
numericBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
numericBox1.EnableMovable = false;
|
||||||
|
numericBox1.Location = new System.Drawing.Point(251, 19);
|
||||||
|
numericBox1.Maximum = 100;
|
||||||
|
numericBox1.Minimum = 1;
|
||||||
|
numericBox1.Name = "numericBox1";
|
||||||
|
numericBox1.Size = new System.Drawing.Size(140, 32);
|
||||||
|
numericBox1.TabIndex = 196;
|
||||||
|
numericBox1.TabStop = false;
|
||||||
|
numericBox1.Value = 1;
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
@ -267,53 +172,108 @@ namespace RokettoLaunch
|
|||||||
label2.Text = "Show Big Icons";
|
label2.Text = "Show Big Icons";
|
||||||
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// tTogglePanel2
|
// label4
|
||||||
//
|
//
|
||||||
tTogglePanel2.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
label4.AutoSize = true;
|
||||||
tTogglePanel2.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
label4.BackColor = System.Drawing.Color.Transparent;
|
||||||
tTogglePanel2.Controls.Add(yesNoPickerBox4);
|
label4.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
tTogglePanel2.Controls.Add(label3);
|
label4.Location = new System.Drawing.Point(1, 22);
|
||||||
tTogglePanel2.Controls.Add(label1);
|
label4.Margin = new Padding(0);
|
||||||
tTogglePanel2.Controls.Add(textBox1);
|
label4.Name = "label4";
|
||||||
tTogglePanel2.Controls.Add(yesNoPickerBox2);
|
label4.Padding = new Padding(0, 8, 0, 0);
|
||||||
tTogglePanel2.Controls.Add(yesNoPickerBox3);
|
label4.Size = new System.Drawing.Size(76, 23);
|
||||||
tTogglePanel2.Controls.Add(label6);
|
label4.TabIndex = 193;
|
||||||
tTogglePanel2.Controls.Add(label7);
|
label4.Text = "Tiles Per Row";
|
||||||
tTogglePanel2.ExpandedHeight = 206;
|
label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
tTogglePanel2.ForeColor = System.Drawing.Color.FromArgb(99, 105, 119);
|
//
|
||||||
tTogglePanel2.HeaderPadding = new Padding(4, 0, 0, 2);
|
// togglePanel2
|
||||||
tTogglePanel2.IsOpen = true;
|
//
|
||||||
tTogglePanel2.Location = new System.Drawing.Point(0, 119);
|
togglePanel2.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
||||||
tTogglePanel2.Margin = new Padding(0);
|
togglePanel2.CloseIcon = "H";
|
||||||
tTogglePanel2.Name = "tTogglePanel2";
|
togglePanel2.Controls.Add(label6);
|
||||||
tTogglePanel2.Padding = new Padding(0, 22, 0, 0);
|
togglePanel2.Controls.Add(yesNoPickerBox4);
|
||||||
tTogglePanel2.Size = new System.Drawing.Size(401, 206);
|
togglePanel2.Controls.Add(textBox1);
|
||||||
tTogglePanel2.TabIndex = 1;
|
togglePanel2.Controls.Add(yesNoPickerBox2);
|
||||||
tTogglePanel2.Title = "Behaviour";
|
togglePanel2.Controls.Add(label3);
|
||||||
tTogglePanel2.TitleContextMenuStrip = null;
|
togglePanel2.Controls.Add(label1);
|
||||||
tTogglePanel2.TitleCursor = Cursors.Default;
|
togglePanel2.EnableMovable = false;
|
||||||
|
togglePanel2.ExpandedHeight = 148;
|
||||||
|
togglePanel2.HeaderPadding = new Padding(4, 0, 0, 2);
|
||||||
|
togglePanel2.IconWidth = 20;
|
||||||
|
togglePanel2.Location = new System.Drawing.Point(10, 113);
|
||||||
|
togglePanel2.Name = "togglePanel2";
|
||||||
|
togglePanel2.OpenIcon = "G";
|
||||||
|
togglePanel2.Size = new System.Drawing.Size(401, 148);
|
||||||
|
togglePanel2.TabIndex = 1;
|
||||||
|
togglePanel2.Title = "Behaviour";
|
||||||
|
togglePanel2.TitleContextMenuStrip = null;
|
||||||
|
togglePanel2.TitleCursor = Cursors.Default;
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
label6.AutoSize = true;
|
||||||
|
label6.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
label6.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
label6.Location = new System.Drawing.Point(1, 106);
|
||||||
|
label6.Margin = new Padding(0);
|
||||||
|
label6.Name = "label6";
|
||||||
|
label6.Padding = new Padding(0, 8, 0, 0);
|
||||||
|
label6.Size = new System.Drawing.Size(116, 23);
|
||||||
|
label6.TabIndex = 182;
|
||||||
|
label6.Text = "Close To System Tray";
|
||||||
|
label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// yesNoPickerBox4
|
// yesNoPickerBox4
|
||||||
//
|
//
|
||||||
yesNoPickerBox4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox4.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox4.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox4.EnableReactiveVisual = true;
|
yesNoPickerBox4.EnableMovable = false;
|
||||||
yesNoPickerBox4.Font = new System.Drawing.Font("Segoe UI", 9F);
|
yesNoPickerBox4.Location = new System.Drawing.Point(311, 64);
|
||||||
yesNoPickerBox4.Location = new System.Drawing.Point(307, 151);
|
|
||||||
yesNoPickerBox4.Name = "yesNoPickerBox4";
|
yesNoPickerBox4.Name = "yesNoPickerBox4";
|
||||||
yesNoPickerBox4.Padding = new Padding(4, 4, 3, 3);
|
yesNoPickerBox4.SelectedIndex = 0;
|
||||||
yesNoPickerBox4.SelectedIndex = 1;
|
yesNoPickerBox4.Size = new System.Drawing.Size(80, 32);
|
||||||
yesNoPickerBox4.Size = new System.Drawing.Size(84, 34);
|
yesNoPickerBox4.TabIndex = 195;
|
||||||
yesNoPickerBox4.TabIndex = 191;
|
|
||||||
yesNoPickerBox4.TabStop = false;
|
yesNoPickerBox4.TabStop = false;
|
||||||
yesNoPickerBox4.Value = true;
|
yesNoPickerBox4.Value = false;
|
||||||
|
//
|
||||||
|
// textBox1
|
||||||
|
//
|
||||||
|
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
textBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
textBox1.EnableMovable = false;
|
||||||
|
textBox1.Icon = "O";
|
||||||
|
textBox1.IconSize = 13F;
|
||||||
|
results1.IsAlt = false;
|
||||||
|
results1.IsCtrl = false;
|
||||||
|
results1.IsShift = false;
|
||||||
|
results1.Key = Keys.None;
|
||||||
|
textBox1.KeyCodeResults = results1;
|
||||||
|
textBox1.Location = new System.Drawing.Point(211, 22);
|
||||||
|
textBox1.Name = "textBox1";
|
||||||
|
textBox1.Size = new System.Drawing.Size(180, 32);
|
||||||
|
textBox1.TabIndex = 194;
|
||||||
|
textBox1.TabStop = false;
|
||||||
|
textBox1.UseSystemPasswordChar = false;
|
||||||
|
//
|
||||||
|
// yesNoPickerBox2
|
||||||
|
//
|
||||||
|
yesNoPickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
yesNoPickerBox2.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
yesNoPickerBox2.EnableMovable = false;
|
||||||
|
yesNoPickerBox2.Location = new System.Drawing.Point(311, 106);
|
||||||
|
yesNoPickerBox2.Name = "yesNoPickerBox2";
|
||||||
|
yesNoPickerBox2.SelectedIndex = 0;
|
||||||
|
yesNoPickerBox2.Size = new System.Drawing.Size(80, 32);
|
||||||
|
yesNoPickerBox2.TabIndex = 192;
|
||||||
|
yesNoPickerBox2.TabStop = false;
|
||||||
|
yesNoPickerBox2.Value = false;
|
||||||
//
|
//
|
||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
label3.AutoSize = true;
|
label3.AutoSize = true;
|
||||||
label3.BackColor = System.Drawing.Color.Transparent;
|
label3.BackColor = System.Drawing.Color.Transparent;
|
||||||
label3.ForeColor = System.Drawing.SystemColors.ControlText;
|
label3.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
label3.Location = new System.Drawing.Point(1, 151);
|
label3.Location = new System.Drawing.Point(1, 64);
|
||||||
label3.Margin = new Padding(0);
|
label3.Margin = new Padding(0);
|
||||||
label3.Name = "label3";
|
label3.Name = "label3";
|
||||||
label3.Padding = new Padding(0, 8, 0, 0);
|
label3.Padding = new Padding(0, 8, 0, 0);
|
||||||
@ -322,16 +282,65 @@ namespace RokettoLaunch
|
|||||||
label3.Text = "Always On Top";
|
label3.Text = "Always On Top";
|
||||||
label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// dialogFooter1
|
// label1
|
||||||
//
|
//
|
||||||
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
|
label1.AutoSize = true;
|
||||||
dialogFooter1.Button1Text = "&Save";
|
label1.BackColor = System.Drawing.Color.Transparent;
|
||||||
dialogFooter1.Dialog = this;
|
label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
dialogFooter1.Dock = DockStyle.Bottom;
|
label1.Location = new System.Drawing.Point(1, 22);
|
||||||
dialogFooter1.IsBusy = false;
|
label1.Margin = new Padding(0);
|
||||||
dialogFooter1.Location = new System.Drawing.Point(0, 437);
|
label1.Name = "label1";
|
||||||
dialogFooter1.Name = "dialogFooter1";
|
label1.Padding = new Padding(0, 8, 0, 0);
|
||||||
dialogFooter1.Size = new System.Drawing.Size(444, 84);
|
label1.Size = new System.Drawing.Size(115, 23);
|
||||||
|
label1.TabIndex = 153;
|
||||||
|
label1.Text = "Show Toggle Hotkey";
|
||||||
|
label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// togglePanel3
|
||||||
|
//
|
||||||
|
togglePanel3.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
||||||
|
togglePanel3.CloseIcon = "H";
|
||||||
|
togglePanel3.Controls.Add(label7);
|
||||||
|
togglePanel3.Controls.Add(yesNoPickerBox3);
|
||||||
|
togglePanel3.EnableMovable = false;
|
||||||
|
togglePanel3.ExpandedHeight = 64;
|
||||||
|
togglePanel3.HeaderPadding = new Padding(4, 0, 0, 2);
|
||||||
|
togglePanel3.IconWidth = 20;
|
||||||
|
togglePanel3.Location = new System.Drawing.Point(10, 271);
|
||||||
|
togglePanel3.Name = "togglePanel3";
|
||||||
|
togglePanel3.OpenIcon = "G";
|
||||||
|
togglePanel3.Size = new System.Drawing.Size(401, 64);
|
||||||
|
togglePanel3.TabIndex = 2;
|
||||||
|
togglePanel3.Title = "Action";
|
||||||
|
togglePanel3.TitleContextMenuStrip = null;
|
||||||
|
togglePanel3.TitleCursor = Cursors.Default;
|
||||||
|
//
|
||||||
|
// label7
|
||||||
|
//
|
||||||
|
label7.AutoSize = true;
|
||||||
|
label7.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
label7.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
label7.Location = new System.Drawing.Point(1, 22);
|
||||||
|
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;
|
||||||
|
//
|
||||||
|
// yesNoPickerBox3
|
||||||
|
//
|
||||||
|
yesNoPickerBox3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
yesNoPickerBox3.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
yesNoPickerBox3.EnableMovable = false;
|
||||||
|
yesNoPickerBox3.Location = new System.Drawing.Point(311, 22);
|
||||||
|
yesNoPickerBox3.Name = "yesNoPickerBox3";
|
||||||
|
yesNoPickerBox3.SelectedIndex = 0;
|
||||||
|
yesNoPickerBox3.Size = new System.Drawing.Size(80, 32);
|
||||||
|
yesNoPickerBox3.TabIndex = 193;
|
||||||
|
yesNoPickerBox3.TabStop = false;
|
||||||
|
yesNoPickerBox3.Value = false;
|
||||||
//
|
//
|
||||||
// OptionsForm
|
// OptionsForm
|
||||||
//
|
//
|
||||||
@ -339,52 +348,36 @@ namespace RokettoLaunch
|
|||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
BackColor = System.Drawing.Color.White;
|
BackColor = System.Drawing.Color.White;
|
||||||
ClientSize = new System.Drawing.Size(444, 521);
|
ClientSize = new System.Drawing.Size(444, 521);
|
||||||
Controls.Add(dialogFooter1);
|
|
||||||
Controls.Add(flowLayoutPanel1);
|
Controls.Add(flowLayoutPanel1);
|
||||||
|
Controls.Add(dialogFooter1);
|
||||||
MinimumSize = new System.Drawing.Size(460, 560);
|
MinimumSize = new System.Drawing.Size(460, 560);
|
||||||
Name = "OptionsForm";
|
Name = "OptionsForm";
|
||||||
Text = "Options";
|
Text = "Options";
|
||||||
flowLayoutPanel1.ResumeLayout(false);
|
flowLayoutPanel1.ResumeLayout(false);
|
||||||
tTogglePanel1.ResumeLayout(false);
|
togglePanel1.ResumeLayout(false);
|
||||||
tTogglePanel1.PerformLayout();
|
togglePanel1.PerformLayout();
|
||||||
tTogglePanel2.ResumeLayout(false);
|
togglePanel2.ResumeLayout(false);
|
||||||
tTogglePanel2.PerformLayout();
|
togglePanel2.PerformLayout();
|
||||||
|
togglePanel3.ResumeLayout(false);
|
||||||
|
togglePanel3.PerformLayout();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnLoad(EventArgs e)
|
public App4Options Result
|
||||||
{
|
|
||||||
base.OnLoad(e);
|
|
||||||
|
|
||||||
flowLayoutPanel1_Resize(null, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void flowLayoutPanel1_Resize(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var width = flowLayoutPanel1.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth;
|
|
||||||
|
|
||||||
foreach (var item in flowLayoutPanel1.Controls.OfType<Control>())
|
|
||||||
{
|
|
||||||
item.Width = width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public AppOptions Result
|
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_appSession == null)
|
if (_appSession == null)
|
||||||
{
|
{
|
||||||
_appSession = new AppOptions();
|
_appSession = new App4Options();
|
||||||
}
|
}
|
||||||
|
|
||||||
_appSession.TilesPerRow = numericBox1.Value;
|
_appSession.TilesPerRow = numericBox1.Value;
|
||||||
_appSession.ShowBigIcons = yesNoPickerBox1.Value;
|
_appSession.ShowBigIcons = yesNoPickerBox1.Value;
|
||||||
_appSession.ShowToggleHotkey = textBox1.KeyCodeResults;
|
_appSession.ShowToggleHotkey = textBox1.KeyCodeResults;
|
||||||
|
_appSession.AlwaysOnTop = yesNoPickerBox4.Value;
|
||||||
_appSession.HideOnClose = yesNoPickerBox2.Value;
|
_appSession.HideOnClose = yesNoPickerBox2.Value;
|
||||||
_appSession.HideOnExecute = yesNoPickerBox3.Value;
|
_appSession.HideOnExecute = yesNoPickerBox3.Value;
|
||||||
_appSession.AlwaysOnTop = yesNoPickerBox4.Value;
|
|
||||||
|
|
||||||
return _appSession;
|
return _appSession;
|
||||||
}
|
}
|
||||||
|
|||||||
13
Program.cs
13
Program.cs
@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using RyzStudio.Windows.Forms;
|
||||||
|
|
||||||
namespace RokettoLaunch
|
namespace RokettoLaunch
|
||||||
{
|
{
|
||||||
@ -11,10 +13,19 @@ namespace RokettoLaunch
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
|
var services = new ServiceCollection();
|
||||||
|
services.AddSingleton<IFileSessionManager, FileSessionManager>();
|
||||||
|
services.AddTransient<MainForm>();
|
||||||
|
services.AddTransient<LoadingForm>();
|
||||||
|
|
||||||
|
var provider = services.BuildServiceProvider();
|
||||||
|
|
||||||
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new MainForm());
|
//Application.Run(new MainForm());
|
||||||
|
|
||||||
|
Application.Run(provider.GetRequiredService<MainForm>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net8.0-windows8.0</TargetFramework>
|
<TargetFramework>net10.0-windows8.0</TargetFramework>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<NoWin32Manifest>true</NoWin32Manifest>
|
<NoWin32Manifest>true</NoWin32Manifest>
|
||||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<Copyright>Ray Lam</Copyright>
|
<Copyright>Ray Lam</Copyright>
|
||||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.0.0</FileVersion>
|
<FileVersion>1.0.0.0</FileVersion>
|
||||||
<Version>0.3.6.0604</Version>
|
<Version>0.4.1.0202</Version>
|
||||||
<EnableNETAnalyzers>False</EnableNETAnalyzers>
|
<EnableNETAnalyzers>False</EnableNETAnalyzers>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<PackageIcon>icon-128.png</PackageIcon>
|
<PackageIcon>icon-128.png</PackageIcon>
|
||||||
@ -79,8 +79,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="RyzStudio" Version="8.1.6.125" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.7" />
|
||||||
<PackageReference Include="RyzStudio.Windows.Forms" Version="8.1.6.25" />
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\ryzstudio8\core\RyzStudio.csproj" />
|
||||||
|
<ProjectReference Include="..\ryzstudio8\windows.forms\RyzStudio.Windows.Forms.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -89,6 +93,12 @@
|
|||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>AppResource.resx</DependentUpon>
|
<DependentUpon>AppResource.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="CopyToTileForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="LoadingForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -1,16 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using RokettoLaunch.Models;
|
|
||||||
using RyzStudio.Windows.Forms;
|
|
||||||
|
|
||||||
namespace RokettoLaunch.Windows.Forms
|
namespace RokettoLaunch.Windows.Forms
|
||||||
{
|
{
|
||||||
public partial class TilePanel : RyzStudio.Windows.TileForms.Tile
|
public partial class TilePanel : RyzStudio.Windows.TileForms.Tile
|
||||||
{
|
{
|
||||||
|
public delegate Task OnFileDropEvent(TilePanel sender, Keys keys, List<string> paths);
|
||||||
|
|
||||||
|
|
||||||
public TilePanel()
|
public TilePanel()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -20,16 +22,20 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
this.Size = new Size(70, 70);
|
this.Size = new Size(70, 70);
|
||||||
this.AutoScaleMode = AutoScaleMode.None;
|
this.AutoScaleMode = AutoScaleMode.None;
|
||||||
|
|
||||||
this.EnableMovable = true;
|
this.EnableMovable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
|
public Guid TileId { get; set; } = Guid.Empty;
|
||||||
|
|
||||||
[Browsable(false)]
|
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public TileModel ModelInfo { get; protected set; } = new TileModel();
|
public bool IsGroup { get; set; } = false;
|
||||||
|
|
||||||
public RyzStudio.Windows.TileForms.TileContainer TileContainer { get => UIControl.GetParentsUntil<RyzStudio.Windows.TileForms.TileContainer>(this); }
|
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
|
public ContextMenuStrip TileContextMenu { get; set; }
|
||||||
|
|
||||||
protected MainForm MainForm { get => UIControl.GetParentsUntil<MainForm>(this); }
|
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
|
public OnFileDropEvent OnFileDrop { get; set; }
|
||||||
|
|
||||||
|
|
||||||
protected override void OnDragOver(DragEventArgs e)
|
protected override void OnDragOver(DragEventArgs e)
|
||||||
@ -41,252 +47,21 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
|
|
||||||
protected override void OnDragDrop(DragEventArgs e)
|
protected override void OnDragDrop(DragEventArgs e)
|
||||||
{
|
{
|
||||||
string[] fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
var fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
||||||
fileList = fileList ?? new string[0];
|
if (fileList == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (fileList.Length <= 0)
|
if (fileList.Length <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.ModelInfo.IsGroup)
|
if (this.OnFileDrop != null)
|
||||||
{
|
{
|
||||||
foreach (var item in fileList)
|
this.OnFileDrop(this, Control.ModifierKeys, fileList.ToList());
|
||||||
{
|
|
||||||
var model = GetTileModel(item);
|
|
||||||
if (model == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ModelInfo.Items.Add(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
InvalidateGroupMenu();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (fileList.Length > 1)
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show("Do you want to add this as a folder ?", "Convert to Folder", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
|
||||||
if (result == DialogResult.Yes)
|
|
||||||
{
|
|
||||||
this.ModelInfo.Title = "New Folder";
|
|
||||||
this.ModelInfo.IsGroup = true;
|
|
||||||
|
|
||||||
foreach (var item in fileList)
|
|
||||||
{
|
|
||||||
var model = GetTileModel(item);
|
|
||||||
if (model == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ModelInfo.Items.Add(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
InvalidateGroupMenu();
|
|
||||||
}
|
|
||||||
else if (result == DialogResult.No)
|
|
||||||
{
|
|
||||||
LoadInfo(fileList[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LoadInfo(fileList[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnMouseClick(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
if (Control.ModifierKeys == Keys.Control)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.ModelInfo == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
{
|
|
||||||
if (this.ModelInfo.IsGroup)
|
|
||||||
{
|
|
||||||
var iconSize = ((this.MainForm?.CurrentSession?.ShowBigIcons ?? true) ? 24 : 16);
|
|
||||||
|
|
||||||
this.LeftContextMenuStrip.ImageScalingSize = new Size(iconSize, iconSize);
|
|
||||||
|
|
||||||
this.LeftContextMenuStrip?.Show(this, e.Location);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
OnMouseDoubleClick(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.Button == MouseButtons.Middle)
|
|
||||||
{
|
|
||||||
var mainForm = UIControl.GetParentsUntil<MainForm>(this);
|
|
||||||
if (mainForm == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.ModelInfo.IsGroup)
|
|
||||||
{
|
|
||||||
var result = MessageBox.Show("Are you sure you want to duplicate tile?", "Duplicate Tile", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
|
||||||
if (result != DialogResult.Yes)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mainForm.DuplicateTile(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnMouseDoubleClick(e);
|
|
||||||
|
|
||||||
if (Control.ModifierKeys == Keys.Control)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
{
|
|
||||||
Execute(this.ModelInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void LoadInfo(TileModel model)
|
|
||||||
{
|
|
||||||
this.ModelInfo = model;
|
|
||||||
|
|
||||||
InvalidateGroupMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadInfo(string filename)
|
|
||||||
{
|
|
||||||
var model = GetTileModel(filename);
|
|
||||||
if (model == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadInfo(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Execute(TileModel model)
|
|
||||||
{
|
|
||||||
if (model == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (model.IsGroup)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.MainForm != null)
|
|
||||||
{
|
|
||||||
if (this.MainForm.CurrentSession?.HideOnExecute ?? true)
|
|
||||||
{
|
|
||||||
this.MainForm.Visible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RyzStudio.Diagnostics.Process.Execute(model.CleanProcessFilename, model.CleanProcessWorkingDirectory, model.CleanProcessArgument, model.ProcessWindowStyle, model.ProcessAsAdmin);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InvalidateGroupMenu()
|
|
||||||
{
|
|
||||||
this.Title = this.ModelInfo.Title;
|
|
||||||
this.LargeIcon = (this.ModelInfo.IsGroup ? AppResource.folder_32 : RyzStudio.IO.File.GetIcon(this.ModelInfo.CleanProcessFilename));
|
|
||||||
|
|
||||||
if (this.ModelInfo.IsGroup)
|
|
||||||
{
|
|
||||||
this.ModelInfo.ProcessFilename = "";
|
|
||||||
this.ModelInfo.ProcessArgument = "";
|
|
||||||
this.ModelInfo.ProcessAsAdmin = false;
|
|
||||||
this.ModelInfo.ProcessWindowStyle = ProcessWindowStyle.Normal;
|
|
||||||
this.ModelInfo.ProcessWorkingDirectory = "";
|
|
||||||
this.ModelInfo.Version = "";
|
|
||||||
|
|
||||||
if (this.LeftContextMenuStrip == null) this.LeftContextMenuStrip = new ContextMenuStrip();
|
|
||||||
this.LeftContextMenuStrip.Items.Clear();
|
|
||||||
|
|
||||||
foreach (var item in this.ModelInfo?.Items ?? new System.Collections.Generic.List<TileModel>())
|
|
||||||
{
|
|
||||||
ToolStripItem toolItem = this.LeftContextMenuStrip.Items.Add(item.Title);
|
|
||||||
toolItem.Image = RyzStudio.IO.File.GetIcon(item.CleanProcessFilename);
|
|
||||||
toolItem.Tag = item;
|
|
||||||
toolItem.Click += (object sender, EventArgs e) =>
|
|
||||||
{
|
|
||||||
var menuItem = (System.Windows.Forms.ToolStripMenuItem)sender;
|
|
||||||
if (menuItem == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var model = (menuItem.Tag as TileModel);
|
|
||||||
if (model == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Execute(model);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
toolTip1.SetToolTip(this, this.Title);
|
|
||||||
}
|
|
||||||
|
|
||||||
private TileModel GetTileModel(string filename)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(filename))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
TileModel model = new TileModel()
|
|
||||||
{
|
|
||||||
ProcessFilename = filename,
|
|
||||||
Title = Path.GetFileName(filename)
|
|
||||||
};
|
|
||||||
|
|
||||||
// exe
|
|
||||||
if (Path.GetExtension(filename).Equals(".exe", StringComparison.CurrentCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
if (File.Exists(filename))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(filename);
|
|
||||||
if (fvi != null)
|
|
||||||
{
|
|
||||||
model.Title = fvi.ProductName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(model.Title))
|
|
||||||
{
|
|
||||||
model.Title = Path.GetFileNameWithoutExtension(filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return model;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
16
skye.sln
16
skye.sln
@ -1,10 +1,14 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 18
|
||||||
VisualStudioVersion = 17.4.33205.214
|
VisualStudioVersion = 18.5.11723.231
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RokettoLaunch", "RokettoLaunch.csproj", "{4833FB27-0817-4720-A54B-180369B0C374}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RokettoLaunch", "RokettoLaunch.csproj", "{4833FB27-0817-4720-A54B-180369B0C374}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RyzStudio", "..\ryzstudio8\core\RyzStudio.csproj", "{BBB7657A-3CE7-4333-9DCE-3137973F538E}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RyzStudio.Windows.Forms", "..\ryzstudio8\windows.forms\RyzStudio.Windows.Forms.csproj", "{EF73F363-4F93-5128-6F96-C797FA7CD94B}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -15,6 +19,14 @@ Global
|
|||||||
{4833FB27-0817-4720-A54B-180369B0C374}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4833FB27-0817-4720-A54B-180369B0C374}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.Build.0 = Release|Any CPU
|
{4833FB27-0817-4720-A54B-180369B0C374}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{BBB7657A-3CE7-4333-9DCE-3137973F538E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{EF73F363-4F93-5128-6F96-C797FA7CD94B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user