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 Mesnac.Controls.ChemicalWeighing
{
public partial class HwProgressBar : UserControl
{
private int _val;//进度值
private int _maxNum;//最大值
public HwProgressBar()
{
InitializeComponent();
}
public string MaxName { get; set; }
public string ValName { get; set; }
///
/// 当前值
///
public int Val
{
get => _val;
set
{
_val = value;
}
}
///
/// 最大值
///
public int MaxNumValue
{
get => _maxNum;
set
{
_maxNum = value;
}
}
protected override void OnPaint(PaintEventArgs e)
{
this.xProgressBar1.Maximum = _maxNum;
this.xProgressBar1.Value = _val;
}
}
}