You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.0 KiB
C#

using Rs.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Rs.MotionPlat
{
public partial class RecipeForm : BaseForm
{
public RecipeForm()
{
InitializeComponent();
}
protected void Menu_Click(object sender, EventArgs e)
{
BaseForm form;
btnTray1.Selected= false;
btnTray2.Selected= false;
btnTray3.Selected= false;
btnTray4.Selected= false;
btnTray5.Selected= false;
btnTray6.Selected= false;
btnTray7.Selected= false;
btnTray8.Selected= false;
btnTranslate.Selected= false;
ButtonEx button = (ButtonEx)sender;
if(button == btnTray1 ||
button == btnTray2 ||
button == btnTray3||
button == btnTray4||
button == btnTray5||
button == btnTray6||
button == btnTray7||
button == btnTray8)
{
CloseWin(panelMain.Controls);
panelMain.Controls.Clear();
button.Selected= true;
form = new TrayRecipe(button);
form.Name = "TrayRecipe";
form.Dock = DockStyle.Fill;
form.TopLevel = false;
form.Visible = true;
//ActiveForms.Add(form);
//form = ActiveForms.Get("TrayRecipe");
//if(form== null )
//{
// form = new TrayRecipe(button);
// form.Name = "TrayRecipe";
// form.Dock = DockStyle.Fill;
// form.TopLevel = false;
// form.Visible = true;
// ActiveForms.Add(form);
//}
panelMain.Controls.Add(form);
}
}
}
}