SoulStar 1 month ago
commit 04c3263270

@ -40,10 +40,30 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="GraphDirection.cs" />
<Compile Include="HslArrow.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="HslHelper.cs" />
<Compile Include="HslLanternSimple.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="HslTable.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Nod.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Nod.Designer.cs">
<DependentUpon>Nod.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReferenceAxis.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Nod.resx">
<DependentUpon>Nod.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

@ -0,0 +1,30 @@
namespace DNSD_Controls
{
/// <summary>
/// 图形的方向
/// </summary>
// Token: 0x02000036 RID: 54
public enum GraphDirection
{
/// <summary>
/// 向上
/// </summary>
// Token: 0x04000285 RID: 645
Upward = 1,
/// <summary>
/// 向下
/// </summary>
// Token: 0x04000286 RID: 646
Downward,
/// <summary>
/// 向左
/// </summary>
// Token: 0x04000287 RID: 647
Leftward,
/// <summary>
/// 向右
/// </summary>
// Token: 0x04000288 RID: 648
Rightward
}
}

@ -0,0 +1,581 @@
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
using System.Net;
using System.Windows.Forms;
namespace DNSD_Controls
{
/// <summary>
/// 箭头控件类
/// </summary>
// Token: 0x02000005 RID: 5
[Description("一个箭头控件,支持设置不同的方向,颜色,文本信息")]
public class HslArrow : UserControl
{
/// <summary>
/// 实例化一个默认的箭头控件
/// </summary>
// Token: 0x06000016 RID: 22 RVA: 0x000112AC File Offset: 0x0000F4AC
public HslArrow()
{
this.InitializeComponent();
this.sf = new StringFormat();
this.sf.Alignment = StringAlignment.Center;
this.sf.LineAlignment = StringAlignment.Center;
base.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
base.SetStyle(ControlStyles.ResizeRedraw, true);
base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}
/// <summary>
/// 获取或设置控件的背景色
/// </summary>
// Token: 0x17000003 RID: 3
// (get) Token: 0x06000017 RID: 23 RVA: 0x00011393 File Offset: 0x0000F593
// (set) Token: 0x06000018 RID: 24 RVA: 0x0001139B File Offset: 0x0000F59B
[Browsable(true)]
[Description("获取或设置控件的背景色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "Transparent")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
/// <summary>
/// 获取或设置当前控件的文本
/// </summary>
// Token: 0x17000004 RID: 4
// (get) Token: 0x06000019 RID: 25 RVA: 0x000113A8 File Offset: 0x0000F5A8
// (set) Token: 0x0600001A RID: 26 RVA: 0x000113C0 File Offset: 0x0000F5C0
[Browsable(true)]
[Description("获取或设置当前控件的文本")]
[Category("HslControls")]
[EditorBrowsable(EditorBrowsableState.Always)]
[Bindable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public override string Text
{
get
{
return base.Text;
}
set
{
base.Text = value;
base.Invalidate();
}
}
/// <summary>
/// 获取或设置控件的前景色
/// </summary>
// Token: 0x17000005 RID: 5
// (get) Token: 0x0600001B RID: 27 RVA: 0x000113D2 File Offset: 0x0000F5D2
// (set) Token: 0x0600001C RID: 28 RVA: 0x000113DA File Offset: 0x0000F5DA
[Browsable(true)]
[Description("获取或设置控件的前景色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "White")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
}
}
/// <summary>
/// 获取或设置箭头控件的边缘颜色
/// </summary>
// Token: 0x17000006 RID: 6
// (get) Token: 0x0600001D RID: 29 RVA: 0x000113E4 File Offset: 0x0000F5E4
// (set) Token: 0x0600001E RID: 30 RVA: 0x000113FC File Offset: 0x0000F5FC
[Browsable(true)]
[Description("获取或设置箭头控件的边缘颜色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "DimGray")]
public virtual Color EdgeColor
{
get
{
return this.edgeColor;
}
set
{
this.edgeColor = value;
this.edgePen = new Pen(value, 1f);
base.Invalidate();
}
}
/// <summary>
/// 获取或设置箭头控件的方向
/// </summary>
// Token: 0x17000007 RID: 7
// (get) Token: 0x0600001F RID: 31 RVA: 0x00011420 File Offset: 0x0000F620
// (set) Token: 0x06000020 RID: 32 RVA: 0x00011438 File Offset: 0x0000F638
[Browsable(true)]
[Description("获取或设置箭头控件的方向")]
[Category("HslControls")]
[DefaultValue(typeof(ArrowDirection), "Right")]
public virtual ArrowDirection ArrowDirection
{
get
{
return this.arrowDirection;
}
set
{
this.arrowDirection = value;
base.Invalidate();
}
}
// Token: 0x17000008 RID: 8
// (get) Token: 0x06000021 RID: 33 RVA: 0x0001144C File Offset: 0x0000F64C
// (set) Token: 0x06000022 RID: 34 RVA: 0x00011464 File Offset: 0x0000F664
[Browsable(true)]
[Description("获取或设置箭头是否应用于两头,默认只有一个箭头")]
[Category("HslControls")]
[DefaultValue(false)]
public virtual bool ArrowBoth
{
get
{
return this.arrowBoth;
}
set
{
this.arrowBoth = value;
base.Invalidate();
}
}
/// <summary>
/// 获取或设置箭头背景的颜色
/// </summary>
// Token: 0x17000009 RID: 9
// (get) Token: 0x06000023 RID: 35 RVA: 0x00011478 File Offset: 0x0000F678
// (set) Token: 0x06000024 RID: 36 RVA: 0x00011490 File Offset: 0x0000F690
[Browsable(true)]
[Description("获取或设置箭头背景的颜色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "DodgerBlue")]
public virtual Color ArrowBackColor
{
get
{
return this.arrowBackColor;
}
set
{
this.arrowBackColor = value;
Brush brush = this.brushArrow;
if (brush != null)
{
brush.Dispose();
}
this.brushArrow = new SolidBrush(value);
base.Invalidate();
}
}
/// <summary>
/// 获取或设置横向宽度的比例值范围0-1
/// </summary>
// Token: 0x1700000A RID: 10
// (get) Token: 0x06000025 RID: 37 RVA: 0x000114C0 File Offset: 0x0000F6C0
// (set) Token: 0x06000026 RID: 38 RVA: 0x000114D8 File Offset: 0x0000F6D8
[Browsable(true)]
[Description("获取或设置横向宽度的比例值范围0-1")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "DodgerBlue")]
public virtual float FactorX
{
get
{
return this.factorX;
}
set
{
bool flag = value >= 0f && value <= 1f;
if (flag)
{
this.factorX = value;
base.Invalidate();
}
}
}
/// <summary>
/// 获取或设置纵向宽度的比例值范围0-0.5
/// </summary>
// Token: 0x1700000B RID: 11
// (get) Token: 0x06000027 RID: 39 RVA: 0x00011510 File Offset: 0x0000F710
// (set) Token: 0x06000028 RID: 40 RVA: 0x00011528 File Offset: 0x0000F728
[Browsable(true)]
[Description("获取或设置纵向宽度的比例值范围0-0.5")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "DodgerBlue")]
public virtual float FactorY
{
get
{
return this.factorY;
}
set
{
bool flag = value >= 0f && value <= 0.5f;
if (flag)
{
this.factorY = value;
base.Invalidate();
}
}
}
/// <summary>
/// 获取或设置本箭头控件是否使用渐进色
/// </summary>
// Token: 0x1700000C RID: 12
// (get) Token: 0x06000029 RID: 41 RVA: 0x00011560 File Offset: 0x0000F760
// (set) Token: 0x0600002A RID: 42 RVA: 0x00011568 File Offset: 0x0000F768
[Category("HslControls")]
[Description("获取或设置本箭头控件是否使用渐进色")]
[Browsable(true)]
[DefaultValue(true)]
public virtual bool UseGradient
{
get
{
return this.useGradient;
}
set
{
this.useGradient = value;
base.Invalidate();
}
}
/// <summary>
/// 重绘控件的
/// </summary>
/// <param name="e">重绘事件</param>
// Token: 0x0600002B RID: 43 RVA: 0x0001157C File Offset: 0x0000F77C
protected override void OnPaint(PaintEventArgs e)
{
Graphics graphics = e.Graphics;
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
this.PaintHslControls(graphics, (float)base.Width, (float)base.Height);
base.OnPaint(e);
}
/// <summary>
/// 绘制当前控件的界面到指定的绘图上下文里面默认位置00需要指定宽度和高度信息
/// </summary>
/// <param name="g">绘图上下文</param>
/// <param name="width">宽度信息</param>
/// <param name="height">高度信息</param>
// Token: 0x0600002C RID: 44 RVA: 0x000115C0 File Offset: 0x0000F7C0
public void PaintHslControls(Graphics g, float width, float height)
{
bool flag = false;
if (true)
{
PointF[] array = null;
RectangleF layoutRectangle = default(RectangleF);
ArrowDirection arrowDirection = this.arrowDirection;
ArrowDirection arrowDirection2 = arrowDirection;
if (arrowDirection2 <= ArrowDirection.Up)
{
if (arrowDirection2 != ArrowDirection.Left)
{
if (arrowDirection2 == ArrowDirection.Up)
{
bool flag2 = !this.arrowBoth;
if (flag2)
{
array = new PointF[]
{
new PointF(width * 0.5f, 0f),
new PointF(width - 1f, height * (1f - this.factorX)),
new PointF(width * (1f - this.factorY), height * (1f - this.factorX)),
new PointF(width * (1f - this.factorY), height - 1f),
new PointF(width * this.factorY, height - 1f),
new PointF(width * this.factorY, height * (1f - this.factorX)),
new PointF(0f, height * (1f - this.factorX)),
new PointF(width * 0.5f, 0f)
};
layoutRectangle = new RectangleF(width * this.factorY, height * (1f - this.factorX) / 2f, width * (1f - this.factorY * 2f), height * (1f - (1f - this.factorX) / 2f));
}
else
{
array = new PointF[]
{
new PointF(width * 0.5f, 0f),
new PointF(width - 1f, height * (1f - this.factorX)),
new PointF(width * (1f - this.factorY), height * (1f - this.factorX)),
new PointF(width * (1f - this.factorY), height * this.factorX),
new PointF(width - 1f, height * this.factorX),
new PointF(width / 2f, height - 1f),
new PointF(0f, height * this.factorX),
new PointF(width * this.factorY, height * this.factorX),
new PointF(width * this.factorY, height * (1f - this.factorX)),
new PointF(0f, height * (1f - this.factorX)),
new PointF(width * 0.5f, 0f)
};
layoutRectangle = new RectangleF(width * this.factorY, 0f, width * (1f - this.factorY * 2f), height - 1f);
}
}
}
else
{
bool flag3 = !this.arrowBoth;
if (flag3)
{
array = new PointF[]
{
new PointF(0f, height * 0.5f),
new PointF(width * (1f - this.factorX), 0f),
new PointF(width * (1f - this.factorX), height * this.factorY),
new PointF(width - 1f, height * this.factorY),
new PointF(width - 1f, height * (1f - this.factorY)),
new PointF(width * (1f - this.factorX), height * (1f - this.factorY)),
new PointF(width * (1f - this.factorX), height - 1f),
new PointF(0f, height * 0.5f)
};
layoutRectangle = new RectangleF((1f - this.factorX) / 2f * width, height * this.factorY, width * (1f - (1f - this.factorX) / 2f), height * (1f - this.factorY * 2f));
}
else
{
array = new PointF[]
{
new PointF(0f, height * 0.5f),
new PointF(width * (1f - this.factorX), 0f),
new PointF(width * (1f - this.factorX), height * this.factorY),
new PointF(width * this.factorX, height * this.factorY),
new PointF(width * this.factorX, 0f),
new PointF(width - 1f, height * 0.5f),
new PointF(width * this.factorX, height - 1f),
new PointF(width * this.factorX, height * (1f - this.factorY)),
new PointF(width * (1f - this.factorX), height * (1f - this.factorY)),
new PointF(width * (1f - this.factorX), height - 1f),
new PointF(0f, height * 0.5f)
};
layoutRectangle = new RectangleF(0f, height * this.factorY, width - 1f, height * (1f - this.factorY * 2f));
}
}
}
else if (arrowDirection2 != ArrowDirection.Right)
{
if (arrowDirection2 == ArrowDirection.Down)
{
bool flag4 = !this.arrowBoth;
if (flag4)
{
array = new PointF[]
{
new PointF(width * (1f - this.factorY), 0f),
new PointF(width * (1f - this.factorY), height * this.factorX),
new PointF(width - 1f, height * this.factorX),
new PointF(width / 2f, height - 1f),
new PointF(0f, height * this.factorX),
new PointF(width * this.factorY, height * this.factorX),
new PointF(width * this.factorY, 0f),
new PointF(width * (1f - this.factorY), 0f)
};
layoutRectangle = new RectangleF(width * this.factorY, 0f, width * (1f - this.factorY * 2f), height * (1f - (1f - this.factorX) / 2f));
}
else
{
array = new PointF[]
{
new PointF(width * 0.5f, 0f),
new PointF(width - 1f, height * (1f - this.factorX)),
new PointF(width * (1f - this.factorY), height * (1f - this.factorX)),
new PointF(width * (1f - this.factorY), height * this.factorX),
new PointF(width - 1f, height * this.factorX),
new PointF(width / 2f, height - 1f),
new PointF(0f, height * this.factorX),
new PointF(width * this.factorY, height * this.factorX),
new PointF(width * this.factorY, height * (1f - this.factorX)),
new PointF(0f, height * (1f - this.factorX)),
new PointF(width * 0.5f, 0f)
};
layoutRectangle = new RectangleF(width * this.factorY, 0f, width * (1f - this.factorY * 2f), height - 1f);
}
}
}
else
{
bool flag5 = !this.arrowBoth;
if (flag5)
{
array = new PointF[]
{
new PointF(0f, height * this.factorY),
new PointF(width * this.factorX, height * this.factorY),
new PointF(width * this.factorX, 0f),
new PointF(width - 1f, height * 0.5f),
new PointF(width * this.factorX, height - 1f),
new PointF(width * this.factorX, height * (1f - this.factorY)),
new PointF(0f, height * (1f - this.factorY)),
new PointF(0f, height * this.factorY)
};
layoutRectangle = new RectangleF(0f, height * this.factorY, width * (1f - (1f - this.factorX) / 2f), height * (1f - this.factorY * 2f));
}
else
{
array = new PointF[]
{
new PointF(width * this.factorX, height * this.factorY),
new PointF(width * this.factorX, 0f),
new PointF(width - 1f, height * 0.5f),
new PointF(width * this.factorX, height - 1f),
new PointF(width * this.factorX, height * (1f - this.factorY)),
new PointF(width * (1f - this.factorX), height * (1f - this.factorY)),
new PointF(width * (1f - this.factorX), height - 1f),
new PointF(0f, height * 0.5f),
new PointF(width * (1f - this.factorX), 0f),
new PointF(width * (1f - this.factorX), height * this.factorY),
new PointF(width * this.factorX, height * this.factorY)
};
layoutRectangle = new RectangleF(0f, height * this.factorY, width - 1f, height * (1f - this.factorY * 2f));
}
}
bool flag6 = array == null;
if (!flag6)
{
bool flag7 = this.useGradient;
if (flag7)
{
ColorBlend colorBlend = new ColorBlend();
colorBlend.Positions = new float[]
{
0f,
0.5f,
1f
};
colorBlend.Colors = new Color[]
{
this.arrowBackColor,
HslHelper.GetColorLight(this.arrowBackColor),
this.arrowBackColor
};
bool flag8 = this.arrowDirection == ArrowDirection.Up || this.arrowDirection == ArrowDirection.Down;
if (flag8)
{
using (LinearGradientBrush linearGradientBrush = new LinearGradientBrush(new PointF(0f, 0f), new PointF(width - 1f, 0f), this.arrowBackColor, this.arrowBackColor))
{
linearGradientBrush.InterpolationColors = colorBlend;
g.FillPolygon(linearGradientBrush, array);
}
}
else
{
using (LinearGradientBrush linearGradientBrush2 = new LinearGradientBrush(new PointF(0f, 0f), new PointF(0f, height - 1f), this.arrowBackColor, this.arrowBackColor))
{
linearGradientBrush2.InterpolationColors = colorBlend;
g.FillPolygon(linearGradientBrush2, array);
}
}
}
else
{
g.FillPolygon(this.brushArrow, array);
}
g.DrawPolygon(this.edgePen, array);
using (Brush brush = new SolidBrush(this.ForeColor))
{
g.DrawString(this.Text, this.Font, brush, layoutRectangle, this.sf);
}
}
}
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
// Token: 0x0600002D RID: 45 RVA: 0x00012364 File Offset: 0x00010564
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
if (flag)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
// Token: 0x0600002E RID: 46 RVA: 0x0001239C File Offset: 0x0001059C
private void InitializeComponent()
{
base.SuspendLayout();
base.AutoScaleMode = AutoScaleMode.None;
this.BackColor = Color.Transparent;
this.ForeColor = Color.White;
base.Name = "HslArrow";
base.Size = new Size(176, 49);
base.ResumeLayout(false);
}
// Token: 0x04000010 RID: 16
private StringFormat sf = null;
// Token: 0x04000011 RID: 17
private Color edgeColor = Color.Gray;
// Token: 0x04000012 RID: 18
private Pen edgePen = new Pen(Color.Gray, 1f);
// Token: 0x04000013 RID: 19
private Color arrowBackColor = Color.DodgerBlue;
// Token: 0x04000014 RID: 20
private Brush brushArrow = new SolidBrush(Color.DodgerBlue);
// Token: 0x04000015 RID: 21
private ArrowDirection arrowDirection = ArrowDirection.Right;
// Token: 0x04000016 RID: 22
private float factorX = 0.75f;
// Token: 0x04000017 RID: 23
private float factorY = 0.27f;
// Token: 0x04000018 RID: 24
private bool useGradient = true;
// Token: 0x04000019 RID: 25
private bool arrowBoth = false;
/// <summary>
/// 必需的设计器变量。
/// </summary>
// Token: 0x0400001A RID: 26
private IContainer components = null;
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,804 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing.Text;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DNSD_Controls
{
/// <summary>
/// 表格控件
/// </summary>
// Token: 0x0200005B RID: 91
[Description("一个表格控件")]
public class HslTable : UserControl
{
/// <summary>
/// 实例化一个表格对象
/// </summary>
// Token: 0x060007A5 RID: 1957 RVA: 0x00044274 File Offset: 0x00042474
public HslTable()
{
this.InitializeComponent();
this.sf = new StringFormat();
this.sf.Alignment = StringAlignment.Center;
this.sf.LineAlignment = StringAlignment.Center;
base.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
base.SetStyle(ControlStyles.ResizeRedraw, true);
base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
bool flag = this.GetService(typeof(IDesignerHost)) != null || LicenseManager.UsageMode == LicenseUsageMode.Designtime;
if (flag)
{
this.tableValues.Add(new string[]
{
"φ31-61-2.5",
"1000",
"A类型",
"800 nm",
""
});
}
}
/// <summary>
/// 获取或设置控件的背景色
/// </summary>
// Token: 0x17000261 RID: 609
// (get) Token: 0x060007A6 RID: 1958 RVA: 0x00044442 File Offset: 0x00042642
// (set) Token: 0x060007A7 RID: 1959 RVA: 0x0004444A File Offset: 0x0004264A
[Browsable(true)]
[Description("获取或设置控件的背景色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "Transparent")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor = value;
}
}
/// <summary>
/// 获取或设置当前控件的文本
/// </summary>
// Token: 0x17000262 RID: 610
// (get) Token: 0x060007A8 RID: 1960 RVA: 0x00044454 File Offset: 0x00042654
// (set) Token: 0x060007A9 RID: 1961 RVA: 0x0004446C File Offset: 0x0004266C
[Browsable(true)]
[Description("获取或设置当前控件的文本")]
[Category("HslControls")]
[EditorBrowsable(EditorBrowsableState.Always)]
[Bindable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public override string Text
{
get
{
return base.Text;
}
set
{
base.Text = value;
base.Invalidate();
}
}
/// <summary>
/// 获取或设置控件的前景色
/// </summary>
// Token: 0x17000263 RID: 611
// (get) Token: 0x060007AA RID: 1962 RVA: 0x0004447E File Offset: 0x0004267E
// (set) Token: 0x060007AB RID: 1963 RVA: 0x00044486 File Offset: 0x00042686
[Browsable(true)]
[Description("获取或设置控件的前景色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "Gray")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor = value;
Brush brush = this.textBrush;
if (brush != null)
{
brush.Dispose();
}
this.textBrush = new SolidBrush(value);
}
}
/// <summary>
/// 获取或设置控件的表格边框的颜色
/// </summary>
// Token: 0x17000264 RID: 612
// (get) Token: 0x060007AC RID: 1964 RVA: 0x000444AF File Offset: 0x000426AF
// (set) Token: 0x060007AD RID: 1965 RVA: 0x000444B7 File Offset: 0x000426B7
[Browsable(true)]
[Description("获取或设置控件的表格边框的颜色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "LightGray")]
public Color BorderColor
{
get
{
return this.borderColor;
}
set
{
this.borderColor = value;
Pen pen = this.borderPen;
if (pen != null)
{
pen.Dispose();
}
this.borderPen = new Pen(value);
base.Invalidate();
}
}
/// <summary>
/// 获取或设置当前的标题的文本颜色
/// </summary>
// Token: 0x17000265 RID: 613
// (get) Token: 0x060007AE RID: 1966 RVA: 0x000444E6 File Offset: 0x000426E6
// (set) Token: 0x060007AF RID: 1967 RVA: 0x000444EE File Offset: 0x000426EE
[Browsable(true)]
[Description("获取或设置当前的标题的文本颜色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "DimGray")]
public Color HeaderColor
{
get
{
return this.headerColor;
}
set
{
this.headerColor = value;
Brush brush = this.headerBrush;
if (brush != null)
{
brush.Dispose();
}
this.headerBrush = new SolidBrush(value);
base.Invalidate();
}
}
/// <summary>
/// 获取或设置当前的最大标题的文本颜色
/// </summary>
// Token: 0x17000266 RID: 614
// (get) Token: 0x060007B0 RID: 1968 RVA: 0x0004451D File Offset: 0x0004271D
// (set) Token: 0x060007B1 RID: 1969 RVA: 0x00044525 File Offset: 0x00042725
[Browsable(true)]
[Description("获取或设置当前的最大标题的文本颜色")]
[Category("HslControls")]
[DefaultValue(typeof(Color), "DarkSlateGray")]
public Color TopHeaderColor
{
get
{
return this.topTextColor;
}
set
{
this.topTextColor = value;
Brush brush = this.topTextBrush;
if (brush != null)
{
brush.Dispose();
}
this.topTextBrush = new SolidBrush(value);
base.Invalidate();
}
}
/// <summary>
/// 获取或设置当前表格的数据行的行数,不包括顶部最大的标题行
/// </summary>
// Token: 0x17000267 RID: 615
// (get) Token: 0x060007B2 RID: 1970 RVA: 0x00044554 File Offset: 0x00042754
// (set) Token: 0x060007B3 RID: 1971 RVA: 0x0004456C File Offset: 0x0004276C
[Browsable(true)]
[Description("获取或设置当前表格的数据行的行数,不包括顶部最大的标题行")]
[Category("HslControls")]
[DefaultValue(5)]
public int RowsTotalCount
{
get
{
return this.rowsTotalCount;
}
set
{
bool flag = this.rowsTotalCount > 0;
if (flag)
{
this.rowsTotalCount = value;
base.Invalidate();
}
}
}
/// <summary>
/// 获取或设置当前最大标题的文本信息,默认为今日生产计划
/// </summary>
// Token: 0x17000268 RID: 616
// (get) Token: 0x060007B4 RID: 1972 RVA: 0x00044597 File Offset: 0x00042797
// (set) Token: 0x060007B5 RID: 1973 RVA: 0x0004459F File Offset: 0x0004279F
[Browsable(true)]
[Description("获取或设置当前最大标题的文本信息,默认为今日生产计划")]
[Category("HslControls")]
[DefaultValue("今日生产计划")]
public string TopHeaderText
{
get
{
return this.topHeaderText;
}
set
{
this.topHeaderText = value;
base.Invalidate();
}
}
/// <summary>
/// 获取或设置当前辅助标题的文本信息默认为9月2日
/// </summary>
// Token: 0x17000269 RID: 617
// (get) Token: 0x060007B6 RID: 1974 RVA: 0x000445B0 File Offset: 0x000427B0
// (set) Token: 0x060007B7 RID: 1975 RVA: 0x000445B8 File Offset: 0x000427B8
[Browsable(true)]
[Description("获取或设置当前辅助标题的文本信息默认为9月2日")]
[Category("HslControls")]
[DefaultValue("9月2日")]
public string AssistHeaderText
{
get
{
return this.assistHeaderText;
}
set
{
this.assistHeaderText = value;
base.Invalidate();
}
}
/// <summary>
/// 获取或设置当前最大标题的高度如果小于1就是百分比如果大于1就是绝对值
/// </summary>
// Token: 0x1700026A RID: 618
// (get) Token: 0x060007B8 RID: 1976 RVA: 0x000445C9 File Offset: 0x000427C9
// (set) Token: 0x060007B9 RID: 1977 RVA: 0x000445D1 File Offset: 0x000427D1
[Browsable(true)]
[Description("获取或设置当前最大标题的高度如果小于1就是百分比如果大于1就是绝对值")]
[Category("HslControls")]
[DefaultValue(0.25f)]
public float TopHeaderHeight
{
get
{
return this.headHeight;
}
set
{
this.headHeight = value;
base.Invalidate();
}
}
/// <summary>
/// 列的宽度信息设置,数组的长度决定了列的数量
/// </summary>
// Token: 0x1700026B RID: 619
// (get) Token: 0x060007BA RID: 1978 RVA: 0x000445E2 File Offset: 0x000427E2
// (set) Token: 0x060007BB RID: 1979 RVA: 0x000445EA File Offset: 0x000427EA
[Category("HslControls")]
[Description("列的宽度信息设置,数组的长度决定了列的数量")]
[TypeConverter(typeof(CollectionConverter))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public float[] ColumnWidth
{
get
{
return this.columnWidth;
}
set
{
this.columnWidth = value;
base.Invalidate();
}
}
/// <summary>
/// 列的标题信息设置,数组长度应该刚好是列的数组,如果少于,多出来的列则为空,如果大于,多出来的列则不显示
/// </summary>
// Token: 0x1700026C RID: 620
// (get) Token: 0x060007BC RID: 1980 RVA: 0x000445FB File Offset: 0x000427FB
// (set) Token: 0x060007BD RID: 1981 RVA: 0x00044603 File Offset: 0x00042803
[Category("HslControls")]
[Description("列的标题信息设置,数组长度应该刚好是列的数组,如果少于,多出来的列则为空,如果大于,多出来的列则不显示")]
[TypeConverter(typeof(CollectionConverter))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public string[] ColumnHeader
{
get
{
return this.columnHeader;
}
set
{
this.columnHeader = value;
base.Invalidate();
}
}
/// <summary>
/// 获取或设置顶部标题的字体大小默认18
/// </summary>
// Token: 0x1700026D RID: 621
// (get) Token: 0x060007BE RID: 1982 RVA: 0x00044614 File Offset: 0x00042814
// (set) Token: 0x060007BF RID: 1983 RVA: 0x0004461C File Offset: 0x0004281C
[Browsable(true)]
[Description("获取或设置顶部标题的字体大小默认18")]
[Category("HslControls")]
[DefaultValue(28f)]
public float TopHeaderTextSize
{
get
{
return this.headTextSize;
}
set
{
this.headTextSize = value;
base.Invalidate();
}
}
/// <summary>
/// 获取或设置是否显示列标题的文本信息
/// </summary>
// Token: 0x1700026E RID: 622
// (get) Token: 0x060007C0 RID: 1984 RVA: 0x0004462D File Offset: 0x0004282D
// (set) Token: 0x060007C1 RID: 1985 RVA: 0x00044635 File Offset: 0x00042835
[Browsable(true)]
[Description("获取或设置是否显示列标题的文本信息")]
[Category("HslControls")]
[DefaultValue(true)]
public bool IsShowColumnHeader
{
get
{
return this.isShowColumnHeader;
}
set
{
this.isShowColumnHeader = value;
base.Invalidate();
}
}
/// <inheritdoc />
// Token: 0x060007C2 RID: 1986 RVA: 0x00044648 File Offset: 0x00042848
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
e.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
bool flag = base.Width < 20 || base.Height < 20;
if (!flag)
{
this.PaintHslControls(e.Graphics, base.Width, (float)base.Height);
}
}
/// <summary>
/// 可以在任意的画刷上绘制当前的控件的图形
/// </summary>
/// <param name="g">画刷</param>
/// <param name="width">宽度信息</param>
/// <param name="height">高度信息</param>
// Token: 0x060007C3 RID: 1987 RVA: 0x000446A4 File Offset: 0x000428A4
public void PaintHslControls(Graphics g, int width, float height)
{
if (true)
{
float num = (this.headHeight < 1f) ? (height * this.headHeight) : this.headHeight;
float num2 = (this.rowsTotalCount == 0) ? (height - num) : ((height - num) / (float)this.rowsTotalCount);
bool flag2 = this.headHeight > 0f;
if (flag2)
{
RectangleF layoutRectangle = new RectangleF(0f, 0f, (float)width, num);
using (Font font = new Font(this.Font.FontFamily, this.headTextSize))
{
g.DrawString(this.topHeaderText, font, this.topTextBrush, layoutRectangle, this.sf);
SizeF sizeF = g.MeasureString(this.topHeaderText, font);
g.DrawString(this.assistHeaderText, this.Font, this.topTextBrush, new PointF((float)width * 0.5f + sizeF.Width / 2f, layoutRectangle.Height / 2f + (float)font.Height / 2f - (float)this.Font.Height - 1f));
}
}
bool flag3 = this.isShowColumnHeader;
if (flag3)
{
for (int i = 0; i < this.columnHeader.Length; i++)
{
bool flag4 = i + 1 < this.columnWidth.Length;
if (flag4)
{
RectangleF layoutRectangle2 = new RectangleF((float)width * this.columnWidth[i], num, (float)width * (this.columnWidth[i + 1] - this.columnWidth[i]), num2);
bool flag5 = !string.IsNullOrEmpty(this.columnHeader[i]);
if (flag5)
{
g.DrawString(this.columnHeader[i], this.Font, this.headerBrush, layoutRectangle2, this.sf);
}
}
}
}
g.DrawLine(this.borderPen, 0, 0, width - 1, 0);
bool flag6 = this.headHeight > 0f;
if (flag6)
{
g.DrawLine(this.borderPen, 0, (int)num, width - 1, (int)num);
}
for (int j = 1; j < this.rowsTotalCount; j++)
{
g.DrawLine(this.borderPen, 0, (int)((float)j * num2 + num), width - 1, (int)((float)j * num2 + num));
}
g.DrawLine(this.borderPen, 0f, height - 1f, (float)(width - 1), height - 1f);
g.DrawLine(this.borderPen, 0f, 0f, 0f, height - 1f);
g.DrawLine(this.borderPen, (float)(width - 1), 0f, (float)(width - 1), height - 1f);
for (int k = 0; k < this.columnWidth.Length - 1; k++)
{
g.DrawLine(this.borderPen, (float)((int)((float)width * this.columnWidth[k])), (float)((int)num), (float)((int)((float)width * this.columnWidth[k])), height - 1f);
}
for (int l = 0; l < this.tableValues.Count; l++)
{
for (int m = 0; m < this.columnHeader.Length; m++)
{
bool flag7 = m + 1 < this.columnWidth.Length;
if (flag7)
{
RectangleF rectangle = new RectangleF((float)width * this.columnWidth[m], num2 * (float)(l + (this.isShowColumnHeader ? 1 : 0)) + num, (float)width * (this.columnWidth[m + 1] - this.columnWidth[m]) - 1f, num2 - 1f);
bool flag8 = m < this.tableValues[l].Length;
if (flag8)
{
bool flag9 = this.OnDrawCellTextEvent == null;
if (flag9)
{
this.DrawCellText(g, l, m, rectangle, this.tableValues[l][m], this.sf);
}
else
{
this.OnDrawCellTextEvent(g, l, m, rectangle, this.tableValues[l][m], this.sf);
}
}
}
}
}
}
}
/// <summary>
/// 当绘制单元格的时候触发
/// </summary>
// Token: 0x1400000B RID: 11
// (add) Token: 0x060007C4 RID: 1988 RVA: 0x00044B04 File Offset: 0x00042D04
// (remove) Token: 0x060007C5 RID: 1989 RVA: 0x00044B3C File Offset: 0x00042D3C
public event HslTable.DrawCellTextDelegate OnDrawCellTextEvent;
/// <summary>
/// 绘制单元格是核心方法,你也可以根据自己的需求进行重写,实现一些特殊的图形或是颜色显示
/// </summary>
/// <param name="g">绘图上下文</param>
/// <param name="rowIndex">行索引</param>
/// <param name="colIndex">列索引</param>
/// <param name="rectangle">文本的区域</param>
/// <param name="value">文本的值</param>
/// <param name="sf">文本的对齐方式</param>
// Token: 0x060007C6 RID: 1990 RVA: 0x00044B71 File Offset: 0x00042D71
public virtual void DrawCellText(Graphics g, int rowIndex, int colIndex, RectangleF rectangle, string value, StringFormat sf)
{
g.DrawString(value, this.Font, this.textBrush, rectangle, sf);
}
/// <summary>
/// 从底部新增一条数据信息
/// </summary>
/// <param name="values">数据信息</param>
// Token: 0x060007C7 RID: 1991 RVA: 0x00044B8D File Offset: 0x00042D8D
public void AddRowDown(string[] values)
{
this.AddRowDown(new List<string[]>
{
values
});
}
/// <summary>
/// 从底部新增多条数据信息
/// </summary>
/// <param name="values">数据信息</param>
// Token: 0x060007C8 RID: 1992 RVA: 0x00044BA4 File Offset: 0x00042DA4
public void AddRowDown(List<string[]> values)
{
this.tableValues.AddRange(values);
bool flag = this.isShowColumnHeader;
if (flag)
{
while (this.tableValues.Count >= this.rowsTotalCount)
{
this.tableValues.RemoveAt(0);
}
}
else
{
while (this.tableValues.Count > this.rowsTotalCount)
{
this.tableValues.RemoveAt(0);
}
}
base.Invalidate();
}
/// <summary>
/// 从顶部新增一条数据信息
/// </summary>
/// <param name="values">数据信息</param>
// Token: 0x060007C9 RID: 1993 RVA: 0x00044C29 File Offset: 0x00042E29
public void AddRowTop(string[] values)
{
this.AddRowTop(new List<string[]>
{
values
});
}
/// <summary>
/// 从顶部新增一条数据信息
/// </summary>
/// <param name="values">数据信息</param>
// Token: 0x060007CA RID: 1994 RVA: 0x00044C40 File Offset: 0x00042E40
public void AddRowTop(List<string[]> values)
{
bool flag = values != null;
if (flag)
{
for (int i = 0; i < values.Count; i++)
{
this.tableValues.Insert(0, values[i]);
}
}
bool flag2 = this.isShowColumnHeader;
if (flag2)
{
while (this.tableValues.Count >= this.rowsTotalCount)
{
this.tableValues.RemoveAt(this.tableValues.Count - 1);
}
}
else
{
while (this.tableValues.Count > this.rowsTotalCount)
{
this.tableValues.RemoveAt(this.tableValues.Count - 1);
}
}
base.Invalidate();
}
/// <summary>
/// 设置表的所有的数据信息
/// </summary>
/// <param name="values">数据值</param>
// Token: 0x060007CB RID: 1995 RVA: 0x00044D09 File Offset: 0x00042F09
public void SetTableValue(List<string[]> values)
{
this.tableValues = values;
base.Invalidate();
}
/// <summary>
/// 设置当前的表格的指定单元的数据内容,需要传递单元格信息,数据值,是否刷新界面。
/// </summary>
/// <param name="rowIndex">所在的行号信息</param>
/// <param name="colIndex">所在的列号信息</param>
/// <param name="value">数据值</param>
/// <param name="updateUI">是否刷新界面</param>
// Token: 0x060007CC RID: 1996 RVA: 0x00044D1C File Offset: 0x00042F1C
public void SetTableValue(int rowIndex, int colIndex, string value, bool updateUI = true)
{
bool flag = rowIndex >= this.tableValues.Count;
if (!flag)
{
bool flag2 = colIndex >= this.tableValues[rowIndex].Length;
if (!flag2)
{
this.tableValues[rowIndex][colIndex] = value;
if (updateUI)
{
base.Invalidate();
}
}
}
}
/// <summary>
/// 获取指定行号列号的单元格的文本信息如果索引超出返回NULL
/// </summary>
/// <param name="rowIndex">行号信息</param>
/// <param name="colIndex">列号信息</param>
/// <returns>单元格文本信息</returns>
// Token: 0x060007CD RID: 1997 RVA: 0x00044D78 File Offset: 0x00042F78
public string GetTableValue(int rowIndex, int colIndex)
{
bool flag = rowIndex >= this.tableValues.Count;
string result;
if (flag)
{
result = null;
}
else
{
bool flag2 = colIndex >= this.tableValues[rowIndex].Length;
if (flag2)
{
result = null;
}
else
{
result = this.tableValues[rowIndex][colIndex];
}
}
return result;
}
/// <summary>
/// 获取所有的数据信息
/// </summary>
/// <returns>单元格文本信息</returns>
// Token: 0x060007CE RID: 1998 RVA: 0x00044DD0 File Offset: 0x00042FD0
public List<string[]> GetTableValue()
{
return this.tableValues;
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
// Token: 0x060007CF RID: 1999 RVA: 0x00044DE8 File Offset: 0x00042FE8
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
if (flag)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
// Token: 0x060007D0 RID: 2000 RVA: 0x00044E20 File Offset: 0x00043020
private void InitializeComponent()
{
base.SuspendLayout();
base.AutoScaleMode = AutoScaleMode.None;
this.BackColor = Color.Transparent;
this.Font = new Font("微软雅黑", 9f, FontStyle.Regular, GraphicsUnit.Point, 134);
this.ForeColor = Color.Gray;
base.Name = "HslTable";
base.Size = new Size(444, 206);
base.ResumeLayout(false);
}
// Token: 0x040003C7 RID: 967
private StringFormat sf = null;
// Token: 0x040003C8 RID: 968
private Color borderColor = Color.LightGray;
// Token: 0x040003C9 RID: 969
private Pen borderPen = new Pen(Color.LightGray);
// Token: 0x040003CA RID: 970
private Brush textBrush = new SolidBrush(Color.Gray);
// Token: 0x040003CB RID: 971
private Color headerColor = Color.DimGray;
// Token: 0x040003CC RID: 972
private Brush headerBrush = new SolidBrush(Color.DimGray);
// Token: 0x040003CD RID: 973
private Color topTextColor = Color.DarkSlateGray;
// Token: 0x040003CE RID: 974
private Brush topTextBrush = new SolidBrush(Color.DarkSlateGray);
// Token: 0x040003CF RID: 975
private float headTextSize = 18f;
// Token: 0x040003D0 RID: 976
private float headHeight = 0.25f;
// Token: 0x040003D1 RID: 977
private int rowsTotalCount = 5;
// Token: 0x040003D2 RID: 978
private float[] columnWidth = new float[]
{
0f,
0.3f,
0.45f,
0.55f,
0.8f,
1f
};
// Token: 0x040003D3 RID: 979
private string[] columnHeader = new string[]
{
"规格",
"生产数量",
"工艺",
"完成度",
"特别说明"
};
// Token: 0x040003D4 RID: 980
private string topHeaderText = "今日生产计划";
// Token: 0x040003D5 RID: 981
private string assistHeaderText = "9月2日";
// Token: 0x040003D6 RID: 982
private List<string[]> tableValues = new List<string[]>();
// Token: 0x040003D7 RID: 983
private bool isShowColumnHeader = true;
/// <summary>
/// 必需的设计器变量。
/// </summary>
// Token: 0x040003D8 RID: 984
private IContainer components = null;
/// <summary>
/// 绘制单元格的委托信息,可以自定义的实现一些高级的操作。
/// </summary>
/// <param name="g">绘图上下文</param>
/// <param name="rowIndex">行号</param>
/// <param name="colIndex">列号</param>
/// <param name="rectangle">绘图的区域</param>
/// <param name="value">本文内容</param>
/// <param name="sf"></param>
// Token: 0x020000FE RID: 254
// (Invoke) Token: 0x06000FCC RID: 4044
public delegate void DrawCellTextDelegate(Graphics g, int rowIndex, int colIndex, RectangleF rectangle, string value, StringFormat sf);
}
}

@ -0,0 +1,90 @@
namespace DNSD_Controls
{
partial class Nod
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.hslLanternSimple3 = new DNSD_Controls.HslLanternSimple();
this.hslLanternSimple2 = new DNSD_Controls.HslLanternSimple();
this.hslLanternSimple1 = new DNSD_Controls.HslLanternSimple();
this.hslArrow1 = new DNSD_Controls.HslArrow();
this.SuspendLayout();
//
// hslLanternSimple3
//
this.hslLanternSimple3.Location = new System.Drawing.Point(735, 15);
this.hslLanternSimple3.Name = "hslLanternSimple3";
this.hslLanternSimple3.Size = new System.Drawing.Size(64, 64);
this.hslLanternSimple3.TabIndex = 2;
//
// hslLanternSimple2
//
this.hslLanternSimple2.Location = new System.Drawing.Point(638, 15);
this.hslLanternSimple2.Name = "hslLanternSimple2";
this.hslLanternSimple2.Size = new System.Drawing.Size(64, 64);
this.hslLanternSimple2.TabIndex = 1;
//
// hslLanternSimple1
//
this.hslLanternSimple1.Location = new System.Drawing.Point(539, 15);
this.hslLanternSimple1.Name = "hslLanternSimple1";
this.hslLanternSimple1.Size = new System.Drawing.Size(64, 64);
this.hslLanternSimple1.TabIndex = 0;
//
// hslArrow1
//
this.hslArrow1.EdgeColor = System.Drawing.Color.Gray;
this.hslArrow1.FactorX = 0.75F;
this.hslArrow1.FactorY = 0.27F;
this.hslArrow1.Location = new System.Drawing.Point(24, 30);
this.hslArrow1.Name = "hslArrow1";
this.hslArrow1.Size = new System.Drawing.Size(111, 49);
this.hslArrow1.TabIndex = 3;
this.hslArrow1.Text = "进行中";
//
// Nod
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.hslArrow1);
this.Controls.Add(this.hslLanternSimple3);
this.Controls.Add(this.hslLanternSimple2);
this.Controls.Add(this.hslLanternSimple1);
this.Name = "Nod";
this.Size = new System.Drawing.Size(835, 101);
this.ResumeLayout(false);
}
#endregion
private HslLanternSimple hslLanternSimple1;
private HslLanternSimple hslLanternSimple2;
private HslLanternSimple hslLanternSimple3;
private HslArrow hslArrow1;
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DNSD_Controls
{
public partial class Nod : UserControl
{
public Nod()
{
InitializeComponent();
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,341 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace DNSD_Controls
{
/// <summary>
/// 参考坐标轴的转换器
/// </summary>
// Token: 0x02000026 RID: 38
public class ReferenceAxisConverter : TypeConverter
{
/// <inheritdoc />
// Token: 0x060003C9 RID: 969 RVA: 0x000297D0 File Offset: 0x000279D0
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
{
return TypeDescriptor.GetProperties(value, attributes);
}
/// <inheritdoc />
// Token: 0x060003CA RID: 970 RVA: 0x000297EC File Offset: 0x000279EC
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
{
return true;
}
}
/// <summary>
/// 参考坐标系的轴信息
/// </summary>
// Token: 0x02000025 RID: 37
[TypeConverter(typeof(ReferenceAxisConverter))]
public class ReferenceAxis
{
/// <summary>
/// 实例化一个默认的对象
/// </summary>
// Token: 0x060003B2 RID: 946 RVA: 0x0002952C File Offset: 0x0002772C
public ReferenceAxis()
{
this.Max = 100f;
this.Min = 0f;
this.Color = Color.LightGray;
this.Format = "{0}";
}
/// <summary>
/// 实例化一个默认的对象
/// </summary>
// Token: 0x060003B3 RID: 947 RVA: 0x00029566 File Offset: 0x00027766
public ReferenceAxis(UserControl userControl) : this()
{
this._control = userControl;
}
// Token: 0x060003B4 RID: 948 RVA: 0x00029577 File Offset: 0x00027777
public ReferenceAxis(float max, float min, bool useLog)
{
this.Max = max;
this.Min = min;
this.useLogarithms = useLog;
}
/// <summary>
/// 最大值
/// </summary>
// Token: 0x1700011F RID: 287
// (get) Token: 0x060003B5 RID: 949 RVA: 0x00029598 File Offset: 0x00027798
// (set) Token: 0x060003B6 RID: 950 RVA: 0x000295A0 File Offset: 0x000277A0
[Category("HslControls")]
[Description("获取或设置当前的Y轴的最大值")]
[Browsable(true)]
[DefaultValue(100f)]
public float Max
{
get
{
return this._max;
}
set
{
this._max = value;
UserControl control = this._control;
if (control != null)
{
control.Invalidate();
}
}
}
/// <summary>
/// 最小值
/// </summary>
// Token: 0x17000120 RID: 288
// (get) Token: 0x060003B7 RID: 951 RVA: 0x000295BC File Offset: 0x000277BC
// (set) Token: 0x060003B8 RID: 952 RVA: 0x000295C4 File Offset: 0x000277C4
[Category("HslControls")]
[Description("获取或设置当前的Y轴的最小值")]
[Browsable(true)]
[DefaultValue(0f)]
public float Min
{
get
{
return this._min;
}
set
{
this._min = value;
UserControl control = this._control;
if (control != null)
{
control.Invalidate();
}
}
}
/// <summary>
/// 单位信息
/// </summary>
// Token: 0x17000121 RID: 289
// (get) Token: 0x060003B9 RID: 953 RVA: 0x000295E0 File Offset: 0x000277E0
// (set) Token: 0x060003BA RID: 954 RVA: 0x000295E8 File Offset: 0x000277E8
[Category("HslControls")]
[Description("获取或设置当前的Y轴的单位值")]
[Browsable(true)]
[DefaultValue("")]
public string Unit
{
get
{
return this._unit;
}
set
{
this._unit = value;
UserControl control = this._control;
if (control != null)
{
control.Invalidate();
}
}
}
// Token: 0x17000122 RID: 290
// (get) Token: 0x060003BB RID: 955 RVA: 0x00029604 File Offset: 0x00027804
// (set) Token: 0x060003BC RID: 956 RVA: 0x0002960C File Offset: 0x0002780C
[Category("HslControls")]
[Description("是否使用对数的表示方式在开始对数的模式下无法表示小于等于0的数值对数以10为底数")]
[Browsable(true)]
[DefaultValue(false)]
public bool UseLogarithms
{
get
{
return this.useLogarithms;
}
set
{
this.useLogarithms = value;
UserControl control = this._control;
if (control != null)
{
control.Invalidate();
}
}
}
/// <summary>
/// 获取或设置当前的坐标系的颜色信息
/// </summary>
// Token: 0x17000123 RID: 291
// (get) Token: 0x060003BD RID: 957 RVA: 0x00029628 File Offset: 0x00027828
// (set) Token: 0x060003BE RID: 958 RVA: 0x00029630 File Offset: 0x00027830
[Category("HslControls")]
[Description("获取或设置当前的坐标系的颜色信息")]
[Browsable(true)]
[DefaultValue(typeof(Color), "LightGray")]
public Color Color
{
get
{
return this._color;
}
set
{
this._color = value;
Brush brush = this.Brush;
if (brush != null)
{
brush.Dispose();
}
this.Brush = new SolidBrush(this._color);
Pen pen = this._pen;
if (pen != null)
{
pen.Dispose();
}
this._pen = new Pen(this._color, 1f);
UserControl control = this._control;
if (control != null)
{
control.Invalidate();
}
}
}
/// <summary>
/// 获取或设置当前坐标轴数字的格式化信息,默认为 {0}, 直接转字符串
/// </summary>
// Token: 0x17000124 RID: 292
// (get) Token: 0x060003BF RID: 959 RVA: 0x000296A3 File Offset: 0x000278A3
// (set) Token: 0x060003C0 RID: 960 RVA: 0x000296AB File Offset: 0x000278AB
[Category("HslControls")]
[Description("获取或设置当前坐标轴数字的格式化信息,默认为 {0}, 直接转字符串")]
[Browsable(true)]
[DefaultValue("{0}")]
public string Format
{
get
{
return this._format;
}
set
{
this._format = value;
UserControl control = this._control;
if (control != null)
{
control.Invalidate();
}
}
}
/// <summary>
/// 获取画笔信息
/// </summary>
/// <returns>画笔信息</returns>
// Token: 0x060003C1 RID: 961 RVA: 0x000296C8 File Offset: 0x000278C8
public Pen GetPen()
{
bool flag = this._pen != null;
Pen pen;
if (flag)
{
pen = this._pen;
}
else
{
this._pen = new Pen(this.Color, 1f);
pen = this._pen;
}
return pen;
}
// Token: 0x060003C2 RID: 962 RVA: 0x0002970C File Offset: 0x0002790C
public bool IsUseLogarithms()
{
return this.useLogarithms && this._max > 0f && this._min > 0f;
}
// Token: 0x060003C3 RID: 963 RVA: 0x00029744 File Offset: 0x00027944
public float GetCalculateMax()
{
bool flag = this.IsUseLogarithms();
float result;
if (flag)
{
result = (float)Math.Log10((double)this.Max);
}
else
{
result = this.Max;
}
return result;
}
// Token: 0x060003C4 RID: 964 RVA: 0x00029778 File Offset: 0x00027978
public float GetCalculateMin()
{
bool flag = this.IsUseLogarithms();
float result;
if (flag)
{
result = (float)Math.Log10((double)this.Min);
}
else
{
result = this.Min;
}
return result;
}
// Token: 0x060003C5 RID: 965 RVA: 0x000297AB File Offset: 0x000279AB
public void SetMaxValue(float value)
{
this._max = value;
}
// Token: 0x060003C6 RID: 966 RVA: 0x000297B5 File Offset: 0x000279B5
public void SetMinValue(float value)
{
this._min = value;
}
/// <summary>
/// 画刷资源
/// </summary>
// Token: 0x17000125 RID: 293
// (get) Token: 0x060003C7 RID: 967 RVA: 0x000297BF File Offset: 0x000279BF
// (set) Token: 0x060003C8 RID: 968 RVA: 0x000297C7 File Offset: 0x000279C7
[Browsable(false)]
public Brush Brush { get; set; }
// Token: 0x040001CC RID: 460
private float _max;
// Token: 0x040001CD RID: 461
private float _min;
// Token: 0x040001CE RID: 462
private string _unit;
// Token: 0x040001CF RID: 463
private string _format;
// Token: 0x040001D0 RID: 464
private Color _color;
// Token: 0x040001D1 RID: 465
private UserControl _control;
// Token: 0x040001D2 RID: 466
private Pen _pen;
// Token: 0x040001D3 RID: 467
private bool useLogarithms;
}
}
Loading…
Cancel
Save