20130412-185001
This commit is contained in:
+75
-41
@@ -28,20 +28,22 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.Temp = new System.Windows.Forms.Label();
|
||||
this.chart = new System.Windows.Forms.DataVisualization.Charting.Chart();
|
||||
this.debug = new System.Windows.Forms.Label();
|
||||
this.heater = new System.Windows.Forms.Label();
|
||||
this.motor = new System.Windows.Forms.Label();
|
||||
this.tempbox = new System.Windows.Forms.TextBox();
|
||||
this.motorbox = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.tempbox = new System.Windows.Forms.NumericUpDown();
|
||||
this.motorbox = new System.Windows.Forms.NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tempbox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.motorbox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
@@ -66,26 +68,26 @@
|
||||
//
|
||||
// chart
|
||||
//
|
||||
chartArea1.Name = "ChartArea1";
|
||||
this.chart.ChartAreas.Add(chartArea1);
|
||||
chartArea3.Name = "ChartArea1";
|
||||
this.chart.ChartAreas.Add(chartArea3);
|
||||
this.chart.Location = new System.Drawing.Point(13, 134);
|
||||
this.chart.Name = "chart";
|
||||
series1.ChartArea = "ChartArea1";
|
||||
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
|
||||
series1.Color = System.Drawing.Color.Red;
|
||||
series1.IsVisibleInLegend = false;
|
||||
series1.Name = "Temp";
|
||||
series2.ChartArea = "ChartArea1";
|
||||
series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
|
||||
series2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
|
||||
series2.Name = "Motor";
|
||||
series3.ChartArea = "ChartArea1";
|
||||
series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
|
||||
series3.Color = System.Drawing.Color.Blue;
|
||||
series3.Name = "Heizung";
|
||||
this.chart.Series.Add(series1);
|
||||
this.chart.Series.Add(series2);
|
||||
this.chart.Series.Add(series3);
|
||||
series7.ChartArea = "ChartArea1";
|
||||
series7.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
|
||||
series7.Color = System.Drawing.Color.Red;
|
||||
series7.IsVisibleInLegend = false;
|
||||
series7.Name = "Temp";
|
||||
series8.ChartArea = "ChartArea1";
|
||||
series8.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
|
||||
series8.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
|
||||
series8.Name = "Motor";
|
||||
series9.ChartArea = "ChartArea1";
|
||||
series9.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
|
||||
series9.Color = System.Drawing.Color.Blue;
|
||||
series9.Name = "Heizung";
|
||||
this.chart.Series.Add(series7);
|
||||
this.chart.Series.Add(series8);
|
||||
this.chart.Series.Add(series9);
|
||||
this.chart.Size = new System.Drawing.Size(359, 122);
|
||||
this.chart.TabIndex = 2;
|
||||
this.chart.Text = "chart1";
|
||||
@@ -121,20 +123,6 @@
|
||||
this.motor.TabIndex = 5;
|
||||
this.motor.Text = "Motor";
|
||||
//
|
||||
// tempbox
|
||||
//
|
||||
this.tempbox.Location = new System.Drawing.Point(261, 76);
|
||||
this.tempbox.Name = "tempbox";
|
||||
this.tempbox.Size = new System.Drawing.Size(55, 20);
|
||||
this.tempbox.TabIndex = 6;
|
||||
//
|
||||
// motorbox
|
||||
//
|
||||
this.motorbox.Location = new System.Drawing.Point(261, 103);
|
||||
this.motorbox.Name = "motorbox";
|
||||
this.motorbox.Size = new System.Drawing.Size(55, 20);
|
||||
this.motorbox.TabIndex = 7;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(322, 76);
|
||||
@@ -145,14 +133,58 @@
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// tempbox
|
||||
//
|
||||
this.tempbox.Location = new System.Drawing.Point(261, 77);
|
||||
this.tempbox.Maximum = new decimal(new int[] {
|
||||
250,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.tempbox.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.tempbox.Name = "tempbox";
|
||||
this.tempbox.Size = new System.Drawing.Size(55, 20);
|
||||
this.tempbox.TabIndex = 9;
|
||||
this.tempbox.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
//
|
||||
// motorbox
|
||||
//
|
||||
this.motorbox.Location = new System.Drawing.Point(261, 104);
|
||||
this.motorbox.Maximum = new decimal(new int[] {
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.motorbox.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
this.motorbox.Name = "motorbox";
|
||||
this.motorbox.Size = new System.Drawing.Size(55, 20);
|
||||
this.motorbox.TabIndex = 10;
|
||||
this.motorbox.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
-2147483648});
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(384, 261);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.motorbox);
|
||||
this.Controls.Add(this.tempbox);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.motor);
|
||||
this.Controls.Add(this.heater);
|
||||
this.Controls.Add(this.debug);
|
||||
@@ -166,6 +198,8 @@
|
||||
this.Text = "Laminator GUI";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.close);
|
||||
((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tempbox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.motorbox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -179,9 +213,9 @@
|
||||
private System.Windows.Forms.Label debug;
|
||||
private System.Windows.Forms.Label heater;
|
||||
private System.Windows.Forms.Label motor;
|
||||
private System.Windows.Forms.TextBox tempbox;
|
||||
private System.Windows.Forms.TextBox motorbox;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.NumericUpDown tempbox;
|
||||
private System.Windows.Forms.NumericUpDown motorbox;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace Laminator_GUI
|
||||
private string tempText = "";
|
||||
private bool heaterBool = false;
|
||||
private bool motorBool = false;
|
||||
private string solltempText = "0";
|
||||
private string motorText = "0";
|
||||
private string solltempText = "-1";
|
||||
private string motorText = "-1";
|
||||
private Thread t;
|
||||
public delegate void InvokeDelegate();
|
||||
|
||||
@@ -93,13 +93,13 @@ namespace Laminator_GUI
|
||||
|
||||
private void InvokeMotorBox()
|
||||
{
|
||||
if (this.motorbox.Text == "" || this.motorbox.Text == "0")
|
||||
if (this.motorbox.Text == "" || this.motorbox.Text == "-1")
|
||||
this.motorbox.Text = this.motorText;
|
||||
}
|
||||
|
||||
private void InvokeTempBox()
|
||||
{
|
||||
if (this.tempbox.Text == "" || this.tempbox.Text == "0")
|
||||
if (this.tempbox.Text == "" || this.tempbox.Text == "-1")
|
||||
this.tempbox.Text = this.solltempText;
|
||||
}
|
||||
|
||||
@@ -163,10 +163,10 @@ namespace Laminator_GUI
|
||||
{
|
||||
this.serialPort.Write("m" + this.motorbox.Text.PadLeft(2, '0') + "\n");
|
||||
this.serialPort.Write("t" + this.tempbox.Text.PadLeft(3, '0') + "\n");
|
||||
this.motorbox.Text = "";
|
||||
this.motorText = "0";
|
||||
this.tempbox.Text = "";
|
||||
this.solltempText = "0";
|
||||
this.motorbox.Text = "-1";
|
||||
this.motorText = "-1";
|
||||
this.tempbox.Text = "-1";
|
||||
this.solltempText = "-1";
|
||||
}
|
||||
|
||||
private void close(object sender, FormClosedEventArgs e)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user