public Form1() { InitializeComponent(); PathSet = new motionTestCLR.PathSettings(); myPathB = new GraphicsPath(); pictureboxGraphics = this.pictureBox1.CreateGraphics(); pictureBox1.Paint += new PaintEventHandler(pictureBox1_Paint); CenterToScreen(); SetStyle(ControlStyles.ResizeRedraw, true); // Alternative to handling Resize(). CreateMenu(); // Attach main menu to the Form object. this.Menu = mainMenu; this.shipX = this.Width / 2; this.shipY = this.Height / 2; this.dX = 0; this.dY = 0; this.SetStyle(System.Windows.Forms.ControlStyles.DoubleBuffer, true); this._stageTimer = new System.Timers.Timer(); this._stageTimer.Enabled = true; this._stageTimer.SynchronizingObject = this; this._StageTimerDone = true; this._stageTimer.Elapsed += new System.Timers.ElapsedEventHandler(this.On_ElapsedTimer); this.ZAxisTimer.Enabled = false; this.ZAxisTimer.Tick += new System.EventHandler(this.On_ZAxisTimerTick); _iter = 0; }
private void button4_Click(object sender, EventArgs e) { motionTestCLR.FormPathSettings PathSettings = new motionTestCLR.FormPathSettings(); PathSettings.ShowDialog(); PathSet = PathSettings.PathSet; }