Archived
Added: update icon + progress bar
This commit is contained in:
1 parent
90473e092d
commit
f56072eebc
18 files changed
+1125
-55
No files matched your search
@@ -1,4 +1,7 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
using RyzStudio.Windows.Forms;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
public class TYesNoPickerBox : TPickerBox
|
||||
{
|
||||
@@ -11,7 +14,14 @@
|
||||
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); }
|
||||
|
||||
public ComboBox InnerControl { get => this.ComboBox; }
|
||||
|
||||
public bool Value
|
||||
{
|
||||
get => (ThreadControl.GetValue(this.ComboBox) == 1);
|
||||
set => ThreadControl.SetValue(this.ComboBox, (value ? 1 : 0));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
using RyzStudio.Windows.Forms;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
@@ -136,7 +137,7 @@
|
||||
|
||||
[Browsable(true)]
|
||||
[Category("Appearance")]
|
||||
public string LabelText { get => label1.Text; set => label1.Text = value; }
|
||||
public string LabelText { get => ThreadControl.GetText(label1); set => ThreadControl.SetText(label1, value); }
|
||||
|
||||
[Browsable(true)]
|
||||
[Category("Appearance")]
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using RyzStudio.Drawing;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
public partial class TProgressBar : RyzStudio.Windows.ThemedForms.TUserControl
|
||||
{
|
||||
protected readonly Padding textboxPadding = new Padding(2, 2, 2, 2);
|
||||
|
||||
|
||||
public TProgressBar() : base()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.Margin = new Padding(10, 6, 10, 6);
|
||||
this.Font = new Font(this.Font, FontStyle.Regular);
|
||||
|
||||
customProgressBar1.Font = this.Font;
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
[Browsable(true), EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
[Category("Appearance")]
|
||||
public RyzStudio.Windows.Forms.TCustomProgressBar InnerControl { get => customProgressBar1; set => customProgressBar1 = value; }
|
||||
|
||||
[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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
namespace RyzStudio.Windows.ThemedForms
|
||||
{
|
||||
partial class TProgressBar
|
||||
{
|
||||
/// <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.customProgressBar1 = new RyzStudio.Windows.Forms.TCustomProgressBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// customProgressBar1
|
||||
//
|
||||
this.customProgressBar1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||
this.customProgressBar1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||
this.customProgressBar1.BarColour = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(225)))), ((int)(((byte)(249)))));
|
||||
this.customProgressBar1.BarTextColour = System.Drawing.SystemColors.ControlText;
|
||||
this.customProgressBar1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.customProgressBar1.Location = new System.Drawing.Point(4, 4);
|
||||
this.customProgressBar1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.customProgressBar1.Maximum = 100;
|
||||
this.customProgressBar1.Minimum = 0;
|
||||
this.customProgressBar1.Name = "customProgressBar1";
|
||||
this.customProgressBar1.Size = new System.Drawing.Size(121, 25);
|
||||
this.customProgressBar1.TabIndex = 0;
|
||||
this.customProgressBar1.Value = 50;
|
||||
//
|
||||
// TProgressBar
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.Controls.Add(this.customProgressBar1);
|
||||
this.Name = "TProgressBar";
|
||||
this.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
||||
this.Size = new System.Drawing.Size(128, 32);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Forms.TCustomProgressBar customProgressBar1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in new issue
Block a user