Archived
WIP: simplifying UI
This commit is contained in:
1 parent
b635db2be6
commit
c18b408df2
75 files changed
+931
-395
No files matched your search
@@ -1,191 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class BorderlessForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,410 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="pictureBox4.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="pictureBox2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="pictureBox1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="pictureBox3.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADnSURBVDhP1ZVB
|
||||
DoIwEEW7whNo9Cri/QCv5Y4YEoTWxK71Gvqn+W2AgEkbNvxkYPgzfWkpKcpau9NaX/u+/yC+iSFjK3Ay
|
||||
RdhcU0qUChc3s67rzipRGJ8T+JYHR2ctWYGzXSC8Gzbs3rbtgZaSXDyp0QoKnJBMBK8WH5vVCUhCcvbX
|
||||
bAuivwxsmmaP2TxYfyE3zJ/Ij2wLYu3/OxQoah4kYedgIt8TDTTGnFgeyfcsAodLxn205Dlo4IRkInjr
|
||||
bgq8dT+bWG0L6A/WnLVo4b1eyHDHV8WHNaJwvwAkJeI9KMSGjC201tkP+AimzgF8cMEAAAAASUVORK5C
|
||||
YII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureBox3.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
xAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADnSURBVDhP1ZVB
|
||||
DoIwEEW7whNo9Cri/QCv5Y4YEoTWxK71Gvqn+W2AgEkbNvxkYPgzfWkpKcpau9NaX/u+/yC+iSFjK3Ay
|
||||
RdhcU0qUChc3s67rzipRGJ8T+JYHR2ctWYGzXSC8Gzbs3rbtgZaSXDyp0QoKnJBMBK8WH5vVCUhCcvbX
|
||||
bAuivwxsmmaP2TxYfyE3zJ/Ij2wLYu3/OxQoah4kYedgIt8TDTTGnFgeyfcsAodLxn205Dlo4IRkInjr
|
||||
bgq8dT+bWG0L6A/WnLVo4b1eyHDHV8WHNaJwvwAkJeI9KMSGjC201tkP+AimzgF8cMEAAAAASUVORK5C
|
||||
YII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,191 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class BorderlessToolForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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;
|
||||
}
|
||||
}
|
||||
@@ -1,394 +0,0 @@
|
||||
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(TTextBox 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="lblDescription.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="panel1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="imgbxMenu.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="imgbxMaximise.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="imgbxMinimise.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="imgbxClose.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,140 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
|
||||
public partial class TButton : RyzStudio.Windows.ThemedForms.TUserControl
|
||||
{
|
||||
public class ButtonStyle
|
||||
{
|
||||
public Color BackColour { get; set; } = Color.Transparent;
|
||||
public Color PenColour { get; set; } = Color.Transparent;
|
||||
public Image ForeImage { get; set; } = null;
|
||||
}
|
||||
|
||||
public enum ButtonState
|
||||
{
|
||||
Idle = 0,
|
||||
Hover,
|
||||
Down
|
||||
}
|
||||
|
||||
protected ButtonState controlState = ButtonState.Idle;
|
||||
protected bool isSelected = false;
|
||||
|
||||
public TButton() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
label1.ImageAlign = ContentAlignment.MiddleCenter;
|
||||
|
||||
this.StyleDefault = new ButtonStyle() { BackColour = Color.White, PenColour = Color.Black, ForeImage = this.DefaultImage };
|
||||
this.StyleDown = new ButtonStyle() { BackColour = Color.FromArgb(0, 183, 209), PenColour = Color.Black, ForeImage = this.DownImage };
|
||||
this.StyleOver = new ButtonStyle() { BackColour = Color.FromArgb(108, 101, 196), PenColour = Color.White, ForeImage = this.OverImage };
|
||||
this.StyleSelected = new ButtonStyle() { BackColour = Color.FromArgb(51, 51, 51), PenColour = Color.White, ForeImage = this.OverImage };
|
||||
|
||||
label1.Click += delegate { this.OnClick(null); };
|
||||
label1.MouseEnter += delegate { this.VisualState = ButtonState.Hover; };
|
||||
label1.MouseLeave += delegate { this.VisualState = ButtonState.Idle; };
|
||||
label1.MouseDown += delegate { this.VisualState = ButtonState.Down; };
|
||||
label1.MouseUp += delegate { this.VisualState = ButtonState.Idle; };
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
this.VisualState = ButtonState.Idle;
|
||||
}
|
||||
|
||||
protected ButtonState VisualState
|
||||
{
|
||||
get { return controlState; }
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case ButtonState.Idle:
|
||||
if (this.VisualState == ButtonState.Down)
|
||||
{
|
||||
updateButton(StyleOver);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.IsSelected)
|
||||
{
|
||||
updateButton(StyleSelected);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateButton(StyleDefault);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case ButtonState.Hover:
|
||||
updateButton(StyleOver);
|
||||
break;
|
||||
case ButtonState.Down:
|
||||
updateButton(StyleDown);
|
||||
break;
|
||||
default:
|
||||
if (this.IsSelected)
|
||||
{
|
||||
updateButton(StyleSelected);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateButton(StyleDefault);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
controlState = 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;
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get => isSelected;
|
||||
set
|
||||
{
|
||||
isSelected = value;
|
||||
|
||||
this.VisualState = this.VisualState;
|
||||
}
|
||||
}
|
||||
|
||||
protected ButtonStyle StyleOver { get; set; } = new ButtonStyle();
|
||||
protected ButtonStyle StyleDown { get; set; } = new ButtonStyle();
|
||||
protected ButtonStyle StyleDefault { get; set; } = new ButtonStyle();
|
||||
protected ButtonStyle StyleSelected { get; set; } = new ButtonStyle();
|
||||
|
||||
public void PerformClick() => this.OnClick(null);
|
||||
}
|
||||
}
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TButton
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,127 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using RyzStudio.Drawing;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public partial class TButtonTextBox : RyzStudio.Windows.ThemedForms.TUserControl
|
||||
{
|
||||
protected readonly Padding textboxPadding = new Padding(6, 6, 6, 6);
|
||||
|
||||
public TButtonTextBox() : 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:
|
||||
close();
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual 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.TImageBox 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.ImageNormal; set => imageBox1.ImageNormal = value; }
|
||||
|
||||
[Category("Appearance"), Browsable(true)]
|
||||
public Image HighlightImage { get => imageBox1.ImageHover; set => imageBox1.ImageHover = 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 TButton 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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TButtonTextBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox();
|
||||
((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.ImageHover = null;
|
||||
this.imageBox1.Image = null;
|
||||
this.imageBox1.InitialImage = null;
|
||||
this.imageBox1.Location = new System.Drawing.Point(107, 4);
|
||||
this.imageBox1.Name = "imageBox1";
|
||||
this.imageBox1.ImageNormal = 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.TImageBox imageBox1;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,96 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TDialogForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.imgbxClose = new RyzStudio.Windows.Forms.TImageBox();
|
||||
this.area1 = new System.Windows.Forms.Panel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// 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;
|
||||
//
|
||||
// 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.ImageHover = global::AppLauncher.Resource1.close2_16;
|
||||
this.imgbxClose.Image = null;
|
||||
this.imgbxClose.InitialImage = null;
|
||||
this.imgbxClose.Location = new System.Drawing.Point(308, 4);
|
||||
this.imgbxClose.Name = "imgbxClose";
|
||||
this.imgbxClose.ImageNormal = global::AppLauncher.Resource1.close_16;
|
||||
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;
|
||||
//
|
||||
// TDialogForm
|
||||
//
|
||||
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.imgbxClose);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MinimumSize = new System.Drawing.Size(40, 0);
|
||||
this.Name = "TDialogForm";
|
||||
((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected internal Forms.TImageBox imgbxClose;
|
||||
protected internal System.Windows.Forms.Panel panel1;
|
||||
protected internal System.Windows.Forms.Panel area1;
|
||||
}
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
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 TDialogForm : System.Windows.Forms.Form
|
||||
{
|
||||
//protected readonly Color borderColour = Color.FromArgb(232, 231, 236);
|
||||
protected readonly Color borderColour = Color.FromArgb(77, 84, 100);
|
||||
protected readonly int borderWidth = 1;
|
||||
protected readonly Color titleBarColour = Color.FromArgb(152, 175, 206);
|
||||
protected readonly Color titleBarForeColour = Color.White;
|
||||
protected readonly Font titleBarFont = new Font("Segoe UI", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
|
||||
protected readonly int titleBarHeight = 32;
|
||||
|
||||
private bool isDragging = false;
|
||||
private Point startPosition = new Point();
|
||||
|
||||
protected bool isBusy = false;
|
||||
|
||||
public TDialogForm() : base()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
this.FormBorderStyle = FormBorderStyle.None;
|
||||
this.ShowInTaskbar = false;
|
||||
this.TopMost = true;
|
||||
|
||||
imgbxClose.Click += pictureBox3_Click;
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
base.OnClosing(e);
|
||||
|
||||
if (this.IsBusy)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
isDragging = true;
|
||||
startPosition = e.Location;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
if (isDragging)
|
||||
{
|
||||
int x = (this.Location.X + (e.Location.X - startPosition.X));
|
||||
int y = (this.Location.Y + (e.Location.Y - startPosition.Y));
|
||||
|
||||
this.Location = new Point(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseUp(e);
|
||||
|
||||
isDragging = false;
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
Rectangle area = new Rectangle(this.DisplayRectangle.X, this.DisplayRectangle.Y, (this.DisplayRectangle.Width - borderWidth), (this.DisplayRectangle.Height - borderWidth));
|
||||
|
||||
// border
|
||||
g.DrawRectangle(new Pen(borderColour, borderWidth), area);
|
||||
g.DrawLine(new Pen(borderColour, 1), this.DisplayRectangle.X, (titleBarHeight + 1), this.DisplayRectangle.Width, (titleBarHeight + 1));
|
||||
|
||||
area.Inflate((-1 * borderWidth), (-1 * borderWidth));
|
||||
|
||||
g.FillRectangle(new SolidBrush(titleBarColour), area.X, area.Y, (area.Width + area.X), titleBarHeight);
|
||||
|
||||
TextRenderer.DrawText(g, this.Title, titleBarFont, new Point(12, 11), titleBarForeColour);
|
||||
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override Color BackColor { get => base.BackColor; set => base.BackColor = Color.FromArgb(254, 254, 254); }
|
||||
|
||||
[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 Title { get; set; }
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="panel1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="imgbxClose.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
public class TFolderTextBox : TButtonTextBox
|
||||
{
|
||||
public TFolderTextBox() : base()
|
||||
{
|
||||
this.NormalImage = AppLauncher.Resource1.folder;
|
||||
this.HighlightImage = AppLauncher.Resource1.folder2;
|
||||
this.Text = string.Empty;
|
||||
}
|
||||
|
||||
public FolderBrowserDialog FolderDialog { get; set; } = null;
|
||||
|
||||
protected override void imageBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.FolderDialog == null)
|
||||
{
|
||||
this.FolderDialog = new FolderBrowserDialog();
|
||||
this.FolderDialog.Description = "Choose a directory";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Text))
|
||||
{
|
||||
if (Directory.Exists(this.Text))
|
||||
{
|
||||
this.FolderDialog.SelectedPath = this.Text;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.FolderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
this.Text = this.FolderDialog.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
-52
@@ -1,52 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public partial class TForm : 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 TForm()
|
||||
{
|
||||
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(TTextBox 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,232 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using RyzStudio.Drawing;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public partial class TListBox : RyzStudio.Windows.ThemedForms.TUserControl
|
||||
{
|
||||
protected readonly Padding textboxPadding = new Padding(6, 2, 4, 2);
|
||||
|
||||
public TListBox() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.Font = new Font(this.Font, FontStyle.Regular);
|
||||
this.Margin = new Padding(10, 4, 10, 4);
|
||||
|
||||
listBox1.Font = this.Font;
|
||||
listBox1.BorderStyle = BorderStyle.None;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
listBox1.Focus();
|
||||
}
|
||||
|
||||
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
[Category("Appearance")]
|
||||
public System.Windows.Forms.ListBox ListBox { get => listBox1; set => listBox1 = value; }
|
||||
|
||||
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
[Category("Appearance")]
|
||||
public TButton SubmitButton { get; set; } = null;
|
||||
|
||||
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public new Padding Margin { get => base.Margin; set => base.Margin = value; }
|
||||
|
||||
[Category("Action")]
|
||||
[Browsable(true)]
|
||||
public event EventHandler OnAdd;
|
||||
|
||||
[Category("Action")]
|
||||
[Browsable(true)]
|
||||
public event EventHandler OnEdit;
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void imageBox1_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.OnAdd?.Invoke(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void imageBox5_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.OnEdit?.Invoke(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void imageBox2_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (listBox1.SelectedIndex < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int pos = listBox1.SelectedIndex;
|
||||
|
||||
listBox1.Items.RemoveAt(pos);
|
||||
|
||||
if (pos > (listBox1.Items.Count - 1))
|
||||
{
|
||||
pos = (listBox1.Items.Count - 1);
|
||||
}
|
||||
|
||||
listBox1.SelectedIndex = pos;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move up
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void imageBox3_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (listBox1.SelectedIndex <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (listBox1.SelectedItem == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
object item = listBox1.SelectedItem;
|
||||
int pos = listBox1.SelectedIndex;
|
||||
|
||||
listBox1.Items.RemoveAt(pos);
|
||||
listBox1.Items.Insert((pos - 1), item);
|
||||
|
||||
listBox1.SelectedIndex = (pos - 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move down
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void imageBox4_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (listBox1.SelectedIndex >= (listBox1.Items.Count - 1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (listBox1.SelectedItem == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
object item = listBox1.SelectedItem;
|
||||
int pos = listBox1.SelectedIndex;
|
||||
|
||||
listBox1.Items.RemoveAt(pos);
|
||||
listBox1.Items.Insert((pos + 1), item);
|
||||
|
||||
listBox1.SelectedIndex = (pos + 1);
|
||||
}
|
||||
|
||||
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) => imageBox5_MouseClick(sender, e);
|
||||
|
||||
private void listBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.Enter:
|
||||
if (this.SubmitButton != null)
|
||||
{
|
||||
this.SubmitButton.PerformClick();
|
||||
}
|
||||
|
||||
break;
|
||||
case Keys.Escape:
|
||||
close();
|
||||
break;
|
||||
case Keys.Up:
|
||||
if (e.Alt)
|
||||
{
|
||||
imageBox3_MouseClick(sender, null);
|
||||
}
|
||||
|
||||
break;
|
||||
case Keys.Down:
|
||||
if (e.Alt)
|
||||
{
|
||||
imageBox4_MouseClick(sender, null);
|
||||
}
|
||||
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
-182
@@ -1,182 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TListBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.imageBox5 = new RyzStudio.Windows.Forms.TImageBox();
|
||||
this.imageBox4 = new RyzStudio.Windows.Forms.TImageBox();
|
||||
this.imageBox3 = new RyzStudio.Windows.Forms.TImageBox();
|
||||
this.imageBox2 = new RyzStudio.Windows.Forms.TImageBox();
|
||||
this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.Location = new System.Drawing.Point(4, 4);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(121, 82);
|
||||
this.listBox1.TabIndex = 0;
|
||||
this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick);
|
||||
this.listBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.listBox1_PreviewKeyDown);
|
||||
//
|
||||
// imageBox5
|
||||
//
|
||||
this.imageBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.imageBox5.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox5.ErrorImage = null;
|
||||
this.imageBox5.ImageHover = global::AppLauncher.Resource1.edit2;
|
||||
this.imageBox5.Image = global::AppLauncher.Resource1.edit;
|
||||
this.imageBox5.InitialImage = null;
|
||||
this.imageBox5.Location = new System.Drawing.Point(52, 94);
|
||||
this.imageBox5.Name = "imageBox5";
|
||||
this.imageBox5.ImageNormal = global::AppLauncher.Resource1.edit;
|
||||
this.imageBox5.Size = new System.Drawing.Size(18, 25);
|
||||
this.imageBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.imageBox5.TabIndex = 6;
|
||||
this.imageBox5.TabStop = false;
|
||||
this.imageBox5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick);
|
||||
this.imageBox5.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick);
|
||||
//
|
||||
// imageBox4
|
||||
//
|
||||
this.imageBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.imageBox4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox4.ErrorImage = null;
|
||||
this.imageBox4.ImageHover = global::AppLauncher.Resource1.arrow_down2;
|
||||
this.imageBox4.Image = global::AppLauncher.Resource1.arrow_down;
|
||||
this.imageBox4.InitialImage = null;
|
||||
this.imageBox4.Location = new System.Drawing.Point(100, 94);
|
||||
this.imageBox4.Name = "imageBox4";
|
||||
this.imageBox4.ImageNormal = global::AppLauncher.Resource1.arrow_down;
|
||||
this.imageBox4.Size = new System.Drawing.Size(18, 25);
|
||||
this.imageBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.imageBox4.TabIndex = 5;
|
||||
this.imageBox4.TabStop = false;
|
||||
this.imageBox4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick);
|
||||
this.imageBox4.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick);
|
||||
//
|
||||
// imageBox3
|
||||
//
|
||||
this.imageBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.imageBox3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox3.ErrorImage = null;
|
||||
this.imageBox3.ImageHover = global::AppLauncher.Resource1.arrow_up2;
|
||||
this.imageBox3.Image = global::AppLauncher.Resource1.arrow_up;
|
||||
this.imageBox3.InitialImage = null;
|
||||
this.imageBox3.Location = new System.Drawing.Point(76, 94);
|
||||
this.imageBox3.Name = "imageBox3";
|
||||
this.imageBox3.ImageNormal = global::AppLauncher.Resource1.arrow_up;
|
||||
this.imageBox3.Size = new System.Drawing.Size(18, 25);
|
||||
this.imageBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.imageBox3.TabIndex = 4;
|
||||
this.imageBox3.TabStop = false;
|
||||
this.imageBox3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick);
|
||||
this.imageBox3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick);
|
||||
//
|
||||
// imageBox2
|
||||
//
|
||||
this.imageBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.imageBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox2.ErrorImage = null;
|
||||
this.imageBox2.ImageHover = global::AppLauncher.Resource1.minus2;
|
||||
this.imageBox2.Image = global::AppLauncher.Resource1.minus;
|
||||
this.imageBox2.InitialImage = null;
|
||||
this.imageBox2.Location = new System.Drawing.Point(28, 94);
|
||||
this.imageBox2.Name = "imageBox2";
|
||||
this.imageBox2.ImageNormal = global::AppLauncher.Resource1.minus;
|
||||
this.imageBox2.Size = new System.Drawing.Size(18, 25);
|
||||
this.imageBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.imageBox2.TabIndex = 3;
|
||||
this.imageBox2.TabStop = false;
|
||||
this.imageBox2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick);
|
||||
this.imageBox2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick);
|
||||
//
|
||||
// imageBox1
|
||||
//
|
||||
this.imageBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.imageBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.imageBox1.ErrorImage = null;
|
||||
this.imageBox1.ImageHover = global::AppLauncher.Resource1.plus2;
|
||||
this.imageBox1.Image = global::AppLauncher.Resource1.plus;
|
||||
this.imageBox1.InitialImage = null;
|
||||
this.imageBox1.Location = new System.Drawing.Point(4, 94);
|
||||
this.imageBox1.Name = "imageBox1";
|
||||
this.imageBox1.ImageNormal = global::AppLauncher.Resource1.plus;
|
||||
this.imageBox1.Size = new System.Drawing.Size(18, 25);
|
||||
this.imageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.imageBox1.TabIndex = 2;
|
||||
this.imageBox1.TabStop = false;
|
||||
this.imageBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick);
|
||||
this.imageBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick);
|
||||
//
|
||||
// TListBox
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.Controls.Add(this.imageBox5);
|
||||
this.Controls.Add(this.imageBox4);
|
||||
this.Controls.Add(this.imageBox3);
|
||||
this.Controls.Add(this.imageBox2);
|
||||
this.Controls.Add(this.imageBox1);
|
||||
this.Controls.Add(this.listBox1);
|
||||
this.Name = "TListBox";
|
||||
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||
this.Size = new System.Drawing.Size(128, 120);
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.imageBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
private Forms.TImageBox imageBox1;
|
||||
private Forms.TImageBox imageBox2;
|
||||
private Forms.TImageBox imageBox3;
|
||||
private Forms.TImageBox imageBox4;
|
||||
private Forms.TImageBox imageBox5;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,42 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
public class TOpenFileTextBox : TButtonTextBox
|
||||
{
|
||||
public TOpenFileTextBox() : base()
|
||||
{
|
||||
this.NormalImage = AppLauncher.Resource1.file;
|
||||
this.HighlightImage = AppLauncher.Resource1.file2;
|
||||
this.Text = string.Empty;
|
||||
}
|
||||
|
||||
public OpenFileDialog FileDialog { get; set; } = null;
|
||||
|
||||
protected override void imageBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.FileDialog == null)
|
||||
{
|
||||
this.FileDialog = new OpenFileDialog();
|
||||
this.FileDialog.Title = "Choose a file";
|
||||
this.FileDialog.Filter = "All files|*";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(this.Text))
|
||||
{
|
||||
if (File.Exists(this.Text))
|
||||
{
|
||||
this.FileDialog.InitialDirectory = Path.GetDirectoryName(this.Text);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.FileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
this.Text = this.FileDialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using RyzStudio.Drawing;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public partial class TPickerBox : RyzStudio.Windows.ThemedForms.TUserControl
|
||||
{
|
||||
protected readonly Padding textboxPadding = new Padding(6, 2, 4, 2);
|
||||
|
||||
public TPickerBox() : 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:
|
||||
close();
|
||||
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 TButton 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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TPickerBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,96 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using RyzStudio.Drawing;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public partial class TTextBox : RyzStudio.Windows.ThemedForms.TUserControl
|
||||
{
|
||||
protected readonly Padding textboxPadding = new Padding(6, 6, 6, 6);
|
||||
|
||||
public TTextBox() : 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:
|
||||
close();
|
||||
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 TButton 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TTextBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,106 +0,0 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using RyzStudio.Drawing;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
public partial class TUserControl : System.Windows.Forms.UserControl
|
||||
{
|
||||
public class 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;
|
||||
}
|
||||
}
|
||||
|
||||
protected ThemeStyle styleActive = new ThemeStyle(1, 3, 2, Color.FromArgb(212, 212, 212), Color.White);
|
||||
|
||||
public TUserControl()
|
||||
{
|
||||
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 close()
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TUserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
public class TYesNoPickerBox : TPickerBox
|
||||
{
|
||||
|
||||
public TYesNoPickerBox() : base()
|
||||
{
|
||||
this.ComboBox.Items.Clear();
|
||||
|
||||
this.ComboBox.Items.AddRange(new string[] { "No", "Yes" });
|
||||
if (this.ComboBox.Items.Count > 0) this.ComboBox.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
public bool Value { get => (this.ComboBox.SelectedIndex == 1); set =>this.ComboBox.SelectedIndex = (value ? 1 : 0); }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user