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 MotionControl.PropertiesForms { public partial class property : Form { instance inst; Micropositionclass micro; public property() { InitializeComponent(); micro = Micropositionclass.Instance; inst = instance.Instance; if(inst.firstGuidList.Contains(inst.a)) { this.Text = "MPC1"; } else if (inst.secondGuidList.Contains(inst.a)) { this.Text = "MPC2"; } else if (inst.thirdGuidList.Contains(inst.a)) { this.Text = "MPC3"; } else if (inst.fourthGuidList.Contains(inst.a)) { this.Text = "MPC4"; //MPC.Default.Save(); } else if (inst.fifthGuidList.Contains(inst.a)) { this.Text = "MPC5"; //MPC.Default.Save(); } else if (inst.sixthGuidList.Contains(inst.a)) { this.Text = "MPC6"; //MPC.Default.Save(); } else if (inst.seventhGuidList.Contains(inst.a)) { this.Text ="MPC7"; //MPC.Default.Save(); } else if (inst.eighthGuidList.Contains(inst.a)) { this.Text = "MPC8"; //MPC.Default.Save(); } else if (inst.ninthGuidList.Contains(inst.a)) { this.Text = "MPC9"; //MPC.Default.Save(); } else if (inst.tenthGuidList.Contains(inst.a)) { this.Text = "MPC10"; //MPC.Default.Save(); } switch (inst.tooltip) { case "Move": this.Size= new Size(238,226); Label lbl1 = new Label(); lbl1.Text = "X"; lbl1.Location = new Point(15, 35); lbl1.Size = new Size(14, 13); Controls.Add(lbl1); Label lbl2 = new Label(); lbl2.Text = "Y"; lbl2.Location = new Point(15, 70); lbl2.Size = new Size(14, 13); Controls.Add(lbl2); Label lbl3 = new Label(); lbl3.Text = "Z"; lbl3.Location = new Point(15, 105); lbl3.Size = new Size(14, 13); Controls.Add(lbl3); TextBox tb1 = new TextBox(); tb1.Text = micro.movex.ToString(); tb1.Location = new Point(105, 35); tb1.Size = new Size(100, 20); Controls.Add(tb1); TextBox tb2 = new TextBox(); tb2.Text = micro.movey.ToString(); tb2.Location = new Point(105, 70); tb2.Size = new Size(100, 20); Controls.Add(tb2); TextBox tb3 = new TextBox(); tb3.Text = micro.movez.ToString(); tb3.Location = new Point(105, 105); tb3.Size = new Size(100, 20); Controls.Add(tb3); break; case "Speed": this.Size = new Size(220, 162); Label speed = new Label(); speed.Text = "Speed"; speed.Location = new Point(20, 40);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)