Commit aefbc688 HZH

add Wave and WaveChart

1 个父辈 97646b42
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls.Controls
{
public class UCWave : Control
{
private Color m_waveColor = Color.FromArgb(73, 119, 232);
[Description("波纹颜色"), Category("自定义")]
public Color WaveColor
{
get { return m_waveColor; }
set { m_waveColor = value; }
}
private int m_waveWidth = 200;
/// <summary>
/// 为方便计算,强制使用10的倍数
/// </summary>
[Description("波纹宽度(为方便计算,强制使用10的倍数)"), Category("自定义")]
public int WaveWidth
{
get { return m_waveWidth; }
set
{
m_waveWidth = value;
m_waveWidth = m_waveWidth / 10 * 10;
intLeftX = value * -1;
}
}
private int m_waveHeight = 30;
/// <summary>
/// 波高
/// </summary>
[Description("波高"), Category("自定义")]
public int WaveHeight
{
get { return m_waveHeight; }
set { m_waveHeight = value; }
}
private int m_waveSleep = 50;
/// <summary>
/// 波运行速度(运行时间间隔,毫秒)
/// </summary>
[Description("波运行速度(运行时间间隔,毫秒)"), Category("自定义")]
public int WaveSleep
{
get { return m_waveSleep; }
set
{
if (value <= 0)
return;
m_waveSleep = value;
if (timer != null)
{
timer.Enabled = false;
timer.Interval = value;
timer.Enabled = true;
}
}
}
Timer timer = new Timer();
int intLeftX = -200;
public UCWave()
{
this.Size = new Size(600, 100);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.SetStyle(ControlStyles.UserPaint, true);
timer.Interval = m_waveSleep;
timer.Tick += timer_Tick;
this.VisibleChanged += UCWave_VisibleChanged;
}
void UCWave_VisibleChanged(object sender, EventArgs e)
{
timer.Enabled = this.Visible;
}
void timer_Tick(object sender, EventArgs e)
{
intLeftX -= 10;
if (intLeftX == m_waveWidth * -2)
intLeftX = m_waveWidth * -1;
this.Refresh();
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
var g = e.Graphics;
g.SetGDIHigh();
List<Point> lst1 = new List<Point>();
List<Point> lst2 = new List<Point>();
int m_intX = intLeftX;
while (true)
{
lst1.Add(new Point(m_intX, 1));
lst1.Add(new Point(m_intX + m_waveWidth / 2, m_waveHeight));
lst2.Add(new Point(m_intX + m_waveWidth / 4, 1));
lst2.Add(new Point(m_intX + m_waveWidth / 4 + m_waveWidth / 2, m_waveHeight));
m_intX += m_waveWidth;
if (m_intX > this.Width + m_waveWidth)
break;
}
GraphicsPath path1 = new GraphicsPath();
path1.AddCurve(lst1.ToArray(), 0.5F);
path1.AddLine(this.Width + 1, -1, this.Width + 1, this.Height);
path1.AddLine(this.Width + 1, this.Height, -1, this.Height);
path1.AddLine(-1, this.Height, -1, -1);
GraphicsPath path2 = new GraphicsPath();
path2.AddCurve(lst2.ToArray(), 0.5F);
path2.AddLine(this.Width + 1, -1, this.Width + 1, this.Height);
path2.AddLine(this.Width + 1, this.Height, -1, this.Height);
path2.AddLine(-1, this.Height, -1, -1);
g.FillPath(new SolidBrush(Color.FromArgb(220, m_waveColor.R, m_waveColor.G, m_waveColor.B)), path1);
g.FillPath(new SolidBrush(Color.FromArgb(220, m_waveColor.R, m_waveColor.G, m_waveColor.B)), path2);
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls.Controls
{
public class UCWaveWithSource : UCControlBase
{
private int m_waveActualWidth = 50;
private int m_waveWidth = 50;
[Description("波形宽度"), Category("自定义")]
public int WaveWidth
{
get { return m_waveWidth; }
set
{
if (value <= 0)
return;
m_waveWidth = value;
ResetWaveCount();
Refresh();
}
}
private int m_sleepTime = 1000;
/// <summary>
/// 波运行速度(运行时间间隔,毫秒)
/// </summary>
[Description("运行速度(运行时间间隔,毫秒)"), Category("自定义")]
public int SleepTime
{
get { return m_sleepTime; }
set
{
if (value <= 0)
return;
m_sleepTime = value;
if (timer != null)
{
timer.Enabled = false;
timer.Interval = value;
timer.Enabled = true;
}
}
}
private float m_lineTension = 0.5f;
/// <summary>
/// 线弯曲程度
/// </summary>
[Description("线弯曲程度(0-1)"), Category("自定义")]
public float LineTension
{
get { return m_lineTension; }
set
{
if (!(value >= 0 && value <= 1))
{
return;
}
m_lineTension = value;
Refresh();
}
}
private Color m_lineColor = Color.FromArgb(150, 73, 119, 232);
[Description("曲线颜色"), Category("自定义")]
public Color LineColor
{
get { return m_lineColor; }
set
{
m_lineColor = value;
Refresh();
}
}
private Color m_gridLineColor = Color.FromArgb(50, 73, 119, 232);
[Description("网格线颜色"), Category("自定义")]
public Color GridLineColor
{
get { return m_gridLineColor; }
set
{
m_gridLineColor = value;
Refresh();
}
}
private Color m_gridLineTextColor = Color.FromArgb(150, 73, 119, 232);
[Description("网格文本颜色"), Category("自定义")]
public Color GridLineTextColor
{
get { return m_gridLineTextColor; }
set
{
m_gridLineTextColor = value;
Refresh();
}
}
public override Font Font
{
get
{
return base.Font;
}
set
{
base.Font = value;
}
}
/// <summary>
/// 数据源,用以缓存所有需要显示的数据
/// </summary>
List<KeyValuePair<string, double>> m_dataSource = new List<KeyValuePair<string, double>>();
/// <summary>
/// 当前需要显示的数据
/// </summary>
List<KeyValuePair<string, double>> m_currentSource = new List<KeyValuePair<string, double>>();
Timer timer = new Timer();
/// <summary>
/// 画图区域
/// </summary>
Rectangle m_drawRect;
int m_waveCount = 0;
public UCWaveWithSource()
{
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SizeChanged += UCWaveWithSource_SizeChanged;
this.IsShowRect = true;
this.RectColor = Color.FromArgb(232, 232, 232);
this.FillColor = Color.FromArgb(197, 229, 250);
this.RectWidth = 1;
this.ConerRadius = 10;
this.IsRadius = true;
this.Size = new Size(300, 200);
timer.Interval = m_sleepTime;
timer.Tick += timer_Tick;
this.VisibleChanged += UCWave_VisibleChanged;
}
/// <summary>
/// 添加需要显示的数据
/// </summary>
/// <param name="key">名称</param>
/// <param name="value">值</param>
public void AddSource(string key, double value)
{
m_dataSource.Add(new KeyValuePair<string, double>(key, value));
}
void UCWave_VisibleChanged(object sender, EventArgs e)
{
if (!DesignMode)
{
timer.Enabled = this.Visible;
}
}
void timer_Tick(object sender, EventArgs e)
{
m_currentSource = GetCurrentList();
m_dataSource.RemoveAt(0);
this.Refresh();
}
void UCWaveWithSource_SizeChanged(object sender, EventArgs e)
{
m_drawRect = new Rectangle(60, 20, this.Width - 80, this.Height - 60);
ResetWaveCount();
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
var g = e.Graphics;
g.SetGDIHigh();
int intLineSplit = m_drawRect.Height / 4;
for (int i = 0; i <= 4; i++)
{
var pen = new Pen(new SolidBrush(m_gridLineColor), 1);
// pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
g.DrawLine(pen, m_drawRect.Left, m_drawRect.Bottom - 1 - i * intLineSplit, m_drawRect.Right, m_drawRect.Bottom - 1 - i * intLineSplit);
}
if (m_currentSource == null || m_currentSource.Count <= 0)
{
for (int i = 0; i <= 4; i++)
{
string strText = (100 / 4 * i).ToString();
System.Drawing.SizeF _numSize = g.MeasureString(strText, this.Font);
g.DrawString(strText, Font, new SolidBrush(m_gridLineTextColor), m_drawRect.Left - _numSize.Width - 1, m_drawRect.Bottom - 1 - i * intLineSplit - (_numSize.Height / 2));
}
return;
}
List<Point> lst1 = new List<Point>();
double dblValue = m_currentSource.Max(p => p.Value);
int intValue = (int)dblValue;
int intDivisor = ("1".PadRight(intValue.ToString().Length - 1, '0')).ToInt();
if (intDivisor < 100)
intDivisor = 100;
int intTop = intValue;
if (intValue % intDivisor != 0)
{
intTop = (intValue / intDivisor + 1) * intDivisor;
}
if (intTop == 0)
intTop = 100;
for (int i = 0; i <= 4; i++)
{
string strText = (intTop / 4 * i).ToString();
System.Drawing.SizeF _numSize = g.MeasureString(strText, this.Font);
g.DrawString(strText, Font, new SolidBrush(m_gridLineTextColor), m_drawRect.Left - _numSize.Width - 1, m_drawRect.Bottom - 1 - i * intLineSplit - (_numSize.Height / 2));
}
int intEndX = 0;
int intEndY = 0;
for (int i = 0; i < m_currentSource.Count; i++)
{
intEndX = i * m_waveActualWidth + m_drawRect.X;
intEndY = m_drawRect.Bottom - 1 - (int)(m_currentSource[i].Value / intTop * m_drawRect.Height);
lst1.Add(new Point(intEndX, intEndY));
if (!string.IsNullOrEmpty(m_currentSource[i].Key))
{
System.Drawing.SizeF _numSize = g.MeasureString(m_currentSource[i].Key, this.Font);
int txtX = intEndX - (int)(_numSize.Width / 2) + 1;
g.DrawString(m_currentSource[i].Key, Font, new SolidBrush(m_gridLineTextColor), new PointF(txtX, m_drawRect.Bottom + 5));
}
}
int intFirstY = m_drawRect.Bottom - 1 - (int)(m_currentSource[0].Value / intTop * m_drawRect.Height);
GraphicsPath path1 = new GraphicsPath();
path1.AddCurve(lst1.ToArray(), m_lineTension);
g.DrawPath(new Pen(new SolidBrush(m_lineColor), 1), path1);
}
/// <summary>
/// 得到当前需要画图的数据
/// </summary>
/// <returns></returns>
private List<KeyValuePair<string, double>> GetCurrentList()
{
if (m_dataSource.Count < m_waveCount)
{
int intCount = m_waveCount - m_dataSource.Count;
for (int i = 0; i < intCount; i++)
{
m_dataSource.Add(new KeyValuePair<string, double>("", 0));
}
}
var lst = m_dataSource.GetRange(0, m_waveCount);
if (lst.Count == 1)
lst.Insert(0, new KeyValuePair<string, double>("", 0));
return lst;
}
/// <summary>
/// 计算需要显示的个数
/// </summary>
private void ResetWaveCount()
{
m_waveCount = m_drawRect.Width / m_waveWidth;
m_waveActualWidth = m_waveWidth + (m_drawRect.Width % m_waveWidth) / m_waveCount;
m_waveCount++;
if (m_dataSource.Count < m_waveCount)
{
int intCount = m_waveCount - m_dataSource.Count;
for (int i = 0; i < intCount; i++)
{
m_dataSource.Insert(0, new KeyValuePair<string, double>("", 0));
}
}
}
}
}
......@@ -154,6 +154,12 @@
<Compile Include="Controls\Tab\TabControlExt.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Wave\UCWaveChart.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Wave\UCWave.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Helpers\ControlHelper.cs" />
<Compile Include="Controls\Btn\UCBtnExt.cs">
<SubType>UserControl</SubType>
......
......@@ -28,8 +28,16 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2));
this.timer1 = new System.Windows.Forms.Timer();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.label1 = new System.Windows.Forms.Label();
this.trackBar2 = new System.Windows.Forms.TrackBar();
this.label2 = new System.Windows.Forms.Label();
this.trackBar3 = new System.Windows.Forms.TrackBar();
this.label3 = new System.Windows.Forms.Label();
this.ucWave1 = new HZH_Controls.Controls.UCWave();
this.ucProcessLineExt1 = new HZH_Controls.Controls.UCProcessLineExt();
this.ucProcessLine1 = new HZH_Controls.Controls.UCProcessLine();
this.ucSwitch10 = new HZH_Controls.Controls.UCSwitch();
......@@ -48,6 +56,10 @@
this.ucPanelTitle1 = new HZH_Controls.Controls.UCPanelTitle();
this.ucStep2 = new HZH_Controls.Controls.UCStep();
this.ucStep1 = new HZH_Controls.Controls.UCStep();
this.ucWaveWithSource1 = new HZH_Controls.Controls.UCWaveWithSource();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar3)).BeginInit();
this.SuspendLayout();
//
// timer1
......@@ -55,11 +67,90 @@
this.timer1.Enabled = true;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// trackBar1
//
this.trackBar1.Location = new System.Drawing.Point(249, 423);
this.trackBar1.Maximum = 100;
this.trackBar1.Minimum = 10;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(350, 45);
this.trackBar1.SmallChange = 10;
this.trackBar1.TabIndex = 8;
this.trackBar1.TickFrequency = 10;
this.trackBar1.Value = 50;
this.trackBar1.Scroll += new System.EventHandler(this.trackBar1_Scroll);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(390, 456);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 9;
this.label1.Text = "波速度";
//
// trackBar2
//
this.trackBar2.Location = new System.Drawing.Point(249, 474);
this.trackBar2.Maximum = 50;
this.trackBar2.Minimum = 10;
this.trackBar2.Name = "trackBar2";
this.trackBar2.Size = new System.Drawing.Size(350, 45);
this.trackBar2.SmallChange = 10;
this.trackBar2.TabIndex = 8;
this.trackBar2.TickFrequency = 10;
this.trackBar2.Value = 30;
this.trackBar2.Scroll += new System.EventHandler(this.trackBar2_Scroll);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(390, 510);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 9;
this.label2.Text = "波高";
//
// trackBar3
//
this.trackBar3.Location = new System.Drawing.Point(249, 537);
this.trackBar3.Maximum = 300;
this.trackBar3.Minimum = 50;
this.trackBar3.Name = "trackBar3";
this.trackBar3.Size = new System.Drawing.Size(350, 45);
this.trackBar3.SmallChange = 50;
this.trackBar3.TabIndex = 8;
this.trackBar3.TickFrequency = 50;
this.trackBar3.Value = 200;
this.trackBar3.Scroll += new System.EventHandler(this.trackBar3_Scroll);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(390, 573);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 9;
this.label3.Text = "波宽";
//
// ucWave1
//
this.ucWave1.Location = new System.Drawing.Point(249, 337);
this.ucWave1.Name = "ucWave1";
this.ucWave1.Size = new System.Drawing.Size(350, 74);
this.ucWave1.TabIndex = 7;
this.ucWave1.Text = "ucWave1";
this.ucWave1.WaveColor = System.Drawing.Color.FromArgb(((int)(((byte)(73)))), ((int)(((byte)(119)))), ((int)(((byte)(232)))));
this.ucWave1.WaveHeight = 30;
this.ucWave1.WaveSleep = 50;
this.ucWave1.WaveWidth = 200;
//
// ucProcessLineExt1
//
this.ucProcessLineExt1.BackColor = System.Drawing.Color.Transparent;
this.ucProcessLineExt1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.ucProcessLineExt1.Location = new System.Drawing.Point(406, 287);
this.ucProcessLineExt1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.ucProcessLineExt1.Location = new System.Drawing.Point(406, 253);
this.ucProcessLineExt1.MaxValue = 100;
this.ucProcessLineExt1.Name = "ucProcessLineExt1";
this.ucProcessLineExt1.Size = new System.Drawing.Size(269, 50);
......@@ -73,7 +164,7 @@
this.ucProcessLine1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.ucProcessLine1.Font = new System.Drawing.Font("Arial Unicode MS", 10F);
this.ucProcessLine1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.ucProcessLine1.Location = new System.Drawing.Point(406, 224);
this.ucProcessLine1.Location = new System.Drawing.Point(406, 204);
this.ucProcessLine1.MaxValue = 150;
this.ucProcessLine1.Name = "ucProcessLine1";
this.ucProcessLine1.Size = new System.Drawing.Size(269, 32);
......@@ -335,11 +426,41 @@
this.ucStep1.StepWidth = 35;
this.ucStep1.TabIndex = 0;
//
// ucWaveWithSource1
//
this.ucWaveWithSource1.ConerRadius = 10;
this.ucWaveWithSource1.EnabledTheme = false;
this.ucWaveWithSource1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(229)))), ((int)(((byte)(250)))));
this.ucWaveWithSource1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.ucWaveWithSource1.GridLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(73)))), ((int)(((byte)(119)))), ((int)(((byte)(232)))));
this.ucWaveWithSource1.GridLineTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(73)))), ((int)(((byte)(119)))), ((int)(((byte)(232)))));
this.ucWaveWithSource1.IsRadius = true;
this.ucWaveWithSource1.IsShowRect = true;
this.ucWaveWithSource1.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(73)))), ((int)(((byte)(119)))), ((int)(((byte)(232)))));
this.ucWaveWithSource1.LineTension = 0.5F;
this.ucWaveWithSource1.Location = new System.Drawing.Point(756, 14);
this.ucWaveWithSource1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucWaveWithSource1.Name = "ucWaveWithSource1";
this.ucWaveWithSource1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
this.ucWaveWithSource1.RectWidth = 1;
this.ucWaveWithSource1.Size = new System.Drawing.Size(586, 182);
this.ucWaveWithSource1.TabIndex = 10;
this.ucWaveWithSource1.SleepTime = 1000;
this.ucWaveWithSource1.WaveWidth = 50;
//
// Form2
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(825, 594);
this.ClientSize = new System.Drawing.Size(1438, 594);
this.Controls.Add(this.ucWaveWithSource1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.trackBar3);
this.Controls.Add(this.trackBar2);
this.Controls.Add(this.trackBar1);
this.Controls.Add(this.ucWave1);
this.Controls.Add(this.ucProcessLineExt1);
this.Controls.Add(this.ucProcessLine1);
this.Controls.Add(this.ucSwitch10);
......@@ -361,7 +482,11 @@
this.Name = "Form2";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form2";
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar3)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
......@@ -386,5 +511,13 @@
private HZH_Controls.Controls.UCStep ucStep2;
private HZH_Controls.Controls.UCProcessLine ucProcessLine1;
private HZH_Controls.Controls.UCProcessLineExt ucProcessLineExt1;
private HZH_Controls.Controls.UCWave ucWave1;
private System.Windows.Forms.TrackBar trackBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TrackBar trackBar2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TrackBar trackBar3;
private System.Windows.Forms.Label label3;
private HZH_Controls.Controls.UCWaveWithSource ucWaveWithSource1;
}
}
\ No newline at end of file
......@@ -19,6 +19,7 @@ namespace Test
private void button1_Click(object sender, EventArgs e)
{
this.ucStep1.StepIndex = 3;
}
private void timer1_Tick(object sender, EventArgs e)
......@@ -36,6 +37,27 @@ namespace Test
this.ucProcessLine1.Value = 0;
if (this.ucProcessLineExt1.Value >= this.ucProcessLineExt1.MaxValue)
this.ucProcessLineExt1.Value = 0;
Random r = new Random();
int i = r.Next(100, 1000);
this.ucWaveWithSource1.AddSource(i.ToString(), i);
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
this.ucWave1.WaveSleep = trackBar1.Value;
}
private void trackBar2_Scroll(object sender, EventArgs e)
{
this.ucWave1.WaveHeight = trackBar2.Value;
}
private void trackBar3_Scroll(object sender, EventArgs e)
{
this.ucWave1.WaveWidth = trackBar3.Value;
}
}
}
......@@ -31,6 +31,7 @@ namespace Test
this.ucListView1.Page = page;
//不使用分页控件
//this.ucListView1.DataSource = lstSource;
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!