public sealed partial class Form1 : Form { // 蓄積するデータ private List<double> upperList = new List<double>(); private List<double> lowerList = new List<double>(); private Random random; private Timer timer;
public Form1() { InitializeComponent(); this.random = new Random(); (this.components ?? (this.components = new System.ComponentModel.Container())).Add(this.timer = new Timer() { Interval = 1000 }); this.Controls.Add(this.cycleTimeBar = new TrackBar() { Name = "trackBar", Minimum = CycleTimeMinValue, Maximum = CycleTimeMaxValue, Value = CycleTimeIniValue, Dock = DockStyle.Top }); this.Controls.Add(this.labelValue = new Label() { Name = "labelValue", Text = this.cycleTimeBar.Value.ToString(), Dock = DockStyle.Top }); this.labelValue.DataBindings.Add("Text", this.cycleTimeBar, "Value");
this.upperChart = this.CreateChart(this.cycleTimeBar.Value); this.upperChart.Location = new System.Drawing.Point(280, 250); this.lowerChart = this.CreateChart(this.cycleTimeBar.Value); this.lowerChart.Location = new System.Drawing.Point(280, 530);