From 42dc1d36235292786322d28340a81c6cb3fd46c0 Mon Sep 17 00:00:00 2001 From: hurter Date: Wed, 31 Aug 2011 16:25:05 +0000 Subject: --- ProjectedStripBoard/FormDeltaParam.cs | 76 +++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 ProjectedStripBoard/FormDeltaParam.cs (limited to 'ProjectedStripBoard/FormDeltaParam.cs') diff --git a/ProjectedStripBoard/FormDeltaParam.cs b/ProjectedStripBoard/FormDeltaParam.cs new file mode 100644 index 0000000..6c8fbbd --- /dev/null +++ b/ProjectedStripBoard/FormDeltaParam.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace ProjectedStripBoard +{ + public partial class FormDeltaParam : Form + { + FormProjectedStripBoard MyFormProjectedStripBoard; + + public FormDeltaParam(FormProjectedStripBoard myFormProjectedStripBoard) + { + InitializeComponent(); + MyFormProjectedStripBoard = myFormProjectedStripBoard; + } + + private void numericUpDownMinX_ValueChanged(object sender, EventArgs e) + { + //Get the data + float dx = (float) numericUpDownDx.Value; + float dy = (float)numericUpDownDy.Value; + float MarkerHeight = (float)numericUpDownMarkerHeight.Value; + float MarkerWidth = (float)numericUpDownMarkerWidth.Value; + float MinX = (float)numericUpDownMinX.Value; + float MinY = (float)numericUpDownMinY.Value; + float MaxX = (float)numericUpDownMaxX.Value; + float MaxY = (float)numericUpDownMaxY.Value; + + + //Populate the data + if ( MyFormProjectedStripBoard != null) + MyFormProjectedStripBoard.Set(dx,dy,MarkerHeight,MarkerWidth,MinX,MinY,MaxX,MaxY); + } + + private void FormDeltaParam_Load(object sender, EventArgs e) + { + + } + + /* f.populateData(ProjectedStrip.DX, + + ProjectedStrip.DY, + ProjectedStrip.MarkerWidth, + ProjectedStrip.MarkerHeight, + ProjectedStrip.TopLeft, + ProjectedStrip.BottomRight, Square); + */ + internal void populateData(float dx, float dy, float markerWidth, float markerHeight, OpenTK.Vector2 topleft, OpenTK.Vector2 bottomRight, OpenTK.Vector2[] Square) + { + textBox1.Text = ""; + string s = ""; + foreach (var item in Square) + { + s += item.X + ";" + item.Y + System.Environment.NewLine; + } + textBox1.Text = s; + + numericUpDownDx.Value = (decimal)dx; + numericUpDownDy.Value = (decimal)dy; + numericUpDownMarkerHeight.Value = (decimal)markerHeight; + numericUpDownMarkerWidth.Value = (decimal)markerWidth; + + + numericUpDownMinX.Value = (decimal)topleft.X; + numericUpDownMinY.Value = (decimal)topleft.Y; + numericUpDownMaxX.Value = (decimal)bottomRight.X; + numericUpDownMaxY.Value = (decimal)bottomRight.Y; + + } + } +} -- cgit v1.1