2using System.Collections.Generic;
3using System.ComponentModel;
8using System.Windows.Forms;
15 private void maxWidth_ValueChanged(
object sender, EventArgs e)
17 trackBar.Maximum = (int)((NumericUpDown)sender).Value;
18 label.Text = trackBar.Value.ToString();
21 public CutWidthsControl(
string name,
int width,
int maxWidth,
int demand, Color color, NumericUpDown nudMaxWidth)
23 InitializeComponent();
26 trackBar.Maximum = maxWidth;
27 trackBar.Value = width;
29 this.BackColor = color;
30 nudMaxWidth.ValueChanged +=
new System.EventHandler(maxWidth_ValueChanged);
33 private void trackBar_ValueChanged(
object sender, EventArgs e)
35 TrackBar tb = ((TrackBar)sender);
36 this.label.Text = tb.Value.ToString();
41 get {
return trackBar.Value; }
44 public int DemandValue
46 get {
return (
int) nud.Value; }