Skip to content

Instantly share code, notes, and snippets.

@hdf
Last active February 5, 2017 14:37
Show Gist options
  • Save hdf/b905c0f169b88ed00abbd045b0177cd2 to your computer and use it in GitHub Desktop.
Save hdf/b905c0f169b88ed00abbd045b0177cd2 to your computer and use it in GitHub Desktop.
RenderDLL
using System;
using System.Drawing;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
namespace ProgressViewer {
public partial class Form1 : Form {
private delegate void FPtr(string msg, string buff);
private delegate bool FPtr2();
private static class NativeMethods {
/*[DllImport("kernel32.dll")]
public static extern IntPtr LoadLibrary(string dllToLoad);
[DllImport("kernel32.dll")]
public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);
[DllImport("kernel32.dll")]
public static extern bool FreeLibrary(IntPtr hModule);*/
public static class asyncCalculatorLinux {
[DllImport("./judit1.so", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
internal static extern void asyncCalculator(FPtr cb, FPtr2 abortCb, bool partial, long begin, long end, long MMM, long NNN, double days, double xstart, double ystart, double xres, double yres);
}
public static class asyncCalculatorWindows {
[DllImport("judit1.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
internal static extern void asyncCalculator(FPtr cb, FPtr2 abortCb, bool partial, long begin, long end, long MMM, long NNN, double days, double xstart, double ystart, double xres, double yres);
}
}
private static void asyncCalculator(FPtr cb, FPtr2 abortCb, bool partial, long begin, long end, long MMM, long NNN, double days, double xstart, double ystart, double xres, double yres) {
try {
if (Environment.OSVersion.Platform == PlatformID.Unix)
NativeMethods.asyncCalculatorLinux.asyncCalculator(cb, abortCb, partial, begin, end, MMM, NNN, days, xstart, ystart, xres, yres);
else
NativeMethods.asyncCalculatorWindows.asyncCalculator(cb, abortCb, partial, begin, end, MMM, NNN, days, xstart, ystart, xres, yres);
} catch (DllNotFoundException) {
MessageBox.Show("DLL not found!");
} catch (BadImageFormatException) {
MessageBox.Show("DLL is of different architecture! (x86/x64)");
} finally {
EnableButton1();
frm1.timer1.Enabled = false;
}
}
private static Form1 frm1;
private static Thread thread;
private static ManualResetEventSlim allow = new ManualResetEventSlim();
private static Bitmap bmp = new Bitmap(1000, 1000); // Displayed
private static Bitmap bmp2 = new Bitmap(1000, 1000); // Paths
private static Bitmap bmp3; // Stable map
private static Object Bmp2Lock = new Object();
private static Object Bmp3Lock = new Object();
private static bool abort = false;
private static float PointScale = 2.0f;
private static bool DrawPaths = true;
//private static long counter = 0;
//http://paletton.com/
//private List<Pen> Pens = new List<Pen>(){
private static Pen[] Pens = {
new Pen(ColorTranslator.FromHtml("#43abc9"), 1.5f),
new Pen(ColorTranslator.FromHtml("#b5c689"), 1.5f),
new Pen(ColorTranslator.FromHtml("#cd594a"), 1.5f),
new Pen(ColorTranslator.FromHtml("#f58b4c"), 1.5f),
new Pen(ColorTranslator.FromHtml("#1496bb"), 1.5f),
new Pen(ColorTranslator.FromHtml("#a3b86c"), 1.5f),
new Pen(ColorTranslator.FromHtml("#c02f1d"), 1.5f),
new Pen(ColorTranslator.FromHtml("#f23d21"), 1.5f),
new Pen(ColorTranslator.FromHtml("#1287a8"), 1.5f),
new Pen(ColorTranslator.FromHtml("#93a661"), 1.5f),
new Pen(ColorTranslator.FromHtml("#ad2a1a"), 1.5f),
new Pen(ColorTranslator.FromHtml("#da621e"), 1.5f),
new Pen(ColorTranslator.FromHtml("#107896"), 1.5f),
new Pen(ColorTranslator.FromHtml("#829356"), 1.5f),
new Pen(ColorTranslator.FromHtml("#9a2617"), 1.5f),
new Pen(ColorTranslator.FromHtml("#c2571a"), 1.5f)
};
private static void processCb(string msg, string buff) {
//Console.Write("{0}", msg);
switch (msg) {
case "partial":
DrawData(buff);
break;
case "stable":
DrawStable(buff);
break;
case "finished":
Console.Write(" {0}", buff);
EnableButton1();
break;
}
}
private static bool abortCb() {
return abort;
}
private delegate void EnableButtonCB();
private static void EnableButton1() {
if (frm1.button1.InvokeRequired) {
EnableButtonCB d = new EnableButtonCB(EnableButton1);
frm1.Invoke(d);
} else {
frm1.button1.Enabled = true;
frm1.button2.Enabled = false;
frm1.button3.Enabled = false;
frm1.button3.Text = "Pause";
//frm1.timer1.Enabled = false;
}
}
private static void DrawStable(string buff) {
allow.Wait();
string[] data = buff.Split(new string[] { " \t " }, StringSplitOptions.RemoveEmptyEntries);
lock (Bmp3Lock)
using (Graphics g = Graphics.FromImage(bmp3)) {
g.FillCircle(new SolidBrush(Color.White),
(float)((double.Parse(data[0], CultureInfo.InvariantCulture) + 1.5) * (1000.0 / 3.0)),
(float)((double.Parse(data[2], CultureInfo.InvariantCulture) + 1.5) * (1000.0 / 3.0)),
PointScale);
}
lock (Bmp2Lock)
using (Graphics g = Graphics.FromImage(bmp2))
g.DrawImage(bmp3, 0, 0);
}
private static void DrawData(string buff) {
if (!DrawPaths) return;
allow.Wait();
string[] data = buff.Split(new string[] { " \t " }, StringSplitOptions.RemoveEmptyEntries);
lock (Bmp2Lock)
using (Graphics g = Graphics.FromImage(bmp2)) {
float x = (float)((double.Parse(data[data.Length - 8], CultureInfo.InvariantCulture) + 1.5) * (1000.0 / 3.0));
float y = (float)((double.Parse(data[data.Length - 6].Trim(), CultureInfo.InvariantCulture) + 1.5) * (1000.0 / 3.0));
g.DrawLine(Pens[int.Parse(data[data.Length - 1]) % 16],
x,
y,
x + 1,
y + 1
//(float)(x + ((double.Parse(data[data.Length - 7], CultureInfo.InvariantCulture) + 1.5) * (1000.0 / 3.0)) / 1000),
//(float)(y + ((double.Parse(data[data.Length - 5].Trim(), CultureInfo.InvariantCulture) + 1.5) * (1000.0 / 3.0)) / 1000)
);
}
}
private FPtr cb = new FPtr(processCb);
private FPtr2 aCb = new FPtr2(abortCb);
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
/*IntPtr pDll = LoadLibrary("judit1.dll");
if (pDll == IntPtr.Zero) MessageBox.Show("Dll not found!");
IntPtr pAddressOfFunctionToCall = GetProcAddress(pDll, "asyncCalculator");
if (pAddressOfFunctionToCall == IntPtr.Zero) MessageBox.Show("asyncCalculator function not found!");
asyncCalculator ac = (asyncCalculator)Marshal.GetDelegateForFunctionPointer(pAddressOfFunctionToCall, typeof(asyncCalculator));
MessageBox.Show("Now calling dll");
ac(cb);
MessageBox.Show("Called dll");
FreeLibrary(pDll);*/
frm1 = this;
using (Graphics g = Graphics.FromImage(bmp)) {
g.Clear(Color.Black);
}
pictureBox1.Image = bmp;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
button2_Click(sender, e);
while (!button1.Enabled) Application.DoEvents();
}
private void timer1_Tick(object sender, EventArgs e) {
lock (Bmp2Lock) {
using (Graphics g = Graphics.FromImage(bmp)) {
g.DrawImage(bmp2, 0, 0);
}
pictureBox1.Image = bmp;
//Console.WriteLine(counter.ToString());
}
}
private void button1_Click(object sender, EventArgs e) {
button1.Enabled = false;
abort = false;
//counter = 0;
bmp3 = new Bitmap(1000, 1000);
using (Graphics g = Graphics.FromImage(bmp2)) {
g.Clear(Color.Black);
g.FillCircle(new SolidBrush(Color.SeaGreen), 500, 500, 10); // Earth
g.FillCircle(new SolidBrush(Color.LightGray),
(float)((-1.381347637397253e-03 * 373.99467665 + 1.5) * (1000.0 / 3.0)),
(float)((-2.024995909893635e-03 * 373.99467665 + 1.5) * (1000.0 / 3.0)), 10 / 4); // Moon
}
timer1.Enabled = true;
thread = new Thread(new ThreadStart(() => {
asyncCalculator(cb, aCb, checkBox1.Checked,
long.Parse(textBox1.Text, CultureInfo.InvariantCulture),
long.Parse(textBox2.Text, CultureInfo.InvariantCulture),
long.Parse(textBox3.Text, CultureInfo.InvariantCulture),
long.Parse(textBox4.Text, CultureInfo.InvariantCulture),
double.Parse(textBox9.Text, CultureInfo.InvariantCulture),
double.Parse(textBox5.Text, CultureInfo.InvariantCulture),
double.Parse(textBox6.Text, CultureInfo.InvariantCulture),
double.Parse(textBox7.Text, CultureInfo.InvariantCulture),
double.Parse(textBox8.Text, CultureInfo.InvariantCulture)
);
}));
thread.Start();
allow.Set();
button2.Enabled = true;
button3.Enabled = true;
button3.Text = "Pause";
}
private void button2_Click(object sender, EventArgs e) {
//thread = null; // Does not work! Don't try this, it's impossible!
abort = true;
timer1.Enabled = false;
}
private void button3_Click(object sender, EventArgs e) {
if (button3.Text == "Pause") {
allow.Reset();
button3.Text = "Resume";
} else {
allow.Set();
button3.Text = "Pause";
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e) {
DrawPaths = checkBox1.Checked;
}
private static bool validate(object sender, KeyPressEventArgs e, string type = "integer") {
TextBoxBase txtBox = (TextBoxBase)sender;
if (type == "integer")
return (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar));
if (type == "float") {
if (!char.IsControl(e.KeyChar) && e.KeyChar == '-') {
int orig = txtBox.SelectionStart;
if (txtBox.Text[0] != '-') {
txtBox.Text = "-" + txtBox.Text;
txtBox.SelectionStart = orig + 1;
} else {
txtBox.Text = txtBox.Text.Substring(1);
txtBox.SelectionStart = orig - ((orig > 0) ? 1 : 0);
}
}
return (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && ((e.KeyChar != '.') || txtBox.Text.Split('.').Length - 1 > 1));
}
return false;
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e);
}
private void textBox2_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e);
}
private void textBox3_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e);
}
private void textBox4_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e);
}
private void textBox5_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e, "float");
}
private void textBox6_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e, "float");
}
private void textBox7_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e, "float");
}
private void textBox8_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e, "float");
}
private void textBox9_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e, "float");
}
private void textBox10_KeyPress(object sender, KeyPressEventArgs e) {
e.Handled = validate(sender, e, "float");
}
private void button4_Click(object sender, EventArgs e) {
bmp.Save(textBox11.Text, System.Drawing.Imaging.ImageFormat.Png);
MessageBox.Show("Saved!");
}
private void textBox10_TextChanged(object sender, EventArgs e) {
PointScale = float.Parse(textBox10.Text, CultureInfo.InvariantCulture);
}
}
public static class GraphicsExtensions {
public static void DrawCircle(this Graphics g, Pen pen,
float centerX, float centerY, float radius) {
g.DrawEllipse(pen, centerX - radius, centerY - radius,
radius + radius, radius + radius);
}
public static void FillCircle(this Graphics g, Brush brush,
float centerX, float centerY, float radius) {
g.FillEllipse(brush, centerX - radius, centerY - radius,
radius + radius, radius + radius);
}
}
}
namespace ProgressViewer {
partial class Form1 {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.Label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.label10 = new System.Windows.Forms.Label();
this.textBox10 = new System.Windows.Forms.TextBox();
this.button4 = new System.Windows.Forms.Button();
this.textBox11 = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// timer1
//
this.timer1.Interval = 30;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// pictureBox1
//
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(624, 350);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// Label1
//
this.Label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Label1.AutoSize = true;
this.Label1.Location = new System.Drawing.Point(3, 355);
this.Label1.Name = "Label1";
this.Label1.Size = new System.Drawing.Size(33, 13);
this.Label1.TabIndex = 1;
this.Label1.Text = "begin";
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 394);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(25, 13);
this.label2.TabIndex = 2;
this.label2.Text = "end";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(48, 355);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(34, 13);
this.label3.TabIndex = 3;
this.label3.Text = "MMM";
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(48, 394);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(31, 13);
this.label4.TabIndex = 4;
this.label4.Text = "NNN";
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(93, 355);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(32, 13);
this.label5.TabIndex = 5;
this.label5.Text = "xstart";
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(93, 394);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 13);
this.label6.TabIndex = 6;
this.label6.Text = "ystart";
//
// label7
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(138, 355);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(26, 13);
this.label7.TabIndex = 7;
this.label7.Text = "xres";
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(138, 394);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(26, 13);
this.label8.TabIndex = 8;
this.label8.Text = "yres";
//
// label9
//
this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(183, 355);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(29, 13);
this.label9.TabIndex = 9;
this.label9.Text = "days";
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button1.Location = new System.Drawing.Point(231, 356);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(65, 75);
this.button1.TabIndex = 20;
this.button1.Text = "Calculate";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox1.Location = new System.Drawing.Point(6, 371);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(39, 20);
this.textBox1.TabIndex = 10;
this.textBox1.Text = "0";
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);
//
// textBox2
//
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox2.Location = new System.Drawing.Point(6, 410);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(39, 20);
this.textBox2.TabIndex = 11;
this.textBox2.Text = "0";
this.textBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox2_KeyPress);
//
// textBox3
//
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox3.Location = new System.Drawing.Point(51, 371);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(39, 20);
this.textBox3.TabIndex = 12;
this.textBox3.Text = "10";
this.textBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox3_KeyPress);
//
// textBox4
//
this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox4.Location = new System.Drawing.Point(51, 410);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(39, 20);
this.textBox4.TabIndex = 13;
this.textBox4.Text = "10";
this.textBox4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox4_KeyPress);
//
// textBox5
//
this.textBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox5.Location = new System.Drawing.Point(96, 371);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(39, 20);
this.textBox5.TabIndex = 14;
this.textBox5.Text = "-1.15";
this.textBox5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox5_KeyPress);
//
// textBox6
//
this.textBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox6.Location = new System.Drawing.Point(96, 410);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(39, 20);
this.textBox6.TabIndex = 15;
this.textBox6.Text = "-0.4";
this.textBox6.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox6_KeyPress);
//
// textBox7
//
this.textBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox7.Location = new System.Drawing.Point(141, 371);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(39, 20);
this.textBox7.TabIndex = 16;
this.textBox7.Text = "0.45";
this.textBox7.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox7_KeyPress);
//
// textBox8
//
this.textBox8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox8.Location = new System.Drawing.Point(141, 410);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(39, 20);
this.textBox8.TabIndex = 17;
this.textBox8.Text = "0.65";
this.textBox8.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox8_KeyPress);
//
// textBox9
//
this.textBox9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox9.Location = new System.Drawing.Point(186, 371);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(39, 20);
this.textBox9.TabIndex = 18;
this.textBox9.Text = "200";
this.textBox9.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox9_KeyPress);
//
// button2
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button2.Enabled = false;
this.button2.Location = new System.Drawing.Point(302, 356);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(65, 75);
this.button2.TabIndex = 21;
this.button2.Text = "Abort";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button3.Enabled = false;
this.button3.Location = new System.Drawing.Point(373, 356);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(65, 75);
this.button3.TabIndex = 22;
this.button3.Text = "Pause";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// checkBox1
//
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox1.Location = new System.Drawing.Point(444, 356);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(80, 17);
this.checkBox1.TabIndex = 19;
this.checkBox1.Text = "Draw paths";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// label10
//
this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(444, 394);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(59, 13);
this.label10.TabIndex = 23;
this.label10.Text = "Point scale";
//
// textBox10
//
this.textBox10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox10.Location = new System.Drawing.Point(447, 410);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(77, 20);
this.textBox10.TabIndex = 24;
this.textBox10.Text = "2";
this.textBox10.TextChanged += new System.EventHandler(this.textBox10_TextChanged);
this.textBox10.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox10_KeyPress);
//
// button4
//
this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.button4.Location = new System.Drawing.Point(530, 356);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(82, 51);
this.button4.TabIndex = 25;
this.button4.Text = "Save as PNG";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// textBox11
//
this.textBox11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.textBox11.Location = new System.Drawing.Point(530, 410);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(82, 20);
this.textBox11.TabIndex = 26;
this.textBox11.Text = "RenderDll.png";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(624, 442);
this.Controls.Add(this.textBox11);
this.Controls.Add(this.button4);
this.Controls.Add(this.textBox10);
this.Controls.Add(this.label10);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.textBox9);
this.Controls.Add(this.textBox8);
this.Controls.Add(this.textBox7);
this.Controls.Add(this.textBox6);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.Label1);
this.Controls.Add(this.pictureBox1);
//this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ProgressViewer";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label Label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.TextBox textBox11;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment