diff --git a/LinearAppLauncher.csproj b/LinearAppLauncher.csproj
index a53b0f6..547fbca 100644
--- a/LinearAppLauncher.csproj
+++ b/LinearAppLauncher.csproj
@@ -67,6 +67,70 @@
True
Resources.resx
+
+
+ UserControl
+
+
+ HorizontalSeparator.cs
+
+
+ Component
+
+
+ UserControl
+
+
+ Button.cs
+
+
+
+
+ Form
+
+
+ DialogForm.cs
+
+
+ Form
+
+
+ BorderlessToolForm.cs
+
+
+ Form
+
+
+ Form.cs
+
+
+ UserControl
+
+
+ PickerBox.cs
+
+
+ UserControl
+
+
+ TextBox.cs
+
+
+ UserControl
+
+
+ TextButtonBox.cs
+
+
+
+ UserControl
+
+
+ UserControl.cs
+
+
+ Form
+
Form
@@ -107,6 +171,30 @@
ResXFileCodeGenerator
Resources.Designer.cs
+
+ Button.cs
+
+
+ DialogForm.cs
+
+
+ BorderlessToolForm.cs
+
+
+ Form.cs
+
+
+ PickerBox.cs
+
+
+ TextBox.cs
+
+
+ TextButtonBox.cs
+
+
+ EditTileForm.cs
+
TileGroupLabel.cs
@@ -157,5 +245,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LinearAppLauncher.csproj.user b/LinearAppLauncher.csproj.user
new file mode 100644
index 0000000..6cbe588
--- /dev/null
+++ b/LinearAppLauncher.csproj.user
@@ -0,0 +1,6 @@
+
+
+
+ ProjectFiles
+
+
\ No newline at end of file
diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs
index 34d2089..92fc8f6 100644
--- a/MainForm.Designer.cs
+++ b/MainForm.Designer.cs
@@ -29,30 +29,16 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- this.button1 = new System.Windows.Forms.Button();
this.titlePanel1 = new AppLauncher.Windows.Forms.TitlePanel();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.button2 = new System.Windows.Forms.Button();
- this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
- this.button3 = new System.Windows.Forms.Button();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
+ this.button3 = new System.Windows.Forms.Button();
this.contextMenuStrip1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
- // button1
- //
- this.button1.Location = new System.Drawing.Point(710, 243);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(78, 40);
- this.button1.TabIndex = 0;
- this.button1.Text = "button1";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
// titlePanel1
//
this.titlePanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -63,7 +49,7 @@
this.titlePanel1.MainMenu = this.contextMenuStrip1;
this.titlePanel1.MinimumSize = new System.Drawing.Size(40, 40);
this.titlePanel1.Name = "titlePanel1";
- this.titlePanel1.Size = new System.Drawing.Size(800, 40);
+ this.titlePanel1.Size = new System.Drawing.Size(1088, 40);
this.titlePanel1.TabIndex = 8;
this.titlePanel1.TitleText = "Launcher";
//
@@ -74,25 +60,27 @@
this.toolStripSeparator1,
this.exitToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
- this.contextMenuStrip1.Size = new System.Drawing.Size(181, 76);
+ this.contextMenuStrip1.Size = new System.Drawing.Size(153, 54);
+ //
+ // toolStripMenuItem1
+ //
+ this.toolStripMenuItem1.Name = "toolStripMenuItem1";
+ this.toolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
+ this.toolStripMenuItem1.Text = "Always On &Top";
+ this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
- this.exitToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
- // button2
- //
- this.button2.Location = new System.Drawing.Point(710, 289);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(78, 40);
- this.button2.TabIndex = 21;
- this.button2.Text = "button2";
- this.button2.UseVisualStyleBackColor = true;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
// flowLayoutPanel1
//
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
@@ -111,58 +99,29 @@
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
- // pictureBox1
- //
- this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
- this.pictureBox1.Location = new System.Drawing.Point(695, 96);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(100, 109);
- this.pictureBox1.TabIndex = 29;
- this.pictureBox1.TabStop = false;
- //
- // toolStripMenuItem1
- //
- this.toolStripMenuItem1.Name = "toolStripMenuItem1";
- this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
- this.toolStripMenuItem1.Text = "Always On &Top";
- this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
- //
- // toolStripSeparator1
- //
- this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
- //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(83)))), ((int)(((byte)(93)))));
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
- this.ClientSize = new System.Drawing.Size(800, 440);
- this.Controls.Add(this.pictureBox1);
+ this.ClientSize = new System.Drawing.Size(1088, 440);
this.Controls.Add(this.button3);
this.Controls.Add(this.flowLayoutPanel1);
- this.Controls.Add(this.button2);
this.Controls.Add(this.titlePanel1);
- this.Controls.Add(this.button1);
this.Name = "MainForm";
this.Text = "Form1";
this.contextMenuStrip1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
-
- private System.Windows.Forms.Button button1;
private Windows.Forms.TitlePanel titlePanel1;
- private System.Windows.Forms.Button button2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.Button button3;
- private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
}
diff --git a/MainForm.cs b/MainForm.cs
index 354fa99..9895c64 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -25,8 +25,6 @@ namespace AppLauncher
public MainForm() : base()
{
InitializeComponent();
-
- //headingPanel2.Checked = true;
}
private async void button1_Click(object sender, EventArgs e)
@@ -205,5 +203,11 @@ namespace AppLauncher
}
+ private void button1_Click_1(object sender, EventArgs e)
+ {
+ EditTileForm addTileForm = new EditTileForm();
+ addTileForm.ShowDialog();
+
+ }
}
}
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index 595fb8f..c9399a3 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -70,6 +70,46 @@ namespace AppLauncher.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap button16_file_add {
+ get {
+ object obj = ResourceManager.GetObject("button16_file_add", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap button16_file_add2 {
+ get {
+ object obj = ResourceManager.GetObject("button16_file_add2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap button16_folder_add {
+ get {
+ object obj = ResourceManager.GetObject("button16_folder_add", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap button16_folder_add2 {
+ get {
+ object obj = ResourceManager.GetObject("button16_folder_add2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -90,6 +130,106 @@ namespace AppLauncher.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_close {
+ get {
+ object obj = ResourceManager.GetObject("form16_close", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_close2 {
+ get {
+ object obj = ResourceManager.GetObject("form16_close2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_maximise {
+ get {
+ object obj = ResourceManager.GetObject("form16_maximise", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_maximise2 {
+ get {
+ object obj = ResourceManager.GetObject("form16_maximise2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_menu {
+ get {
+ object obj = ResourceManager.GetObject("form16_menu", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_menu2 {
+ get {
+ object obj = ResourceManager.GetObject("form16_menu2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_minimise {
+ get {
+ object obj = ResourceManager.GetObject("form16_minimise", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_minimise2 {
+ get {
+ object obj = ResourceManager.GetObject("form16_minimise2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_restore {
+ get {
+ object obj = ResourceManager.GetObject("form16_restore", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap form16_restore2 {
+ get {
+ object obj = ResourceManager.GetObject("form16_restore2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index f5a53b6..c5a52dd 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -121,12 +121,54 @@
..\Resources\arrow-right-ea-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\button16_file_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\button16_file_add2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\button16_folder_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\button16_folder_add2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\chrome-ea-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\folder-ea-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\form16_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_close2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_maximise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_maximise2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_menu.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_menu2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_minimise.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_minimise2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_restore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\form16_restore2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\grid-ea-24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/Resources/button16_file_add.png b/Resources/button16_file_add.png
new file mode 100644
index 0000000..d0c9e58
Binary files /dev/null and b/Resources/button16_file_add.png differ
diff --git a/Resources/button16_file_add2.png b/Resources/button16_file_add2.png
new file mode 100644
index 0000000..f3e9f6d
Binary files /dev/null and b/Resources/button16_file_add2.png differ
diff --git a/Resources/button16_folder_add.png b/Resources/button16_folder_add.png
new file mode 100644
index 0000000..a97c4e0
Binary files /dev/null and b/Resources/button16_folder_add.png differ
diff --git a/Resources/button16_folder_add2.png b/Resources/button16_folder_add2.png
new file mode 100644
index 0000000..d21178a
Binary files /dev/null and b/Resources/button16_folder_add2.png differ
diff --git a/Resources/form16_close.png b/Resources/form16_close.png
new file mode 100644
index 0000000..6cfa679
Binary files /dev/null and b/Resources/form16_close.png differ
diff --git a/Resources/form16_close2.png b/Resources/form16_close2.png
new file mode 100644
index 0000000..e298627
Binary files /dev/null and b/Resources/form16_close2.png differ
diff --git a/Resources/form16_maximise.png b/Resources/form16_maximise.png
new file mode 100644
index 0000000..93017d3
Binary files /dev/null and b/Resources/form16_maximise.png differ
diff --git a/Resources/form16_maximise2.png b/Resources/form16_maximise2.png
new file mode 100644
index 0000000..0511a09
Binary files /dev/null and b/Resources/form16_maximise2.png differ
diff --git a/Resources/form16_menu.png b/Resources/form16_menu.png
new file mode 100644
index 0000000..b56d75a
Binary files /dev/null and b/Resources/form16_menu.png differ
diff --git a/Resources/form16_menu2.png b/Resources/form16_menu2.png
new file mode 100644
index 0000000..6f9b41a
Binary files /dev/null and b/Resources/form16_menu2.png differ
diff --git a/Resources/form16_minimise.png b/Resources/form16_minimise.png
new file mode 100644
index 0000000..3bde4b5
Binary files /dev/null and b/Resources/form16_minimise.png differ
diff --git a/Resources/form16_minimise2.png b/Resources/form16_minimise2.png
new file mode 100644
index 0000000..14347bf
Binary files /dev/null and b/Resources/form16_minimise2.png differ
diff --git a/Resources/form16_restore.png b/Resources/form16_restore.png
new file mode 100644
index 0000000..b6651db
Binary files /dev/null and b/Resources/form16_restore.png differ
diff --git a/Resources/form16_restore2.png b/Resources/form16_restore2.png
new file mode 100644
index 0000000..b61682c
Binary files /dev/null and b/Resources/form16_restore2.png differ
diff --git a/RyzStudio/Data/SQLite/SQLiteDatabase.cs b/RyzStudio/Data/SQLite/SQLiteDatabase.cs
new file mode 100644
index 0000000..2ebab58
--- /dev/null
+++ b/RyzStudio/Data/SQLite/SQLiteDatabase.cs
@@ -0,0 +1,444 @@
+using System;
+using System.ComponentModel;
+using System.Data;
+using System.IO;
+
+namespace RyzStudio.Data.SQLite
+{
+ public class SQLiteDatabase
+ {
+ #region static methods
+
+ public static string escapeSQL(string query)
+ {
+ return query.Replace("'", "''").Trim();
+ }
+
+ public static string escapeValue(string text)
+ {
+ return text.Replace("\"", "\\\"").Replace("\t", "\\t").Replace("\r", " \\r").Replace("\n", "\\n");
+ }
+
+ public static string PrepareQuery(string query, params string[] arguments)
+ {
+ string rv = query;
+
+ if (string.IsNullOrEmpty(rv))
+ {
+ return string.Empty;
+ }
+
+ for (int i = 0; i < arguments.Length; i++)
+ {
+ rv = rv.Replace("[^" + (i + 1).ToString() + "]", escapeSQL(arguments[i]));
+ }
+
+ return rv;
+ }
+
+ #endregion
+
+ protected SQLiteWrapper.SQLiteBase database = null;
+ protected string databaseLocation = ":memory:";
+ protected string lastError = "";
+
+ protected string[] requiredTableList = new string[0];
+
+ protected const string tableNameConfig = "ryz_app_xxxx_config";
+
+ #region public properties
+
+ [Browsable(false)]
+ public SQLiteWrapper.SQLiteBase Database
+ {
+ get { return database; }
+ set { database = value; }
+ }
+
+ [Browsable(false)]
+ public string DatabaseLocation
+ {
+ get { return databaseLocation; }
+ set { databaseLocation = value; }
+ }
+
+ [Browsable(false)]
+ public string LastError
+ {
+ get { return lastError; }
+ }
+
+ [Browsable(false)]
+ public int LastInsertID
+ {
+ get
+ {
+ if (database == null)
+ {
+ return 0;
+ }
+
+ DataTable dt = this.DoQuery("SELECT last_insert_rowid() AS ccc;");
+ if (dt == null)
+ {
+ return 0;
+ }
+
+ if (dt.Rows.Count <= 0)
+ {
+ return 0;
+ }
+
+ return int.Parse(dt.Rows[0]["ccc"].ToString());
+ }
+ }
+
+ #endregion
+
+ #region public methods
+
+ public bool Create(bool use_memory = true)
+ {
+ lastError = string.Empty;
+
+ if (string.IsNullOrEmpty(databaseLocation))
+ {
+ return false;
+ }
+
+ try
+ {
+ if (database != null)
+ {
+ database.CloseDatabase();
+ }
+
+ database = new SQLiteWrapper.SQLiteBase(((use_memory) ? ":memory:" : databaseLocation));
+ }
+ catch (Exception exc)
+ {
+ lastError = exc.Message;
+ return false;
+ }
+
+ bool rv = Prepare();
+ if (!rv)
+ {
+ return false;
+ }
+
+ return CheckRequiredTables();
+ }
+
+ public bool Create(string filename, bool override_file = false)
+ {
+ lastError = string.Empty;
+ databaseLocation = filename;
+
+ if (string.IsNullOrEmpty(databaseLocation))
+ {
+ return false;
+ }
+
+ if (File.Exists(databaseLocation) && override_file)
+ {
+ try
+ {
+ File.Delete(databaseLocation);
+ }
+ catch (Exception xc)
+ {
+ lastError = xc.Message;
+ return false;
+ }
+ }
+
+ try
+ {
+ if (database != null)
+ {
+ database.CloseDatabase();
+ }
+
+ database = new SQLiteWrapper.SQLiteBase(databaseLocation);
+ }
+ catch (Exception exc)
+ {
+ lastError = exc.Message;
+ return false;
+ }
+
+ bool rv = CheckRequiredTables();
+ if (!rv)
+ {
+ Prepare();
+ }
+
+ return CheckRequiredTables();
+ }
+
+ public bool Load(string filename)
+ {
+ if (!File.Exists(filename))
+ {
+ return false;
+ }
+
+ lastError = string.Empty;
+ databaseLocation = filename;
+
+ try
+ {
+ if (database != null)
+ {
+ database.CloseDatabase();
+ }
+
+ database = new SQLiteWrapper.SQLiteBase(databaseLocation);
+ }
+ catch (Exception exc)
+ {
+ lastError = exc.Message;
+ return false;
+ }
+
+ return CheckRequiredTables();
+ }
+
+ public void Close()
+ {
+ if (database != null)
+ {
+ database.CloseDatabase();
+ }
+ }
+
+
+ public DataTable DoQuery(string query)
+ {
+ lastError = string.Empty;
+ if (database == null)
+ {
+ return null;
+ }
+
+ try
+ {
+ return database.ExecuteQuery(query);
+ }
+ catch (Exception exc)
+ {
+ lastError = exc.Message;
+ return null;
+ }
+ }
+
+ public DataTable DoQuery(string query, params string[] args)
+ {
+ string sql = SQLiteDatabase.PrepareQuery(query, args);
+
+ return DoQuery(sql);
+ }
+
+ public bool DoNonQuery(string query)
+ {
+ lastError = string.Empty;
+ if (database == null)
+ {
+ return false;
+ }
+
+ try
+ {
+ database.ExecuteNonQuery(query);
+ return true;
+ }
+ catch (Exception exc)
+ {
+ lastError = exc.Message;
+ return false;
+ }
+ }
+
+ public bool DoNonQuery(string query, params string[] args)
+ {
+ string sql = SQLiteDatabase.PrepareQuery(query, args);
+
+ return DoNonQuery(sql);
+ }
+
+ public string DoQuerySingle(string query)
+ {
+ lastError = string.Empty;
+ if (database == null)
+ {
+ return string.Empty;
+ }
+
+ DataTable tbl = DoQuery(query);
+
+ if (tbl == null)
+ {
+ return string.Empty;
+ }
+
+ if (tbl.Columns.Count <= 0)
+ {
+ return string.Empty;
+ }
+
+ if (tbl.Rows.Count <= 0)
+ {
+ return string.Empty;
+ }
+
+ return tbl.Rows[0][0].ToString();
+ }
+
+ public string DoQuerySingle(string query, params string[] args)
+ {
+ string sql = SQLiteDatabase.PrepareQuery(query, args);
+
+ return DoQuerySingle(sql);
+ }
+
+ public int DoQueryCount(string query)
+ {
+ if (database == null)
+ {
+ return -1;
+ }
+
+ DataTable tbl = DoQuery(query);
+
+ if (tbl == null)
+ {
+ return -1;
+ }
+
+ if (tbl.Rows.Count <= 0)
+ {
+ return 0;
+ }
+
+ return tbl.Rows.Count;
+ }
+
+ public int DoQueryCount(string query, params string[] args)
+ {
+ string sql = SQLiteDatabase.PrepareQuery(query, args);
+
+ return DoQueryCount(sql);
+ }
+
+ public bool DoQueryExist(string query)
+ {
+ int rv = DoQueryCount(query);
+
+ return (rv > 0);
+ }
+
+ public bool DoQueryExist(string query, params string[] args)
+ {
+ string sql = SQLiteDatabase.PrepareQuery(query, args);
+
+ return DoQueryExist(sql);
+ }
+
+ public bool HasTable(string table_name)
+ {
+ lastError = string.Empty;
+ if (database == null)
+ {
+ return false;
+ }
+
+ int rv = this.DoQueryCount("SELECT 1 FROM sqlite_master WHERE type='table' AND name='" + escapeSQL(table_name) + "'");
+
+ return (rv > 0);
+ }
+
+ public bool CheckRequiredTables()
+ {
+ bool rv = true;
+ foreach (string tbl in requiredTableList)
+ {
+ if (string.IsNullOrEmpty(tbl))
+ {
+ continue;
+ }
+
+ if (!this.HasTable(tbl))
+ {
+ rv = false;
+ break;
+ }
+ }
+
+ return rv;
+ }
+
+
+ protected bool PrepareConfig()
+ {
+ if (HasTable(tableNameConfig))
+ {
+ return true;
+ }
+
+ bool rv = this.DoNonQuery(@"
+ BEGIN TRANSACTION;
+ CREATE TABLE " + tableNameConfig + @" (cfg_name TEXT, cfg_value TEXT);
+ COMMIT;
+ ");
+
+ return rv;
+ }
+
+ public bool SetConfig(string name, string value)
+ {
+ if (!PrepareConfig())
+ {
+ return false;
+ }
+
+ string sql = string.Empty;
+ int rv = this.DoQueryCount("SELECT 1 FROM " + tableNameConfig + " WHERE cfg_name='" + escapeSQL(name) + "'");
+ if (rv <= 0)
+ {
+ sql = "INSERT INTO " + tableNameConfig + " (cfg_name, cfg_value) VALUES ('[^1]', '[^2]');";
+ }
+ else
+ {
+ sql = "UPDATE " + tableNameConfig + " SET cfg_value='[^2]' WHERE cfg_name='[^1]';";
+ }
+
+ sql = PrepareQuery(sql, new string[] { name, value });
+
+ return this.DoNonQuery(sql);
+ }
+
+ public string GetConfig(string name, string default_value = "")
+ {
+ if (!PrepareConfig())
+ {
+ return default_value;
+ }
+
+ bool rv = this.DoQueryExist("SELECT 1 FROM " + tableNameConfig + " WHERE cfg_name='" + escapeSQL(name) + "'");
+ if (!rv)
+ {
+ return default_value;
+ }
+
+ return this.DoQuerySingle("SELECT cfg_value FROM " + tableNameConfig + " WHERE cfg_name='" + escapeSQL(name) + "'");
+ }
+
+ #endregion
+
+ protected virtual bool Prepare()
+ {
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Drawing/LeftRectangoid.cs b/RyzStudio/Drawing/LeftRectangoid.cs
new file mode 100644
index 0000000..b421a98
--- /dev/null
+++ b/RyzStudio/Drawing/LeftRectangoid.cs
@@ -0,0 +1,137 @@
+namespace RyzStudio.Drawing
+{
+ using System.Drawing;
+ using System.Drawing.Drawing2D;
+
+ public struct LeftRectangoid
+ {
+ private int X;
+ private int Y;
+ private int Width;
+ private int Height;
+ private int Radius;
+
+ public LeftRectangoid(Rectangle rect, int radius)
+ {
+ X = rect.X;
+ Y = rect.Y;
+ Width = rect.Width;
+ Height = rect.Height;
+ Radius = radius;
+ }
+
+ public LeftRectangoid(Rectangle rect, int radius, int borderWidth)
+ {
+ rect.Inflate((-1 * borderWidth), (-1 * borderWidth));
+
+ X = rect.X;
+ Y = rect.Y;
+ Width = rect.Width;
+ Height = rect.Height;
+ Radius = radius;
+ }
+
+ public LeftRectangoid(int x, int y, int width, int height, int radius)
+ {
+ X = x;
+ Y = y;
+ Width = width;
+ Height = height;
+ Radius = radius;
+ }
+
+ public LeftRectangoid(int x, int y, int width, int height)
+ {
+ X = x;
+ Y = y;
+ Width = width;
+ Height = height;
+ Radius = 0;
+ }
+
+ public LeftRectangoid(int width, int height, int radius)
+ {
+ X = 0;
+ Y = 0;
+ Width = width;
+ Height = height;
+ Radius = radius;
+ }
+
+ public LeftRectangoid(int width, int height)
+ {
+ X = 0;
+ Y = 0;
+ Width = width;
+ Height = height;
+ Radius = 0;
+ }
+
+ public LeftRectangoid(int width)
+ {
+ X = 0;
+ Y = 0;
+ Width = width;
+ Height = width;
+ Radius = 0;
+ }
+
+ public GraphicsPath ToGraphicsPath()
+ {
+ GraphicsPath rv = new GraphicsPath();
+
+ rv.AddLine(X + Width, Y + Height, X + this.Radius, Y + Height);
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X, Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 90, 90);
+ }
+
+ rv.AddLine(X, Y + Height - (this.Radius * 2), X, Y + this.Radius);
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X, Y, this.Radius * 2, this.Radius * 2, 180, 90);
+ }
+
+ rv.AddLine(X + Width, Y, X + this.Radius, Y);
+
+ return rv;
+ }
+
+ public GraphicsPath ToClosedGraphicsPath()
+ {
+ GraphicsPath rv = new GraphicsPath();
+
+ rv.AddLine(X + this.Radius, Y, X + Width, Y);
+ rv.AddLine(X + Width + this.Radius, Y + this.Radius, X + Width + this.Radius, Y + Height);
+
+ rv.AddLine(X + Width + this.Radius, Y + Height, X + this.Radius, Y + Height);
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X, Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 90, 90);
+ }
+
+ rv.AddLine(X, Y + Height - (this.Radius * 2), X, Y + this.Radius);
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X, Y, this.Radius * 2, this.Radius * 2, 180, 90);
+ }
+
+ rv.AddLine(X + Width + this.Radius, Y, X + this.Radius, Y);
+
+ return rv;
+ }
+
+ public PointF GetOrigin()
+ {
+ PointF rv = new PointF();
+ rv.X = ((float)Width / 2) + X;
+ rv.Y = ((float)Height / 2) + Y;
+
+ return rv;
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Drawing/Rectangoid.cs b/RyzStudio/Drawing/Rectangoid.cs
new file mode 100644
index 0000000..59a24d8
--- /dev/null
+++ b/RyzStudio/Drawing/Rectangoid.cs
@@ -0,0 +1,124 @@
+using System.Drawing;
+using System.Drawing.Drawing2D;
+
+namespace RyzStudio.Drawing
+{
+ public struct Rectangoid
+ {
+ private int X;
+ private int Y;
+ private int Width;
+ private int Height;
+ private int Radius;
+
+ public Rectangoid(Rectangle rect, int radius)
+ {
+ X = rect.X;
+ Y = rect.Y;
+ Width = rect.Width;
+ Height = rect.Height;
+ Radius = radius;
+ }
+
+ public Rectangoid(Rectangle rect, int radius, int borderWidth)
+ {
+ rect.Inflate((-1 * borderWidth), (-1 * borderWidth));
+
+ X = rect.X;
+ Y = rect.Y;
+ Width = rect.Width;
+ Height = rect.Height;
+ Radius = radius;
+ }
+
+ public Rectangoid(int x, int y, int width, int height, int radius)
+ {
+ X = x;
+ Y = y;
+ Width = width;
+ Height = height;
+ Radius = radius;
+ }
+
+ public Rectangoid(int x, int y, int width, int height)
+ {
+ X = x;
+ Y = y;
+ Width = width;
+ Height = height;
+ Radius = 0;
+ }
+
+ public Rectangoid(int width, int height, int radius)
+ {
+ X = 0;
+ Y = 0;
+ Width = width;
+ Height = height;
+ Radius = radius;
+ }
+
+ public Rectangoid(int width, int height)
+ {
+ X = 0;
+ Y = 0;
+ Width = width;
+ Height = height;
+ Radius = 0;
+ }
+
+ public Rectangoid(int width)
+ {
+ X = 0;
+ Y = 0;
+ Width = width;
+ Height = width;
+ Radius = 0;
+ }
+
+ public GraphicsPath ToGraphicsPath()
+ {
+ GraphicsPath rv = new GraphicsPath();
+ rv.AddLine(X + this.Radius, Y, X + Width - (this.Radius * 2), Y);
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X + Width - (this.Radius * 2), Y, this.Radius * 2, this.Radius * 2, 270, 90);
+ }
+
+ rv.AddLine(X + Width, Y + this.Radius, X + Width, Y + Height - (this.Radius * 2));
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X + Width - (this.Radius * 2), Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 0, 90);
+ }
+
+ rv.AddLine(X + Width - (this.Radius * 2), Y + Height, X + this.Radius, Y + Height);
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X, Y + Height - (this.Radius * 2), this.Radius * 2, this.Radius * 2, 90, 90);
+ }
+
+ rv.AddLine(X, Y + Height - (this.Radius * 2), X, Y + this.Radius);
+
+ if (this.Radius > 0)
+ {
+ rv.AddArc(X, Y, this.Radius * 2, this.Radius * 2, 180, 90);
+ }
+
+ rv.CloseFigure();
+
+ return rv;
+ }
+
+ public PointF GetOrigin()
+ {
+ PointF rv = new PointF();
+ rv.X = ((float)Width / 2) + X;
+ rv.Y = ((float)Height / 2) + Y;
+
+ return rv;
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/IO/FileType.cs b/RyzStudio/IO/FileType.cs
new file mode 100644
index 0000000..3c8b616
--- /dev/null
+++ b/RyzStudio/IO/FileType.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace RyzStudio.IO
+{
+ public class FileType
+ {
+ protected static readonly byte[] BMP = { 66, 77 };
+ protected static readonly byte[] GIF = { 71, 73, 70, 56 };
+ protected static readonly byte[] ICO = { 0, 0, 1, 0 };
+ protected static readonly byte[] JPG = { 255, 216, 255 };
+ protected static readonly byte[] PNG = { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82 };
+
+ public static bool IsImage(byte[] byteArray)
+ {
+ if (byteArray == null)
+ {
+ return false;
+ }
+
+ if (byteArray.Length <= 0)
+ {
+ return false;
+ }
+
+ if (byteArray.Take(2).SequenceEqual(BMP))
+ {
+ return true;
+ }
+
+ if (byteArray.Take(4).SequenceEqual(GIF))
+ {
+ return true;
+ }
+
+ if (byteArray.Take(4).SequenceEqual(ICO))
+ {
+ return true;
+ }
+
+ if (byteArray.Take(3).SequenceEqual(JPG))
+ {
+ return true;
+ }
+
+ if (byteArray.Take(16).SequenceEqual(PNG))
+ {
+ return true;
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/RyzStudio/IO/SessionFileFormatBase.cs b/RyzStudio/IO/SessionFileFormatBase.cs
new file mode 100644
index 0000000..3ae2887
--- /dev/null
+++ b/RyzStudio/IO/SessionFileFormatBase.cs
@@ -0,0 +1,290 @@
+using System;
+using System.IO;
+using System.Text;
+using System.Xml;
+using System.Windows.Forms;
+using ICSharpCode.SharpZipLib.Zip;
+
+namespace RyzStudio.IO
+{
+ public abstract class SessionFileFormatBase
+ {
+ protected string CONST_KEYPASS = "";
+ protected string CONST_PRODUCT = "";
+ protected string CONST_STREAM_FILE_NAME = "";
+
+ protected bool enableErrorReporting = false;
+ protected string lastUsedFileName = "";
+
+ #region public properties
+
+ public string passkey
+ {
+ get { return CONST_KEYPASS; }
+ set { CONST_KEYPASS = value; }
+ }
+
+ /*public string LastFilename
+ {
+ get { return lastUsedFileName; }
+ set { lastUsedFileName = value; }
+ }*/
+
+ #endregion
+
+ #region public methods
+
+/* public bool loadFromRyz()
+ {
+ return loadFromRyz(lastUsedFileName);
+ }*/
+
+ public bool loadFromRyz(string file_name)
+ {
+ lastUsedFileName = file_name;
+ if (!File.Exists(file_name))
+ {
+ return false;
+ }
+
+ bool rv = false;
+
+ try
+ {
+ ZipInputStream zipIn = new ZipInputStream(File.OpenRead(file_name));
+ zipIn.Password = CONST_KEYPASS;
+ ZipEntry theEntry = null;
+
+ while ((theEntry = zipIn.GetNextEntry()) != null)
+ {
+ string streamFileName = Path.GetFileName(theEntry.Name);
+ if (streamFileName.Equals(CONST_STREAM_FILE_NAME))
+ {
+ MemoryStream oxStream = new MemoryStream();
+ StreamWriter streamWriter = new StreamWriter(oxStream);
+ int size = 2048;
+ byte[] data = new byte[size];
+ while (true)
+ {
+ size = zipIn.Read(data, 0, data.Length);
+ if (size <= 0) break;
+ streamWriter.BaseStream.Write(data, 0, size);
+ }
+
+ oxStream.Position = 0;
+
+ StreamReader sr2 = new StreamReader(oxStream, Encoding.UTF8);
+ XmlDocument xDoc = new XmlDocument();
+ xDoc.LoadXml(sr2.ReadToEnd());
+
+ loadFromXmlDocument(ref xDoc);
+ }
+ }
+
+ zipIn.Close();
+
+ rv = true;
+ }
+ catch (Exception exc)
+ {
+ if (enableErrorReporting)
+ {
+ MessageBox.Show(exc.Message);
+ }
+ }
+
+ return rv;
+ }
+
+ public bool loadFromXml()
+ {
+ return loadFromXml(lastUsedFileName);
+ }
+
+ public bool loadFromXml(string file_name)
+ {
+ lastUsedFileName = file_name;
+ if (!File.Exists(file_name))
+ {
+ return false;
+ }
+
+ bool rv = false;
+
+ try
+ {
+ StreamReader sr2 = new StreamReader(file_name, Encoding.UTF8);
+ XmlDocument xDoc = new XmlDocument();
+ xDoc.LoadXml(sr2.ReadToEnd());
+
+ loadFromXmlDocument(ref xDoc);
+ sr2.Close();
+
+ rv = true;
+ }
+ catch (Exception exc)
+ {
+ if (enableErrorReporting)
+ {
+ MessageBox.Show(exc.Message);
+ }
+ }
+
+ return rv;
+ }
+
+/* public bool saveToRyz()
+ {
+ return saveToRyz(lastUsedFileName);
+ }
+*/
+
+ public bool saveToRyz(string file_name)
+ {
+ bool rv = false;
+ lastUsedFileName = file_name;
+ byte[] buffer = new byte[4096];
+
+ try
+ {
+ File.Delete(file_name);
+ FileInfo fileinfo1 = new FileInfo(file_name);
+ if (!Directory.Exists(fileinfo1.DirectoryName))
+ {
+ Directory.CreateDirectory(fileinfo1.DirectoryName);
+ }
+ }
+ catch (Exception exc)
+ {
+ if (enableErrorReporting)
+ {
+ MessageBox.Show(exc.Message);
+ }
+ }
+
+ try
+ {
+ ZipOutputStream zipOutStream1 = new ZipOutputStream(File.Create(file_name));
+ zipOutStream1.SetLevel(9);
+ zipOutStream1.Password = CONST_KEYPASS;
+
+ MemoryStream oxIndexStream = new MemoryStream();
+ XmlTextWriter oxTW = new XmlTextWriter(oxIndexStream, Encoding.UTF8);
+ saveToXmlTextWriter(ref oxTW);
+ oxTW.Flush();
+
+ // write to file
+ zipOutStream1.PutNextEntry(new ZipEntry(CONST_STREAM_FILE_NAME));
+ oxIndexStream.Position = 0;
+ StreamReader sr2 = new StreamReader(oxIndexStream, Encoding.UTF8);
+ int sourceBytes;
+ do
+ {
+ sourceBytes = sr2.BaseStream.Read(buffer, 0, buffer.Length);
+ zipOutStream1.Write(buffer, 0, sourceBytes);
+ }
+ while (sourceBytes > 0);
+
+ sr2.Close();
+ oxTW.Close();
+ zipOutStream1.Finish();
+ zipOutStream1.Close();
+
+ rv = true;
+ }
+ catch (Exception exc)
+ {
+ if (enableErrorReporting)
+ {
+ MessageBox.Show(exc.Message);
+ }
+ }
+
+ return rv;
+ }
+
+ public bool saveToXml()
+ {
+ return saveToXml(lastUsedFileName);
+ }
+
+ public bool saveToXml(string file_name)
+ {
+ bool rv = false;
+
+ lastUsedFileName = file_name;
+ try
+ {
+ File.Delete(file_name);
+ FileInfo fileinfo1 = new FileInfo(file_name);
+ if (!Directory.Exists(fileinfo1.DirectoryName))
+ {
+ Directory.CreateDirectory(fileinfo1.DirectoryName);
+ }
+ }
+ catch (Exception exc)
+ {
+ if (enableErrorReporting)
+ {
+ MessageBox.Show(exc.Message);
+ }
+ }
+
+ try
+ {
+ XmlTextWriter oxTW = new XmlTextWriter(file_name, Encoding.UTF8);
+ saveToXmlTextWriter(ref oxTW);
+ oxTW.Flush();
+ oxTW.Close();
+
+ rv = true;
+ }
+ catch (Exception exc)
+ {
+ if (enableErrorReporting)
+ {
+ MessageBox.Show(exc.Message);
+ }
+ }
+
+ return rv;
+ }
+
+ #endregion
+
+ protected virtual void loadFromXmlDocument(ref XmlDocument xml_doc) { }
+ protected virtual void saveToXmlTextWriter(ref XmlTextWriter writer) { }
+
+ #region public methods (conversions)
+
+ public int[] convIntArrayString(string s1, char c)
+ {
+ string[] sarr = s1.Split(c);
+ int[] iarr = new int[sarr.Length];
+ for (int i = 0; i < sarr.Length; i++)
+ {
+ iarr[i] = Int32.Parse(sarr[i]);
+ }
+
+ return iarr;
+ }
+
+ public string convStringIntArray(int[] r, char s)
+ {
+ string t = null;
+ for (int i = 0; i < r.Length; i++)
+ {
+ if (i != 0)
+ {
+ t += s.ToString();
+ }
+
+ t += r[i].ToString();
+ }
+
+ return t;
+ }
+
+#endregion
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/IO/SharpZipLib.cs b/RyzStudio/IO/SharpZipLib.cs
new file mode 100644
index 0000000..b162124
--- /dev/null
+++ b/RyzStudio/IO/SharpZipLib.cs
@@ -0,0 +1,76 @@
+using System;
+using System.IO;
+using ICSharpCode.SharpZipLib.Zip;
+
+namespace RyzStudio.IO
+{
+ public class SharpZipLib
+ {
+ ///
+ /// Is zip file encrypted
+ ///
+ /// Filename
+ /// Is encrypted
+ public static bool IsZipEncrypted(string fn)
+ {
+ bool ret_val = false;
+ try
+ {
+ ZipInputStream zipIn = new ZipInputStream(System.IO.File.OpenRead(fn));
+ ZipEntry theEntry = null;
+ while ((theEntry = zipIn.GetNextEntry()) != null)
+ {
+ if (theEntry.IsCrypted)
+ {
+ ret_val = true;
+ }
+
+ break;
+ }
+
+ zipIn.Close();
+ }
+ catch
+ {
+ // do nothing
+ }
+
+ return ret_val;
+ }
+
+ public static void AddFile(ZipOutputStream zipstream, string filename, string prefixpath = null)
+ {
+ byte[] buffer = new byte[4096];
+
+ string f1 = "";
+ if (prefixpath != null)
+ {
+ f1 = Path.GetDirectoryName(filename).TrimEnd('\\') + "\\";
+ f1 = f1.Replace(prefixpath, "").TrimEnd('\\') + "\\";
+ f1 = f1 + Path.GetFileName(filename);
+ f1 = f1.TrimStart('\\');
+ }
+
+ ZipEntry entry = new ZipEntry(f1);
+ entry.DateTime = DateTime.Now;
+ zipstream.PutNextEntry(entry);
+
+ FileStream fs = File.OpenRead(filename);
+ int sourceBytes;
+ do
+ {
+ sourceBytes = fs.Read(buffer, 0, buffer.Length);
+ zipstream.Write(buffer, 0, sourceBytes);
+ }
+ while (sourceBytes > 0);
+ }
+
+ public static void AddFolder(ZipOutputStream zipstream, string folderpath, string prefixpath = null)
+ {
+ foreach (string fn in Directory.GetFiles(folderpath, "*.*", System.IO.SearchOption.AllDirectories))
+ {
+ AddFile(zipstream, fn, prefixpath);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Net/HttpWeb.cs b/RyzStudio/Net/HttpWeb.cs
new file mode 100644
index 0000000..bafff2e
--- /dev/null
+++ b/RyzStudio/Net/HttpWeb.cs
@@ -0,0 +1,168 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Windows.Forms;
+
+namespace RyzStudio.Net
+{
+ public class HttpWeb
+ {
+ public string defaultUserAgent = "Momozilla/5.0 (" + Environment.OSVersion.Platform.ToString() + " ; " + Environment.OSVersion.VersionString + "; " + Application.CurrentCulture.TwoLetterISOLanguageName + ")";
+ public int defaultTimeout = 6000;
+ public int defaultMaxRedirect = 8;
+ public bool defaultAllowRedirect = true;
+ public CookieContainer defaultCookierContainer = null;
+
+ public HttpWeb()
+ {
+ }
+
+ public HttpWebRequest CreateRequest(string url)
+ {
+ return this.CreateRequest(url, url);
+ }
+
+ public HttpWebRequest CreateRequest(string url, string referrerURL)
+ {
+ if (defaultCookierContainer == null)
+ {
+ defaultCookierContainer = new CookieContainer();
+ }
+
+ HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
+ webRequest.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);
+ webRequest.MaximumAutomaticRedirections = defaultMaxRedirect;
+ webRequest.CookieContainer = defaultCookierContainer;
+ webRequest.UserAgent = defaultUserAgent;
+ webRequest.AllowAutoRedirect = defaultAllowRedirect;
+ webRequest.Timeout = defaultTimeout;
+
+ return webRequest;
+ }
+
+ public int GetResponse(out string sourceCode, string url, string referrerURL = "")
+ {
+ HttpWebRequest webRequest = this.CreateRequest(url, referrerURL);
+
+ return GetResponse(out sourceCode, webRequest);
+ }
+
+ public int GetResponse(out string sourceCode, HttpWebRequest webRequest)
+ {
+ sourceCode = string.Empty;
+
+ int rv = 0;
+
+ try
+ {
+ HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
+
+ rv = (int)webResponse.StatusCode;
+
+ StreamReader readContent = new StreamReader(webResponse.GetResponseStream());
+ sourceCode = readContent.ReadToEnd();
+
+ webResponse.Close();
+ webResponse = null;
+ }
+ catch (WebException xc)
+ {
+ if (xc.Response is HttpWebResponse)
+ {
+ HttpWebResponse rs = xc.Response as HttpWebResponse;
+ StreamReader readContent = new StreamReader(rs.GetResponseStream());
+ if (readContent != null)
+ {
+ sourceCode = readContent.ReadToEnd();
+ }
+
+ rv = (int)rs.StatusCode;
+ }
+ else
+ {
+ rv = (int)xc.Status;
+ sourceCode = xc.Message;
+ }
+ }
+ catch (Exception xc)
+ {
+ sourceCode = xc.Message;
+ }
+
+ return rv;
+ }
+
+ public static HttpWebRequest AddBasicAuthentication(HttpWebRequest webRequest, string username, string password)
+ {
+ webRequest.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes(string.Concat(username, ":", password)));
+ webRequest.PreAuthenticate = true;
+
+ return webRequest;
+ }
+
+
+ public int GetPOSTResponse(out string sourceCode, HttpWebRequest webRequest, string postData)
+ {
+ sourceCode = "";
+ int rv = 0;
+ byte[] buffer = Encoding.UTF8.GetBytes(postData);
+
+ webRequest.ContentLength = buffer.Length;
+
+ try
+ {
+ Stream dataStream = webRequest.GetRequestStream();
+ dataStream.Write(buffer, 0, buffer.Length);
+ dataStream.Close();
+ }
+ catch (Exception xc)
+ {
+ sourceCode = xc.Message;
+ return rv;
+ }
+
+ return this.GetResponse(out sourceCode, webRequest);
+ }
+
+ public int GetHeader(out WebHeaderCollection headerCollection, string url, string referrerURL = "")
+ {
+ headerCollection = null;
+
+ int rv = 0;
+
+ HttpWebRequest webRequest = this.CreateRequest(url, referrerURL);
+ webRequest.Method = "HEAD";
+
+ try
+ {
+ HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
+ headerCollection = webResponse.Headers;
+
+ rv = (int)webResponse.StatusCode;
+
+ webResponse.Close();
+ webResponse = null;
+ }
+ catch (WebException xc)
+ {
+ if (xc.Response is HttpWebResponse)
+ {
+ HttpWebResponse rs = xc.Response as HttpWebResponse;
+
+ rv = (int)rs.StatusCode;
+ }
+ else
+ {
+ rv = (int)xc.Status;
+ }
+ }
+ catch
+ {
+ // do nothing
+ }
+
+ return rv;
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/String.cs b/RyzStudio/String.cs
new file mode 100644
index 0000000..c6c4510
--- /dev/null
+++ b/RyzStudio/String.cs
@@ -0,0 +1,36 @@
+using System;
+using System.IO;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace RyzStudio
+{
+ public class String
+ {
+ public static string EncodeTo64(string value)
+ {
+ try
+ {
+ byte[] toEncodeAsBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(value);
+ return System.Convert.ToBase64String(toEncodeAsBytes);
+ }
+ catch
+ {
+ return string.Empty;
+ }
+ }
+
+ public static string DecodeFrom64(string value)
+ {
+ try
+ {
+ byte[] encodedDataAsBytes = System.Convert.FromBase64String(value);
+ return System.Text.ASCIIEncoding.ASCII.GetString(encodedDataAsBytes);
+ }
+ catch
+ {
+ return string.Empty;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/Forms/HorizontalSeparator.Designer.cs b/RyzStudio/Windows/Forms/HorizontalSeparator.Designer.cs
new file mode 100644
index 0000000..7fa6fd6
--- /dev/null
+++ b/RyzStudio/Windows/Forms/HorizontalSeparator.Designer.cs
@@ -0,0 +1,37 @@
+namespace RyzStudio.Windows.Forms
+{
+ partial class HorizontalSeparator
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ }
+
+ #endregion
+ }
+}
diff --git a/RyzStudio/Windows/Forms/HorizontalSeparator.cs b/RyzStudio/Windows/Forms/HorizontalSeparator.cs
new file mode 100644
index 0000000..1c7aeba
--- /dev/null
+++ b/RyzStudio/Windows/Forms/HorizontalSeparator.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace RyzStudio.Windows.Forms
+{
+ public partial class HorizontalSeparator : System.Windows.Forms.UserControl
+ {
+ public HorizontalSeparator()
+ {
+ InitializeComponent();
+
+ this.MaximumSize = new Size(SystemInformation.VirtualScreen.Width, 2);
+ }
+
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ base.OnPaintBackground(e);
+
+ Graphics g = e.Graphics;
+ g.FillRectangle(new SolidBrush(Color.FromArgb(213, 223, 229)), new Rectangle(this.DisplayRectangle.Left, 0, this.DisplayRectangle.Width, 1));
+ g.FillRectangle(new SolidBrush(Color.FromArgb(249, 251, 253)), new Rectangle(this.DisplayRectangle.Left, 1, this.DisplayRectangle.Width, 1));
+ }
+ }
+}
diff --git a/RyzStudio/Windows/Forms/ImageBox.cs b/RyzStudio/Windows/Forms/ImageBox.cs
new file mode 100644
index 0000000..eebcc75
--- /dev/null
+++ b/RyzStudio/Windows/Forms/ImageBox.cs
@@ -0,0 +1,54 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+
+namespace RyzStudio.Windows.Forms
+{
+ public class ImageBox : System.Windows.Forms.PictureBox
+ {
+ public ImageBox() : base()
+ {
+ this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.ErrorImage = null;
+ this.InitialImage = null;
+ this.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ }
+
+ protected override void OnCreateControl()
+ {
+ OnMouseLeave(null);
+
+ base.OnCreateControl();
+ }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Image Image { get => base.Image; set { base.Image = value; } }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image NormalImage { get; set; }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image HighlightImage { get; set; }
+
+ protected override void OnMouseEnter(EventArgs e)
+ {
+ this.Image = this.HighlightImage;
+
+ base.OnMouseEnter(e);
+ }
+
+ protected override void OnMouseLeave(EventArgs e)
+ {
+ this.Image = this.NormalImage;
+
+ base.OnMouseLeave(e);
+ }
+
+ protected override void OnLostFocus(EventArgs e)
+ {
+ this.Image = this.NormalImage;
+
+ base.OnLostFocus(e);
+ }
+ }
+}
diff --git a/RyzStudio/Windows/Forms/PanelBook.Designer.cs b/RyzStudio/Windows/Forms/PanelBook.Designer.cs
new file mode 100644
index 0000000..576b43a
--- /dev/null
+++ b/RyzStudio/Windows/Forms/PanelBook.Designer.cs
@@ -0,0 +1,37 @@
+namespace RyzStudio.Windows.Forms
+{
+ partial class PanelBook
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ }
+
+ #endregion
+ }
+}
diff --git a/RyzStudio/Windows/Forms/PanelBook.cs b/RyzStudio/Windows/Forms/PanelBook.cs
new file mode 100644
index 0000000..190ec28
--- /dev/null
+++ b/RyzStudio/Windows/Forms/PanelBook.cs
@@ -0,0 +1,159 @@
+namespace RyzStudio.Windows.Forms
+{
+ using System;
+ using System.ComponentModel;
+ using System.Windows.Forms;
+
+ [ToolboxItem(true)]
+ public partial class PanelBook : UserControl
+ {
+ protected PanelCollection panelCollection = null;
+
+ public PanelBook()
+ {
+ InitializeComponent();
+
+ panelCollection = new PanelCollection(this);
+
+ }
+
+ public Panel ActivePanel { get; set; } = null;
+
+ [Category("Collection")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PanelCollection Pages
+ {
+ get { return panelCollection; }
+ }
+
+ [Category("Collection")]
+ public int SelectedIndex
+ {
+ get
+ {
+ if (panelCollection.Count <= 0)
+ {
+ return -1;
+ }
+
+ return panelCollection.IndexOf(this.ActivePanel);
+ }
+ set
+ {
+ if (panelCollection.Count <= 0)
+ {
+ return;
+ }
+
+ if (value < 0)
+ {
+ return;
+ }
+
+ if (value > (panelCollection.Count - 1))
+ {
+ return;
+ }
+
+ if (value == this.SelectedIndex)
+ {
+ return;
+ }
+
+ ActivatePanel(value);
+ }
+ }
+
+ protected internal int PageIndex
+ {
+ get
+ {
+ return panelCollection.IndexOf(this.ActivePanel);
+ }
+ set
+ {
+ if (panelCollection.Count <= 0)
+ {
+ ActivatePanel(-1);
+ return;
+ }
+
+ if ((value < -1) || (value >= panelCollection.Count))
+ {
+ throw new ArgumentOutOfRangeException("PageIndex", value, "The page index must be between 0 and " + Convert.ToString(panelCollection.Count - 1));
+ }
+
+ ActivatePanel(value);
+ }
+ }
+
+ protected internal void ActivatePanel(int index)
+ {
+ if ((panelCollection.Count == 0) && (index >= panelCollection.Count) && (index <= 0))
+ {
+ return;
+ }
+
+ Panel p = (Panel)panelCollection[index];
+
+ ActivatePage(p);
+ }
+
+ protected internal void ActivatePage(Panel page)
+ {
+ if (this.ActivePanel != null)
+ {
+ this.ActivePanel.Visible = false;
+ }
+
+ this.ActivePanel = page;
+ if (this.ActivePanel != null)
+ {
+ this.ActivePanel.Parent = this;
+ if (!this.Contains(this.ActivePanel))
+ {
+ this.Container.Add(this.ActivePanel);
+ }
+
+ this.ActivePanel.Dock = DockStyle.Fill;
+ this.ActivePanel.Visible = true;
+ this.ActivePanel.BringToFront();
+ }
+
+ if (this.ActivePanel != null)
+ {
+ this.ActivePanel.Invalidate();
+ }
+ else
+ {
+ this.Invalidate();
+ }
+ }
+
+#if DEBUG
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ if (this.DesignMode)
+ {
+ this.Invalidate();
+ }
+ }
+
+#endif
+
+ protected override void DestroyHandle()
+ {
+ base.DestroyHandle();
+
+ foreach (Panel p in panelCollection)
+ {
+ p.Dispose();
+ }
+ }
+
+
+ }
+}
diff --git a/RyzStudio/Windows/Forms/PanelCollection.cs b/RyzStudio/Windows/Forms/PanelCollection.cs
new file mode 100644
index 0000000..af9838b
--- /dev/null
+++ b/RyzStudio/Windows/Forms/PanelCollection.cs
@@ -0,0 +1,80 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace RyzStudio.Windows.Forms
+{
+ [ToolboxItem(true)]
+ public class PanelCollection : CollectionBase
+ {
+ protected PanelBook panelBook = null;
+
+ public PanelCollection()
+ {
+
+ }
+
+ public PanelCollection(PanelBook parent) : base()
+ {
+ panelBook = parent;
+ }
+
+ public PanelBook Parent => panelBook;
+
+ public Panel this[int index] { get => (Panel)List[index]; set => List[index] = value; }
+
+ public int Add(Panel value) => List.Add(value);
+
+ public void AddRange(Panel[] pages)
+ {
+ foreach (Panel page in pages)
+ {
+ this.Add(page);
+ }
+ }
+
+ public int IndexOf(Panel value) => (List.IndexOf(value));
+
+ public void Insert(int index, Panel value) => List.Insert(index, value);
+
+ public void Remove(Panel value) => List.Remove(value);
+
+ public bool Contains(Panel value) => List.Contains(value);
+
+ protected override void OnInsertComplete(int index, object value)
+ {
+ base.OnInsertComplete(index, value);
+
+ if (panelBook != null)
+ {
+ panelBook.PageIndex = index;
+ }
+ }
+
+ protected override void OnRemoveComplete(int index, object value)
+ {
+ base.OnRemoveComplete(index, value);
+
+ if (panelBook != null)
+ {
+ if (panelBook.PageIndex == index)
+ {
+ if (index < InnerList.Count)
+ {
+ panelBook.PageIndex = index;
+ }
+ else
+ {
+ panelBook.PageIndex = InnerList.Count - 1;
+ }
+ }
+ }
+ }
+
+ }
+}
diff --git a/RyzStudio/Windows/Forms/StackLayoutPanel.cs b/RyzStudio/Windows/Forms/StackLayoutPanel.cs
new file mode 100644
index 0000000..8cdeae5
--- /dev/null
+++ b/RyzStudio/Windows/Forms/StackLayoutPanel.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace RyzStudio.Windows.Forms
+{
+ public class StackLayoutPanel : FlowLayoutPanel
+ {
+ public StackLayoutPanel() : base()
+ {
+ this.AutoScroll = true;
+ this.FlowDirection = FlowDirection.TopDown;
+ this.WrapContents = false;
+ }
+
+ protected override void OnResize(EventArgs eventargs)
+ {
+ base.OnResize(eventargs);
+
+ //int w = this.ClientRectangle.Width - SystemInformation.VerticalScrollBarWidth;
+ int w = this.ClientRectangle.Width - 1;
+
+ foreach (Control item in this.Controls)
+ {
+ if (item.Width != w)
+ {
+ item.Width = w;
+ }
+ }
+ }
+
+ protected override void OnControlAdded(ControlEventArgs e)
+ {
+ base.OnControlAdded(e);
+
+ OnResize(null);
+ }
+
+ protected override void OnControlRemoved(ControlEventArgs e)
+ {
+ base.OnControlRemoved(e);
+
+ OnResize(null);
+ }
+
+ public void AddControl(Control value)
+ {
+ if (this.InvokeRequired)
+ {
+ this.Invoke(new MethodInvoker(() =>
+ {
+ value.Margin = new Padding(0, 3, 0, 3);
+
+ this.Controls.Add(value);
+ }));
+ }
+ else
+ {
+ value.Margin = new Padding(0, 3, 0, 3);
+
+ this.Controls.Add(value);
+ }
+ }
+
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/BorderlessForm.Designer.cs b/RyzStudio/Windows/ThemedForms/BorderlessForm.Designer.cs
new file mode 100644
index 0000000..04e71d5
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/BorderlessForm.Designer.cs
@@ -0,0 +1,191 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class BorderlessForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BorderlessForm));
+ this.label1 = new System.Windows.Forms.Label();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.area1 = new System.Windows.Forms.Panel();
+ this.pictureBox4 = new RyzStudio.Windows.Forms.ImageBox();
+ this.pictureBox2 = new RyzStudio.Windows.Forms.ImageBox();
+ this.pictureBox1 = new RyzStudio.Windows.Forms.ImageBox();
+ this.pictureBox3 = new RyzStudio.Windows.Forms.ImageBox();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.label1.BackColor = System.Drawing.Color.Transparent;
+ this.label1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(241)))), ((int)(((byte)(241)))));
+ this.label1.Location = new System.Drawing.Point(1, 1);
+ this.label1.Name = "label1";
+ this.label1.Padding = new System.Windows.Forms.Padding(48, 0, 0, 0);
+ this.label1.Size = new System.Drawing.Size(454, 48);
+ this.label1.TabIndex = 148;
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.label1.DoubleClick += new System.EventHandler(this.label1_DoubleClick);
+ this.label1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick);
+ this.label1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.label1_MouseDown);
+ this.label1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label1_MouseMove);
+ this.label1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.label1_MouseUp);
+ //
+ // panel1
+ //
+ this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.panel1.BackColor = System.Drawing.Color.Transparent;
+ this.panel1.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
+ this.panel1.Location = new System.Drawing.Point(594, 674);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(6, 6);
+ this.panel1.TabIndex = 150;
+ this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown);
+ this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove);
+ this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseUp);
+ //
+ // area1
+ //
+ this.area1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.area1.BackColor = System.Drawing.Color.Transparent;
+ this.area1.Cursor = System.Windows.Forms.Cursors.SizeNS;
+ this.area1.Location = new System.Drawing.Point(1, 674);
+ this.area1.Name = "area1";
+ this.area1.Size = new System.Drawing.Size(592, 6);
+ this.area1.TabIndex = 152;
+ this.area1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseDown);
+ this.area1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseMove);
+ this.area1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseUp);
+ //
+ // pictureBox4
+ //
+ this.pictureBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.pictureBox4.BackColor = System.Drawing.Color.Transparent;
+ this.pictureBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.pictureBox4.ErrorImage = null;
+ this.pictureBox4.HighlightImage = global::hiim.dply.Properties.Resources.form20_menu2;
+ this.pictureBox4.Image = global::hiim.dply.Properties.Resources.form20_menu;
+ this.pictureBox4.InitialImage = null;
+ this.pictureBox4.Location = new System.Drawing.Point(460, 11);
+ this.pictureBox4.Name = "pictureBox4";
+ this.pictureBox4.NormalImage = global::hiim.dply.Properties.Resources.form20_menu;
+ this.pictureBox4.Size = new System.Drawing.Size(28, 28);
+ this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.pictureBox4.TabIndex = 149;
+ this.pictureBox4.TabStop = false;
+ //
+ // pictureBox2
+ //
+ this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.pictureBox2.BackColor = System.Drawing.Color.Transparent;
+ this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.pictureBox2.ErrorImage = null;
+ this.pictureBox2.HighlightImage = global::hiim.dply.Properties.Resources.form20_maximise2;
+ this.pictureBox2.Image = global::hiim.dply.Properties.Resources.form20_maximise;
+ this.pictureBox2.InitialImage = null;
+ this.pictureBox2.Location = new System.Drawing.Point(528, 11);
+ this.pictureBox2.Name = "pictureBox2";
+ this.pictureBox2.NormalImage = global::hiim.dply.Properties.Resources.form20_maximise;
+ this.pictureBox2.Size = new System.Drawing.Size(28, 28);
+ this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.pictureBox2.TabIndex = 147;
+ this.pictureBox2.TabStop = false;
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
+ this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.pictureBox1.ErrorImage = null;
+ this.pictureBox1.HighlightImage = global::hiim.dply.Properties.Resources.form20_minimise2;
+ this.pictureBox1.Image = global::hiim.dply.Properties.Resources.form20_minimise;
+ this.pictureBox1.InitialImage = null;
+ this.pictureBox1.Location = new System.Drawing.Point(494, 11);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.NormalImage = global::hiim.dply.Properties.Resources.form20_minimise;
+ this.pictureBox1.Size = new System.Drawing.Size(28, 28);
+ this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.pictureBox1.TabIndex = 146;
+ this.pictureBox1.TabStop = false;
+ //
+ // pictureBox3
+ //
+ this.pictureBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.pictureBox3.BackColor = System.Drawing.Color.Transparent;
+ this.pictureBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.pictureBox3.ErrorImage = null;
+ this.pictureBox3.HighlightImage = global::hiim.dply.Properties.Resources.form20_close2;
+ this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
+ this.pictureBox3.InitialImage = null;
+ this.pictureBox3.Location = new System.Drawing.Point(562, 11);
+ this.pictureBox3.Name = "pictureBox3";
+ this.pictureBox3.NormalImage = ((System.Drawing.Image)(resources.GetObject("pictureBox3.NormalImage")));
+ this.pictureBox3.Size = new System.Drawing.Size(28, 28);
+ this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.pictureBox3.TabIndex = 145;
+ this.pictureBox3.TabStop = false;
+ //
+ // BorderlessForm
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.ClientSize = new System.Drawing.Size(600, 680);
+ this.Controls.Add(this.area1);
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.pictureBox4);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.pictureBox2);
+ this.Controls.Add(this.pictureBox1);
+ this.Controls.Add(this.pictureBox3);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.Name = "BorderlessForm";
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ protected internal Forms.ImageBox pictureBox2;
+ protected internal Forms.ImageBox pictureBox1;
+ protected internal Forms.ImageBox pictureBox3;
+ protected internal System.Windows.Forms.Label label1;
+ protected internal Forms.ImageBox pictureBox4;
+ protected internal System.Windows.Forms.Panel panel1;
+ protected internal System.Windows.Forms.Panel area1;
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/BorderlessForm.cs b/RyzStudio/Windows/ThemedForms/BorderlessForm.cs
new file mode 100644
index 0000000..c5e4efe
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/BorderlessForm.cs
@@ -0,0 +1,410 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Drawing.Design;
+ using System.Windows.Forms;
+ using Resources = hiim.dply.Properties.Resources;
+
+ public partial class BorderlessForm : System.Windows.Forms.Form
+ {
+ protected bool isBusy = false;
+
+ protected Color topFillColour = Color.FromArgb(15, 15, 15);
+ protected int topFillHeight = 48;
+ protected Color bottomFillColour = Color.FromArgb(15, 15, 15);
+ protected int bottomFillMargin = 19;
+ protected int bottomLeftMargin = 20;
+ protected int borderWidth = 1;
+ protected int menuFillWidth = 160;
+ protected Color menuFillColour = Color.FromArgb(179, 179, 179);
+
+ private bool windowDragging = false;
+ private Point windowOffset = new Point();
+ private Point windowSize = new Point();
+
+ public BorderlessForm() : base()
+ {
+ this.InitializeComponent();
+
+ this.BackColor = Color.FromArgb(247, 247, 247);
+ this.FormBorderStyle = FormBorderStyle.None;
+ this.Padding = new Padding(1);
+
+ this.topFillColour = Color.FromArgb(51, 51, 51);
+ this.topFillHeight = 48;
+ this.bottomFillColour = Color.FromArgb(0, 152, 167);
+ this.bottomFillMargin = 6;
+
+ pictureBox1.Click += pictureBox1_Click;
+ pictureBox2.Click += pictureBox2_Click;
+ pictureBox3.Click += pictureBox3_Click;
+ pictureBox4.Click += pictureBox4_Click;
+
+ updatePictureBox2Image();
+ }
+
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ base.OnClosing(e);
+
+ if (this.IsBusy)
+ {
+ e.Cancel = true;
+ }
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ Graphics g = e.Graphics;
+
+ Rectangle areaTop = new Rectangle(this.DisplayRectangle.Left, this.Padding.Top, this.DisplayRectangle.Width, topFillHeight);
+ Rectangle areaBottom = new Rectangle(this.DisplayRectangle.Left, (this.DisplayRectangle.Height - bottomFillMargin + this.Padding.Top), this.DisplayRectangle.Width, bottomFillMargin);
+ Rectangle areaBorder = new Rectangle(this.ClientRectangle.X, this.ClientRectangle.Y, this.ClientRectangle.Width - borderWidth, this.ClientRectangle.Height - borderWidth);
+
+ Rectangle areaMenu = new Rectangle(this.DisplayRectangle.Left, this.DisplayRectangle.Top + topFillHeight, menuFillWidth, (this.DisplayRectangle.Height - bottomFillMargin - topFillHeight));
+
+ // draw header
+ if (topFillHeight > 0)
+ {
+ g.FillRectangle(new SolidBrush(topFillColour), areaTop);
+ }
+
+ // fill menu
+ g.FillRectangle(new SolidBrush(menuFillColour), areaMenu);
+
+ // draw footer
+ if (bottomFillMargin > 0)
+ {
+ g.FillRectangle(new SolidBrush(bottomFillColour), areaBottom);
+ }
+
+ // draw logo
+ if (this.TitleLogo != null)
+ {
+ g.DrawImageUnscaled(this.TitleLogo, this.Padding.Left, this.Padding.Top);
+ }
+
+ if (this.Banner != null)
+ {
+ g.DrawImageUnscaled(this.Banner, this.Padding.Left + bottomLeftMargin, (this.DisplayRectangle.Height - this.Banner.Height - bottomFillMargin + this.Padding.Top), (this.DisplayRectangle.Width - (this.Padding.Left + this.Padding.Right)), this.Banner.Height);
+ }
+
+ g.DrawRectangle(new Pen(Color.Black, borderWidth), areaBorder);
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ updatePictureBox2Image();
+
+ this.Invalidate();
+ }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Color BackColor { get => base.BackColor; set => base.BackColor = value; }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new FormBorderStyle FormBorderStyle { get => base.FormBorderStyle; set => base.FormBorderStyle = value; }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Padding { get => base.Padding; set => base.Padding = value; }
+
+ [Category("Appearance"), Browsable(true)]
+ public string Description
+ {
+ get
+ {
+ return label1.Text?.Replace("\n", "\\n");
+ }
+ set
+ {
+ label1.Text = value?.Replace("\\n", "\n");
+ }
+ }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image TitleLogo { get; set; }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image Banner { get; set; }
+
+ [Category("Appearance"), Browsable(true)]
+ public bool ShowMenuButton { get => pictureBox4.Visible; set => pictureBox4.Visible = value; }
+
+ protected virtual bool IsBusy { get => isBusy; set => isBusy = value; }
+
+ private void pictureBox4_Click(object sender, System.EventArgs e)
+ {
+ //this.WindowState = FormWindowState.Minimized;
+ }
+
+ private void pictureBox1_Click(object sender, System.EventArgs e)
+ {
+ MouseEventArgs mouseEvent = (MouseEventArgs)e;
+ if (mouseEvent != null)
+ {
+ if (mouseEvent.Button != MouseButtons.Left)
+ {
+ return;
+ }
+ }
+
+ this.WindowState = FormWindowState.Minimized;
+ }
+
+ private void pictureBox2_Click(object sender, System.EventArgs e)
+ {
+ MouseEventArgs mouseEvent = (MouseEventArgs)e;
+ if (mouseEvent != null)
+ {
+ if (mouseEvent.Button != MouseButtons.Left)
+ {
+ return;
+ }
+ }
+
+ if (this.WindowState == FormWindowState.Maximized)
+ {
+ this.WindowState = FormWindowState.Normal;
+ pictureBox2.NormalImage = Resources.form20_maximise;
+ pictureBox2.HighlightImage = Resources.form20_maximise2;
+ }
+ else
+ {
+ this.WindowState = FormWindowState.Maximized;
+ pictureBox2.NormalImage = Resources.form20_restore;
+ pictureBox2.HighlightImage = Resources.form20_restore2;
+ }
+ }
+
+ private void pictureBox3_Click(object sender, System.EventArgs e)
+ {
+ MouseEventArgs mouseEvent = (MouseEventArgs)e;
+ if (mouseEvent != null)
+ {
+ if (mouseEvent.Button != MouseButtons.Left)
+ {
+ return;
+ }
+ }
+
+ this.Close();
+ }
+
+ public void SetValue(Label sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void SetValue(GroupBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void AddValue(ListBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Add(value); }));
+ }
+ else
+ {
+ sender.Items.Add(value);
+ }
+ }
+
+ public void AddControl(FlowLayoutPanel sender, Control value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() =>
+ {
+ sender.Controls.Add(value);
+ }));
+ }
+ else
+ {
+ sender.Controls.Add(value);
+ }
+ }
+
+ public void ClearValues(ListBox sender)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Clear(); }));
+ }
+ else
+ {
+ sender.Items.Clear();
+ }
+ }
+
+ public string GetValue(ListBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); }));
+ }
+ else
+ {
+ rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString();
+ }
+
+ return rv;
+ }
+
+ public string GetValue(TextBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = sender.Text.Trim(); }));
+ }
+ else
+ {
+ rv = sender.Text.Trim();
+ }
+
+ return rv;
+ }
+
+ public int GetValue(NumericUpDown sender)
+ {
+ int rv = 0;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (int)sender.Value; }));
+ }
+ else
+ {
+ rv = (int)sender.Value;
+ }
+
+ return rv;
+ }
+
+ protected void updatePictureBox2Image()
+ {
+ if (this.WindowState == FormWindowState.Maximized)
+ {
+ pictureBox2.NormalImage = Resources.form20_restore;
+ pictureBox2.HighlightImage = Resources.form20_restore2;
+ }
+ else
+ {
+ pictureBox2.NormalImage = Resources.form20_maximise;
+ pictureBox2.HighlightImage = Resources.form20_maximise2;
+ }
+ }
+
+ private void label1_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ }
+
+ private void label1_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+ }
+
+ private void label1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ Point currentScreenPos = PointToScreen(e.Location);
+ Location = new Point(currentScreenPos.X - windowOffset.X, currentScreenPos.Y - windowOffset.Y);
+ }
+ }
+
+ private void label1_DoubleClick(object sender, EventArgs e) => pictureBox2_Click(sender, e);
+
+ private void label1_MouseClick(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Middle)
+ {
+ this.TopMost = !this.TopMost;
+ }
+ }
+
+ private void panel1_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ windowSize = new Point(this.Width, this.Height);
+ }
+
+ private void panel1_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+ }
+
+ private void panel1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ this.Size = new Size(e.X - windowOffset.X + this.Width, e.Y - windowOffset.Y + this.Height);
+ }
+ }
+
+ private void panel2_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ windowSize = new Point(this.Width, this.Height);
+ }
+
+ private void panel2_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+ }
+
+ private void panel2_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ this.Size = new Size(windowSize.X, e.Y - windowOffset.Y + this.Height);
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/BorderlessForm.resx b/RyzStudio/Windows/ThemedForms/BorderlessForm.resx
new file mode 100644
index 0000000..db173e1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/BorderlessForm.resx
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ xAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADnSURBVDhP1ZVB
+ DoIwEEW7whNo9Cri/QCv5Y4YEoTWxK71Gvqn+W2AgEkbNvxkYPgzfWkpKcpau9NaX/u+/yC+iSFjK3Ay
+ RdhcU0qUChc3s67rzipRGJ8T+JYHR2ctWYGzXSC8Gzbs3rbtgZaSXDyp0QoKnJBMBK8WH5vVCUhCcvbX
+ bAuivwxsmmaP2TxYfyE3zJ/Ij2wLYu3/OxQoah4kYedgIt8TDTTGnFgeyfcsAodLxn205Dlo4IRkInjr
+ bgq8dT+bWG0L6A/WnLVo4b1eyHDHV8WHNaJwvwAkJeI9KMSGjC201tkP+AimzgF8cMEAAAAASUVORK5C
+ YII=
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ xAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADnSURBVDhP1ZVB
+ DoIwEEW7whNo9Cri/QCv5Y4YEoTWxK71Gvqn+W2AgEkbNvxkYPgzfWkpKcpau9NaX/u+/yC+iSFjK3Ay
+ RdhcU0qUChc3s67rzipRGJ8T+JYHR2ctWYGzXSC8Gzbs3rbtgZaSXDyp0QoKnJBMBK8WH5vVCUhCcvbX
+ bAuivwxsmmaP2TxYfyE3zJ/Ij2wLYu3/OxQoah4kYedgIt8TDTTGnFgeyfcsAodLxn205Dlo4IRkInjr
+ bgq8dT+bWG0L6A/WnLVo4b1eyHDHV8WHNaJwvwAkJeI9KMSGjC201tkP+AimzgF8cMEAAAAASUVORK5C
+ YII=
+
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/BorderlessToolForm.Designer.cs b/RyzStudio/Windows/ThemedForms/BorderlessToolForm.Designer.cs
new file mode 100644
index 0000000..75f86a0
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/BorderlessToolForm.Designer.cs
@@ -0,0 +1,191 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class BorderlessToolForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.lblDescription = new System.Windows.Forms.Label();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.imgbxMenu = new RyzStudio.Windows.Forms.ImageBox();
+ this.imgbxMaximise = new RyzStudio.Windows.Forms.ImageBox();
+ this.imgbxMinimise = new RyzStudio.Windows.Forms.ImageBox();
+ this.imgbxClose = new RyzStudio.Windows.Forms.ImageBox();
+ this.area1 = new System.Windows.Forms.Panel();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxMenu)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxMaximise)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxMinimise)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).BeginInit();
+ this.SuspendLayout();
+ //
+ // lblDescription
+ //
+ this.lblDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.lblDescription.BackColor = System.Drawing.Color.Transparent;
+ this.lblDescription.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblDescription.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(241)))), ((int)(((byte)(241)))));
+ this.lblDescription.Location = new System.Drawing.Point(1, 1);
+ this.lblDescription.Name = "lblDescription";
+ this.lblDescription.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.lblDescription.Size = new System.Drawing.Size(194, 30);
+ this.lblDescription.TabIndex = 148;
+ this.lblDescription.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.lblDescription.DoubleClick += new System.EventHandler(this.label1_DoubleClick);
+ this.lblDescription.MouseClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick);
+ this.lblDescription.MouseDown += new System.Windows.Forms.MouseEventHandler(this.label1_MouseDown);
+ this.lblDescription.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label1_MouseMove);
+ this.lblDescription.MouseUp += new System.Windows.Forms.MouseEventHandler(this.label1_MouseUp);
+ //
+ // panel1
+ //
+ this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.panel1.BackColor = System.Drawing.Color.Transparent;
+ this.panel1.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
+ this.panel1.Location = new System.Drawing.Point(335, 595);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(5, 5);
+ this.panel1.TabIndex = 150;
+ this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown);
+ this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove);
+ this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseUp);
+ //
+ // imgbxMenu
+ //
+ this.imgbxMenu.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.imgbxMenu.BackColor = System.Drawing.Color.Transparent;
+ this.imgbxMenu.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.imgbxMenu.ErrorImage = null;
+ this.imgbxMenu.HighlightImage = global::AppLauncher.Properties.Resources.form16_menu2;
+ this.imgbxMenu.Image = global::AppLauncher.Properties.Resources.form16_menu;
+ this.imgbxMenu.InitialImage = null;
+ this.imgbxMenu.Location = new System.Drawing.Point(224, 4);
+ this.imgbxMenu.Name = "imgbxMenu";
+ this.imgbxMenu.NormalImage = global::AppLauncher.Properties.Resources.form16_menu;
+ this.imgbxMenu.Size = new System.Drawing.Size(24, 24);
+ this.imgbxMenu.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.imgbxMenu.TabIndex = 149;
+ this.imgbxMenu.TabStop = false;
+ //
+ // imgbxMaximise
+ //
+ this.imgbxMaximise.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.imgbxMaximise.BackColor = System.Drawing.Color.Transparent;
+ this.imgbxMaximise.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.imgbxMaximise.ErrorImage = null;
+ this.imgbxMaximise.HighlightImage = global::AppLauncher.Properties.Resources.form16_maximise2;
+ this.imgbxMaximise.Image = global::AppLauncher.Properties.Resources.form16_maximise;
+ this.imgbxMaximise.InitialImage = null;
+ this.imgbxMaximise.Location = new System.Drawing.Point(280, 4);
+ this.imgbxMaximise.Name = "imgbxMaximise";
+ this.imgbxMaximise.NormalImage = global::AppLauncher.Properties.Resources.form16_maximise;
+ this.imgbxMaximise.Size = new System.Drawing.Size(24, 24);
+ this.imgbxMaximise.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.imgbxMaximise.TabIndex = 147;
+ this.imgbxMaximise.TabStop = false;
+ //
+ // imgbxMinimise
+ //
+ this.imgbxMinimise.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.imgbxMinimise.BackColor = System.Drawing.Color.Transparent;
+ this.imgbxMinimise.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.imgbxMinimise.ErrorImage = null;
+ this.imgbxMinimise.HighlightImage = global::AppLauncher.Properties.Resources.form16_minimise2;
+ this.imgbxMinimise.Image = global::AppLauncher.Properties.Resources.form16_minimise;
+ this.imgbxMinimise.InitialImage = null;
+ this.imgbxMinimise.Location = new System.Drawing.Point(252, 4);
+ this.imgbxMinimise.Name = "imgbxMinimise";
+ this.imgbxMinimise.NormalImage = global::AppLauncher.Properties.Resources.form16_minimise;
+ this.imgbxMinimise.Size = new System.Drawing.Size(24, 24);
+ this.imgbxMinimise.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.imgbxMinimise.TabIndex = 146;
+ this.imgbxMinimise.TabStop = false;
+ //
+ // imgbxClose
+ //
+ this.imgbxClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.imgbxClose.BackColor = System.Drawing.Color.Transparent;
+ this.imgbxClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.imgbxClose.ErrorImage = null;
+ this.imgbxClose.HighlightImage = global::AppLauncher.Properties.Resources.form16_close2;
+ this.imgbxClose.Image = global::AppLauncher.Properties.Resources.form16_close;
+ this.imgbxClose.InitialImage = null;
+ this.imgbxClose.Location = new System.Drawing.Point(308, 4);
+ this.imgbxClose.Name = "imgbxClose";
+ this.imgbxClose.NormalImage = global::AppLauncher.Properties.Resources.form16_close;
+ this.imgbxClose.Size = new System.Drawing.Size(24, 24);
+ this.imgbxClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.imgbxClose.TabIndex = 145;
+ this.imgbxClose.TabStop = false;
+ //
+ // area1
+ //
+ this.area1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.area1.BackColor = System.Drawing.Color.Transparent;
+ this.area1.Cursor = System.Windows.Forms.Cursors.SizeNS;
+ this.area1.Location = new System.Drawing.Point(0, 595);
+ this.area1.Name = "area1";
+ this.area1.Size = new System.Drawing.Size(334, 5);
+ this.area1.TabIndex = 151;
+ this.area1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseDown);
+ this.area1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseMove);
+ this.area1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseUp);
+ //
+ // BorderlessToolForm
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.ClientSize = new System.Drawing.Size(340, 600);
+ this.Controls.Add(this.area1);
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.imgbxMenu);
+ this.Controls.Add(this.lblDescription);
+ this.Controls.Add(this.imgbxMaximise);
+ this.Controls.Add(this.imgbxMinimise);
+ this.Controls.Add(this.imgbxClose);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.MinimumSize = new System.Drawing.Size(40, 0);
+ this.Name = "BorderlessToolForm";
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxMenu)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxMaximise)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxMinimise)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ protected internal Forms.ImageBox imgbxMaximise;
+ protected internal Forms.ImageBox imgbxMinimise;
+ protected internal Forms.ImageBox imgbxClose;
+ protected internal System.Windows.Forms.Label lblDescription;
+ protected internal Forms.ImageBox imgbxMenu;
+ protected internal System.Windows.Forms.Panel panel1;
+ protected internal System.Windows.Forms.Panel area1;
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/BorderlessToolForm.cs b/RyzStudio/Windows/ThemedForms/BorderlessToolForm.cs
new file mode 100644
index 0000000..7508a90
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/BorderlessToolForm.cs
@@ -0,0 +1,394 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Drawing.Design;
+ using System.Windows.Forms;
+ using Resources = AppLauncher.Properties.Resources;
+
+ public partial class BorderlessToolForm : System.Windows.Forms.Form
+ {
+ protected bool isBusy = false;
+
+ protected Color topFillColour = Color.FromArgb(15, 15, 15);
+ protected int topFillHeight = 32;
+ protected int borderWidth = 1;
+
+ private bool windowDragging = false;
+ private Point windowOffset = new Point();
+ private Point windowSize = new Point();
+
+ public BorderlessToolForm() : base()
+ {
+ this.InitializeComponent();
+
+ this.BackColor = Color.FromArgb(246, 246, 246);
+ this.Padding = new Padding(1);
+
+ this.topFillColour = Color.FromArgb(51, 51, 51);
+ this.topFillHeight = 32;
+
+ this.BackColor = Color.FromArgb(179, 179, 179);
+ this.FormBorderStyle = FormBorderStyle.None;
+
+ imgbxMinimise.Click += pictureBox1_Click;
+ imgbxMaximise.Click += pictureBox2_Click;
+ imgbxClose.Click += pictureBox3_Click;
+ imgbxMenu.Click += pictureBox4_Click;
+
+ updatePictureBox2Image();
+ }
+
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ base.OnClosing(e);
+
+ if (this.IsBusy)
+ {
+ e.Cancel = true;
+ }
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ Graphics g = e.Graphics;
+
+ Rectangle areaTop = new Rectangle(this.DisplayRectangle.Left, this.Padding.Top, this.DisplayRectangle.Width, topFillHeight);
+ Rectangle areaBorder = new Rectangle(this.ClientRectangle.X, this.ClientRectangle.Y, this.ClientRectangle.Width - borderWidth, this.ClientRectangle.Height - borderWidth);
+
+ // draw header
+ if (topFillHeight > 0)
+ {
+ g.FillRectangle(new SolidBrush(topFillColour), areaTop);
+ }
+
+ // draw logo
+ //if (this.TitleLogo != null)
+ //{
+ // g.DrawImageUnscaled(this.TitleLogo, this.Padding.Left, this.Padding.Top);
+ //}
+
+ g.DrawRectangle(new Pen(Color.Black, borderWidth), areaBorder);
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ updatePictureBox2Image();
+
+ this.Invalidate();
+ }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Color BackColor { get => base.BackColor; set => base.BackColor = value; }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new FormBorderStyle FormBorderStyle { get => base.FormBorderStyle; set => base.FormBorderStyle = value; }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Padding { get => base.Padding; set => base.Padding = value; }
+
+ [Category("Appearance"), Browsable(true)]
+ public string Description
+ {
+ get
+ {
+ return lblDescription.Text?.Replace("\n", "\\n");
+ }
+ set
+ {
+ lblDescription.Text = value?.Replace("\\n", "\n");
+ }
+ }
+
+ //[Category("Appearance"), Browsable(true)]
+ //public Image TitleLogo { get; set; }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image Banner { get; set; }
+
+ [Category("Appearance"), Browsable(true)]
+ public bool ShowMenuButton { get => imgbxMenu.Visible; set => imgbxMenu.Visible = value; }
+
+ [Category("Appearance"), Browsable(true)]
+ public bool ShowMinimiseButton { get => imgbxMinimise.Visible; set => imgbxMinimise.Visible = value; }
+
+ [Category("Appearance"), Browsable(true)]
+ public bool ShowMaximiseButton { get => imgbxMaximise.Visible; set => imgbxMaximise.Visible = value; }
+
+ protected virtual bool IsBusy { get => isBusy; set => isBusy = value; }
+
+ private void pictureBox4_Click(object sender, System.EventArgs e)
+ {
+ //this.WindowState = FormWindowState.Minimized;
+ }
+
+ private void pictureBox1_Click(object sender, System.EventArgs e)
+ {
+ MouseEventArgs mouseEvent = (MouseEventArgs)e;
+ if (mouseEvent != null)
+ {
+ if (mouseEvent.Button != MouseButtons.Left)
+ {
+ return;
+ }
+ }
+
+ this.WindowState = FormWindowState.Minimized;
+ }
+
+ private void pictureBox2_Click(object sender, System.EventArgs e)
+ {
+ MouseEventArgs mouseEvent = (MouseEventArgs)e;
+ if (mouseEvent != null)
+ {
+ if (mouseEvent.Button != MouseButtons.Left)
+ {
+ return;
+ }
+ }
+
+ if (this.WindowState == FormWindowState.Maximized)
+ {
+ this.WindowState = FormWindowState.Normal;
+ imgbxMaximise.NormalImage = Resources.form16_maximise;
+ imgbxMaximise.HighlightImage = Resources.form16_maximise2;
+ }
+ else
+ {
+ this.WindowState = FormWindowState.Maximized;
+ imgbxMaximise.NormalImage = Resources.form16_restore;
+ imgbxMaximise.HighlightImage = Resources.form16_restore2;
+ }
+ }
+
+ private void pictureBox3_Click(object sender, System.EventArgs e)
+ {
+ MouseEventArgs mouseEvent = (MouseEventArgs)e;
+ if (mouseEvent != null)
+ {
+ if (mouseEvent.Button != MouseButtons.Left)
+ {
+ return;
+ }
+ }
+
+ this.Close();
+ }
+
+ public void SetValue(Label sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void SetValue(GroupBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void AddValue(ListBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Add(value); }));
+ }
+ else
+ {
+ sender.Items.Add(value);
+ }
+ }
+
+ public void AddControl(FlowLayoutPanel sender, Control value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() =>
+ {
+ sender.Controls.Add(value);
+ }));
+ }
+ else
+ {
+ sender.Controls.Add(value);
+ }
+ }
+
+ public void ClearValues(ListBox sender)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Clear(); }));
+ }
+ else
+ {
+ sender.Items.Clear();
+ }
+ }
+
+ public string GetValue(ListBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); }));
+ }
+ else
+ {
+ rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString();
+ }
+
+ return rv;
+ }
+
+ public string GetValue(TextBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = sender.Text.Trim(); }));
+ }
+ else
+ {
+ rv = sender.Text.Trim();
+ }
+
+ return rv;
+ }
+
+ public int GetValue(NumericUpDown sender)
+ {
+ int rv = 0;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (int)sender.Value; }));
+ }
+ else
+ {
+ rv = (int)sender.Value;
+ }
+
+ return rv;
+ }
+
+ protected void updatePictureBox2Image()
+ {
+ if (this.WindowState == FormWindowState.Maximized)
+ {
+ imgbxMaximise.NormalImage = Resources.form16_restore;
+ imgbxMaximise.HighlightImage = Resources.form16_restore2;
+ }
+ else
+ {
+ imgbxMaximise.NormalImage = Resources.form16_maximise;
+ imgbxMaximise.HighlightImage = Resources.form16_maximise2;
+ }
+ }
+
+ private void label1_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ }
+
+ private void label1_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+ }
+
+ private void label1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ Point currentScreenPos = PointToScreen(e.Location);
+ Location = new Point(currentScreenPos.X - windowOffset.X, currentScreenPos.Y - windowOffset.Y);
+ }
+ }
+
+ private void label1_DoubleClick(object sender, EventArgs e) => pictureBox2_Click(sender, e);
+
+ private void label1_MouseClick(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Middle)
+ {
+ this.TopMost = !this.TopMost;
+ }
+ }
+
+ private void panel1_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ windowSize = new Point(this.Width, this.Height);
+ }
+
+ private void panel1_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+ }
+
+ private void panel1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ this.Size = new Size(e.X - windowOffset.X + this.Width, e.Y - windowOffset.Y + this.Height);
+ }
+ }
+
+ private void panel2_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ windowSize = new Point(this.Width, this.Height);
+ }
+
+ private void panel2_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+
+ }
+
+ private void panel2_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ this.Size = new Size(windowSize.X, e.Y - windowOffset.Y + this.Height);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/BorderlessToolForm.resx b/RyzStudio/Windows/ThemedForms/BorderlessToolForm.resx
new file mode 100644
index 0000000..8c98a25
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/BorderlessToolForm.resx
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/Button.cs b/RyzStudio/Windows/ThemedForms/Button.cs
new file mode 100644
index 0000000..e15b8de
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/Button.cs
@@ -0,0 +1,103 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+
+ public partial class Button : RyzStudio.Windows.ThemedForms.UserControl
+ {
+ protected ButtonState buttonState = ButtonState.Normal;
+
+ public Button() : base()
+ {
+ InitializeComponent();
+
+ label1.ImageAlign = ContentAlignment.MiddleCenter;
+
+ label1.Click += delegate { this.OnClick(null); };
+ label1.MouseEnter += delegate { this.VisualState = ButtonState.Hover; };
+ label1.MouseLeave += delegate { this.VisualState = ButtonState.Normal; };
+ label1.MouseDown += delegate { this.VisualState = ButtonState.Down; };
+ label1.MouseUp += delegate { this.VisualState = ButtonState.Normal; };
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+
+ // customise
+ this.StyleOver = new ButtonStyle(Color.FromArgb(51, 51, 51), Color.White, this.OverImage);
+ this.StyleDown = new ButtonStyle(Color.FromArgb(179, 179, 179), Color.Black, this.DownImage);
+ this.StyleDefault = new ButtonStyle(Color.White, Color.Black, this.DefaultImage);
+
+ this.VisualState = ButtonState.Normal;
+ }
+
+ protected ButtonState VisualState
+ {
+ get { return buttonState; }
+ set
+ {
+ switch (value)
+ {
+ case ButtonState.Normal:
+ if (this.VisualState == ButtonState.Down)
+ {
+ updateButton(StyleOver);
+ }
+ else
+ {
+ updateButton(StyleDefault);
+ }
+
+ break;
+ case ButtonState.Hover:
+ updateButton(StyleOver);
+ break;
+ case ButtonState.Down:
+ updateButton(StyleDown);
+ break;
+ default:
+ updateButton(StyleDefault);
+ break;
+ }
+
+ buttonState = value;
+ }
+ }
+
+ protected void updateButton(ButtonStyle style)
+ {
+ label1.ForeColor = style.PenColour;
+ label1.BackColor = style.BackColour;
+ label1.Image = style.ForeImage;
+ }
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public string LabelText { get => label1.Text; set => label1.Text = value; }
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public Image OverImage { get; set; } = null;
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public Image DownImage { get; set; } = null;
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public Image DefaultImage { get; set; } = null;
+
+ [Browsable(false)]
+ public ButtonStyle StyleOver { get; set; } = new ButtonStyle(Color.FromArgb(71, 142, 203), Color.FromArgb(250, 250, 250));
+
+ [Browsable(false)]
+ public ButtonStyle StyleDown { get; set; } = new ButtonStyle(Color.FromArgb(61, 132, 193), Color.FromArgb(250, 250, 250));
+
+ [Browsable(false)]
+ public ButtonStyle StyleDefault { get; set; } = new ButtonStyle(Color.FromArgb(51, 122, 183), Color.FromArgb(250, 250, 250));
+
+ public void PerformClick() => this.OnClick(null);
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/Button.designer.cs b/RyzStudio/Windows/ThemedForms/Button.designer.cs
new file mode 100644
index 0000000..0e6b247
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/Button.designer.cs
@@ -0,0 +1,61 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class Button
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label1.Location = new System.Drawing.Point(4, 4);
+ this.label1.Margin = new System.Windows.Forms.Padding(0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(121, 25);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // Button
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.label1);
+ this.Name = "Button";
+ this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
+ this.Size = new System.Drawing.Size(128, 32);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/Button.resx b/RyzStudio/Windows/ThemedForms/Button.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/Button.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/ButtonState.cs b/RyzStudio/Windows/ThemedForms/ButtonState.cs
new file mode 100644
index 0000000..9ca2060
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ButtonState.cs
@@ -0,0 +1,9 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ public enum ButtonState
+ {
+ Normal = 0,
+ Hover,
+ Down
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/ButtonStyle.cs b/RyzStudio/Windows/ThemedForms/ButtonStyle.cs
new file mode 100644
index 0000000..57c7cb5
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ButtonStyle.cs
@@ -0,0 +1,25 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System.Drawing;
+
+ public class ButtonStyle
+ {
+ public Color BackColour { get; set; }
+ public Color PenColour { get; set; }
+ public Image ForeImage { get; set; } = null;
+
+ public ButtonStyle(Color backColour, Color penColour)
+ {
+ this.BackColour = backColour;
+ this.PenColour = penColour;
+ this.ForeImage = null;
+ }
+
+ public ButtonStyle(Color backColour, Color penColour, Image foreImage)
+ {
+ this.BackColour = backColour;
+ this.PenColour = penColour;
+ this.ForeImage = foreImage;
+ }
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/DialogForm.Designer.cs b/RyzStudio/Windows/ThemedForms/DialogForm.Designer.cs
new file mode 100644
index 0000000..7eb9bf3
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/DialogForm.Designer.cs
@@ -0,0 +1,123 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class DialogForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.lblDescription = new System.Windows.Forms.Label();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.imgbxClose = new RyzStudio.Windows.Forms.ImageBox();
+ this.area1 = new System.Windows.Forms.Panel();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).BeginInit();
+ this.SuspendLayout();
+ //
+ // lblDescription
+ //
+ this.lblDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.lblDescription.BackColor = System.Drawing.Color.Transparent;
+ this.lblDescription.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblDescription.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(241)))), ((int)(((byte)(241)))));
+ this.lblDescription.Location = new System.Drawing.Point(1, 1);
+ this.lblDescription.Name = "lblDescription";
+ this.lblDescription.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0);
+ this.lblDescription.Size = new System.Drawing.Size(301, 30);
+ this.lblDescription.TabIndex = 148;
+ this.lblDescription.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.lblDescription.MouseClick += new System.Windows.Forms.MouseEventHandler(this.label1_MouseClick);
+ this.lblDescription.MouseDown += new System.Windows.Forms.MouseEventHandler(this.label1_MouseDown);
+ this.lblDescription.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label1_MouseMove);
+ this.lblDescription.MouseUp += new System.Windows.Forms.MouseEventHandler(this.label1_MouseUp);
+ //
+ // panel1
+ //
+ this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.panel1.BackColor = System.Drawing.Color.Transparent;
+ this.panel1.Cursor = System.Windows.Forms.Cursors.SizeNWSE;
+ this.panel1.Location = new System.Drawing.Point(335, 595);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(5, 5);
+ this.panel1.TabIndex = 150;
+ this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown);
+ this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove);
+ this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseUp);
+ //
+ // imgbxClose
+ //
+ this.imgbxClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.imgbxClose.BackColor = System.Drawing.Color.Transparent;
+ this.imgbxClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.imgbxClose.ErrorImage = null;
+ this.imgbxClose.HighlightImage = global::AppLauncher.Properties.Resources.form16_close2;
+ this.imgbxClose.Image = global::AppLauncher.Properties.Resources.form16_close;
+ this.imgbxClose.InitialImage = null;
+ this.imgbxClose.Location = new System.Drawing.Point(308, 4);
+ this.imgbxClose.Name = "imgbxClose";
+ this.imgbxClose.NormalImage = global::AppLauncher.Properties.Resources.form16_close;
+ this.imgbxClose.Size = new System.Drawing.Size(24, 24);
+ this.imgbxClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.imgbxClose.TabIndex = 145;
+ this.imgbxClose.TabStop = false;
+ //
+ // area1
+ //
+ this.area1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.area1.BackColor = System.Drawing.Color.Transparent;
+ this.area1.Cursor = System.Windows.Forms.Cursors.SizeNS;
+ this.area1.Location = new System.Drawing.Point(0, 595);
+ this.area1.Name = "area1";
+ this.area1.Size = new System.Drawing.Size(334, 5);
+ this.area1.TabIndex = 151;
+ this.area1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseDown);
+ this.area1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseMove);
+ this.area1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel2_MouseUp);
+ //
+ // DialogForm
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(248)))), ((int)(((byte)(249)))), ((int)(((byte)(250)))));
+ this.ClientSize = new System.Drawing.Size(340, 600);
+ this.Controls.Add(this.area1);
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.lblDescription);
+ this.Controls.Add(this.imgbxClose);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ this.MinimumSize = new System.Drawing.Size(40, 0);
+ this.Name = "DialogForm";
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ protected internal Forms.ImageBox imgbxClose;
+ protected internal System.Windows.Forms.Label lblDescription;
+ protected internal System.Windows.Forms.Panel panel1;
+ protected internal System.Windows.Forms.Panel area1;
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/DialogForm.cs b/RyzStudio/Windows/ThemedForms/DialogForm.cs
new file mode 100644
index 0000000..f990153
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/DialogForm.cs
@@ -0,0 +1,306 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Drawing.Design;
+ using System.Windows.Forms;
+ using Resources = AppLauncher.Properties.Resources;
+
+ public partial class DialogForm : System.Windows.Forms.Form
+ {
+ protected bool isBusy = false;
+
+ protected Color topFillColour = Color.FromArgb(15, 15, 15);
+ protected int topFillHeight = 32;
+ protected int borderWidth = 1;
+
+ private bool windowDragging = false;
+ private Point windowOffset = new Point();
+ private Point windowSize = new Point();
+
+ public DialogForm() : base()
+ {
+ this.InitializeComponent();
+
+ this.BackColor = Color.FromArgb(246, 246, 246);
+ this.Padding = new Padding(1);
+
+ this.topFillColour = Color.FromArgb(51, 51, 51);
+ this.topFillHeight = 32;
+
+ this.BackColor = Color.FromArgb(248, 249, 250);
+ this.FormBorderStyle = FormBorderStyle.None;
+
+ imgbxClose.Click += pictureBox3_Click;
+ }
+
+ protected override void OnClosing(CancelEventArgs e)
+ {
+ base.OnClosing(e);
+
+ if (this.IsBusy)
+ {
+ e.Cancel = true;
+ }
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ Graphics g = e.Graphics;
+
+ Rectangle areaTop = new Rectangle(this.DisplayRectangle.Left, this.Padding.Top, this.DisplayRectangle.Width, topFillHeight);
+ Rectangle areaBorder = new Rectangle(this.ClientRectangle.X, this.ClientRectangle.Y, this.ClientRectangle.Width - borderWidth, this.ClientRectangle.Height - borderWidth);
+
+ // draw header
+ if (topFillHeight > 0)
+ {
+ g.FillRectangle(new SolidBrush(topFillColour), areaTop);
+ }
+
+ g.DrawRectangle(new Pen(Color.Black, borderWidth), areaBorder);
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ this.Invalidate();
+ }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Color BackColor { get => base.BackColor; set => base.BackColor = value; }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new FormBorderStyle FormBorderStyle { get => base.FormBorderStyle; set => base.FormBorderStyle = value; }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Padding { get => base.Padding; set => base.Padding = value; }
+
+ [Category("Appearance"), Browsable(true)]
+ public string Description
+ {
+ get
+ {
+ return lblDescription.Text?.Replace("\n", "\\n");
+ }
+ set
+ {
+ lblDescription.Text = value?.Replace("\\n", "\n");
+ }
+ }
+
+ protected virtual bool IsBusy { get => isBusy; set => isBusy = value; }
+
+ private void pictureBox3_Click(object sender, System.EventArgs e)
+ {
+ MouseEventArgs mouseEvent = (MouseEventArgs)e;
+ if (mouseEvent != null)
+ {
+ if (mouseEvent.Button != MouseButtons.Left)
+ {
+ return;
+ }
+ }
+
+ this.Close();
+ }
+
+ public void SetValue(Label sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void SetValue(GroupBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void AddValue(ListBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Add(value); }));
+ }
+ else
+ {
+ sender.Items.Add(value);
+ }
+ }
+
+ public void AddControl(FlowLayoutPanel sender, Control value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() =>
+ {
+ sender.Controls.Add(value);
+ }));
+ }
+ else
+ {
+ sender.Controls.Add(value);
+ }
+ }
+
+ public void ClearValues(ListBox sender)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Clear(); }));
+ }
+ else
+ {
+ sender.Items.Clear();
+ }
+ }
+
+ public string GetValue(ListBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); }));
+ }
+ else
+ {
+ rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString();
+ }
+
+ return rv;
+ }
+
+ public string GetValue(TextBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = sender.Text.Trim(); }));
+ }
+ else
+ {
+ rv = sender.Text.Trim();
+ }
+
+ return rv;
+ }
+
+ public int GetValue(NumericUpDown sender)
+ {
+ int rv = 0;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (int)sender.Value; }));
+ }
+ else
+ {
+ rv = (int)sender.Value;
+ }
+
+ return rv;
+ }
+
+ private void label1_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ }
+
+ private void label1_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+ }
+
+ private void label1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ Point currentScreenPos = PointToScreen(e.Location);
+ Location = new Point(currentScreenPos.X - windowOffset.X, currentScreenPos.Y - windowOffset.Y);
+ }
+ }
+
+ private void label1_MouseClick(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Middle)
+ {
+ this.TopMost = !this.TopMost;
+ }
+ }
+
+ private void panel1_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ windowSize = new Point(this.Width, this.Height);
+ }
+
+ private void panel1_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+ }
+
+ private void panel1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ this.Size = new Size(e.X - windowOffset.X + this.Width, e.Y - windowOffset.Y + this.Height);
+ }
+ }
+
+ private void panel2_MouseDown(object sender, MouseEventArgs e)
+ {
+ if (e.Button != MouseButtons.Left)
+ {
+ return;
+ }
+
+ windowDragging = true;
+ windowOffset = e.Location;
+ windowSize = new Point(this.Width, this.Height);
+ }
+
+ private void panel2_MouseUp(object sender, MouseEventArgs e)
+ {
+ windowDragging = false;
+
+ }
+
+ private void panel2_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (windowDragging)
+ {
+ this.Size = new Size(windowSize.X, e.Y - windowOffset.Y + this.Height);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/DialogForm.resx b/RyzStudio/Windows/ThemedForms/DialogForm.resx
new file mode 100644
index 0000000..983de50
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/DialogForm.resx
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ True
+
+
+ True
+
+
+ True
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/Form.Designer.cs b/RyzStudio/Windows/ThemedForms/Form.Designer.cs
new file mode 100644
index 0000000..a50fcc7
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/Form.Designer.cs
@@ -0,0 +1,52 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class Form
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.SuspendLayout();
+ //
+ // Form
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.Color.WhiteSmoke;
+ this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
+ this.ClientSize = new System.Drawing.Size(584, 381);
+ this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.ForeColor = System.Drawing.Color.Black;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(600, 420);
+ this.Name = "Form";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/Form.cs b/RyzStudio/Windows/ThemedForms/Form.cs
new file mode 100644
index 0000000..3a9dfa9
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/Form.cs
@@ -0,0 +1,173 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ public partial class Form : System.Windows.Forms.Form
+ {
+ protected Color topFillColour = Color.FromArgb(15, 15, 15);
+ protected int topFillHeight = 52;
+
+ protected Color bottomFillColour = Color.FromArgb(15, 15, 15);
+ protected int bottomFillMargin = 19;
+
+ protected int borderWidth = 1;
+
+ public Form()
+ {
+ this.InitializeComponent();
+
+ this.BackColor = Color.FromArgb(246, 246, 246);
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ this.Invalidate();
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ Graphics g = e.Graphics;
+
+ Rectangle areaTop = new Rectangle(this.DisplayRectangle.Left, this.Padding.Top, this.DisplayRectangle.Width, topFillHeight);
+ Rectangle areaBottom = new Rectangle(this.DisplayRectangle.Left, (this.DisplayRectangle.Height - bottomFillMargin), this.DisplayRectangle.Width, bottomFillMargin);
+ Rectangle areaBorder = new Rectangle(this.ClientRectangle.X, this.ClientRectangle.Y, this.ClientRectangle.Width - borderWidth, this.ClientRectangle.Height - borderWidth);
+
+ // draw header
+ if (topFillHeight > 0)
+ {
+ g.FillRectangle(new SolidBrush(topFillColour), areaTop);
+ }
+
+ // draw footer
+ if (bottomFillMargin > 0)
+ {
+ g.FillRectangle(new SolidBrush(bottomFillColour), areaBottom);
+ }
+
+ // draw logo
+ if (this.TitleLogo != null)
+ {
+ g.DrawImageUnscaled(this.TitleLogo, this.Padding.Left, this.Padding.Top);
+ }
+
+ if (this.Banner != null)
+ {
+ g.DrawImageUnscaled(this.Banner, this.Padding.Left, (this.DisplayRectangle.Height - this.Banner.Height - bottomFillMargin), (this.DisplayRectangle.Width - (this.Padding.Left + this.Padding.Right)), this.Banner.Height);
+ }
+
+ g.DrawRectangle(new Pen(Color.Black, borderWidth), areaBorder);
+ }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Color BackColor { get => base.BackColor; set { base.BackColor = value; } }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image TitleLogo { get; set; }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image Banner { get; set; }
+
+ public void SetValue(Label sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void SetValue(GroupBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ public void AddValue(ListBox sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Add(value); }));
+ }
+ else
+ {
+ sender.Items.Add(value);
+ }
+ }
+
+ public void ClearValues(ListBox sender)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Items.Clear(); }));
+ }
+ else
+ {
+ sender.Items.Clear();
+ }
+ }
+
+ public string GetValue(ListBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString(); }));
+ }
+ else
+ {
+ rv = (sender.SelectedItem == null) ? string.Empty : sender.SelectedItem.ToString();
+ }
+
+ return rv;
+ }
+
+ public string GetValue(TextBox sender)
+ {
+ string rv = string.Empty;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = sender.Text.Trim(); }));
+ }
+ else
+ {
+ rv = sender.Text.Trim();
+ }
+
+ return rv;
+ }
+
+ public int GetValue(NumericUpDown sender)
+ {
+ int rv = 0;
+
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { rv = (int)sender.Value; }));
+ }
+ else
+ {
+ rv = (int)sender.Value;
+ }
+
+ return rv;
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/Form.resx b/RyzStudio/Windows/ThemedForms/Form.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/Form.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/LeftButton.cs b/RyzStudio/Windows/ThemedForms/LeftButton.cs
new file mode 100644
index 0000000..ca98f5a
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/LeftButton.cs
@@ -0,0 +1,111 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+
+ public partial class LeftButton : RyzStudio.Windows.ThemedForms.LeftUserControl
+ {
+ protected ButtonState buttonState = ButtonState.Normal;
+
+ public LeftButton() : base()
+ {
+ InitializeComponent();
+
+ label1.ImageAlign = ContentAlignment.MiddleCenter;
+
+ label1.Click += delegate { this.OnClick(null); };
+ label1.MouseEnter += delegate { this.VisualState = ButtonState.Hover; };
+ label1.MouseLeave += delegate { this.VisualState = ButtonState.Normal; };
+ label1.MouseDown += delegate { this.VisualState = ButtonState.Down; };
+ label1.MouseUp += delegate { this.VisualState = ButtonState.Normal; };
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+
+ // customise
+ this.StyleOver = new ButtonStyle(Color.FromArgb(0, 152, 167), Color.White, this.OverImage);
+ this.StyleDown = new ButtonStyle(Color.FromArgb(179, 179, 179), Color.Black, this.DownImage);
+ this.StyleDefault = new ButtonStyle(Color.White, Color.Black, this.DefaultImage);
+
+ //this.StyleOver.ForeImage = this.OverImage;
+ //this.StyleDown.ForeImage = this.DownImage;
+ //this.StyleDefault.ForeImage = this.DefaultImage;
+
+ this.VisualState = ButtonState.Normal;
+ }
+
+ protected ButtonState VisualState
+ {
+ get { return buttonState; }
+ set
+ {
+ switch (value)
+ {
+ case ButtonState.Normal:
+ if (this.VisualState == ButtonState.Down)
+ {
+ updateButton(StyleOver);
+ }
+ else
+ {
+ updateButton(StyleDefault);
+ }
+
+ break;
+ case ButtonState.Hover:
+ updateButton(StyleOver);
+ break;
+ case ButtonState.Down:
+ updateButton(StyleDown);
+ break;
+ default:
+ updateButton(StyleDefault);
+ break;
+ }
+
+ buttonState = value;
+ }
+ }
+
+ protected void updateButton(ButtonStyle style)
+ {
+ label1.ForeColor = style.PenColour;
+ label1.BackColor = style.BackColour;
+ label1.Image = style.ForeImage;
+ }
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public string LabelText { get => label1.Text; set => label1.Text = value; }
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public System.Windows.Forms.Label Label { get => label1; set => label1 = value; }
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public Image OverImage { get; set; } = null;
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public Image DownImage { get; set; } = null;
+
+ [Browsable(true)]
+ [Category("Appearance")]
+ public Image DefaultImage { get; set; } = null;
+
+ [Browsable(false)]
+ public ButtonStyle StyleOver { get; set; } = new ButtonStyle(Color.FromArgb(71, 142, 203), Color.FromArgb(250, 250, 250));
+
+ [Browsable(false)]
+ public ButtonStyle StyleDown { get; set; } = new ButtonStyle(Color.FromArgb(61, 132, 193), Color.FromArgb(250, 250, 250));
+
+ [Browsable(false)]
+ public ButtonStyle StyleDefault { get; set; } = new ButtonStyle(Color.FromArgb(51, 122, 183), Color.FromArgb(250, 250, 250));
+
+ public void PerformClick() => this.OnClick(null);
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/LeftButton.designer.cs b/RyzStudio/Windows/ThemedForms/LeftButton.designer.cs
new file mode 100644
index 0000000..6c359d6
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/LeftButton.designer.cs
@@ -0,0 +1,61 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class LeftButton
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label1.Location = new System.Drawing.Point(4, 4);
+ this.label1.Margin = new System.Windows.Forms.Padding(0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(121, 25);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // Button
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.label1);
+ this.Name = "Button";
+ this.Padding = new System.Windows.Forms.Padding(4, 4, 0, 3);
+ this.Size = new System.Drawing.Size(128, 32);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label1;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/LeftButton.resx b/RyzStudio/Windows/ThemedForms/LeftButton.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/LeftButton.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/LeftUserControl.cs b/RyzStudio/Windows/ThemedForms/LeftUserControl.cs
new file mode 100644
index 0000000..89353ec
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/LeftUserControl.cs
@@ -0,0 +1,53 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+ using RyzStudio.Drawing;
+ using System.ComponentModel;
+
+ public partial class LeftUserControl : System.Windows.Forms.UserControl
+ {
+ protected ThemeStyle styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(212, 212, 212), Color.White);
+
+ public LeftUserControl()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+
+ this.BackColor = Color.Transparent;
+ }
+
+
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ base.OnPaintBackground(e);
+
+ Graphics g = e.Graphics;
+ //// g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
+ //// g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
+ //// g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
+ //// g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+
+ updateBackground(g, styleActive);
+ }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Padding { get => base.Padding; set => base.Padding = value; }
+
+ protected virtual void updateBackground(Graphics g, ThemeStyle style)
+ {
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Padding = new Padding(b, b, 0, (b - 1));
+
+ LeftRectangoid area = new LeftRectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
+ g.FillPath(new SolidBrush(style.BackColour), area.ToClosedGraphicsPath());
+ g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/LeftUserControl.designer.cs b/RyzStudio/Windows/ThemedForms/LeftUserControl.designer.cs
new file mode 100644
index 0000000..792cd21
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/LeftUserControl.designer.cs
@@ -0,0 +1,37 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class LeftUserControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ }
+
+ #endregion
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/PickerBox.cs b/RyzStudio/Windows/ThemedForms/PickerBox.cs
new file mode 100644
index 0000000..74cb07f
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/PickerBox.cs
@@ -0,0 +1,98 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using RyzStudio.Drawing;
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ public partial class PickerBox : RyzStudio.Windows.ThemedForms.UserControl
+ {
+ protected readonly Padding textboxPadding = new Padding(6, 2, 4, 2);
+
+ public PickerBox() : base()
+ {
+ InitializeComponent();
+
+ this.Font = new Font(this.Font, FontStyle.Regular);
+ this.Margin = new Padding(10, 4, 10, 4);
+
+ comboBox1.Font = this.Font;
+ comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
+ comboBox1.PreviewKeyDown += textBox_PreviewKeyDown;
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Height = comboBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom);
+ }
+
+ protected override void OnGotFocus(EventArgs e)
+ {
+ base.OnGotFocus(e);
+
+ comboBox1.Focus();
+ }
+
+ protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
+ {
+ switch (e.KeyCode)
+ {
+ case Keys.Enter:
+ if (this.SubmitButton != null)
+ {
+ this.SubmitButton.PerformClick();
+ }
+
+ break;
+ case Keys.Escape:
+ tryClose();
+ break;
+ default: break;
+ }
+ }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public System.Windows.Forms.ComboBox ComboBox { get => comboBox1; set => comboBox1 = value; }
+
+ //[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ //[Category("Appearance")]
+ //public new string Text
+ //{
+ // get => textBox1.Text;
+ // set
+ // {
+ // textBox1.Text = value;
+ // textBox1.SelectionStart = textBox1.Text.Length;
+ // }
+ //}
+
+ //[Browsable(true)]
+ //[Category("Appearance")]
+ //public ComboBox.ObjectCollection Items { get => comboBox1.Items; set => comboBox1.Items = value; }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public Button SubmitButton { get; set; } = null;
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Margin { get => base.Margin; set => base.Margin = value; }
+
+ protected override void updateBackground(Graphics g, ThemeStyle style)
+ {
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom));
+
+ Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
+ g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
+ g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/PickerBox.designer.cs b/RyzStudio/Windows/ThemedForms/PickerBox.designer.cs
new file mode 100644
index 0000000..5b8a324
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/PickerBox.designer.cs
@@ -0,0 +1,59 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class PickerBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.SuspendLayout();
+ //
+ // comboBox1
+ //
+ this.comboBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(4, 4);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(121, 21);
+ this.comboBox1.TabIndex = 0;
+ //
+ // PickerBox
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.Controls.Add(this.comboBox1);
+ this.Name = "PickerBox";
+ this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
+ this.Size = new System.Drawing.Size(128, 32);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ComboBox comboBox1;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/PickerBox.resx b/RyzStudio/Windows/ThemedForms/PickerBox.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/PickerBox.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/ProgressBar.Designer.cs b/RyzStudio/Windows/ThemedForms/ProgressBar.Designer.cs
new file mode 100644
index 0000000..032705b
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ProgressBar.Designer.cs
@@ -0,0 +1,72 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class ProgressBar
+ {
+ private System.ComponentModel.IContainer components = null;
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label3 = new System.Windows.Forms.Label();
+ this.userControl1 = new RyzStudio.Windows.ThemedForms.ProgressBarInner();
+ this.SuspendLayout();
+ //
+ // label3
+ //
+ this.label3.BackColor = System.Drawing.Color.Transparent;
+ this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label3.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.Location = new System.Drawing.Point(4, 4);
+ this.label3.Margin = new System.Windows.Forms.Padding(0);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(803, 47);
+ this.label3.TabIndex = 144;
+ this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ //
+ // userControl1
+ //
+ this.userControl1.BarColour = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(225)))), ((int)(((byte)(249)))));
+ this.userControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.userControl1.Location = new System.Drawing.Point(4, 4);
+ this.userControl1.Margin = new System.Windows.Forms.Padding(0);
+ this.userControl1.Maximum = 100;
+ this.userControl1.Minimum = 0;
+ this.userControl1.Name = "userControl1";
+ this.userControl1.Size = new System.Drawing.Size(803, 47);
+ this.userControl1.TabIndex = 145;
+ this.userControl1.Value = 50;
+ //
+ // ProgressBar
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.userControl1);
+ this.Controls.Add(this.label3);
+ this.Margin = new System.Windows.Forms.Padding(0);
+ this.Name = "ProgressBar";
+ this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
+ this.Size = new System.Drawing.Size(810, 54);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label3;
+ private ProgressBarInner userControl1;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/ProgressBar.cs b/RyzStudio/Windows/ThemedForms/ProgressBar.cs
new file mode 100644
index 0000000..6660601
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ProgressBar.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Drawing;
+
+namespace RyzStudio.Windows.ThemedForms
+{
+ public partial class ProgressBar : RyzStudio.Windows.ThemedForms.UserControl
+ {
+ public ProgressBar() : base()
+ {
+ InitializeComponent();
+
+ styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(212, 212, 212), Color.White);
+ }
+
+ public int Minimum { get => userControl1.Minimum; set => userControl1.Minimum = value; }
+ public int Maximum { get => userControl1.Maximum; set => userControl1.Maximum = value; }
+ public int Value { get => userControl1.Value; set => userControl1.Value = value; }
+
+ public Color BarColour { get => userControl1.BarColour; set => userControl1.BarColour = value; }
+ public Color BarTextColour { get => userControl1.BarTextColour; set => userControl1.BarTextColour = value; }
+
+ protected override void OnSizeChanged(EventArgs e)
+ {
+ base.OnSizeChanged(e);
+
+ this.Invalidate();
+ }
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/ProgressBar.resx b/RyzStudio/Windows/ThemedForms/ProgressBar.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ProgressBar.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/ProgressBarInner.Designer.cs b/RyzStudio/Windows/ThemedForms/ProgressBarInner.Designer.cs
new file mode 100644
index 0000000..8a0fc5c
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ProgressBarInner.Designer.cs
@@ -0,0 +1,63 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class ProgressBarInner
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.label3 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // label3
+ //
+ this.label3.BackColor = System.Drawing.Color.Transparent;
+ this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.label3.Font = new System.Drawing.Font("Segoe UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.Location = new System.Drawing.Point(4, 4);
+ this.label3.Margin = new System.Windows.Forms.Padding(0);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(803, 47);
+ this.label3.TabIndex = 144;
+ this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ //
+ // ProgressBarInner
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.label3);
+ this.Margin = new System.Windows.Forms.Padding(0);
+ this.Name = "ProgressBarInner";
+ this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
+ this.Size = new System.Drawing.Size(810, 54);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label label3;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/ProgressBarInner.cs b/RyzStudio/Windows/ThemedForms/ProgressBarInner.cs
new file mode 100644
index 0000000..acf6004
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ProgressBarInner.cs
@@ -0,0 +1,197 @@
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace RyzStudio.Windows.ThemedForms
+{
+ public partial class ProgressBarInner : System.Windows.Forms.UserControl
+ {
+ protected int minimum = 0;
+ protected int maximum = 100;
+ protected int value = 0;
+
+ public ProgressBarInner() : base()
+ {
+ InitializeComponent();
+
+ this.Padding = new Padding(0);
+ }
+
+ public int Minimum
+ {
+ get
+ {
+ return minimum;
+ }
+ set
+ {
+ if (this.InvokeRequired)
+ {
+ this.Invoke(new MethodInvoker(() => {
+ setMinimum(value);
+ }));
+ }
+ else
+ {
+ setMinimum(value);
+ }
+ }
+ }
+
+ public int Maximum
+ {
+ get
+ {
+ return maximum;
+ }
+ set
+ {
+ if (this.InvokeRequired)
+ {
+ this.Invoke(new MethodInvoker(() => {
+ setMaximum(value);
+ }));
+ }
+ else
+ {
+ setMaximum(value);
+ }
+ }
+ }
+
+ public int Value
+ {
+ get
+ {
+ return value;
+ }
+ set
+ {
+ if (this.InvokeRequired)
+ {
+ this.Invoke(new MethodInvoker(() => {
+ setValue(value);
+ }));
+ }
+ else
+ {
+ setValue(value);
+ }
+ }
+ }
+
+ public Color BarColour { get; set; } = Color.FromArgb(158, 225, 249);
+
+ public Color BarTextColour
+ {
+ get => label3.ForeColor;
+ set => label3.ForeColor = value;
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ Rectangle canvas = this.DisplayRectangle;
+ Graphics g = e.Graphics;
+
+ if (this.Value > 0)
+ {
+ decimal result = decimal.Divide(canvas.Width, this.Maximum) * this.Value;
+
+ canvas.Width = (int)Math.Round(result);
+
+ g.FillRectangle(new SolidBrush(this.BarColour), canvas);
+ }
+ }
+
+ protected void updateText()
+ {
+ if (label3.InvokeRequired)
+ {
+ label3.Invoke(new MethodInvoker(() =>
+ {
+ label3.Text = string.Format("{0}/{1}", this.Value.ToString(), this.Maximum.ToString());
+ }));
+ }
+ else
+ {
+ label3.Text = string.Format("{0}/{1}", this.Value.ToString(), this.Maximum.ToString());
+ }
+ }
+
+ protected void setMinimum(int value)
+ {
+ int m = value;
+ if (m < 0)
+ {
+ m = 0;
+ }
+
+ if (m > this.Maximum)
+ {
+ m = this.Maximum;
+ }
+
+ if (this.Value < m)
+ {
+ this.Value = m;
+ }
+
+ if (this.value > this.Maximum)
+ {
+ this.value = this.Maximum;
+ }
+
+ minimum = m;
+ updateText();
+ this.Invalidate();
+ }
+
+ protected void setMaximum(int value)
+ {
+ int m = value;
+ if (m < 0)
+ {
+ m = 0;
+ }
+
+ if (m < this.Minimum)
+ {
+ m = this.Minimum;
+ }
+
+ if (this.Value > m)
+ {
+ this.Value = m;
+ }
+
+ if (this.value < this.Minimum)
+ {
+ this.value = this.Minimum;
+ }
+
+ maximum = m;
+ updateText();
+ this.Invalidate();
+ }
+
+ protected void setValue(int value)
+ {
+ int m = value;
+ if (m < this.Minimum)
+ {
+ m = this.Minimum;
+ }
+
+ if (m > this.Maximum)
+ {
+ m = this.Maximum;
+ }
+
+ this.value = m;
+ updateText();
+ this.Invalidate();
+ }
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/ProgressBarInner.resx b/RyzStudio/Windows/ThemedForms/ProgressBarInner.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ProgressBarInner.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/TextBox.cs b/RyzStudio/Windows/ThemedForms/TextBox.cs
new file mode 100644
index 0000000..2671771
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TextBox.cs
@@ -0,0 +1,96 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using RyzStudio.Drawing;
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ public partial class TextBox : RyzStudio.Windows.ThemedForms.UserControl
+ {
+ protected readonly Padding textboxPadding = new Padding(6, 6, 6, 6);
+
+ public TextBox() : base()
+ {
+ InitializeComponent();
+
+ this.Margin = new Padding(10, 6, 10, 6);
+ this.Font = new Font(this.Font, FontStyle.Regular);
+
+ textBox1.Font = this.Font;
+ textBox1.PreviewKeyDown += textBox_PreviewKeyDown;
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom);
+ }
+
+ protected override void OnGotFocus(EventArgs e)
+ {
+ base.OnGotFocus(e);
+
+ textBox1.Focus();
+ }
+
+ protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
+ {
+ switch (e.KeyCode)
+ {
+ case Keys.Enter:
+ if (this.SubmitButton != null)
+ {
+ this.SubmitButton.PerformClick();
+ }
+
+ break;
+ case Keys.Escape:
+ tryClose();
+ break;
+ default: break;
+ }
+ }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public new string Text
+ {
+ get => textBox1.Text;
+ set
+ {
+ textBox1.Text = value;
+ textBox1.SelectionStart = textBox1.Text.Length;
+ }
+ }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public bool UseSystemPasswordChar { get => textBox1.UseSystemPasswordChar; set => textBox1.UseSystemPasswordChar = value; }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public Button SubmitButton { get; set; } = null;
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } }
+
+ protected override void updateBackground(Graphics g, ThemeStyle style)
+ {
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom));
+
+ Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
+ g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
+ g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
+ }
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/TextBox.designer.cs b/RyzStudio/Windows/ThemedForms/TextBox.designer.cs
new file mode 100644
index 0000000..29231b0
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TextBox.designer.cs
@@ -0,0 +1,60 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class TextBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.textBox1.HideSelection = false;
+ this.textBox1.Location = new System.Drawing.Point(4, 4);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(121, 13);
+ this.textBox1.TabIndex = 0;
+ //
+ // TextBox
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.Controls.Add(this.textBox1);
+ this.Name = "TextBox";
+ this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
+ this.Size = new System.Drawing.Size(128, 32);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/TextBox.resx b/RyzStudio/Windows/ThemedForms/TextBox.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TextBox.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/TextButtonBox.cs b/RyzStudio/Windows/ThemedForms/TextButtonBox.cs
new file mode 100644
index 0000000..1fd4ba7
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TextButtonBox.cs
@@ -0,0 +1,127 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using RyzStudio.Drawing;
+ using System;
+ using System.ComponentModel;
+ using System.Drawing;
+ using System.Windows.Forms;
+
+ public partial class TextButtonBox : RyzStudio.Windows.ThemedForms.UserControl
+ {
+ protected readonly Padding textboxPadding = new Padding(6, 6, 6, 6);
+
+ public TextButtonBox() : base()
+ {
+ InitializeComponent();
+
+ //this.Margin = new Padding(10, 6, 10, 6);
+ this.Margin = new Padding(10, 3, 3, 3);
+ this.Font = new Font(this.Font, FontStyle.Regular);
+
+ textBox1.Font = this.Font;
+ textBox1.Left = this.Margin.Left;
+ textBox1.PreviewKeyDown += textBox_PreviewKeyDown;
+
+ imageBox1.Click += imageBox1_Click;
+
+ OnResize(null);
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ base.OnResize(e);
+
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Height = textBox1.Height + (b + textboxPadding.Top) + ((b - 1) + textboxPadding.Bottom);
+
+ imageBox1.Width = 18;
+ imageBox1.Height = textBox1.Height + textboxPadding.Top + textboxPadding.Bottom;
+ imageBox1.Left = this.Width - (this.Margin.Right + b + imageBox1.Width);
+
+ textBox1.Left = this.Margin.Left;
+ textBox1.Width = imageBox1.Left - textBox1.Left - 3;
+ textBox1.Top = (int)Math.Ceiling(decimal.Divide((this.Height - textBox1.Height), 2));
+ }
+
+ protected override void OnGotFocus(EventArgs e)
+ {
+ base.OnGotFocus(e);
+
+ textBox1.Focus();
+ }
+
+ protected void textBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
+ {
+ switch (e.KeyCode)
+ {
+ case Keys.Enter:
+ if (this.SubmitButton != null)
+ {
+ this.SubmitButton.PerformClick();
+ }
+
+ break;
+ case Keys.Escape:
+ tryClose();
+ break;
+ default: break;
+ }
+ }
+
+ private void imageBox1_Click(object sender, EventArgs e) => OnButtonClick?.Invoke(sender, e);
+
+ [Category("Action")]
+ [Browsable(true)]
+ public event EventHandler OnButtonClick;
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public Forms.ImageBox InnerImageBox { get => imageBox1; set => imageBox1 = value; }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public System.Windows.Forms.TextBox InnerTextBox { get => textBox1; set => textBox1 = value; }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image NormalImage { get => imageBox1.NormalImage; set => imageBox1.NormalImage = value; }
+
+ [Category("Appearance"), Browsable(true)]
+ public Image HighlightImage { get => imageBox1.HighlightImage; set => imageBox1.HighlightImage = value; }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public new string Text
+ {
+ get => textBox1.Text;
+ set
+ {
+ textBox1.Text = value;
+ textBox1.SelectionStart = textBox1.Text.Length;
+ }
+ }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public bool UseSystemPasswordChar { get => textBox1.UseSystemPasswordChar; set => textBox1.UseSystemPasswordChar = value; }
+
+ [Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
+ [Category("Appearance")]
+ public Button SubmitButton { get; set; } = null;
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Margin { get { return base.Margin; } set { base.Margin = value; } }
+
+ protected override void updateBackground(Graphics g, ThemeStyle style)
+ {
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Padding = new Padding((b + textboxPadding.Left), (b + textboxPadding.Top), ((b - 1) + textboxPadding.Right), ((b - 1) + textboxPadding.Bottom));
+
+ Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
+ g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
+ g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/TextButtonBox.designer.cs b/RyzStudio/Windows/ThemedForms/TextButtonBox.designer.cs
new file mode 100644
index 0000000..9a15b4c
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TextButtonBox.designer.cs
@@ -0,0 +1,81 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class TextButtonBox
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.imageBox1 = new RyzStudio.Windows.Forms.ImageBox();
+ ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.BackColor = System.Drawing.SystemColors.Window;
+ this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox1.HideSelection = false;
+ this.textBox1.Location = new System.Drawing.Point(7, 7);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(68, 13);
+ this.textBox1.TabIndex = 0;
+ //
+ // imageBox1
+ //
+ this.imageBox1.BackColor = System.Drawing.Color.Transparent;
+ this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.imageBox1.ErrorImage = null;
+ this.imageBox1.HighlightImage = null;
+ this.imageBox1.Image = null;
+ this.imageBox1.InitialImage = null;
+ this.imageBox1.Location = new System.Drawing.Point(107, 4);
+ this.imageBox1.Name = "imageBox1";
+ this.imageBox1.NormalImage = null;
+ this.imageBox1.Size = new System.Drawing.Size(18, 25);
+ this.imageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ this.imageBox1.TabIndex = 1;
+ this.imageBox1.TabStop = false;
+ //
+ // TextBox2
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.Controls.Add(this.imageBox1);
+ this.Controls.Add(this.textBox1);
+ this.Name = "TextBox2";
+ this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
+ this.Size = new System.Drawing.Size(128, 32);
+ ((System.ComponentModel.ISupportInitialize)(this.imageBox1)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ private Forms.ImageBox imageBox1;
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/TextButtonBox.resx b/RyzStudio/Windows/ThemedForms/TextButtonBox.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/TextButtonBox.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/ThemeStyle.cs b/RyzStudio/Windows/ThemedForms/ThemeStyle.cs
new file mode 100644
index 0000000..71d1dee
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/ThemeStyle.cs
@@ -0,0 +1,34 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System.Drawing;
+
+ public struct ThemeStyle
+ {
+ public int BorderWidth;
+ public int BorderRadius;
+ public int BorderPadding;
+ public Color BorderColour;
+ public Color BackColour;
+ public Color ForeColour;
+
+ public ThemeStyle(int borderWidth, int borderRadius, int borderPadding, Color borderColour, Color backColour)
+ {
+ this.BorderWidth = borderWidth;
+ this.BorderRadius = borderRadius;
+ this.BorderPadding = borderPadding;
+ this.BorderColour = borderColour;
+ this.BackColour = backColour;
+ this.ForeColour = Color.Black;
+ }
+
+ public ThemeStyle(int borderWidth, int borderRadius, int borderPadding, Color borderColour, Color backColour, Color foreColour)
+ {
+ this.BorderWidth = borderWidth;
+ this.BorderRadius = borderRadius;
+ this.BorderPadding = borderPadding;
+ this.BorderColour = borderColour;
+ this.BackColour = backColour;
+ this.ForeColour = foreColour;
+ }
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/UserControl.cs b/RyzStudio/Windows/ThemedForms/UserControl.cs
new file mode 100644
index 0000000..9ca33c0
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/UserControl.cs
@@ -0,0 +1,89 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+ using RyzStudio.Drawing;
+ using System.ComponentModel;
+
+ public partial class UserControl : System.Windows.Forms.UserControl
+ {
+ //protected ThemeStyle styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(112, 112, 112), Color.White);
+ protected ThemeStyle styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(212, 212, 212), Color.White);
+
+ public UserControl()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+
+ this.BackColor = Color.Transparent;
+ }
+
+ protected override void OnPaintBackground(PaintEventArgs e)
+ {
+ base.OnPaintBackground(e);
+
+ Graphics g = e.Graphics;
+ //// g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
+ //// g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
+ //// g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
+ //// g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+
+ updateBackground(g, styleActive);
+ }
+
+ [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
+ public new Padding Padding { get => base.Padding; set => base.Padding = value; }
+
+ protected virtual void updateBackground(Graphics g, ThemeStyle style)
+ {
+ int b = (styleActive.BorderWidth + 1) + styleActive.BorderPadding;
+
+ this.Padding = new Padding(b, b, (b - 1), (b - 1));
+
+ Rectangoid area = new Rectangoid(this.ClientRectangle, style.BorderRadius, style.BorderWidth);
+ g.FillPath(new SolidBrush(style.BackColour), area.ToGraphicsPath());
+ g.DrawPath(new Pen(new SolidBrush(style.BorderColour), style.BorderWidth), area.ToGraphicsPath());
+ }
+
+ protected virtual void tryClose()
+ {
+ if (this.Parent == null)
+ {
+ return;
+ }
+
+ if (this.Parent is Form)
+ {
+ (this.Parent as Form).Close();
+ return;
+ }
+
+ if (this.Parent.GetType().IsSubclassOf(typeof(System.Windows.Forms.Form)))
+ {
+ System.Windows.Forms.Form parentForm = (System.Windows.Forms.Form)this.Parent;
+ if (parentForm != null)
+ {
+ parentForm.Close();
+ }
+ }
+ }
+
+ public void SetValue(Label sender, string value)
+ {
+ if (sender.InvokeRequired)
+ {
+ sender.Invoke(new MethodInvoker(() => { sender.Text = value; }));
+ }
+ else
+ {
+ sender.Text = value;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/RyzStudio/Windows/ThemedForms/UserControl.designer.cs b/RyzStudio/Windows/ThemedForms/UserControl.designer.cs
new file mode 100644
index 0000000..ea91b3c
--- /dev/null
+++ b/RyzStudio/Windows/ThemedForms/UserControl.designer.cs
@@ -0,0 +1,37 @@
+namespace RyzStudio.Windows.ThemedForms
+{
+ partial class UserControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ }
+
+ #endregion
+ }
+}
diff --git a/RyzStudio/Windows/ThemedForms/res/button16_file_add.png b/RyzStudio/Windows/ThemedForms/res/button16_file_add.png
new file mode 100644
index 0000000..ecd378d
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/button16_file_add.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/button16_file_add2.png b/RyzStudio/Windows/ThemedForms/res/button16_file_add2.png
new file mode 100644
index 0000000..63f8d49
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/button16_file_add2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/button16_folder_add.png b/RyzStudio/Windows/ThemedForms/res/button16_folder_add.png
new file mode 100644
index 0000000..09bf8d4
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/button16_folder_add.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/button16_folder_add2.png b/RyzStudio/Windows/ThemedForms/res/button16_folder_add2.png
new file mode 100644
index 0000000..3cec8ca
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/button16_folder_add2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/button16_refresh.png b/RyzStudio/Windows/ThemedForms/res/button16_refresh.png
new file mode 100644
index 0000000..2fce7d1
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/button16_refresh.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/button16_refresh2.png b/RyzStudio/Windows/ThemedForms/res/button16_refresh2.png
new file mode 100644
index 0000000..1ed24ba
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/button16_refresh2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_close.png b/RyzStudio/Windows/ThemedForms/res/form16_close.png
new file mode 100644
index 0000000..6cfa679
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_close.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_close2.png b/RyzStudio/Windows/ThemedForms/res/form16_close2.png
new file mode 100644
index 0000000..e298627
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_close2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_maximise.png b/RyzStudio/Windows/ThemedForms/res/form16_maximise.png
new file mode 100644
index 0000000..93017d3
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_maximise.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_maximise2.png b/RyzStudio/Windows/ThemedForms/res/form16_maximise2.png
new file mode 100644
index 0000000..0511a09
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_maximise2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_menu.png b/RyzStudio/Windows/ThemedForms/res/form16_menu.png
new file mode 100644
index 0000000..b56d75a
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_menu.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_menu2.png b/RyzStudio/Windows/ThemedForms/res/form16_menu2.png
new file mode 100644
index 0000000..6f9b41a
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_menu2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_minimise.png b/RyzStudio/Windows/ThemedForms/res/form16_minimise.png
new file mode 100644
index 0000000..3bde4b5
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_minimise.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_minimise2.png b/RyzStudio/Windows/ThemedForms/res/form16_minimise2.png
new file mode 100644
index 0000000..14347bf
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_minimise2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_restore.png b/RyzStudio/Windows/ThemedForms/res/form16_restore.png
new file mode 100644
index 0000000..b6651db
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_restore.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form16_restore2.png b/RyzStudio/Windows/ThemedForms/res/form16_restore2.png
new file mode 100644
index 0000000..b61682c
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form16_restore2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_close.png b/RyzStudio/Windows/ThemedForms/res/form20_close.png
new file mode 100644
index 0000000..73b1b27
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_close.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_close2.png b/RyzStudio/Windows/ThemedForms/res/form20_close2.png
new file mode 100644
index 0000000..06c113d
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_close2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_maximise.png b/RyzStudio/Windows/ThemedForms/res/form20_maximise.png
new file mode 100644
index 0000000..3895c42
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_maximise.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_maximise2.png b/RyzStudio/Windows/ThemedForms/res/form20_maximise2.png
new file mode 100644
index 0000000..2b34aea
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_maximise2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_menu.png b/RyzStudio/Windows/ThemedForms/res/form20_menu.png
new file mode 100644
index 0000000..3928143
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_menu.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_menu2.png b/RyzStudio/Windows/ThemedForms/res/form20_menu2.png
new file mode 100644
index 0000000..cc52e78
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_menu2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_minimise.png b/RyzStudio/Windows/ThemedForms/res/form20_minimise.png
new file mode 100644
index 0000000..366da41
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_minimise.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_minimise2.png b/RyzStudio/Windows/ThemedForms/res/form20_minimise2.png
new file mode 100644
index 0000000..60e7e9e
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_minimise2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_restore.png b/RyzStudio/Windows/ThemedForms/res/form20_restore.png
new file mode 100644
index 0000000..fe799c1
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_restore.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/form20_restore2.png b/RyzStudio/Windows/ThemedForms/res/form20_restore2.png
new file mode 100644
index 0000000..bf98f2c
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/form20_restore2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/settings16.png b/RyzStudio/Windows/ThemedForms/res/settings16.png
new file mode 100644
index 0000000..0e3b411
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/settings16.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/settings16_2.png b/RyzStudio/Windows/ThemedForms/res/settings16_2.png
new file mode 100644
index 0000000..eb0792f
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/settings16_2.png differ
diff --git a/RyzStudio/Windows/ThemedForms/res/settings16_white.png b/RyzStudio/Windows/ThemedForms/res/settings16_white.png
new file mode 100644
index 0000000..7b49593
Binary files /dev/null and b/RyzStudio/Windows/ThemedForms/res/settings16_white.png differ
diff --git a/Windows/Forms/EditTileForm.cs b/Windows/Forms/EditTileForm.cs
new file mode 100644
index 0000000..5af5165
--- /dev/null
+++ b/Windows/Forms/EditTileForm.cs
@@ -0,0 +1,349 @@
+using RyzStudio.Windows.ThemedForms;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AppLauncher.Windows.Forms
+{
+ public class EditTileForm : DialogForm
+ {
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Label label7;
+ private System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label1;
+ private TextButtonBox textBox2;
+ private TextBox textBox3;
+ private TextButtonBox textBox4;
+ private Button button1;
+ private PickerBox pickerBox1;
+ private PickerBox pickerBox2;
+ private RyzStudio.Windows.Forms.HorizontalSeparator horizontalSeparator1;
+ private RyzStudio.Windows.Forms.HorizontalSeparator horizontalSeparator2;
+ private TextBox textBox1;
+
+ protected TilePanel parentPanel = null;
+
+ public EditTileForm() : base()
+ {
+ InitializeComponent();
+ initialiseComponents2();
+ }
+
+ public EditTileForm(TilePanel panel) : base()
+ {
+ parentPanel = panel;
+
+ InitializeComponent();
+ initialiseComponents2();
+ }
+
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditTileForm));
+ this.textBox1 = new RyzStudio.Windows.ThemedForms.TextBox();
+ this.label6 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.textBox2 = new RyzStudio.Windows.ThemedForms.TextButtonBox();
+ this.textBox3 = new RyzStudio.Windows.ThemedForms.TextBox();
+ this.textBox4 = new RyzStudio.Windows.ThemedForms.TextButtonBox();
+ this.button1 = new RyzStudio.Windows.ThemedForms.Button();
+ this.pickerBox1 = new RyzStudio.Windows.ThemedForms.PickerBox();
+ this.pickerBox2 = new RyzStudio.Windows.ThemedForms.PickerBox();
+ this.horizontalSeparator1 = new RyzStudio.Windows.Forms.HorizontalSeparator();
+ this.horizontalSeparator2 = new RyzStudio.Windows.Forms.HorizontalSeparator();
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).BeginInit();
+ this.SuspendLayout();
+ //
+ // imgbxClose
+ //
+ this.imgbxClose.Image = ((System.Drawing.Image)(resources.GetObject("imgbxClose.Image")));
+ this.imgbxClose.Location = new System.Drawing.Point(367, 5);
+ //
+ // lblDescription
+ //
+ this.lblDescription.Size = new System.Drawing.Size(359, 30);
+ this.lblDescription.Text = "Edit Tile";
+ //
+ // panel1
+ //
+ this.panel1.Location = new System.Drawing.Point(394, 474);
+ //
+ // area1
+ //
+ this.area1.Location = new System.Drawing.Point(1, 474);
+ this.area1.Size = new System.Drawing.Size(392, 5);
+ //
+ // textBox1
+ //
+ this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox1.BackColor = System.Drawing.Color.Transparent;
+ this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.textBox1.Location = new System.Drawing.Point(159, 50);
+ this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
+ this.textBox1.Size = new System.Drawing.Size(220, 32);
+ this.textBox1.SubmitButton = null;
+ this.textBox1.TabIndex = 152;
+ this.textBox1.UseSystemPasswordChar = false;
+ //
+ // label6
+ //
+ this.label6.BackColor = System.Drawing.Color.Transparent;
+ this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(99)))), ((int)(((byte)(104)))));
+ this.label6.Location = new System.Drawing.Point(18, 268);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(208, 32);
+ this.label6.TabIndex = 163;
+ this.label6.Text = "Run As Admin";
+ this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label7
+ //
+ this.label7.BackColor = System.Drawing.Color.Transparent;
+ this.label7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(99)))), ((int)(((byte)(104)))));
+ this.label7.Location = new System.Drawing.Point(18, 227);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(208, 32);
+ this.label7.TabIndex = 161;
+ this.label7.Text = "Window Style";
+ this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label4
+ //
+ this.label4.BackColor = System.Drawing.Color.Transparent;
+ this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(99)))), ((int)(((byte)(104)))));
+ this.label4.Location = new System.Drawing.Point(18, 173);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(131, 32);
+ this.label4.TabIndex = 159;
+ this.label4.Text = "Working Directory";
+ this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label3
+ //
+ this.label3.BackColor = System.Drawing.Color.Transparent;
+ this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(99)))), ((int)(((byte)(104)))));
+ this.label3.Location = new System.Drawing.Point(18, 132);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(131, 32);
+ this.label3.TabIndex = 157;
+ this.label3.Text = "Argument";
+ this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label2
+ //
+ this.label2.BackColor = System.Drawing.Color.Transparent;
+ this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(99)))), ((int)(((byte)(104)))));
+ this.label2.Location = new System.Drawing.Point(18, 91);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(131, 32);
+ this.label2.TabIndex = 155;
+ this.label2.Text = "Filename";
+ this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // label1
+ //
+ this.label1.BackColor = System.Drawing.Color.Transparent;
+ this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(99)))), ((int)(((byte)(104)))));
+ this.label1.Location = new System.Drawing.Point(18, 50);
+ this.label1.Margin = new System.Windows.Forms.Padding(0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(131, 32);
+ this.label1.TabIndex = 153;
+ this.label1.Text = "Title";
+ this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // textBox2
+ //
+ this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox2.BackColor = System.Drawing.Color.Transparent;
+ this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.textBox2.HighlightImage = global::AppLauncher.Properties.Resources.button16_file_add2;
+ this.textBox2.Location = new System.Drawing.Point(159, 91);
+ this.textBox2.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.NormalImage = global::AppLauncher.Properties.Resources.button16_file_add;
+ this.textBox2.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
+ this.textBox2.Size = new System.Drawing.Size(220, 32);
+ this.textBox2.SubmitButton = null;
+ this.textBox2.TabIndex = 170;
+ this.textBox2.UseSystemPasswordChar = false;
+ //
+ // textBox3
+ //
+ this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox3.BackColor = System.Drawing.Color.Transparent;
+ this.textBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.textBox3.Location = new System.Drawing.Point(159, 132);
+ this.textBox3.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
+ this.textBox3.Size = new System.Drawing.Size(220, 32);
+ this.textBox3.SubmitButton = null;
+ this.textBox3.TabIndex = 171;
+ this.textBox3.UseSystemPasswordChar = false;
+ //
+ // textBox4
+ //
+ this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBox4.BackColor = System.Drawing.Color.Transparent;
+ this.textBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.textBox4.HighlightImage = global::AppLauncher.Properties.Resources.button16_folder_add2;
+ this.textBox4.Location = new System.Drawing.Point(159, 173);
+ this.textBox4.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3);
+ this.textBox4.Name = "textBox4";
+ this.textBox4.NormalImage = global::AppLauncher.Properties.Resources.button16_folder_add;
+ this.textBox4.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
+ this.textBox4.Size = new System.Drawing.Size(220, 32);
+ this.textBox4.SubmitButton = null;
+ this.textBox4.TabIndex = 172;
+ this.textBox4.UseSystemPasswordChar = false;
+ //
+ // button1
+ //
+ this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.button1.BackColor = System.Drawing.Color.Transparent;
+ this.button1.DefaultImage = null;
+ this.button1.DownImage = null;
+ this.button1.LabelText = "&Save";
+ this.button1.Location = new System.Drawing.Point(251, 427);
+ this.button1.Name = "button1";
+ this.button1.OverImage = null;
+ this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
+ this.button1.Size = new System.Drawing.Size(128, 32);
+ this.button1.TabIndex = 173;
+ //
+ // pickerBox1
+ //
+ this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.pickerBox1.BackColor = System.Drawing.Color.Transparent;
+ this.pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.pickerBox1.Location = new System.Drawing.Point(239, 227);
+ this.pickerBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
+ this.pickerBox1.Name = "pickerBox1";
+ this.pickerBox1.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
+ this.pickerBox1.Size = new System.Drawing.Size(140, 32);
+ this.pickerBox1.SubmitButton = null;
+ this.pickerBox1.TabIndex = 174;
+ //
+ // pickerBox2
+ //
+ this.pickerBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.pickerBox2.BackColor = System.Drawing.Color.Transparent;
+ this.pickerBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
+ this.pickerBox2.Location = new System.Drawing.Point(239, 268);
+ this.pickerBox2.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
+ this.pickerBox2.Name = "pickerBox2";
+ this.pickerBox2.Padding = new System.Windows.Forms.Padding(10, 6, 7, 5);
+ this.pickerBox2.Size = new System.Drawing.Size(140, 32);
+ this.pickerBox2.SubmitButton = null;
+ this.pickerBox2.TabIndex = 175;
+ //
+ // horizontalSeparator1
+ //
+ this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.horizontalSeparator1.Location = new System.Drawing.Point(10, 215);
+ this.horizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
+ this.horizontalSeparator1.Name = "horizontalSeparator1";
+ this.horizontalSeparator1.Size = new System.Drawing.Size(380, 2);
+ this.horizontalSeparator1.TabIndex = 176;
+ //
+ // horizontalSeparator2
+ //
+ this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.horizontalSeparator2.Location = new System.Drawing.Point(10, 310);
+ this.horizontalSeparator2.MaximumSize = new System.Drawing.Size(4920, 2);
+ this.horizontalSeparator2.Name = "horizontalSeparator2";
+ this.horizontalSeparator2.Size = new System.Drawing.Size(380, 2);
+ this.horizontalSeparator2.TabIndex = 177;
+ //
+ // EditTileForm
+ //
+ this.ClientSize = new System.Drawing.Size(400, 480);
+ this.Controls.Add(this.horizontalSeparator2);
+ this.Controls.Add(this.horizontalSeparator1);
+ this.Controls.Add(this.pickerBox2);
+ this.Controls.Add(this.pickerBox1);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.textBox4);
+ this.Controls.Add(this.textBox3);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.label6);
+ this.Controls.Add(this.label7);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.textBox1);
+ this.Description = "Edit Tile";
+ this.Name = "EditTileForm";
+ this.Controls.SetChildIndex(this.imgbxClose, 0);
+ this.Controls.SetChildIndex(this.lblDescription, 0);
+ this.Controls.SetChildIndex(this.panel1, 0);
+ this.Controls.SetChildIndex(this.area1, 0);
+ this.Controls.SetChildIndex(this.textBox1, 0);
+ this.Controls.SetChildIndex(this.label1, 0);
+ this.Controls.SetChildIndex(this.label2, 0);
+ this.Controls.SetChildIndex(this.label3, 0);
+ this.Controls.SetChildIndex(this.label4, 0);
+ this.Controls.SetChildIndex(this.label7, 0);
+ this.Controls.SetChildIndex(this.label6, 0);
+ this.Controls.SetChildIndex(this.textBox2, 0);
+ this.Controls.SetChildIndex(this.textBox3, 0);
+ this.Controls.SetChildIndex(this.textBox4, 0);
+ this.Controls.SetChildIndex(this.button1, 0);
+ this.Controls.SetChildIndex(this.pickerBox1, 0);
+ this.Controls.SetChildIndex(this.pickerBox2, 0);
+ this.Controls.SetChildIndex(this.horizontalSeparator1, 0);
+ this.Controls.SetChildIndex(this.horizontalSeparator2, 0);
+ ((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ private void initialiseComponents2()
+ {
+ pickerBox1.ComboBox.Items.Clear();
+ pickerBox1.ComboBox.Items.AddRange(new string[] { "Normal", "Hidden", "Minimized", "Maximized" });
+ if (pickerBox1.ComboBox.Items.Count > 0) pickerBox1.ComboBox.SelectedIndex = 0;
+
+ pickerBox2.ComboBox.Items.Clear();
+ pickerBox2.ComboBox.Items.AddRange(new string[] { "No", "Yes" });
+ if (pickerBox2.ComboBox.Items.Count > 0) pickerBox2.ComboBox.SelectedIndex = 0;
+ }
+
+ protected override void OnShown(EventArgs e)
+ {
+ base.OnShown(e);
+
+ if (parentPanel != null)
+ {
+ textBox1.Text = parentPanel.Info.Title;
+ textBox2.Text = parentPanel.Info.ProcessFilename;
+ textBox3.Text = parentPanel.Info.ProcessArgument;
+ textBox4.Text = parentPanel.Info.ProcessWorkingDirectory;
+ pickerBox1.ComboBox.SelectedIndex = (int)parentPanel.Info.ProcessWindowStyle;
+ pickerBox2.ComboBox.SelectedIndex = (parentPanel.Info.ProcessAsAdmin ? 1 : 0);
+
+ }
+ }
+
+ }
+}
diff --git a/Windows/Forms/EditTileForm.resx b/Windows/Forms/EditTileForm.resx
new file mode 100644
index 0000000..3747e00
--- /dev/null
+++ b/Windows/Forms/EditTileForm.resx
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wwAADsMBx2+oZAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMS4xYyqcSwAAANlJREFUOE+lU1sO
+ gjAQrHgRY6KemQ+VT9NrgAfgfRA+SawzdTAk2lhkkgm7s7vTAq0py/LUNM0dHEEXSfYWfd8fDQIOD23b
+ nvFMY6jeAcxpMFIwC1HX9YWzNOCWUunR4AxnvxpUVbV3zm2UGsbUlHoEDfBhdsgf4BWDCcmYGmtqCxtw
+ NeQcoJ6JjGn43hXy8CvIxDeIGbREZY+pHjLgtqeVHf7SzVq7VdmDM6x9GGj1/19h9UckVv3GWMwNRh5L
+ 6dGYH+UCHCTQ9SfV+7pMvJIIaLL0Oudd1x2eUQ8MyeAeq0cAAAAASUVORK5CYII=
+
+
+
\ No newline at end of file
diff --git a/Windows/Forms/Tile/TilePanel.Designer.cs b/Windows/Forms/Tile/TilePanel.Designer.cs
index 8dc31d6..ff0d3a6 100644
--- a/Windows/Forms/Tile/TilePanel.Designer.cs
+++ b/Windows/Forms/Tile/TilePanel.Designer.cs
@@ -28,8 +28,13 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
@@ -37,6 +42,7 @@
//
this.label1.AutoEllipsis = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
+ this.label1.ContextMenuStrip = this.contextMenuStrip1;
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234)))));
this.label1.Location = new System.Drawing.Point(0, 47);
this.label1.Margin = new System.Windows.Forms.Padding(0);
@@ -47,10 +53,33 @@
this.label1.Click += new System.EventHandler(this.TilePanel_Click);
this.label1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TilePanel_MouseDoubleClick);
//
+ // contextMenuStrip1
+ //
+ this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.editToolStripMenuItem,
+ this.removeToolStripMenuItem});
+ this.contextMenuStrip1.Name = "contextMenuStrip1";
+ this.contextMenuStrip1.Size = new System.Drawing.Size(181, 70);
+ //
+ // editToolStripMenuItem
+ //
+ this.editToolStripMenuItem.Name = "editToolStripMenuItem";
+ this.editToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.editToolStripMenuItem.Text = "&Edit";
+ this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click);
+ //
+ // removeToolStripMenuItem
+ //
+ this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
+ this.removeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
+ this.removeToolStripMenuItem.Text = "&Remove";
+ this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
+ //
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.pictureBox1.ContextMenuStrip = this.contextMenuStrip1;
this.pictureBox1.ErrorImage = null;
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(0, 8);
@@ -77,6 +106,7 @@
this.Size = new System.Drawing.Size(70, 70);
this.Click += new System.EventHandler(this.TilePanel_Click);
this.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TilePanel_MouseDoubleClick);
+ this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
@@ -86,5 +116,8 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox1;
+ private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
+ private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
}
}
diff --git a/Windows/Forms/Tile/TilePanel.cs b/Windows/Forms/Tile/TilePanel.cs
index 61c617e..3ed5924 100644
--- a/Windows/Forms/Tile/TilePanel.cs
+++ b/Windows/Forms/Tile/TilePanel.cs
@@ -14,11 +14,14 @@ namespace AppLauncher.Windows.Forms
protected Point startPosition = new Point();
protected TileModel model = new TileModel();
+ protected EditTileForm editForm = null;
public TilePanel() : base()
{
InitializeComponent();
+ this.ContextMenuStrip = contextMenuStrip1;
+
this.MouseDown += panel_MouseDown;
this.MouseUp += panel_MouseUp;
this.MouseMove += panel_MouseMove;
@@ -161,5 +164,16 @@ namespace AppLauncher.Windows.Forms
// do nothing yet
}
+ private void editToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (editForm == null) editForm = new EditTileForm(this);
+ editForm.ShowDialog();
+ }
+
+ private void removeToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+
+ }
+
}
}
\ No newline at end of file
diff --git a/Windows/Forms/Tile/TilePanel.resx b/Windows/Forms/Tile/TilePanel.resx
index 1af7de1..ad53752 100644
--- a/Windows/Forms/Tile/TilePanel.resx
+++ b/Windows/Forms/Tile/TilePanel.resx
@@ -117,4 +117,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 17, 17
+
\ No newline at end of file