Compare commits
No commits in common. "642d3da10574ba6ea4e32251367a4733220575a9" and "810b129f94579df50b3492d466642ef108d2b072" have entirely different histories.
642d3da105
...
810b129f94
@ -182,13 +182,13 @@ namespace RokettoLaunch.DTOs.SaveFile
|
|||||||
public string ResolvedStartPath { get; private set; }
|
public string ResolvedStartPath { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
public Item CopyOf(bool addPrefix = true)
|
public Item CopyOf()
|
||||||
{
|
{
|
||||||
var json = JsonSerializer.Serialize(this);
|
var json = JsonSerializer.Serialize(this);
|
||||||
|
|
||||||
var newTileInfo = JsonSerializer.Deserialize<Item>(json);
|
var newTileInfo = JsonSerializer.Deserialize<Item>(json);
|
||||||
newTileInfo.Id = Guid.NewGuid();
|
newTileInfo.Id = Guid.NewGuid();
|
||||||
newTileInfo.Title = (addPrefix ? "Copy of " : "") + newTileInfo.Title;
|
newTileInfo.Title = "Copy of " + newTileInfo.Title;
|
||||||
newTileInfo.Position = new Point(-1, -1);
|
newTileInfo.Position = new Point(-1, -1);
|
||||||
|
|
||||||
if (newTileInfo.IsGroup)
|
if (newTileInfo.IsGroup)
|
||||||
|
|||||||
@ -10,7 +10,7 @@ namespace RokettoLaunch.DTOs.SaveFile
|
|||||||
|
|
||||||
public bool ShowBigIcons { get; set; } = true;
|
public bool ShowBigIcons { get; set; } = true;
|
||||||
|
|
||||||
public RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results ShowToggleHotkey { get; set; } = null;
|
public RyzStudio.Windows.ThemedForms.ButtonTextBox.ThKeyCodeTextBox.Results ShowToggleHotkey { get; set; } = null;
|
||||||
|
|
||||||
public bool HideOnClose { get; set; } = true;
|
public bool HideOnClose { get; set; } = true;
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ namespace RokettoLaunch.Forms
|
|||||||
public class CopyToTileForm : Form
|
public class CopyToTileForm : Form
|
||||||
{
|
{
|
||||||
private Label label1;
|
private Label label1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3PickerBox pickerBox1;
|
private ThPickerBox pickerBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.SetupDialog();
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = "Copy To...";
|
this.Text = "Copy To...";
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ namespace RokettoLaunch.Forms
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
pickerBox1 = new RyzStudio.Windows.ThemedForms.T3PickerBox();
|
pickerBox1 = new ThPickerBox();
|
||||||
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
|
|||||||
@ -1,18 +1,22 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using RokettoLaunch.DTOs.SaveFile;
|
using RokettoLaunch.DTOs.SaveFile;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.ThemedForms;
|
||||||
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
|
|
||||||
namespace RokettoLaunch.Forms
|
namespace RokettoLaunch.Forms
|
||||||
{
|
{
|
||||||
public class EditFolderForm : Form
|
public class EditFolderForm : Form
|
||||||
{
|
{
|
||||||
private Label label1;
|
private Label label1;
|
||||||
private RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox textBox1;
|
private ThClearableTextBox textBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3ListBox listBox1;
|
private ThListBox listBox1;
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
|
||||||
@ -20,18 +24,11 @@ namespace RokettoLaunch.Forms
|
|||||||
private App4Options.Item result = null;
|
private App4Options.Item result = null;
|
||||||
|
|
||||||
|
|
||||||
public EditFolderForm()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
this.SetupDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
public EditFolderForm(App4Options.Item model = null)
|
public EditFolderForm(App4Options.Item model = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.SetupDialog();
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = (result == null) ? "Add Folder" : "Edit Folder";
|
this.Text = (result == null) ? "Add Folder" : "Edit Folder";
|
||||||
|
|
||||||
@ -57,9 +54,9 @@ namespace RokettoLaunch.Forms
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
textBox1 = new RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox();
|
textBox1 = new ThClearableTextBox();
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
listBox1 = new RyzStudio.Windows.ThemedForms.T3ListBox();
|
listBox1 = new ThListBox();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
@ -95,7 +92,6 @@ namespace RokettoLaunch.Forms
|
|||||||
//
|
//
|
||||||
// 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.EnableMovable = false;
|
listBox1.EnableMovable = false;
|
||||||
|
|||||||
@ -3,6 +3,8 @@ using System.Windows.Forms;
|
|||||||
using RokettoLaunch.DTOs.SaveFile;
|
using RokettoLaunch.DTOs.SaveFile;
|
||||||
using RokettoLaunch.Windows.Forms;
|
using RokettoLaunch.Windows.Forms;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
|
using RyzStudio.Windows.ThemedForms.PickerBox;
|
||||||
|
|
||||||
namespace RokettoLaunch.Forms
|
namespace RokettoLaunch.Forms
|
||||||
{
|
{
|
||||||
@ -10,13 +12,13 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private Label label1;
|
private Label label1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3YnPickerBox pickerBox1;
|
private ThYesNoPickerBox pickerBox1;
|
||||||
private RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox textBox1;
|
private ThClearableTextBox textBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
private THorizontalSeparator horizontalSeparator1;
|
private THorizontalSeparator horizontalSeparator1;
|
||||||
private RyzStudio.Windows.ThemedForms.T4NumericBox numericBox1;
|
private RyzStudio.Windows.ThemedForms.ThNumericBox numericBox1;
|
||||||
private Label label4;
|
private Label label4;
|
||||||
private RyzStudio.Windows.ThemedForms.T4NumericBox numericBox2;
|
private RyzStudio.Windows.ThemedForms.ThNumericBox numericBox2;
|
||||||
private Label label3;
|
private Label label3;
|
||||||
private App4Options.Group result = null;
|
private App4Options.Group result = null;
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.SetupDialog();
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = (result == null) ? "Add Group" : "Edit Group";
|
this.Text = (result == null) ? "Add Group" : "Edit Group";
|
||||||
|
|
||||||
@ -51,15 +53,15 @@ namespace RokettoLaunch.Forms
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
textBox1 = new RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox();
|
textBox1 = new ThClearableTextBox();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
pickerBox1 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
|
pickerBox1 = new ThYesNoPickerBox();
|
||||||
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
||||||
horizontalSeparator1 = new THorizontalSeparator();
|
horizontalSeparator1 = new THorizontalSeparator();
|
||||||
numericBox1 = new RyzStudio.Windows.ThemedForms.T4NumericBox();
|
numericBox1 = new RyzStudio.Windows.ThemedForms.ThNumericBox();
|
||||||
label4 = new Label();
|
label4 = new Label();
|
||||||
numericBox2 = new RyzStudio.Windows.ThemedForms.T4NumericBox();
|
numericBox2 = new RyzStudio.Windows.ThemedForms.ThNumericBox();
|
||||||
label3 = new Label();
|
label3 = new Label();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
|
|||||||
@ -4,6 +4,9 @@ using System.Drawing;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using RokettoLaunch.DTOs.SaveFile;
|
using RokettoLaunch.DTOs.SaveFile;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.ThemedForms;
|
||||||
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
|
using RyzStudio.Windows.ThemedForms.PickerBox;
|
||||||
|
|
||||||
namespace RokettoLaunch.Forms
|
namespace RokettoLaunch.Forms
|
||||||
{
|
{
|
||||||
@ -15,13 +18,13 @@ namespace RokettoLaunch.Forms
|
|||||||
private Label label3;
|
private Label label3;
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private Label label1;
|
private Label label1;
|
||||||
private RyzStudio.Windows.FontForms.TextBox.T4PathTextBox textBox2;
|
private ThPathTextBox textBox2;
|
||||||
private RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox textBox3;
|
private ThClearableTextBox textBox3;
|
||||||
private RyzStudio.Windows.FontForms.TextBox.T4PathTextBox textBox4;
|
private ThPathTextBox textBox4;
|
||||||
private RyzStudio.Windows.ThemedForms.T3PickerBox pickerBox1;
|
private ThPickerBox pickerBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3YnPickerBox pickerBox2;
|
private ThYesNoPickerBox pickerBox2;
|
||||||
private THorizontalSeparator horizontalSeparator1;
|
private THorizontalSeparator horizontalSeparator1;
|
||||||
private RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox textBox1;
|
private ThClearableTextBox textBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
|
||||||
|
|
||||||
|
|
||||||
@ -32,7 +35,7 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.SetupDialog();
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = (result == null) ? "Add Tile" : "Edit Tile";
|
this.Text = (result == null) ? "Add Tile" : "Edit Tile";
|
||||||
|
|
||||||
@ -55,18 +58,18 @@ namespace RokettoLaunch.Forms
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
textBox1 = new RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox();
|
textBox1 = new ThClearableTextBox();
|
||||||
label6 = new Label();
|
label6 = new Label();
|
||||||
label7 = new Label();
|
label7 = new Label();
|
||||||
label4 = new Label();
|
label4 = new Label();
|
||||||
label3 = new Label();
|
label3 = new Label();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
textBox2 = new RyzStudio.Windows.FontForms.TextBox.T4PathTextBox();
|
textBox2 = new ThPathTextBox();
|
||||||
textBox3 = new RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox();
|
textBox3 = new ThClearableTextBox();
|
||||||
textBox4 = new RyzStudio.Windows.FontForms.TextBox.T4PathTextBox();
|
textBox4 = new ThPathTextBox();
|
||||||
pickerBox1 = new RyzStudio.Windows.ThemedForms.T3PickerBox();
|
pickerBox1 = new ThPickerBox();
|
||||||
pickerBox2 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
|
pickerBox2 = new ThYesNoPickerBox();
|
||||||
horizontalSeparator1 = new THorizontalSeparator();
|
horizontalSeparator1 = new THorizontalSeparator();
|
||||||
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
@ -174,7 +177,7 @@ namespace RokettoLaunch.Forms
|
|||||||
//
|
//
|
||||||
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 = RyzStudio.Windows.FontForms.TextBox.T4PathTextBox.DialogType.OpenFile;
|
textBox2.DialogMode = ThPathTextBox.DialogType.OpenFile;
|
||||||
textBox2.EnableMovable = false;
|
textBox2.EnableMovable = false;
|
||||||
textBox2.FolderBrowserDialog = null;
|
textBox2.FolderBrowserDialog = null;
|
||||||
textBox2.Icon = "D";
|
textBox2.Icon = "D";
|
||||||
@ -205,7 +208,7 @@ namespace RokettoLaunch.Forms
|
|||||||
//
|
//
|
||||||
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 = RyzStudio.Windows.FontForms.TextBox.T4PathTextBox.DialogType.FolderBrowser;
|
textBox4.DialogMode = ThPathTextBox.DialogType.FolderBrowser;
|
||||||
textBox4.EnableMovable = false;
|
textBox4.EnableMovable = false;
|
||||||
textBox4.FolderBrowserDialog = null;
|
textBox4.FolderBrowserDialog = null;
|
||||||
textBox4.Icon = "D";
|
textBox4.Icon = "D";
|
||||||
|
|||||||
@ -11,8 +11,8 @@ namespace RokettoLaunch.Forms
|
|||||||
public class LoadingForm : Form
|
public class LoadingForm : Form
|
||||||
{
|
{
|
||||||
private TProgressBar progressBar1;
|
private TProgressBar progressBar1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3UserControl userControl1;
|
private RyzStudio.Windows.ThemedForms.ThUserControl userControl1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3UserControl userControl2;
|
private RyzStudio.Windows.ThemedForms.ThUserControl userControl2;
|
||||||
private TProgressBar progressBar2;
|
private TProgressBar progressBar2;
|
||||||
|
|
||||||
private App4Options result = null;
|
private App4Options result = null;
|
||||||
@ -25,7 +25,7 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.SetupDialog();
|
UISetup.Dialog(this, true);
|
||||||
|
|
||||||
this.Text = "Loading";
|
this.Text = "Loading";
|
||||||
}
|
}
|
||||||
@ -34,8 +34,8 @@ namespace RokettoLaunch.Forms
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
progressBar1 = new TProgressBar();
|
progressBar1 = new TProgressBar();
|
||||||
userControl1 = new RyzStudio.Windows.ThemedForms.T3UserControl();
|
userControl1 = new RyzStudio.Windows.ThemedForms.ThUserControl();
|
||||||
userControl2 = new RyzStudio.Windows.ThemedForms.T3UserControl();
|
userControl2 = new RyzStudio.Windows.ThemedForms.ThUserControl();
|
||||||
progressBar2 = new TProgressBar();
|
progressBar2 = new TProgressBar();
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
@ -137,8 +137,8 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
this.Clear();
|
this.Clear();
|
||||||
|
|
||||||
label1.SetText("Loading...");
|
UIControl.SetText(label1, "Loading...");
|
||||||
label2.SetText("... " + Path.GetFileName(loadFilename));
|
UIControl.SetText(label2, "... " + Path.GetFileName(loadFilename));
|
||||||
|
|
||||||
var newSession = await LoadSaveSessionWithVersion(loadFilename);
|
var newSession = await LoadSaveSessionWithVersion(loadFilename);
|
||||||
|
|
||||||
@ -146,12 +146,12 @@ namespace RokettoLaunch.Forms
|
|||||||
progressBar1.Maximum = newSession.Groups?.Count ?? 0;
|
progressBar1.Maximum = newSession.Groups?.Count ?? 0;
|
||||||
progressBar2.Maximum = 0;
|
progressBar2.Maximum = 0;
|
||||||
|
|
||||||
label1.SetText("Counting...");
|
UIControl.SetText(label1, "Counting...");
|
||||||
label2.SetText("");
|
UIControl.SetText(label2, "");
|
||||||
|
|
||||||
foreach (var group in newSession?.Groups ?? new List<App4Options.Group>())
|
foreach (var group in newSession?.Groups ?? new List<App4Options.Group>())
|
||||||
{
|
{
|
||||||
label2.SetText("... " + group.Title);
|
UIControl.SetText(label2, "... " + group.Title);
|
||||||
|
|
||||||
foreach (var item in group?.Items ?? new List<App4Options.Item>())
|
foreach (var item in group?.Items ?? new List<App4Options.Item>())
|
||||||
{
|
{
|
||||||
@ -169,8 +169,8 @@ namespace RokettoLaunch.Forms
|
|||||||
// Resolve paths
|
// Resolve paths
|
||||||
progressBar2.Value = 0;
|
progressBar2.Value = 0;
|
||||||
|
|
||||||
label1.SetText("Seeking...");
|
UIControl.SetText(label1, "Seeking...");
|
||||||
label2.SetText("");
|
UIControl.SetText(label2, "");
|
||||||
|
|
||||||
// Resolve paths
|
// Resolve paths
|
||||||
foreach (var group in newSession?.Groups ?? new List<App4Options.Group>())
|
foreach (var group in newSession?.Groups ?? new List<App4Options.Group>())
|
||||||
@ -179,7 +179,7 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
progressBar1.Value++;
|
progressBar1.Value++;
|
||||||
|
|
||||||
label2.SetText("... " + group.Title);
|
UIControl.SetText(label2, "... " + group.Title);
|
||||||
|
|
||||||
if (item.IsGroup)
|
if (item.IsGroup)
|
||||||
{
|
{
|
||||||
@ -187,7 +187,7 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
progressBar2.Value++;
|
progressBar2.Value++;
|
||||||
|
|
||||||
label2.SetText("... " + subItem.Title);
|
UIControl.SetText(label2, "... " + subItem.Title);
|
||||||
|
|
||||||
subItem.ResolvePaths();
|
subItem.ResolvePaths();
|
||||||
}
|
}
|
||||||
@ -196,7 +196,7 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
progressBar2.Value++;
|
progressBar2.Value++;
|
||||||
|
|
||||||
label2.SetText("... " + item.Title);
|
UIControl.SetText(label2, "... " + item.Title);
|
||||||
|
|
||||||
item.ResolvePaths();
|
item.ResolvePaths();
|
||||||
}
|
}
|
||||||
@ -205,8 +205,8 @@ namespace RokettoLaunch.Forms
|
|||||||
|
|
||||||
result = newSession;
|
result = newSession;
|
||||||
|
|
||||||
label1.SetText("Done");
|
UIControl.SetText(label1, "Done");
|
||||||
label2.SetText("Done");
|
UIControl.SetText(label2, "Done");
|
||||||
});
|
});
|
||||||
|
|
||||||
this.DialogResult = DialogResult.OK;
|
this.DialogResult = DialogResult.OK;
|
||||||
@ -237,8 +237,8 @@ namespace RokettoLaunch.Forms
|
|||||||
|
|
||||||
public void Clear()
|
public void Clear()
|
||||||
{
|
{
|
||||||
label1.SetText("Ready");
|
UIControl.SetText(label1, "Ready");
|
||||||
label2.SetText("");
|
UIControl.SetText(label2, "");
|
||||||
|
|
||||||
progressBar1.Value = progressBar1.Maximum = 0;
|
progressBar1.Value = progressBar1.Maximum = 0;
|
||||||
progressBar2.Value = progressBar2.Maximum = 0;
|
progressBar2.Value = progressBar2.Maximum = 0;
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using RokettoLaunch.DTOs.SaveFile;
|
using RokettoLaunch.DTOs.SaveFile;
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.ThemedForms;
|
||||||
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
|
using RyzStudio.Windows.ThemedForms.PickerBox;
|
||||||
|
|
||||||
namespace RokettoLaunch.Forms
|
namespace RokettoLaunch.Forms
|
||||||
{
|
{
|
||||||
@ -17,12 +20,12 @@ namespace RokettoLaunch.Forms
|
|||||||
private Label label1;
|
private Label label1;
|
||||||
private Label label6;
|
private Label label6;
|
||||||
private Label label7;
|
private Label label7;
|
||||||
private RyzStudio.Windows.ThemedForms.T3YnPickerBox yesNoPickerBox1;
|
private ThYesNoPickerBox yesNoPickerBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.T4NumericBox numericBox1;
|
private ThNumericBox numericBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3YnPickerBox yesNoPickerBox4;
|
private ThYesNoPickerBox yesNoPickerBox4;
|
||||||
private RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox textBox1;
|
private ThKeyCodeTextBox textBox1;
|
||||||
private RyzStudio.Windows.ThemedForms.T3YnPickerBox yesNoPickerBox2;
|
private ThYesNoPickerBox yesNoPickerBox2;
|
||||||
private RyzStudio.Windows.ThemedForms.T3YnPickerBox yesNoPickerBox3;
|
private ThYesNoPickerBox yesNoPickerBox3;
|
||||||
private TTogglePanel togglePanel3;
|
private TTogglePanel togglePanel3;
|
||||||
|
|
||||||
private App4Options _appSession = null;
|
private App4Options _appSession = null;
|
||||||
@ -32,11 +35,11 @@ namespace RokettoLaunch.Forms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.SetupDialog();
|
UISetup.Dialog(this, true);
|
||||||
|
UISetup.AutoSizeChildren(flowLayoutPanel1);
|
||||||
|
|
||||||
_appSession = appSession;
|
_appSession = appSession;
|
||||||
|
|
||||||
flowLayoutPanel1.AutoSizeChildren();
|
|
||||||
numericBox1.Minimum = 4;
|
numericBox1.Minimum = 4;
|
||||||
numericBox1.Maximum = 24;
|
numericBox1.Maximum = 24;
|
||||||
}
|
}
|
||||||
@ -47,7 +50,7 @@ namespace RokettoLaunch.Forms
|
|||||||
|
|
||||||
numericBox1.Value = _appSession?.TilesPerRow ?? 4;
|
numericBox1.Value = _appSession?.TilesPerRow ?? 4;
|
||||||
yesNoPickerBox1.Value = _appSession?.ShowBigIcons ?? true;
|
yesNoPickerBox1.Value = _appSession?.ShowBigIcons ?? true;
|
||||||
textBox1.UpdateKeyCode(_appSession?.ShowToggleHotkey ?? new RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results());
|
textBox1.UpdateKeyCode(_appSession?.ShowToggleHotkey ?? new ThKeyCodeTextBox.Results());
|
||||||
yesNoPickerBox4.Value = _appSession?.AlwaysOnTop ?? true;
|
yesNoPickerBox4.Value = _appSession?.AlwaysOnTop ?? true;
|
||||||
yesNoPickerBox2.Value = _appSession?.HideOnClose ?? true;
|
yesNoPickerBox2.Value = _appSession?.HideOnClose ?? true;
|
||||||
yesNoPickerBox3.Value = _appSession?.HideOnExecute ?? true;
|
yesNoPickerBox3.Value = _appSession?.HideOnExecute ?? true;
|
||||||
@ -55,32 +58,32 @@ namespace RokettoLaunch.Forms
|
|||||||
|
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results results1 = new RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results();
|
ThKeyCodeTextBox.Results results1 = new ThKeyCodeTextBox.Results();
|
||||||
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
|
||||||
flowLayoutPanel1 = new FlowLayoutPanel();
|
flowLayoutPanel1 = new FlowLayoutPanel();
|
||||||
togglePanel1 = new TTogglePanel();
|
togglePanel1 = new TTogglePanel();
|
||||||
yesNoPickerBox1 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
|
yesNoPickerBox1 = new ThYesNoPickerBox();
|
||||||
numericBox1 = new RyzStudio.Windows.ThemedForms.T4NumericBox();
|
numericBox1 = new ThNumericBox();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
label4 = new Label();
|
label4 = new Label();
|
||||||
togglePanel2 = new TTogglePanel();
|
togglePanel2 = new TTogglePanel();
|
||||||
label6 = new Label();
|
label6 = new Label();
|
||||||
yesNoPickerBox4 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
|
yesNoPickerBox4 = new ThYesNoPickerBox();
|
||||||
textBox1 = new RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox();
|
textBox1 = new ThKeyCodeTextBox();
|
||||||
yesNoPickerBox2 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
|
yesNoPickerBox2 = new ThYesNoPickerBox();
|
||||||
label3 = new Label();
|
label3 = new Label();
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
togglePanel3 = new TTogglePanel();
|
togglePanel3 = new TTogglePanel();
|
||||||
label7 = new Label();
|
label7 = new Label();
|
||||||
yesNoPickerBox3 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
|
yesNoPickerBox3 = new ThYesNoPickerBox();
|
||||||
flowLayoutPanel1.SuspendLayout();
|
flowLayoutPanel1.SuspendLayout();
|
||||||
togglePanel1.SuspendLayout();
|
togglePanel1.SuspendLayout();
|
||||||
togglePanel2.SuspendLayout();
|
togglePanel2.SuspendLayout();
|
||||||
togglePanel3.SuspendLayout();
|
togglePanel3.SuspendLayout();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// dialogFooter1
|
// dialogFooter1
|
||||||
//
|
//
|
||||||
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
|
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
|
||||||
dialogFooter1.Dock = DockStyle.Bottom;
|
dialogFooter1.Dock = DockStyle.Bottom;
|
||||||
dialogFooter1.EnableMovable = false;
|
dialogFooter1.EnableMovable = false;
|
||||||
@ -90,9 +93,9 @@ namespace RokettoLaunch.Forms
|
|||||||
dialogFooter1.Size = new System.Drawing.Size(444, 70);
|
dialogFooter1.Size = new System.Drawing.Size(444, 70);
|
||||||
dialogFooter1.TabIndex = 0;
|
dialogFooter1.TabIndex = 0;
|
||||||
dialogFooter1.TabStop = false;
|
dialogFooter1.TabStop = false;
|
||||||
//
|
//
|
||||||
// flowLayoutPanel1
|
// flowLayoutPanel1
|
||||||
//
|
//
|
||||||
flowLayoutPanel1.AutoScroll = true;
|
flowLayoutPanel1.AutoScroll = true;
|
||||||
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent;
|
||||||
flowLayoutPanel1.Controls.Add(togglePanel1);
|
flowLayoutPanel1.Controls.Add(togglePanel1);
|
||||||
@ -106,9 +109,9 @@ namespace RokettoLaunch.Forms
|
|||||||
flowLayoutPanel1.Size = new System.Drawing.Size(444, 451);
|
flowLayoutPanel1.Size = new System.Drawing.Size(444, 451);
|
||||||
flowLayoutPanel1.TabIndex = 195;
|
flowLayoutPanel1.TabIndex = 195;
|
||||||
flowLayoutPanel1.WrapContents = false;
|
flowLayoutPanel1.WrapContents = false;
|
||||||
//
|
//
|
||||||
// togglePanel1
|
// togglePanel1
|
||||||
//
|
//
|
||||||
togglePanel1.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
togglePanel1.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
||||||
togglePanel1.CloseIcon = "H";
|
togglePanel1.CloseIcon = "H";
|
||||||
togglePanel1.Controls.Add(yesNoPickerBox1);
|
togglePanel1.Controls.Add(yesNoPickerBox1);
|
||||||
@ -127,9 +130,9 @@ namespace RokettoLaunch.Forms
|
|||||||
togglePanel1.Title = "Appearance";
|
togglePanel1.Title = "Appearance";
|
||||||
togglePanel1.TitleContextMenuStrip = null;
|
togglePanel1.TitleContextMenuStrip = null;
|
||||||
togglePanel1.TitleCursor = Cursors.Default;
|
togglePanel1.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.EnableMovable = false;
|
yesNoPickerBox1.EnableMovable = false;
|
||||||
@ -140,9 +143,9 @@ namespace RokettoLaunch.Forms
|
|||||||
yesNoPickerBox1.TabIndex = 197;
|
yesNoPickerBox1.TabIndex = 197;
|
||||||
yesNoPickerBox1.TabStop = false;
|
yesNoPickerBox1.TabStop = false;
|
||||||
yesNoPickerBox1.Value = false;
|
yesNoPickerBox1.Value = false;
|
||||||
//
|
//
|
||||||
// numericBox1
|
// numericBox1
|
||||||
//
|
//
|
||||||
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
numericBox1.BackColor = System.Drawing.Color.Transparent;
|
numericBox1.BackColor = System.Drawing.Color.Transparent;
|
||||||
numericBox1.EnableMovable = false;
|
numericBox1.EnableMovable = false;
|
||||||
@ -154,9 +157,9 @@ namespace RokettoLaunch.Forms
|
|||||||
numericBox1.TabIndex = 196;
|
numericBox1.TabIndex = 196;
|
||||||
numericBox1.TabStop = false;
|
numericBox1.TabStop = false;
|
||||||
numericBox1.Value = 1;
|
numericBox1.Value = 1;
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
label2.AutoSize = true;
|
label2.AutoSize = true;
|
||||||
label2.BackColor = System.Drawing.Color.Transparent;
|
label2.BackColor = System.Drawing.Color.Transparent;
|
||||||
label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
label2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
@ -168,9 +171,9 @@ namespace RokettoLaunch.Forms
|
|||||||
label2.TabIndex = 194;
|
label2.TabIndex = 194;
|
||||||
label2.Text = "Show Big Icons";
|
label2.Text = "Show Big Icons";
|
||||||
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// label4
|
// label4
|
||||||
//
|
//
|
||||||
label4.AutoSize = true;
|
label4.AutoSize = true;
|
||||||
label4.BackColor = System.Drawing.Color.Transparent;
|
label4.BackColor = System.Drawing.Color.Transparent;
|
||||||
label4.ForeColor = System.Drawing.SystemColors.ControlText;
|
label4.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
@ -182,9 +185,9 @@ namespace RokettoLaunch.Forms
|
|||||||
label4.TabIndex = 193;
|
label4.TabIndex = 193;
|
||||||
label4.Text = "Tiles Per Row";
|
label4.Text = "Tiles Per Row";
|
||||||
label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// togglePanel2
|
// togglePanel2
|
||||||
//
|
//
|
||||||
togglePanel2.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
togglePanel2.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
||||||
togglePanel2.CloseIcon = "H";
|
togglePanel2.CloseIcon = "H";
|
||||||
togglePanel2.Controls.Add(label6);
|
togglePanel2.Controls.Add(label6);
|
||||||
@ -205,9 +208,9 @@ namespace RokettoLaunch.Forms
|
|||||||
togglePanel2.Title = "Behaviour";
|
togglePanel2.Title = "Behaviour";
|
||||||
togglePanel2.TitleContextMenuStrip = null;
|
togglePanel2.TitleContextMenuStrip = null;
|
||||||
togglePanel2.TitleCursor = Cursors.Default;
|
togglePanel2.TitleCursor = Cursors.Default;
|
||||||
//
|
//
|
||||||
// label6
|
// label6
|
||||||
//
|
//
|
||||||
label6.AutoSize = true;
|
label6.AutoSize = true;
|
||||||
label6.BackColor = System.Drawing.Color.Transparent;
|
label6.BackColor = System.Drawing.Color.Transparent;
|
||||||
label6.ForeColor = System.Drawing.SystemColors.ControlText;
|
label6.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
@ -219,9 +222,9 @@ namespace RokettoLaunch.Forms
|
|||||||
label6.TabIndex = 182;
|
label6.TabIndex = 182;
|
||||||
label6.Text = "Close To System Tray";
|
label6.Text = "Close To System Tray";
|
||||||
label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
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.EnableMovable = false;
|
yesNoPickerBox4.EnableMovable = false;
|
||||||
@ -232,9 +235,9 @@ namespace RokettoLaunch.Forms
|
|||||||
yesNoPickerBox4.TabIndex = 195;
|
yesNoPickerBox4.TabIndex = 195;
|
||||||
yesNoPickerBox4.TabStop = false;
|
yesNoPickerBox4.TabStop = false;
|
||||||
yesNoPickerBox4.Value = false;
|
yesNoPickerBox4.Value = false;
|
||||||
//
|
//
|
||||||
// textBox1
|
// textBox1
|
||||||
//
|
//
|
||||||
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.EnableMovable = false;
|
textBox1.EnableMovable = false;
|
||||||
@ -251,9 +254,9 @@ namespace RokettoLaunch.Forms
|
|||||||
textBox1.TabIndex = 194;
|
textBox1.TabIndex = 194;
|
||||||
textBox1.TabStop = false;
|
textBox1.TabStop = false;
|
||||||
textBox1.UseSystemPasswordChar = false;
|
textBox1.UseSystemPasswordChar = false;
|
||||||
//
|
//
|
||||||
// yesNoPickerBox2
|
// yesNoPickerBox2
|
||||||
//
|
//
|
||||||
yesNoPickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox2.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox2.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox2.EnableMovable = false;
|
yesNoPickerBox2.EnableMovable = false;
|
||||||
@ -264,9 +267,9 @@ namespace RokettoLaunch.Forms
|
|||||||
yesNoPickerBox2.TabIndex = 192;
|
yesNoPickerBox2.TabIndex = 192;
|
||||||
yesNoPickerBox2.TabStop = false;
|
yesNoPickerBox2.TabStop = false;
|
||||||
yesNoPickerBox2.Value = 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;
|
||||||
@ -278,9 +281,9 @@ namespace RokettoLaunch.Forms
|
|||||||
label3.TabIndex = 190;
|
label3.TabIndex = 190;
|
||||||
label3.Text = "Always On Top";
|
label3.Text = "Always On Top";
|
||||||
label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
label1.AutoSize = true;
|
label1.AutoSize = true;
|
||||||
label1.BackColor = System.Drawing.Color.Transparent;
|
label1.BackColor = System.Drawing.Color.Transparent;
|
||||||
label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
label1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
@ -292,9 +295,9 @@ namespace RokettoLaunch.Forms
|
|||||||
label1.TabIndex = 153;
|
label1.TabIndex = 153;
|
||||||
label1.Text = "Show Toggle Hotkey";
|
label1.Text = "Show Toggle Hotkey";
|
||||||
label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// togglePanel3
|
// togglePanel3
|
||||||
//
|
//
|
||||||
togglePanel3.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
togglePanel3.BackColor = System.Drawing.Color.FromArgb(252, 252, 252);
|
||||||
togglePanel3.CloseIcon = "H";
|
togglePanel3.CloseIcon = "H";
|
||||||
togglePanel3.Controls.Add(label7);
|
togglePanel3.Controls.Add(label7);
|
||||||
@ -311,9 +314,9 @@ namespace RokettoLaunch.Forms
|
|||||||
togglePanel3.Title = "Action";
|
togglePanel3.Title = "Action";
|
||||||
togglePanel3.TitleContextMenuStrip = null;
|
togglePanel3.TitleContextMenuStrip = null;
|
||||||
togglePanel3.TitleCursor = Cursors.Default;
|
togglePanel3.TitleCursor = Cursors.Default;
|
||||||
//
|
//
|
||||||
// label7
|
// label7
|
||||||
//
|
//
|
||||||
label7.AutoSize = true;
|
label7.AutoSize = true;
|
||||||
label7.BackColor = System.Drawing.Color.Transparent;
|
label7.BackColor = System.Drawing.Color.Transparent;
|
||||||
label7.ForeColor = System.Drawing.SystemColors.ControlText;
|
label7.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
@ -325,9 +328,9 @@ namespace RokettoLaunch.Forms
|
|||||||
label7.TabIndex = 184;
|
label7.TabIndex = 184;
|
||||||
label7.Text = "Hide On Execute";
|
label7.Text = "Hide On Execute";
|
||||||
label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
// yesNoPickerBox3
|
// yesNoPickerBox3
|
||||||
//
|
//
|
||||||
yesNoPickerBox3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
yesNoPickerBox3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
yesNoPickerBox3.BackColor = System.Drawing.Color.Transparent;
|
yesNoPickerBox3.BackColor = System.Drawing.Color.Transparent;
|
||||||
yesNoPickerBox3.EnableMovable = false;
|
yesNoPickerBox3.EnableMovable = false;
|
||||||
@ -338,9 +341,9 @@ namespace RokettoLaunch.Forms
|
|||||||
yesNoPickerBox3.TabIndex = 193;
|
yesNoPickerBox3.TabIndex = 193;
|
||||||
yesNoPickerBox3.TabStop = false;
|
yesNoPickerBox3.TabStop = false;
|
||||||
yesNoPickerBox3.Value = false;
|
yesNoPickerBox3.Value = false;
|
||||||
//
|
//
|
||||||
// OptionsForm
|
// OptionsForm
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
BackColor = System.Drawing.Color.White;
|
BackColor = System.Drawing.Color.White;
|
||||||
|
|||||||
337
MainForm.cs
337
MainForm.cs
@ -10,9 +10,9 @@ using RokettoLaunch.DTOs.SaveFile;
|
|||||||
using RokettoLaunch.Forms;
|
using RokettoLaunch.Forms;
|
||||||
using RokettoLaunch.Windows.Forms;
|
using RokettoLaunch.Windows.Forms;
|
||||||
using RyzStudio;
|
using RyzStudio;
|
||||||
using RyzStudio.Services;
|
|
||||||
using RyzStudio.Windows.FontForms.TextBox;
|
|
||||||
using RyzStudio.Windows.Forms;
|
using RyzStudio.Windows.Forms;
|
||||||
|
using RyzStudio.Windows.ThemedForms;
|
||||||
|
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
|
||||||
|
|
||||||
namespace RokettoLaunch
|
namespace RokettoLaunch
|
||||||
{
|
{
|
||||||
@ -49,23 +49,15 @@ namespace RokettoLaunch
|
|||||||
{
|
{
|
||||||
base.OnShown(e);
|
base.OnShown(e);
|
||||||
|
|
||||||
var args = this.GetCommandLine();
|
var args = WinApplication.GetCommandLine();
|
||||||
|
|
||||||
string jsonfigFilename = null;
|
|
||||||
if (!args.TryGetValue("open", out jsonfigFilename))
|
|
||||||
{
|
|
||||||
if (!args.TryGetValue("o", out jsonfigFilename))
|
|
||||||
{
|
|
||||||
jsonfigFilename = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
string jsonfigFilename = args.Where(x => (x.Key.Equals("o") || x.Key.Equals("open"))).Select(x => x.Value).FirstOrDefault();
|
||||||
if (string.IsNullOrWhiteSpace(jsonfigFilename))
|
if (string.IsNullOrWhiteSpace(jsonfigFilename))
|
||||||
{
|
{
|
||||||
jsonfigFilename = Path.ChangeExtension(Application.ExecutablePath, "jsonfig");
|
jsonfigFilename = Path.ChangeExtension(Application.ExecutablePath, "jsonfig");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (File.Exists(jsonfigFilename))
|
if (!string.IsNullOrWhiteSpace(jsonfigFilename) && File.Exists(jsonfigFilename))
|
||||||
{
|
{
|
||||||
await _fileSessionManager.OpenSession(jsonfigFilename);
|
await _fileSessionManager.OpenSession(jsonfigFilename);
|
||||||
}
|
}
|
||||||
@ -74,7 +66,7 @@ namespace RokettoLaunch
|
|||||||
//await _fileSessionManager.NewSession();
|
//await _fileSessionManager.NewSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
UIControl.Invoke(this, (x) => this.Focus());
|
UIControl.SetFocus(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async override void OnFormClosing(FormClosingEventArgs e)
|
protected async override void OnFormClosing(FormClosingEventArgs e)
|
||||||
@ -103,7 +95,7 @@ namespace RokettoLaunch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((this.CurrentSession?.ShowToggleHotkey ?? new T4KeyTextBox.Results()).Key != Keys.None)
|
if ((this.CurrentSession?.ShowToggleHotkey ?? new ThKeyCodeTextBox.Results()).Key != Keys.None)
|
||||||
{
|
{
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
RyzStudio.Runtime.InteropServices.User32.UnregisterHotKey((IntPtr)Handle, 1);
|
RyzStudio.Runtime.InteropServices.User32.UnregisterHotKey((IntPtr)Handle, 1);
|
||||||
@ -157,17 +149,17 @@ namespace RokettoLaunch
|
|||||||
{
|
{
|
||||||
if (!this.CurrentSession.StartPosition.IsEmpty)
|
if (!this.CurrentSession.StartPosition.IsEmpty)
|
||||||
{
|
{
|
||||||
UIControl.Invoke(this, (x) => this.Location = this.CurrentSession.StartPosition);
|
UIControl.SetLocation(this, this.CurrentSession.StartPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.CurrentSession.Width > 0)
|
if (this.CurrentSession.Width > 0)
|
||||||
{
|
{
|
||||||
UIControl.Invoke(this, (x) => this.Width = this.CurrentSession.Width);
|
UIControl.SetClientWidth(this, this.CurrentSession.Width);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.CurrentSession.Height > 0)
|
if (this.CurrentSession.Height > 0)
|
||||||
{
|
{
|
||||||
UIControl.Invoke(this, (x) => this.Height = this.CurrentSession.Height);
|
UIControl.SetClientHeight(this, this.CurrentSession.Height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +171,7 @@ namespace RokettoLaunch
|
|||||||
RyzStudio.Runtime.InteropServices.User32.UnregisterHotKey((IntPtr)Handle, 1);
|
RyzStudio.Runtime.InteropServices.User32.UnregisterHotKey((IntPtr)Handle, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
if ((this.CurrentSession?.ShowToggleHotkey ?? new RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results()).Key != Keys.None)
|
if ((this.CurrentSession?.ShowToggleHotkey ?? new ThKeyCodeTextBox.Results()).Key != Keys.None)
|
||||||
{
|
{
|
||||||
UIControl.Invoke(this, (x) =>
|
UIControl.Invoke(this, (x) =>
|
||||||
{
|
{
|
||||||
@ -188,7 +180,7 @@ namespace RokettoLaunch
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UIControl.Invoke(this, (x) => this.TopMost = this.CurrentSession.AlwaysOnTop);
|
UIControl.SetTopMost(this, this.CurrentSession.AlwaysOnTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainMenuStrip_MenuActivate(object sender, EventArgs e)
|
private void MainMenuStrip_MenuActivate(object sender, EventArgs e)
|
||||||
@ -389,7 +381,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void AboutToolStripMenuItem_Click(object sender, EventArgs e)
|
private void AboutToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var form = new RyzStudio.Forms.T3AboutForm();
|
var form = new RyzStudio.Windows.ThemedForms.AboutForm();
|
||||||
form.ProductURL = AppResource.AppProductURL;
|
form.ProductURL = AppResource.AppProductURL;
|
||||||
form.AuthorURL = AppResource.AppAuthorURL;
|
form.AuthorURL = AppResource.AppAuthorURL;
|
||||||
form.CompanyURL = AppResource.AppCompanyURL;
|
form.CompanyURL = AppResource.AppCompanyURL;
|
||||||
@ -433,7 +425,7 @@ namespace RokettoLaunch
|
|||||||
// Enforce minimum number of rows
|
// Enforce minimum number of rows
|
||||||
this.CurrentSession.TilesPerRow = Math.Max(this.CurrentSession.TilesPerRow, TileLayoutPanel.MIN_COLUMNS);
|
this.CurrentSession.TilesPerRow = Math.Max(this.CurrentSession.TilesPerRow, TileLayoutPanel.MIN_COLUMNS);
|
||||||
|
|
||||||
UIControl.Invoke(flowLayoutPanel1, (x) => flowLayoutPanel1.Controls.Clear());
|
UIControl.Clear(flowLayoutPanel1);
|
||||||
|
|
||||||
AddGroupToolStripMenuItem_Click(null, null);
|
AddGroupToolStripMenuItem_Click(null, null);
|
||||||
|
|
||||||
@ -498,7 +490,7 @@ namespace RokettoLaunch
|
|||||||
this.CurrentSession.Width = this.DisplayRectangle.Width;
|
this.CurrentSession.Width = this.DisplayRectangle.Width;
|
||||||
this.CurrentSession.Height = this.DisplayRectangle.Height;
|
this.CurrentSession.Height = this.DisplayRectangle.Height;
|
||||||
|
|
||||||
var result = MethodResult.Create();
|
var result = GenericResult.Create();
|
||||||
|
|
||||||
switch (Path.GetExtension(filename?.ToLower()?.Trim() ?? string.Empty))
|
switch (Path.GetExtension(filename?.ToLower()?.Trim() ?? string.Empty))
|
||||||
{
|
{
|
||||||
@ -519,34 +511,34 @@ namespace RokettoLaunch
|
|||||||
result = await RyzStudio.IO.Compression.ZFile.WriteFile(filename, "Document.json", this.CurrentSession);
|
result = await RyzStudio.IO.Compression.ZFile.WriteFile(filename, "Document.json", this.CurrentSession);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = MethodResult.Error("Format not supported");
|
result = GenericResult.Fault("Format not supported");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.Success)
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
if (showNotices)
|
if (showNotices)
|
||||||
{
|
{
|
||||||
RyzStudio.Forms.T3MessageBox.Show(this, "Session saved!", "Save session", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
ThMessageBox.Show(this, "Session saved!", "Save session", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (showNotices)
|
if (showNotices)
|
||||||
{
|
{
|
||||||
RyzStudio.Forms.T3MessageBox.Show(this, "Session saved!", "Save session");
|
ThMessageBox.Show(this, "Session saved!", "Save session");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isBusy = false;
|
isBusy = false;
|
||||||
|
|
||||||
return result.Success;
|
return result.IsSuccess;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool> fileSessionManager_OnClearSession(FileSessionManager sender)
|
private async Task<bool> fileSessionManager_OnClearSession(FileSessionManager sender)
|
||||||
{
|
{
|
||||||
UIControl.Invoke(flowLayoutPanel1, (x) => flowLayoutPanel1.Controls.Clear());
|
UIControl.Clear(flowLayoutPanel1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -558,13 +550,13 @@ namespace RokettoLaunch
|
|||||||
switch (sender.SessionState)
|
switch (sender.SessionState)
|
||||||
{
|
{
|
||||||
case FileSessionManager.SessionStateEnum.New:
|
case FileSessionManager.SessionStateEnum.New:
|
||||||
this.SetText("New Session - " + Application.ProductName);
|
UIControl.SetText(this, "New Session - " + Application.ProductName);
|
||||||
break;
|
break;
|
||||||
case FileSessionManager.SessionStateEnum.Open:
|
case FileSessionManager.SessionStateEnum.Open:
|
||||||
this.SetText(Path.GetFileNameWithoutExtension(filename) + " - " + Application.ProductName);
|
UIControl.SetText(this, Path.GetFileNameWithoutExtension(filename) + " - " + Application.ProductName);
|
||||||
break;
|
break;
|
||||||
case FileSessionManager.SessionStateEnum.Close:
|
case FileSessionManager.SessionStateEnum.Close:
|
||||||
this.SetText(Application.ProductName);
|
UIControl.SetText(this, Application.ProductName);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -583,7 +575,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void AddTileToolStripMenuItem_Click(object sender, EventArgs e)
|
private void AddTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripMenuItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripMenuItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -594,35 +586,32 @@ namespace RokettoLaunch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddNewTile(panel.ToggleControlId.Value, (TileLayoutPanel)panel.ToggleControl);
|
var groupInfo = this.CurrentSession.Groups.Where(x => x.Id == panel.ToggleControlId.Value).FirstOrDefault();
|
||||||
|
if (groupInfo == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//var groupInfo = this.CurrentSession.Groups.Where(x => x.Id == panel.ToggleControlId.Value).FirstOrDefault();
|
var newTileInfo = new App4Options.Item()
|
||||||
//if (groupInfo == null)
|
{
|
||||||
//{
|
Id = Guid.NewGuid(),
|
||||||
// return;
|
Title = "New Tile",
|
||||||
//}
|
IsGroup = false,
|
||||||
|
Position = new Point(-1, -1)
|
||||||
|
};
|
||||||
|
|
||||||
//var newTileInfo = new App4Options.Item()
|
newTileInfo = groupInfo.AddItem(newTileInfo);
|
||||||
//{
|
|
||||||
// Id = Guid.NewGuid(),
|
|
||||||
// Title = "New Tile",
|
|
||||||
// IsGroup = false,
|
|
||||||
// Position = new Point(-1, -1)
|
|
||||||
//};
|
|
||||||
|
|
||||||
//newTileInfo = groupInfo.AddItem(newTileInfo);
|
// Update table layout
|
||||||
|
var newTilePanel = CreateTile(newTileInfo);
|
||||||
|
|
||||||
//// Update table layout
|
var tableLayout = (TileLayoutPanel)panel.ToggleControl;
|
||||||
//var newTilePanel = CreateTile(newTileInfo);
|
tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
|
||||||
|
tableLayout.SetGridSize(groupInfo.GridSize);
|
||||||
//var tableLayout = (TileLayoutPanel)panel.ToggleControl;
|
|
||||||
//tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
|
|
||||||
//tableLayout.SetGridSize(groupInfo.GridSize);
|
|
||||||
|
|
||||||
_fileSessionManager.HasChanged = true;
|
_fileSessionManager.HasChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add Folder
|
/// Add Folder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -630,7 +619,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void AddFolderToolStripMenuItem_Click(object sender, EventArgs e)
|
private void AddFolderToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripMenuItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripMenuItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -674,7 +663,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void EditGroupToolStripMenuItem_Click(object sender, EventArgs e)
|
private void EditGroupToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripMenuItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripMenuItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -718,7 +707,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private async void toolStripMenuItem5_Click(object sender, EventArgs e)
|
private async void toolStripMenuItem5_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripMenuItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripMenuItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -756,19 +745,19 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void MoveTopToolStripMenuItem_Click(object sender, EventArgs e)
|
private void MoveTopToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripDropDownItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripDropDownItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move header
|
// Move header
|
||||||
flowLayoutPanel1.MoveTop(panel);
|
UIControl.MoveTop(flowLayoutPanel1, panel);
|
||||||
|
|
||||||
// Move sidecar
|
// Move sidecar
|
||||||
if (panel.ToggleControl != null)
|
if (panel.ToggleControl != null)
|
||||||
{
|
{
|
||||||
flowLayoutPanel1.MoveNext(panel, panel.ToggleControl);
|
UIControl.MoveNext(flowLayoutPanel1, panel, panel.ToggleControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move group
|
// Move group
|
||||||
@ -791,19 +780,19 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void MoveUpToolStripMenuItem_Click(object sender, EventArgs e)
|
private void MoveUpToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripDropDownItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripDropDownItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move header
|
// Move header
|
||||||
flowLayoutPanel1.MovePos(panel, -2);
|
UIControl.MovePos(flowLayoutPanel1, panel, -2);
|
||||||
|
|
||||||
// Move sidecar
|
// Move sidecar
|
||||||
if (panel.ToggleControl != null)
|
if (panel.ToggleControl != null)
|
||||||
{
|
{
|
||||||
flowLayoutPanel1.MoveNext(panel, panel.ToggleControl);
|
UIControl.MoveNext(flowLayoutPanel1, panel, panel.ToggleControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move group
|
// Move group
|
||||||
@ -826,19 +815,19 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void MoveDownToolStripMenuItem_Click(object sender, EventArgs e)
|
private void MoveDownToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripDropDownItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripDropDownItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move header
|
// Move header
|
||||||
flowLayoutPanel1.MovePos(panel, 3);
|
UIControl.MovePos(flowLayoutPanel1, panel, 3);
|
||||||
|
|
||||||
// Move sidecar
|
// Move sidecar
|
||||||
if (panel.ToggleControl != null)
|
if (panel.ToggleControl != null)
|
||||||
{
|
{
|
||||||
flowLayoutPanel1.MovePos(panel.ToggleControl, 3);
|
UIControl.MovePos(flowLayoutPanel1, panel.ToggleControl, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move group
|
// Move group
|
||||||
@ -861,19 +850,19 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void MoveBottomToolStripMenuItem_Click(object sender, EventArgs e)
|
private void MoveBottomToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var panel = ((ToolStripDropDownItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripDropDownItem)sender);
|
||||||
if (panel == null)
|
if (panel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move header
|
// Move header
|
||||||
flowLayoutPanel1.MoveBottom(panel);
|
UIControl.MoveBottom(flowLayoutPanel1, panel);
|
||||||
|
|
||||||
// Move sidecar
|
// Move sidecar
|
||||||
if (panel.ToggleControl != null)
|
if (panel.ToggleControl != null)
|
||||||
{
|
{
|
||||||
flowLayoutPanel1.MoveNext(panel, panel.ToggleControl);
|
UIControl.MoveNext(flowLayoutPanel1, panel, panel.ToggleControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move group
|
// Move group
|
||||||
@ -903,7 +892,7 @@ namespace RokettoLaunch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var panel = ((ToolStripMenuItem)sender).GetOwner<TToggleHeaderPanel>();
|
var panel = UIControl.GetOwner<TToggleHeaderPanel>((ToolStripMenuItem)sender);
|
||||||
if (panel?.Parent == null)
|
if (panel?.Parent == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -940,7 +929,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void EditTileToolStripMenuItem_Click(object sender, EventArgs e)
|
private void EditTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var tilePanel = ((ToolStripMenuItem)sender).GetOwner<TilePanel>();
|
var tilePanel = UIControl.GetOwner<TilePanel>((ToolStripMenuItem)sender);
|
||||||
|
|
||||||
var tileInfo = this.GetTileInfo(tilePanel);
|
var tileInfo = this.GetTileInfo(tilePanel);
|
||||||
if (tileInfo == null)
|
if (tileInfo == null)
|
||||||
@ -987,7 +976,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private async void CopyToTileToolStripMenuItem_Click(object sender, EventArgs e)
|
private async void CopyToTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var tilePanel = ((ToolStripMenuItem)sender).GetOwner<TilePanel>();
|
var tilePanel = UIControl.GetOwner<TilePanel>((ToolStripMenuItem)sender);
|
||||||
|
|
||||||
var tileInfo = this.GetTileInfo(tilePanel);
|
var tileInfo = this.GetTileInfo(tilePanel);
|
||||||
if (tileInfo == null)
|
if (tileInfo == null)
|
||||||
@ -1020,6 +1009,8 @@ namespace RokettoLaunch
|
|||||||
var tableLayout = (TileLayoutPanel)headers[n].ToggleControl;
|
var tableLayout = (TileLayoutPanel)headers[n].ToggleControl;
|
||||||
tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
|
tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
|
||||||
tableLayout.SetGridSize(this.CurrentSession.Groups[n].GridSize);
|
tableLayout.SetGridSize(this.CurrentSession.Groups[n].GridSize);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1036,7 +1027,7 @@ namespace RokettoLaunch
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void RemoveTileToolStripMenuItem_Click(object sender, EventArgs e)
|
private void RemoveTileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var tilePanel = ((ToolStripMenuItem)sender).GetOwner<TilePanel>();
|
var tilePanel = UIControl.GetOwner<TilePanel>((ToolStripMenuItem)sender);
|
||||||
|
|
||||||
var tileInfo = this.GetTileInfo(tilePanel);
|
var tileInfo = this.GetTileInfo(tilePanel);
|
||||||
if (tileInfo == null)
|
if (tileInfo == null)
|
||||||
@ -1065,32 +1056,6 @@ namespace RokettoLaunch
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private TilePanel AddNewTile(Guid groupId, TileLayoutPanel tableLayout)
|
|
||||||
{
|
|
||||||
var groupInfo = this.CurrentSession.Groups.Where(x => x.Id == groupId).FirstOrDefault();
|
|
||||||
if (groupInfo == null)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var newTileInfo = new App4Options.Item()
|
|
||||||
{
|
|
||||||
Id = Guid.NewGuid(),
|
|
||||||
Title = "New Tile",
|
|
||||||
IsGroup = false,
|
|
||||||
Position = new Point(-1, -1)
|
|
||||||
};
|
|
||||||
|
|
||||||
newTileInfo = groupInfo.AddItem(newTileInfo);
|
|
||||||
|
|
||||||
// Update table layout
|
|
||||||
var newTilePanel = CreateTile(newTileInfo);
|
|
||||||
|
|
||||||
tableLayout.AddTilePanel(newTilePanel, newTileInfo.Position.X, newTileInfo.Position.Y);
|
|
||||||
tableLayout.SetGridSize(groupInfo.GridSize);
|
|
||||||
|
|
||||||
return newTilePanel;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddGroup(App4Options.Group groupInfo)
|
private void AddGroup(App4Options.Group groupInfo)
|
||||||
{
|
{
|
||||||
@ -1102,8 +1067,8 @@ namespace RokettoLaunch
|
|||||||
header.ToggleControl = tableLayout;
|
header.ToggleControl = tableLayout;
|
||||||
header.IsOpen = groupInfo.IsOpen;
|
header.IsOpen = groupInfo.IsOpen;
|
||||||
|
|
||||||
UIControl.Invoke(flowLayoutPanel1, (x) => flowLayoutPanel1.Controls.Add(header));
|
UIControl.Add(flowLayoutPanel1, header);
|
||||||
UIControl.Invoke(flowLayoutPanel1, (x) => flowLayoutPanel1.Controls.Add(tableLayout));
|
UIControl.Add(flowLayoutPanel1, tableLayout);
|
||||||
|
|
||||||
foreach (var item in groupInfo.Items ?? new List<App4Options.Item>())
|
foreach (var item in groupInfo.Items ?? new List<App4Options.Item>())
|
||||||
{
|
{
|
||||||
@ -1140,33 +1105,10 @@ namespace RokettoLaunch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ConvertToFolder(App4Options.Item tileInfo)
|
|
||||||
{
|
|
||||||
if (tileInfo.IsGroup)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var newTileInfo = tileInfo.CopyOf(false);
|
|
||||||
|
|
||||||
tileInfo.Title = "New Folder";
|
|
||||||
tileInfo.IsGroup = true;
|
|
||||||
tileInfo.TargetPath = string.Empty;
|
|
||||||
tileInfo.StartPath = string.Empty;
|
|
||||||
tileInfo.Argument = string.Empty;
|
|
||||||
tileInfo.RunAsAdmin = false;
|
|
||||||
|
|
||||||
tileInfo.Items.Clear();
|
|
||||||
tileInfo.Items.Add(newTileInfo);
|
|
||||||
|
|
||||||
tileInfo.ResolvePaths();
|
|
||||||
}
|
|
||||||
|
|
||||||
private TileLayoutPanel CreateTable(Size gridSize)
|
private TileLayoutPanel CreateTable(Size gridSize)
|
||||||
{
|
{
|
||||||
var layoutPanel = new TileLayoutPanel();
|
var layoutPanel = new TileLayoutPanel();
|
||||||
layoutPanel.DragDrop += LayoutPanel_TileDragDrop;
|
layoutPanel.DragDrop += LayoutPanel_DragDrop;
|
||||||
layoutPanel.DragDrop += LayoutPanel_FileDragDrop;
|
|
||||||
layoutPanel.SetGridSize(gridSize);
|
layoutPanel.SetGridSize(gridSize);
|
||||||
|
|
||||||
return layoutPanel;
|
return layoutPanel;
|
||||||
@ -1280,13 +1222,8 @@ namespace RokettoLaunch
|
|||||||
return contextMenu;
|
return contextMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LayoutPanel_TileDragDrop(object sender, DragEventArgs e)
|
private async void LayoutPanel_DragDrop(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Effect != DragDropEffects.Move)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!e.Data.TryGetData<TilePanel>(out var tilePanel))
|
if (!e.Data.TryGetData<TilePanel>(out var tilePanel))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -1323,72 +1260,6 @@ namespace RokettoLaunch
|
|||||||
_fileSessionManager.HasChanged = true;
|
_fileSessionManager.HasChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LayoutPanel_FileDragDrop(object sender, DragEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.Effect != DragDropEffects.Link)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var fileList = e.Data.GetData(DataFormats.FileDrop) as string[];
|
|
||||||
if (fileList == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fileList.Length <= 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var tableLayout = (sender as TileLayoutPanel);
|
|
||||||
if (tableLayout == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tableLayout.GroupId == Guid.Empty)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var newTilePanel = AddNewTile(tableLayout.GroupId, tableLayout);
|
|
||||||
var tileInfo = this.CurrentSession.FindById(newTilePanel.TileId);
|
|
||||||
|
|
||||||
if (fileList.Length <= 1)
|
|
||||||
{
|
|
||||||
tileInfo.IsGroup = false;
|
|
||||||
tileInfo.TargetPath = fileList[0];
|
|
||||||
tileInfo.StartPath = string.Empty;
|
|
||||||
tileInfo.Argument = string.Empty;
|
|
||||||
tileInfo.RunAsAdmin = false;
|
|
||||||
|
|
||||||
tileInfo.Items.Clear();
|
|
||||||
tileInfo.ResolvePaths();
|
|
||||||
|
|
||||||
tileInfo.Title = RyzStudio.IO.File.GetName(tileInfo.ResolvedTargetPath);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tileInfo.Title = "New Folder";
|
|
||||||
tileInfo.IsGroup = true;
|
|
||||||
tileInfo.TargetPath = string.Empty;
|
|
||||||
tileInfo.StartPath = string.Empty;
|
|
||||||
tileInfo.Argument = string.Empty;
|
|
||||||
tileInfo.RunAsAdmin = false;
|
|
||||||
|
|
||||||
tileInfo.Items.Clear();
|
|
||||||
|
|
||||||
this.AddToFolder(tileInfo, fileList.ToList(), false);
|
|
||||||
|
|
||||||
tileInfo.ResolvePaths();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.UpdateTile(newTilePanel, tileInfo);
|
|
||||||
|
|
||||||
_fileSessionManager.HasChanged = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void TilePanel_MouseClick(object sender, MouseEventArgs e)
|
private void TilePanel_MouseClick(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
@ -1435,59 +1306,60 @@ namespace RokettoLaunch
|
|||||||
var tileInfo = this.CurrentSession.FindById(sender.TileId);
|
var tileInfo = this.CurrentSession.FindById(sender.TileId);
|
||||||
|
|
||||||
// Append
|
// Append
|
||||||
if (keys.HasFlag(Keys.Shift) || ((Control.ModifierKeys & Keys.Shift) == Keys.Shift))
|
if (keys.HasFlag(Keys.Shift))
|
||||||
{
|
{
|
||||||
if (tileInfo.IsGroup)
|
if (tileInfo.IsGroup)
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("Do you want to add shortcut to the folder?", "Add Item", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
this.AddToFolder(tileInfo, paths, true);
|
||||||
{
|
|
||||||
AddToFolder(tileInfo, paths, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("Do you want to convert this shortcut to a folder, then add shortcut to the folder?", "Add Item (Convert)", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
var newTileInfo = tileInfo.CopyOf();
|
||||||
{
|
|
||||||
ConvertToFolder(tileInfo);
|
tileInfo.Title = "New Folder";
|
||||||
AddToFolder(tileInfo, paths, true);
|
tileInfo.IsGroup = true;
|
||||||
}
|
tileInfo.TargetPath = string.Empty;
|
||||||
|
tileInfo.StartPath = string.Empty;
|
||||||
|
tileInfo.Argument = string.Empty;
|
||||||
|
tileInfo.RunAsAdmin = false;
|
||||||
|
|
||||||
|
tileInfo.Items.Clear();
|
||||||
|
tileInfo.Items.Add(newTileInfo);
|
||||||
|
|
||||||
|
this.AddToFolder(tileInfo, paths, true);
|
||||||
|
|
||||||
|
tileInfo.ResolvePaths();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (paths.Count <= 1)
|
if (paths.Count <= 1)
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("Do you want to replace this shortcut?", "Replace Item", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
tileInfo.IsGroup = false;
|
||||||
{
|
tileInfo.TargetPath = paths[0];
|
||||||
tileInfo.IsGroup = false;
|
tileInfo.StartPath = string.Empty;
|
||||||
tileInfo.TargetPath = paths[0];
|
tileInfo.Argument = string.Empty;
|
||||||
tileInfo.StartPath = string.Empty;
|
tileInfo.RunAsAdmin = false;
|
||||||
tileInfo.Argument = string.Empty;
|
|
||||||
tileInfo.RunAsAdmin = false;
|
|
||||||
|
|
||||||
tileInfo.Items.Clear();
|
tileInfo.Items.Clear();
|
||||||
tileInfo.ResolvePaths();
|
tileInfo.ResolvePaths();
|
||||||
|
|
||||||
tileInfo.Title = RyzStudio.IO.File.GetName(tileInfo.ResolvedTargetPath);
|
tileInfo.Title = RyzStudio.IO.File.GetName(tileInfo.ResolvedTargetPath);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("Do you want to replace this shortcut with a folder?", "Replace Item (Folder)", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
tileInfo.Title = "New Folder";
|
||||||
{
|
tileInfo.IsGroup = true;
|
||||||
tileInfo.Title = "New Folder";
|
tileInfo.TargetPath = string.Empty;
|
||||||
tileInfo.IsGroup = true;
|
tileInfo.StartPath = string.Empty;
|
||||||
tileInfo.TargetPath = string.Empty;
|
tileInfo.Argument = string.Empty;
|
||||||
tileInfo.StartPath = string.Empty;
|
tileInfo.RunAsAdmin = false;
|
||||||
tileInfo.Argument = string.Empty;
|
|
||||||
tileInfo.RunAsAdmin = false;
|
|
||||||
|
|
||||||
tileInfo.Items.Clear();
|
tileInfo.Items.Clear();
|
||||||
|
|
||||||
this.AddToFolder(tileInfo, paths, false);
|
this.AddToFolder(tileInfo, paths, false);
|
||||||
|
|
||||||
tileInfo.ResolvePaths();
|
tileInfo.ResolvePaths();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1509,11 +1381,6 @@ namespace RokettoLaunch
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(model.TargetPath))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.CurrentSession.HideOnExecute)
|
if (this.CurrentSession.HideOnExecute)
|
||||||
{
|
{
|
||||||
this.Visible = false;
|
this.Visible = false;
|
||||||
|
|||||||
@ -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.4.2.204</Version>
|
<Version>0.4.1.0217</Version>
|
||||||
<EnableNETAnalyzers>False</EnableNETAnalyzers>
|
<EnableNETAnalyzers>False</EnableNETAnalyzers>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<PackageIcon>icon-128.png</PackageIcon>
|
<PackageIcon>icon-128.png</PackageIcon>
|
||||||
@ -47,7 +47,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="UIResource.Designer.cs" />
|
<Compile Remove="UIResource.Designer.cs" />
|
||||||
<Compile Remove="Windows\Forms\TileContainer.cs" />
|
<Compile Remove="Windows\Forms\TileContainer.cs" />
|
||||||
<Compile Remove="Windows\Forms\TileForms\TileContainer.cs" />
|
|
||||||
<Compile Remove="Windows\Forms\TilePanelLayout.cs" />
|
<Compile Remove="Windows\Forms\TilePanelLayout.cs" />
|
||||||
<Compile Remove="Windows\Forms\TilePanelLayout.Designer.cs" />
|
<Compile Remove="Windows\Forms\TilePanelLayout.Designer.cs" />
|
||||||
<Compile Remove="Windows\GridTableLayout.cs" />
|
<Compile Remove="Windows\GridTableLayout.cs" />
|
||||||
@ -65,7 +64,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Remove="UIResource.resx" />
|
<EmbeddedResource Remove="UIResource.resx" />
|
||||||
<EmbeddedResource Remove="Windows\Forms\TileContainer.resx" />
|
<EmbeddedResource Remove="Windows\Forms\TileContainer.resx" />
|
||||||
<EmbeddedResource Remove="Windows\Forms\TileForms\TileContainer.resx" />
|
|
||||||
<EmbeddedResource Remove="Windows\Forms\TilePanelLayout.resx" />
|
<EmbeddedResource Remove="Windows\Forms\TilePanelLayout.resx" />
|
||||||
<EmbeddedResource Remove="Windows\GridTableLayout.resx" />
|
<EmbeddedResource Remove="Windows\GridTableLayout.resx" />
|
||||||
<EmbeddedResource Remove="Windows\TileGridPanel.resx" />
|
<EmbeddedResource Remove="Windows\TileGridPanel.resx" />
|
||||||
@ -81,9 +79,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="RyzStudio" Version="10.1.1.261" />
|
<PackageReference Include="RyzStudio" Version="10.1.0.128" />
|
||||||
<PackageReference Include="RyzStudio.Windows.Forms" Version="10.3.0.41" />
|
<PackageReference Include="RyzStudio.Windows.Forms" Version="10.1.0.140" />
|
||||||
<PackageReference Include="RyzStudio.Windows.Forms.Themed" Version="10.3.0.41" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="AppResource.Designer.cs">
|
<Compile Update="AppResource.Designer.cs">
|
||||||
|
|||||||
@ -1,55 +0,0 @@
|
|||||||
using System.Drawing;
|
|
||||||
using RyzStudio.Drawing;
|
|
||||||
|
|
||||||
namespace RyzStudio.Windows.TileForms
|
|
||||||
{
|
|
||||||
public class DefaultVisualStyle
|
|
||||||
{
|
|
||||||
//private static FontProvider _fontProvider;
|
|
||||||
|
|
||||||
//public static FontProvider FontProvider
|
|
||||||
//{
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// if (_fontProvider == null)
|
|
||||||
// {
|
|
||||||
// _fontProvider = new FontProvider();
|
|
||||||
// _fontProvider.AddFont(Resource2.RyzStudio8);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return _fontProvider;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public static FontFamily[] Fonts
|
|
||||||
//{
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// return FontProvider.Collection.Families;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
public class StyleSet
|
|
||||||
{
|
|
||||||
public BorderStyle Border { get; set; } = new BorderStyle();
|
|
||||||
|
|
||||||
public Color BackColour { get; set; }
|
|
||||||
|
|
||||||
public Color ForeColour { get; set; }
|
|
||||||
|
|
||||||
//public Color IconColour { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static StyleSet Default = new StyleSet()
|
|
||||||
{
|
|
||||||
Border = BorderStyle.Create(1, Color.FromArgb(204, 206, 218), 0, 2),
|
|
||||||
BackColour = Color.FromArgb(250, 250, 250),
|
|
||||||
ForeColour = Color.FromArgb(99, 105, 119),
|
|
||||||
//IconColour = Color.FromArgb(86, 86, 149)
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
43
Windows/Forms/TileForms/Tile.Designer.cs
generated
43
Windows/Forms/TileForms/Tile.Designer.cs
generated
@ -1,43 +0,0 @@
|
|||||||
namespace RyzStudio.Windows.TileForms
|
|
||||||
{
|
|
||||||
partial class Tile
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
SuspendLayout();
|
|
||||||
//
|
|
||||||
// Tile
|
|
||||||
//
|
|
||||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
|
||||||
Name = "Tile";
|
|
||||||
Size = new System.Drawing.Size(82, 81);
|
|
||||||
ResumeLayout(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,130 +0,0 @@
|
|||||||
using System.ComponentModel;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace RyzStudio.Windows.TileForms
|
|
||||||
{
|
|
||||||
public partial class Tile : RyzStudio.Windows.Forms.TUserControl
|
|
||||||
{
|
|
||||||
private int _imageLeft = 0;
|
|
||||||
private int _imageTop = 11;
|
|
||||||
private int _labelMargin = 3;
|
|
||||||
private int _labelTop = 47;
|
|
||||||
private Rectangle _labelRectangle = new Rectangle();
|
|
||||||
|
|
||||||
private string _title = "";
|
|
||||||
private Image _largeIcon = null;
|
|
||||||
|
|
||||||
|
|
||||||
public Tile()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
this.AutoScaleMode = AutoScaleMode.None;
|
|
||||||
this.BackColor = DefaultVisualStyle.Default.BackColour;
|
|
||||||
this.DoubleBuffered = true;
|
|
||||||
this.Font = new Font(this.Font.FontFamily, 8.25F);
|
|
||||||
this.ForeColor = DefaultVisualStyle.Default.ForeColour;
|
|
||||||
//this.Size = new Size(70, 70);
|
|
||||||
|
|
||||||
this.EnableMovable = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region encapsulated properties
|
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
public override bool AutoSize { get => base.AutoSize; set => base.AutoSize = false; }
|
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
public new AutoScaleMode AutoScaleMode { get => base.AutoScaleMode; set => base.AutoScaleMode = AutoScaleMode.None; }
|
|
||||||
|
|
||||||
//[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
//public new Padding Margin { get => base.Margin; set => base.Margin = new Padding(0); }
|
|
||||||
|
|
||||||
//[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
//public new Padding Padding { get => base.Padding; set => base.Padding = new Padding(0); }
|
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
public override Size MaximumSize { get => base.MaximumSize; set => this.Size = value; }
|
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
public override Size MinimumSize { get => base.MinimumSize; set => this.Size = value; }
|
|
||||||
|
|
||||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
|
||||||
public new Size Size { get => base.Size; set => base.MaximumSize = base.MinimumSize = base.Size = value; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public properties
|
|
||||||
|
|
||||||
[Category("Appearance"), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
|
||||||
public Image LargeIcon
|
|
||||||
{
|
|
||||||
get => _largeIcon;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_largeIcon = value;
|
|
||||||
|
|
||||||
if (_largeIcon == null)
|
|
||||||
{
|
|
||||||
_imageLeft = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_imageLeft = (this.Width - _largeIcon.Width) / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.Invalidate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Category("Appearance"), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
|
||||||
public string Title
|
|
||||||
{
|
|
||||||
get => _title;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_title = value;
|
|
||||||
|
|
||||||
_labelRectangle = new Rectangle(_labelMargin, _labelTop, (this.Width - (_labelMargin * 2)), (this.Height - _labelTop - 1));
|
|
||||||
|
|
||||||
this.Invalidate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Category("Behaviour"), DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
|
|
||||||
public ContextMenuStrip LeftContextMenuStrip { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnPaint(e);
|
|
||||||
|
|
||||||
Graphics g = e.Graphics;
|
|
||||||
|
|
||||||
if (this.LargeIcon != null)
|
|
||||||
{
|
|
||||||
g.DrawImage(this.LargeIcon, new Point(_imageLeft, _imageTop));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(this.Title))
|
|
||||||
{
|
|
||||||
TextRenderer.DrawText(e.Graphics, this.Title, this.Font, _labelRectangle, this.ForeColor, TextFormatFlags.HorizontalCenter | TextFormatFlags.NoPadding | TextFormatFlags.EndEllipsis);
|
|
||||||
}
|
|
||||||
|
|
||||||
g.DrawRectangle(new Pen(DefaultVisualStyle.Default.Border.Colour, DefaultVisualStyle.Default.Border.Width), new Rectangle(this.DisplayRectangle.X, this.DisplayRectangle.Y, (this.DisplayRectangle.Width - 1), (this.DisplayRectangle.Height - 1)));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnMouseClick(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnMouseClick(e);
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
{
|
|
||||||
this.LeftContextMenuStrip?.Show(this, e.Location);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,120 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@ -22,13 +22,6 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
this.RowCount = 0;
|
this.RowCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//protected override void OnDragOver(DragEventArgs e)
|
|
||||||
//{
|
|
||||||
// base.OnDragDrop(e);
|
|
||||||
|
|
||||||
// e.Effect = (e.Data.GetDataPresent(DataFormats.FileDrop)) ? DragDropEffects.Link : DragDropEffects.None;
|
|
||||||
//}
|
|
||||||
|
|
||||||
protected override void OnDragEnter(DragEventArgs e)
|
protected override void OnDragEnter(DragEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnDragEnter(e);
|
base.OnDragEnter(e);
|
||||||
@ -37,14 +30,6 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
{
|
{
|
||||||
e.Effect = DragDropEffects.Move;
|
e.Effect = DragDropEffects.Move;
|
||||||
}
|
}
|
||||||
else if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
|
||||||
{
|
|
||||||
e.Effect = DragDropEffects.Link;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
e.Effect = DragDropEffects.None;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +39,7 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
|
|
||||||
public void AddTilePanel(TilePanel tilePanel, int x, int y)
|
public void AddTilePanel(TilePanel tilePanel, int x, int y)
|
||||||
{
|
{
|
||||||
UIControl.Invoke(this, (_) => this.Controls.Add(tilePanel, x, y));
|
UIControl.Add(this, tilePanel, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetGridSize(Size gridSize)
|
public void SetGridSize(Size gridSize)
|
||||||
|
|||||||
@ -42,14 +42,7 @@ namespace RokettoLaunch.Windows.Forms
|
|||||||
{
|
{
|
||||||
base.OnDragDrop(e);
|
base.OnDragDrop(e);
|
||||||
|
|
||||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
e.Effect = (e.Data.GetDataPresent(DataFormats.FileDrop)) ? DragDropEffects.Link : DragDropEffects.None;
|
||||||
{
|
|
||||||
e.Effect = ((Control.ModifierKeys & Keys.Shift) == Keys.Shift) ? DragDropEffects.Copy : DragDropEffects.Link;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
e.Effect = DragDropEffects.None;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDragDrop(DragEventArgs e)
|
protected override void OnDragDrop(DragEventArgs e)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user