private void MainForm_Load(object sender, EventArgs e) { formauto_1 = new AutoControl(); formsche_1 = new Scheduling(); formmps_1 = new MPS(); formauto_1.TopLevel = false; formauto_1.Dock = DockStyle.Fill; formauto_1.Parent = this.panel3; formauto_1.Show(); formsche_1.Show(); formsche_1.Hide(); toolStripStatusLabel1.Text = "NOW Auto-Control Mode"; toolStripStatusLabel1.BackColor = Color.Gray; button1.BackgroundImage = Properties.Resources.A_1; button2.BackgroundImage = Properties.Resources.B_2; button3.BackgroundImage = Properties.Resources.C_2; button4.BackgroundImage = Properties.Resources.D_2; button2.BackgroundImageLayout = ImageLayout.Stretch; button1.BackgroundImageLayout = ImageLayout.Stretch; button3.BackgroundImageLayout = ImageLayout.Stretch; button4.BackgroundImageLayout = ImageLayout.Stretch; button1.Enabled = false; toolupdate_Elapsed(null, null); toolUpdate(); }
private void button3_Click(object sender, EventArgs e) { button1.BackgroundImage = Properties.Resources.A_2; button3.BackgroundImage = Properties.Resources.C_1; button2.BackgroundImage = Properties.Resources.B_2; button4.BackgroundImage = Properties.Resources.D_2; toolStripStatusLabel1.Text = "NOW Material Calcualte Mode"; toolStripStatusLabel1.BackColor = Color.Gray; AutoControl.toolstatus = 0; button1.Enabled = true; button3.Enabled = false; button4.Enabled = true; button2.Enabled = true; formauto_1.Hide(); formsche_1.Hide(); formmps_1 = new MPS(); formmps_1.Show(); formmps_1.TopLevel = false; formmps_1.Dock = DockStyle.Fill; formmps_1.Parent = this.panel3; formmps_1.Show(); //formsche_1.Close(); //formsche_1.Dispose(); //formauto_1.Close(); //formauto_1.Dispose(); }