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; } } }