using Navigation;
|
using System;
|
using System.Drawing;
|
using System.IO;
|
using System.Windows.Forms;
|
|
namespace SHARP_CLAS_UI.Screen
|
{
|
public partial class Form_Recipe_Main : Form
|
{
|
#region Field
|
Form_Frame _Parent;
|
|
Main_Recipe cur_main_recipe;
|
|
Process_Info_Recipe cur_process_info;
|
|
Panel_Type_Info_Recipe cur_panel_type_info;
|
|
public delegate void RecipeEvent(object obj, RecipeEventArgs e);
|
|
public static event RecipeEvent Process_Info_Recipe_Event;
|
|
public static event RecipeEvent Panel_Type_Info_Recipe_Event;
|
|
public static event RecipeEvent Main_Recipe_Event;
|
|
#endregion
|
|
#region Construct
|
public Form_Recipe_Main(Form_Frame _Parent)
|
{
|
InitializeComponent();
|
this._Parent = _Parent;
|
|
cbb_WaveForm.SelectedIndex = 0;
|
Process_Info_Recipe_Event += Form_Recipe_Type_Process_Info_Recipe_Event;
|
Panel_Type_Info_Recipe_Event += Form_Panel_Type_Info_Recipe_Event;
|
Main_Recipe_Event += Form_Recipe_Main_Main_Recipe_Event;
|
|
Refresh_lv_Process_Info_Recipes();
|
Refresh_lv_Panel_Type_Info_Recipes();
|
Refresh_lv_Main_Recipes();
|
}
|
#endregion
|
|
#region Form Function
|
|
private void btn_Process_Info_Recipe_New_Click(object sender, EventArgs e)
|
{
|
Form_Recipe_Name_Set Name_Set_View = new Form_Recipe_Name_Set();
|
|
if (Name_Set_View.ShowDialog() == DialogResult.OK)
|
{
|
if (Process_Info_Manager.Instance.Exist_Recipe(Name_Set_View.Recipe_Name))
|
{
|
MessageBox.Show("Recipe가 존재합니다.");
|
return;
|
}
|
else
|
{
|
if (Process_Info_Manager.Instance.Create_Recipe(Name_Set_View.Recipe_Name))
|
{
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.New);
|
MessageBox.Show("Recipe 생성.");
|
}
|
else
|
{
|
MessageBox.Show("Recipe 생성 실패!!");
|
}
|
}
|
}
|
}
|
|
private void btn_Process_Info_Recipe_Delete_Click(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
|
if (!Process_Info_Manager.Instance.Exist_Recipe(cur_process_info.Name))
|
{
|
MessageBox.Show("Recipe가 존재하지 않습니다.");
|
return;
|
}
|
else
|
{
|
if (Process_Info_Manager.Instance.Delete_Recipe(cur_process_info.Name))
|
{
|
cur_process_info = null;
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Delete);
|
MessageBox.Show("Recipe 삭제.");
|
}
|
}
|
}
|
|
private void btn_Process_Info_Recipe_Save_Click(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
|
if (Process_Info_Manager.Instance.Save_Recipe(cur_process_info.Name, cur_process_info))
|
{
|
if (_Parent._equip.Cur_Main_Recipe != null)
|
{
|
Main_Recipe recipe = _Parent._equip.Cur_Main_Recipe.Clone();
|
|
if (recipe.process_info != null)
|
{
|
if(recipe.process_info.Name == cur_process_info.Name)
|
{
|
recipe.process_info = cur_process_info.Clone();
|
Main_Recipe_Manager.Instance.Save_Recipe(recipe.Name, recipe);
|
}
|
}
|
}
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Save);
|
}
|
}
|
|
private void btn_Process_Info_Recipe_Copy_Click(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
|
Form_Recipe_Name_Set Name_Set_View = new Form_Recipe_Name_Set();
|
|
if (Name_Set_View.ShowDialog() == DialogResult.OK)
|
{
|
if (Process_Info_Manager.Instance.Exist_Recipe(Name_Set_View.Recipe_Name))
|
{
|
MessageBox.Show("Recipe가 존재합니다.");
|
return;
|
}
|
else
|
{
|
if (Process_Info_Manager.Instance.Create_Recipe(Name_Set_View.Recipe_Name))
|
{
|
Process_Info_Manager.Instance.Save_Recipe(Name_Set_View.Recipe_Name, cur_process_info);
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.New);
|
MessageBox.Show("Recipe 생성.");
|
}
|
}
|
}
|
}
|
|
private void btn_Process_Info_Recipe_Apply_Click(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
_Parent.sm.Set_Value(Process_Memory_Address.Process_Info_Recipe_Name, cur_process_info.Name);
|
}
|
|
private void btn_Process_Info_Recipe_Cancel_Click(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
|
cur_process_info = Process_Info_Manager.Instance.Get_Recipe(cur_process_info.Name);
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Cancel);
|
}
|
|
private void btn_Process_Info_Refresh_Click(object sender, EventArgs e)
|
{
|
Refresh_lv_Process_Info_Recipes();
|
}
|
|
private void lv_Process_Info_Recipes_Click(object sender, EventArgs e)
|
{
|
ListView lv = (ListView)sender;
|
|
if (lv.SelectedItems.Count == 0)
|
return;
|
|
string recipe_Name = lv.SelectedItems[0].Text;
|
|
if (cur_process_info == null)
|
{
|
cur_process_info = Process_Info_Manager.Instance.Get_Recipe(recipe_Name);
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
else if (cur_process_info.Name != recipe_Name)
|
{
|
cur_process_info = Process_Info_Manager.Instance.Get_Recipe(recipe_Name);
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
if (_Parent._equip.User.Level <= En_User_Level.Operator)
|
{
|
pnl_Process_Info_Recipe.Enabled = false;
|
}
|
else
|
{
|
pnl_Process_Info_Recipe.Enabled = true;
|
}
|
}
|
|
private void tb_Process_Info_Recipe_TextChanged(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
|
TextBox tb = (TextBox)sender;
|
|
int value_int = 0;
|
double value_double = 0;
|
float value_float = 0;
|
short value_short = 0;
|
ushort value_ushort = 0;
|
switch (tb.Name)
|
{
|
case "tb_Hatch_Distance":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Hatch_Distance = value_float;
|
|
break;
|
}
|
case "tb_Jump_Repeat":
|
{
|
int.TryParse(tb.Text, out value_int);
|
cur_process_info.Jump_Repeat = value_int;
|
|
break;
|
}
|
case "tb_Jump_Range":
|
{
|
int.TryParse(tb.Text, out value_int);
|
cur_process_info.Jump_Range = value_int;
|
|
break;
|
}
|
case "cbb_WaveForm":
|
{
|
int.TryParse(tb.Text, out value_int);
|
cur_process_info.Waveform = value_int;
|
|
break;
|
}
|
case "tb_Work_Area_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Work_Area_X = value_float;
|
|
break;
|
}
|
case "tb_Work_Area_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Work_Area_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_1_Start_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_1.Start_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_1_End_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_1.End_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_1_Start_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_1.Start_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_1_End_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_1.End_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_1_Distance":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_1.Distance = value_float;
|
|
break;
|
}
|
case "tb_Draw_1_Repeat":
|
{
|
int.TryParse(tb.Text, out value_int);
|
cur_process_info.Draw_Info_1.Repeat = value_int;
|
|
break;
|
}
|
case "tb_Draw_2_Start_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_2.Start_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_2_End_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_2.End_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_2_Start_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_2.Start_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_2_End_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_2.End_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_2_Distance":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_2.Distance = value_float;
|
|
break;
|
}
|
case "tb_Draw_2_Repeat":
|
{
|
int.TryParse(tb.Text, out value_int);
|
cur_process_info.Draw_Info_2.Repeat = value_int;
|
|
break;
|
}
|
case "tb_Draw_3_Start_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_3.Start_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_3_End_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_3.End_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_3_Start_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_3.Start_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_3_End_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_3.End_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_3_Distance":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_3.Distance = value_float;
|
|
break;
|
}
|
case "tb_Draw_3_Repeat":
|
{
|
int.TryParse(tb.Text, out value_int);
|
cur_process_info.Draw_Info_3.Repeat = value_int;
|
|
break;
|
}
|
case "tb_Draw_4_Start_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_4.Start_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_4_End_X":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_4.End_X = value_float;
|
|
break;
|
}
|
case "tb_Draw_4_Start_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_4.Start_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_4_End_Y":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_4.End_Y = value_float;
|
|
break;
|
}
|
case "tb_Draw_4_Distance":
|
{
|
float.TryParse(tb.Text, out value_float);
|
cur_process_info.Draw_Info_4.Distance = value_float;
|
|
break;
|
}
|
case "tb_Draw_4_Repeat":
|
{
|
int.TryParse(tb.Text, out value_int);
|
cur_process_info.Draw_Info_4.Repeat = value_int;
|
break;
|
}
|
case "tb_Mark_Speed":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Mark_Speed = value_double;
|
|
break;
|
}
|
case "tb_Jump_Speed":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Jump_Speed = value_double;
|
|
break;
|
}
|
case "tb_Laser_On_Delay":
|
{
|
short.TryParse(tb.Text, out value_short);
|
cur_process_info.Laser_On_Delay = value_short;
|
|
break;
|
}
|
case "tb_Laser_Off_Delay":
|
{
|
short.TryParse(tb.Text, out value_short);
|
cur_process_info.Laser_Off_Delay = value_short;
|
|
break;
|
}
|
case "tb_Jump_Delay":
|
{
|
ushort.TryParse(tb.Text, out value_ushort);
|
cur_process_info.Jump_Delay = value_ushort;
|
|
break;
|
}
|
case "tb_Mark_Delay":
|
{
|
ushort.TryParse(tb.Text, out value_ushort);
|
cur_process_info.Mark_Delay = value_ushort;
|
|
break;
|
}
|
case "tb_Frequency":
|
{
|
ushort.TryParse(tb.Text, out value_ushort);
|
cur_process_info.Frequency = value_ushort;
|
|
break;
|
}
|
case "tb_Power":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Power = value_double;
|
break;
|
}
|
case "tb_Target_Power":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Target_Power_W = value_double;
|
break;
|
}
|
case "tb_CTB_File_Path":
|
{
|
if (File.Exists(tb.Text))
|
cur_process_info.CTB_File_Path = tb.Text;
|
|
break;
|
}
|
case "tb_Scanner_X_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_X_A1 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_X_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_X_A2 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_X_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_X_B1 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_X_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_X_B2 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Y_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Y_A1 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Y_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Y_A2 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Y_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Y_B1 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Y_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Y_B2 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Z_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Z_A1 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Z_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Z_A2 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Z_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Z_B1 = value_double;
|
|
break;
|
}
|
case "tb_Scanner_Z_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Scanner_Z_B2 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_X_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_X_A1 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_X_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_X_A2 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_X_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_X_B1 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_X_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_X_B2 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_Y_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_Y_A1 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_Y_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_Y_A2 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_Y_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_Y_B1 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_Y_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_Y_B2 = value_double;
|
|
break;
|
}
|
case "tb_Plasma_Distance":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_Distance = value_double;
|
|
break;
|
}
|
case "tb_Plasma_Speed":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_process_info.Plasma_Speed = value_double;
|
|
break;
|
}
|
}
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
|
}
|
|
private void cb_Process_CheckedChanged(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
|
CheckBox cb = (CheckBox)sender;
|
|
switch (cb.Name)
|
{
|
case "cb_Draw_1_Draw":
|
{
|
cur_process_info.Draw_Info_1.Draw = cb.Checked;
|
break;
|
}
|
case "cb_Draw_2_Draw":
|
{
|
cur_process_info.Draw_Info_2.Draw = cb.Checked;
|
break;
|
}
|
case "cb_Draw_3_Draw":
|
{
|
cur_process_info.Draw_Info_3.Draw = cb.Checked;
|
break;
|
}
|
case "cb_Draw_4_Draw":
|
{
|
cur_process_info.Draw_Info_4.Draw = cb.Checked;
|
break;
|
}
|
case "cb_Reverse_1":
|
{
|
cur_process_info.Draw_Info_1.Reverse = cb.Checked;
|
break;
|
}
|
case "cb_Reverse_2":
|
{
|
cur_process_info.Draw_Info_2.Reverse = cb.Checked;
|
break;
|
}
|
case "cb_Reverse_3":
|
{
|
cur_process_info.Draw_Info_3.Reverse = cb.Checked;
|
break;
|
}
|
case "cb_Reverse_4":
|
{
|
cur_process_info.Draw_Info_4.Reverse = cb.Checked;
|
break;
|
}
|
}
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
private void cbb_WaveForm_SelectedIndexChanged(object sender, EventArgs e)
|
{
|
if (cur_process_info == null) return;
|
|
cur_process_info.Waveform = cbb_WaveForm.SelectedIndex;
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
private void btn_CTB_File_Path_Get_Click(object sender, EventArgs e)
|
{
|
OpenFileDialog ofd = new OpenFileDialog();
|
|
ofd.Title = "Open CTB File";
|
ofd.Filter = "CTB File|*.ctb";
|
|
if (ofd.ShowDialog() == DialogResult.OK)
|
{
|
if (ofd.CheckPathExists)
|
{
|
tb_CTB_File_Path.Text = ofd.FileName;
|
}
|
}
|
}
|
|
private void btn_Panel_Type_Info_New_Click(object sender, EventArgs e)
|
{
|
Form_Recipe_Name_Set Name_Set_View = new Form_Recipe_Name_Set();
|
|
if (Name_Set_View.ShowDialog() == DialogResult.OK)
|
{
|
if (Panel_Type_Info_Manager.Instance.Exist_Recipe(Name_Set_View.Recipe_Name))
|
{
|
MessageBox.Show("Recipe가 존재합니다.");
|
return;
|
}
|
else
|
{
|
if (Panel_Type_Info_Manager.Instance.Create_Recipe(Name_Set_View.Recipe_Name))
|
{
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.New);
|
MessageBox.Show("Recipe 생성.");
|
}
|
else
|
{
|
MessageBox.Show("Recipe 생성 실패!!");
|
}
|
}
|
}
|
}
|
|
private void btn_Panel_Type_Info_Delete_Click(object sender, EventArgs e)
|
{
|
if (cur_panel_type_info == null) return;
|
|
if (!Panel_Type_Info_Manager.Instance.Exist_Recipe(cur_panel_type_info.Name))
|
{
|
MessageBox.Show("Recipe가 존재하지 않습니다.");
|
return;
|
}
|
else
|
{
|
if (Panel_Type_Info_Manager.Instance.Delete_Recipe(cur_panel_type_info.Name))
|
{
|
cur_panel_type_info = null;
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.Delete);
|
MessageBox.Show("Recipe 삭제.");
|
}
|
}
|
}
|
|
private void btn_Panel_Type_Info_Save_Click(object sender, EventArgs e)
|
{
|
if (cur_panel_type_info == null) return;
|
|
if (Panel_Type_Info_Manager.Instance.Save_Recipe(cur_panel_type_info.Name, cur_panel_type_info))
|
{
|
if (_Parent._equip.Cur_Main_Recipe != null)
|
{
|
Main_Recipe recipe = _Parent._equip.Cur_Main_Recipe.Clone();
|
|
if (recipe.panel_type_info != null)
|
{
|
if (recipe.panel_type_info.Name == cur_panel_type_info.Name)
|
{
|
recipe.panel_type_info = cur_panel_type_info.Clone();
|
Main_Recipe_Manager.Instance.Save_Recipe(recipe.Name, recipe);
|
}
|
}
|
}
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.Save);
|
}
|
}
|
|
private void btn_Panel_Type_Info_Copy_Click(object sender, EventArgs e)
|
{
|
if (cur_panel_type_info == null) return;
|
|
Form_Recipe_Name_Set Name_Set_View = new Form_Recipe_Name_Set();
|
|
if (Name_Set_View.ShowDialog() == DialogResult.OK)
|
{
|
if (Panel_Type_Info_Manager.Instance.Exist_Recipe(Name_Set_View.Recipe_Name))
|
{
|
MessageBox.Show("Recipe가 존재합니다.");
|
return;
|
}
|
else
|
{
|
if (Panel_Type_Info_Manager.Instance.Create_Recipe(Name_Set_View.Recipe_Name))
|
{
|
Panel_Type_Info_Manager.Instance.Save_Recipe(Name_Set_View.Recipe_Name, cur_panel_type_info);
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.New);
|
MessageBox.Show("Recipe 생성.");
|
}
|
}
|
}
|
}
|
|
private void btn_Panel_Type_Info_Apply_Click(object sender, EventArgs e)
|
{
|
if (cur_panel_type_info == null) return;
|
_Parent.sm.Set_Value(Process_Memory_Address.Panel_Type_Info_Recipe_Name, cur_panel_type_info.Name);
|
}
|
|
private void btn_Panel_Type_Info_Cancel_Click(object sender, EventArgs e)
|
{
|
if (cur_panel_type_info == null) return;
|
|
cur_panel_type_info = Panel_Type_Info_Manager.Instance.Get_Recipe(cur_panel_type_info.Name);
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.Cancel);
|
}
|
|
private void btn_Panel_Type_Info_Refresh_Click(object sender, EventArgs e)
|
{
|
Refresh_lv_Panel_Type_Info_Recipes();
|
}
|
|
private void lv_Panel_Type_Info_Recipes_Click(object sender, EventArgs e)
|
{
|
ListView lv = (ListView)sender;
|
|
if (lv.SelectedItems.Count == 0)
|
return;
|
|
string recipe_Name = lv.SelectedItems[0].Text;
|
|
if (cur_panel_type_info == null)
|
{
|
cur_panel_type_info = Panel_Type_Info_Manager.Instance.Get_Recipe(recipe_Name);
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
else if (cur_panel_type_info.Name != recipe_Name)
|
{
|
cur_panel_type_info = Panel_Type_Info_Manager.Instance.Get_Recipe(recipe_Name);
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
if (_Parent._equip.User.Level <= En_User_Level.Operator)
|
{
|
pnl_Panel_Type_Info_Recipe.Enabled = false;
|
}
|
else
|
{
|
pnl_Panel_Type_Info_Recipe.Enabled = true;
|
}
|
}
|
|
private void tb_Panel_Type_Info_Recipe_TextChanged(object sender, EventArgs e)
|
{
|
if (cur_panel_type_info == null) return;
|
|
TextBox tb = (TextBox)sender;
|
|
double value_double = 0;
|
|
switch (tb.Name)
|
{
|
case "tb_Panel_Type_Info_Align_Mark_1_X":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Align_Mark_1_X = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Align_Mark_1_Y":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Align_Mark_1_Y = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Align_Mark_2_X":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Align_Mark_2_X = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Align_Mark_2_Y":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Align_Mark_2_Y = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_MCR_X":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.MCR_Mark_X = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_MCR_Y":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.MCR_Mark_Y = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_X_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_X_A1 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_Y_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_Y_A1 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_T_A1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_T_A1 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_X_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_X_A2 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_Y_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_Y_A2 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_T_A2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_T_A2 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_X_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_X_B1 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_Y_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_Y_B1 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_T_B1":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_T_B1 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_X_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_X_B2 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_Y_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_Y_B2 = value_double;
|
|
break;
|
}
|
case "tb_Panel_Type_Info_Offset_T_B2":
|
{
|
double.TryParse(tb.Text, out value_double);
|
cur_panel_type_info.Scanner_Offset_T_B2 = value_double;
|
|
break;
|
}
|
}
|
|
On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
private void lv_Main_Recipe_Click(object sender, EventArgs e)
|
{
|
ListView lv = (ListView)sender;
|
|
if (lv.SelectedItems.Count == 0)
|
return;
|
|
string recipe_Name = lv.SelectedItems[0].Text;
|
|
if (cur_main_recipe == null)
|
{
|
cur_main_recipe = Main_Recipe_Manager.Instance.Get_Recipe(recipe_Name);
|
On_Main_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
else if (cur_main_recipe.Name != recipe_Name)
|
{
|
cur_main_recipe = Main_Recipe_Manager.Instance.Get_Recipe(recipe_Name);
|
On_Main_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
if (cur_main_recipe == null)
|
{
|
pnl_Main_Recipe.Enabled = false;
|
}
|
else
|
{
|
pnl_Main_Recipe.Enabled = true;
|
}
|
}
|
|
private void btn_Main_Recipe_Refresh_Click(object sender, EventArgs e)
|
{
|
Refresh_lv_Main_Recipes();
|
}
|
|
private void btn_Main_Recipe_New_Click(object sender, EventArgs e)
|
{
|
Form_Recipe_Name_Set Name_Set_View = new Form_Recipe_Name_Set();
|
|
if (Name_Set_View.ShowDialog() == DialogResult.OK)
|
{
|
if (Main_Recipe_Manager.Instance.Exist_Recipe(Name_Set_View.Recipe_Name))
|
{
|
MessageBox.Show("Recipe가 존재합니다.");
|
return;
|
}
|
else
|
{
|
if (Main_Recipe_Manager.Instance.Create_Recipe(Name_Set_View.Recipe_Name))
|
{
|
_Parent.sm.Set_Value(Data_Interpretation_Memory_Address.RecipeChangeStatus_Name, Name_Set_View.Recipe_Name);
|
_Parent.sm.Set_Bit(Data_Interpretation_Memory_Address.RecipeChangeStatus_Create, true);
|
On_Main_Receipe_Event(Recipe_Event_Status.New);
|
MessageBox.Show("Recipe 생성.");
|
}
|
else
|
{
|
MessageBox.Show("Recipe 생성 실패!!");
|
}
|
}
|
}
|
}
|
|
private void btn_Main_Recipe_Delete_Click(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
if (!Main_Recipe_Manager.Instance.Exist_Recipe(cur_main_recipe.Name))
|
{
|
MessageBox.Show("Recipe가 존재하지 않습니다.");
|
return;
|
}
|
else
|
{
|
if (Main_Recipe_Manager.Instance.Delete_Recipe(cur_main_recipe.Name))
|
{
|
_Parent.sm.Set_Value(Data_Interpretation_Memory_Address.RecipeChangeStatus_Name, cur_main_recipe.Name);
|
_Parent.sm.Set_Bit(Data_Interpretation_Memory_Address.RecipeChangeStatus_Delete, true);
|
|
cur_main_recipe = null;
|
On_Main_Receipe_Event(Recipe_Event_Status.Delete);
|
MessageBox.Show("Recipe 삭제.");
|
}
|
}
|
}
|
|
private void btn_Main_Recipe_Save_Click(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
if (Main_Recipe_Manager.Instance.Save_Recipe(cur_main_recipe.Name, cur_main_recipe))
|
{
|
_Parent.sm.Set_Value(Data_Interpretation_Memory_Address.RecipeChangeStatus_Name, cur_main_recipe.Name);
|
_Parent.sm.Set_Bit(Data_Interpretation_Memory_Address.RecipeChangeStatus_Modify, true);
|
On_Main_Receipe_Event(Recipe_Event_Status.Save);
|
}
|
}
|
|
private void btn_Main_Recipe_Copy_Click(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
Form_Recipe_Name_Set Name_Set_View = new Form_Recipe_Name_Set();
|
|
if (Name_Set_View.ShowDialog() == DialogResult.OK)
|
{
|
if (Main_Recipe_Manager.Instance.Exist_Recipe(Name_Set_View.Recipe_Name))
|
{
|
MessageBox.Show("Recipe가 존재합니다.");
|
return;
|
}
|
else
|
{
|
if (Main_Recipe_Manager.Instance.Create_Recipe(Name_Set_View.Recipe_Name))
|
{
|
Main_Recipe_Manager.Instance.Save_Recipe(Name_Set_View.Recipe_Name, cur_main_recipe);
|
On_Main_Receipe_Event(Recipe_Event_Status.New);
|
MessageBox.Show("Recipe 생성.");
|
}
|
}
|
}
|
}
|
|
private void btn_Main_Recipe_Apply_Click(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
object value;
|
_Parent.sm.Get_Value(Process_Memory_Address.Tray_Info_Recipe_Name, out value);
|
|
if (cur_main_recipe.tray_info == null || value.ToString() != cur_main_recipe.tray_info.Name)
|
{
|
_Parent.sm.Set_Value(Data_Interpretation_Memory_Address.OK_Out_Cnt, 0);
|
_Parent.sm.Set_Value(Data_Interpretation_Memory_Address.NG_Out_Cnt, 0);
|
_Parent.sm.Set_Bit(Data_Interpretation_Memory_Address.RecipeChanged, true);
|
}
|
|
_Parent.sm.Set_Value(Process_Memory_Address.Main_Recipe_Name, cur_main_recipe.Name);
|
}
|
|
private void btn_Main_Recipe_Cancel_Click(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
cur_main_recipe = Main_Recipe_Manager.Instance.Get_Recipe(cur_main_recipe.Name);
|
On_Main_Receipe_Event(Recipe_Event_Status.Cancel);
|
}
|
|
private void cbb_Tray_Info_Recipe_SelectedIndexChanged(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
cur_main_recipe.tray_info = Tray_Info_Manager.Instance.Get_Recipe(cbb_Tray_Info_Recipe.Text);
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
private void Cbb_Process_Info_Recipe_SelectedIndexChanged(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
cur_main_recipe.process_info = Process_Info_Manager.Instance.Get_Recipe(Cbb_Process_Info_Recipe.Text);
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
private void cbb_Vision_Info_Recipe_SelectedIndexChanged(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
cur_main_recipe.vision_info = Vision_Info_Manager.Instance.Get_Recipe(cbb_Vision_Info_Recipe.Text);
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
|
private void cbb_Panel_Type_Info_Recipe_SelectedIndexChanged(object sender, EventArgs e)
|
{
|
if (cur_main_recipe == null) return;
|
|
cur_main_recipe.panel_type_info = Panel_Type_Info_Manager.Instance.Get_Recipe(cbb_Panel_Type_Info_Recipe.Text);
|
|
On_Process_Info_Receipe_Event(Recipe_Event_Status.Update);
|
}
|
#endregion
|
|
#region Function
|
public void Set_Language()
|
{
|
try
|
{
|
//Main Recipe
|
lv_Main_Recipes.Columns[0].Text = resLanguage.Main_Recipe;
|
lb_Main_Recipe.Text = resLanguage.Main_Recipe;
|
btn_Main_Recipe_Refresh.Text = resLanguage.Refresh;
|
btn_Main_Recipe_New.Text = resLanguage.New;
|
btn_Main_Recipe_Delete.Text = resLanguage.Delete;
|
btn_Main_Recipe_Save.Text = resLanguage.Save;
|
btn_Main_Recipe_Copy.Text = resLanguage.Copy;
|
btn_Main_Recipe_Apply.Text = resLanguage.Apply;
|
btn_Main_Recipe_Cancel.Text = resLanguage.Cancel;
|
|
lb_Main_Recipe_Name_.Text = resLanguage.Recipe_Name;
|
lb_Main_Recipe_Time_.Text = resLanguage.Create_Time;
|
|
lb_Main_tray_recipe_name.Text = resLanguage.Recipe;
|
lb_Main_process_recipe_name.Text = resLanguage.Recipe;
|
lb_Main_vision_recipe_name.Text = resLanguage.Recipe;
|
lb_Main_panel_recipe_name.Text = resLanguage.Recipe;
|
lb_Tray_info_recipe.Text = resLanguage.Tray_Info_Recipe;
|
lb_Process_info_recipe_.Text = resLanguage.Process_Info_Recipe;
|
lb_Vision_info_recipe.Text = resLanguage.Vision_Info_Recipe;
|
lb_Panel_info_recipe_.Text = resLanguage.Panel_Info_Recipe;
|
|
//Process Recipe
|
lv_Process_Info_Recipes.Columns[0].Text = resLanguage.Process_Info_Recipe;
|
lb_Process_info_recipe.Text = resLanguage.Process_Info_Recipe;
|
btn_Process_Info_Refresh.Text = resLanguage.Refresh;
|
btn_Process_Info_Recipe_New.Text = resLanguage.New;
|
btn_Process_Info_Recipe_Delete.Text = resLanguage.Delete;
|
btn_Process_Info_Recipe_Save.Text = resLanguage.Save;
|
btn_Process_Info_Recipe_Copy.Text = resLanguage.Copy;
|
btn_Process_Info_Recipe_Apply.Text = resLanguage.Apply;
|
btn_Process_Info_Recipe_Cancel.Text = resLanguage.Cancel;
|
|
lb_Process_Recipe_Name_.Text = resLanguage.Recipe_Name;
|
lb_Process_Recipe_Time_.Text = resLanguage.Create_Time;
|
|
lb_Hatch.Text = resLanguage.Hatch_Data;
|
lb_Distance.Text = resLanguage.Distance;
|
lb_Waveform.Text = resLanguage.Waveform;
|
|
lb_Space_data.Text = resLanguage.Space_Data;
|
lb_Work_area_x.Text = resLanguage.Work_Area_X;
|
lb_Work_area_y.Text = resLanguage.Work_Area_Y;
|
|
lb_Draw_Position_Data.Text = resLanguage.Draw_Position_Data;
|
cb_Draw_1_Draw.Text = resLanguage.Draw_1;
|
cb_Reverse_1.Text = resLanguage.Reverse;
|
lb_Start_X_1.Text = resLanguage.Start_X;
|
lb_End_X_1.Text = resLanguage.End_X;
|
lb_Start_Y_1.Text = resLanguage.Start_Y;
|
lb_End_Y_1.Text = resLanguage.End_Y;
|
lb_Distance_1.Text = resLanguage.Distance;
|
lb_Repeat_1.Text = resLanguage.Repeat;
|
|
cb_Draw_2_Draw.Text = resLanguage.Draw_2;
|
cb_Reverse_2.Text = resLanguage.Reverse;
|
lb_Start_X_2.Text = resLanguage.Start_X;
|
lb_End_X_2.Text = resLanguage.End_X;
|
lb_Start_Y_2.Text = resLanguage.Start_Y;
|
lb_End_Y_2.Text = resLanguage.End_Y;
|
lb_Distance_2.Text = resLanguage.Distance;
|
lb_Repeat_2.Text = resLanguage.Repeat;
|
|
cb_Draw_3_Draw.Text = resLanguage.Draw_3;
|
cb_Reverse_3.Text = resLanguage.Reverse;
|
lb_Start_X_3.Text = resLanguage.Start_X;
|
lb_End_X_3.Text = resLanguage.End_X;
|
lb_Start_Y_3.Text = resLanguage.Start_Y;
|
lb_End_Y_3.Text = resLanguage.End_Y;
|
lb_Distance_3.Text = resLanguage.Distance;
|
lb_Repeat_3.Text = resLanguage.Repeat;
|
|
cb_Draw_4_Draw.Text = resLanguage.Draw_4;
|
cb_Reverse_4.Text = resLanguage.Reverse;
|
lb_Start_X_4.Text = resLanguage.Start_X;
|
lb_End_X_4.Text = resLanguage.End_X;
|
lb_Start_Y_4.Text = resLanguage.Start_Y;
|
lb_End_Y_4.Text = resLanguage.End_Y;
|
lb_Distance_4.Text = resLanguage.Distance;
|
lb_Repeat_4.Text = resLanguage.Repeat;
|
|
lb_Scanner_Info.Text = resLanguage.Scanner_Info;
|
lb_Mark_Speed.Text = resLanguage.Mark_Speed;
|
lb_Jump_delay.Text = resLanguage.Jump_Delay;
|
lb_Mark_delay.Text = resLanguage.Mark_Delay;
|
lb_Jump_Speed.Text = resLanguage.Jump_Speed;
|
lb_Laser_on_delay.Text = resLanguage.Laser_On_Delay;
|
lb_Frequency.Text = resLanguage.Frequency;
|
lb_Laser_off_delay.Text = resLanguage.Laser_Off_Delay;
|
lb_Power.Text = resLanguage.Power;
|
lb_CTB_File_Path.Text = resLanguage.CTB_File_Path;
|
|
lb_Scanner_position_data.Text = resLanguage.Scanner_Position_Data;
|
lb_Scanner_X_A1.Text = resLanguage.Scanner_X_A1;
|
lb_Scanner_X_A2.Text = resLanguage.Scanner_X_A2;
|
lb_Scanner_X_B1.Text = resLanguage.Scanner_X_B1;
|
lb_Scanner_X_B2.Text = resLanguage.Scanner_X_B2;
|
|
lb_Ablation_Y_A1.Text = resLanguage.Ablation_Y_A1;
|
lb_Ablation_Y_A2.Text = resLanguage.Ablation_Y_A2;
|
lb_Ablation_Y_B1.Text = resLanguage.Ablation_Y_B1;
|
lb_Ablation_Y_B2.Text = resLanguage.Ablation_Y_B2;
|
|
lb_Scanner_Z_A1.Text = resLanguage.Scanner_Z_A1;
|
lb_Scanner_Z_A2.Text = resLanguage.Scanner_Z_A2;
|
lb_Scanner_Z_B1.Text = resLanguage.Scanner_Z_B1;
|
lb_Scanner_Z_B2.Text = resLanguage.Scanner_Z_B2;
|
|
lb_Plasma_position_data.Text = resLanguage.Plasma_Position_Data;
|
lb_Plasma_X_A1.Text = resLanguage.Plasma_X_A1;
|
lb_Plasma_X_A2.Text = resLanguage.Plasma_X_A2;
|
lb_Plasma_X_B1.Text = resLanguage.Plasma_X_B1;
|
lb_Plasma_X_B2.Text = resLanguage.Plasma_X_B2;
|
|
lb_Ablation_Y_A1_.Text = resLanguage.Ablation_Y_A1;
|
lb_Ablation_Y_A2_.Text = resLanguage.Ablation_Y_A2;
|
lb_Ablation_Y_B1_.Text = resLanguage.Ablation_Y_B1;
|
lb_Ablation_Y_B2_.Text = resLanguage.Ablation_Y_B2;
|
|
lb_Distance_.Text = resLanguage.Distance;
|
lb_Plasma_Speed.Text = resLanguage.Plasma_Speed;
|
|
//Panel Type Info
|
lv_Panel_Type_Info_Recipes.Columns[0].Text = resLanguage.Panel_Info_Recipe;
|
lb_Panel_type_info.Text = resLanguage.Panel_Info_Recipe;
|
btn_Panel_Type_Info_Refresh.Text = resLanguage.Refresh;
|
btn_Panel_Type_Info_New.Text = resLanguage.New;
|
btn_Panel_Type_Info_Delete.Text = resLanguage.Delete;
|
btn_Panel_Type_Info_Save.Text = resLanguage.Save;
|
btn_Panel_Type_Info_Copy.Text = resLanguage.Copy;
|
btn_Panel_Type_Info_Apply.Text = resLanguage.Apply;
|
btn_Panel_Type_Info_Cancel.Text = resLanguage.Cancel;
|
|
lb_panel_recipe_name.Text = resLanguage.Recipe_Name;
|
lb_Panel_Type_Info_Time_.Text = resLanguage.Create_Time;
|
|
lb_Panel_Data.Text = resLanguage.Panel_Data;
|
lb_Align_mark_1_x.Text = resLanguage.Align_Mark_1_X;
|
lb_Align_mark_1_y.Text = resLanguage.Align_Mark_1_Y;
|
lb_Align_mark_2_x.Text = resLanguage.Align_Mark_2_X;
|
lb_Align_mark_2_y.Text = resLanguage.Align_Mark_2_Y;
|
lb_Mcr_X.Text = resLanguage.MCR_X;
|
lb_Mcr_Y.Text = resLanguage.MCR_Y;
|
|
lb_Scanner_offset_data.Text = resLanguage.Scanner_Offset_Data;
|
lb_Scanner_X_A1_.Text = resLanguage.Scanner_X_A1;
|
lb_Scanner_X_A2_.Text = resLanguage.Scanner_X_A2;
|
lb_Scanner_X_B1_.Text = resLanguage.Scanner_X_B1;
|
lb_Scanner_X_B2_.Text = resLanguage.Scanner_X_B2;
|
|
lb_Ablation_Y_A1__.Text = resLanguage.Ablation_Y_A1;
|
lb_Ablation_Y_A2__.Text = resLanguage.Ablation_Y_A2;
|
lb_Ablation_Y_B1__.Text = resLanguage.Ablation_Y_B1;
|
lb_Ablation_Y_B2__.Text = resLanguage.Ablation_Y_B2;
|
|
lb_Scanner_T_A1.Text = resLanguage.Scanner_T_A1;
|
lb_Scanner_T_A2.Text = resLanguage.Scanner_T_A2;
|
lb_Scanner_T_B1.Text = resLanguage.Scanner_T_B1;
|
lb_Scanner_T_B2.Text = resLanguage.Scanner_T_B2;
|
}
|
catch(Exception ex)
|
{
|
|
}
|
}
|
|
public void Set_User_Level(Navigator.User_Level level)
|
{
|
if (_Parent._equip.User.Level <= En_User_Level.Operator)
|
{
|
btn_Main_Recipe_Copy.Enabled = false;
|
btn_Main_Recipe_Delete.Enabled = false;
|
btn_Main_Recipe_New.Enabled = false;
|
|
btn_Process_Info_Recipe_Copy.Enabled = false;
|
btn_Process_Info_Recipe_Delete.Enabled = false;
|
btn_Process_Info_Recipe_New.Enabled = false;
|
|
btn_Panel_Type_Info_Copy.Enabled = false;
|
btn_Panel_Type_Info_Delete.Enabled = false;
|
btn_Panel_Type_Info_New.Enabled = false;
|
}
|
else
|
{
|
btn_Main_Recipe_Copy.Enabled = true;
|
btn_Main_Recipe_Delete.Enabled = true;
|
btn_Main_Recipe_New.Enabled = true;
|
|
btn_Process_Info_Recipe_Copy.Enabled = true;
|
btn_Process_Info_Recipe_Delete.Enabled = true;
|
btn_Process_Info_Recipe_New.Enabled = true;
|
|
btn_Panel_Type_Info_Copy.Enabled = true;
|
btn_Panel_Type_Info_Delete.Enabled = true;
|
btn_Panel_Type_Info_New.Enabled = true;
|
}
|
|
Refresh_lv_Process_Info_Recipes();
|
Refresh_lv_Panel_Type_Info_Recipes();
|
Refresh_lv_Main_Recipes();
|
}
|
|
private void Form_Recipe_Type_Process_Info_Recipe_Event(object obj, RecipeEventArgs e)
|
{
|
switch (e.Status)
|
{
|
case Recipe_Event_Status.New:
|
{
|
Refresh_lv_Process_Info_Recipes();
|
Set_Process_Info_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Delete:
|
{
|
Refresh_lv_Process_Info_Recipes();
|
Set_Process_Info_Defferent();
|
Reset_Process_Info_UI();
|
break;
|
}
|
case Recipe_Event_Status.Save:
|
{
|
Set_Process_Info_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Cancel:
|
{
|
Set_Process_Info_Recipe_UI();
|
Set_Process_Info_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Update:
|
{
|
Set_Process_Info_Recipe_UI();
|
Set_Process_Info_Defferent();
|
break;
|
}
|
}
|
}
|
|
public static void On_Process_Info_Receipe_Event(Recipe_Event_Status status)
|
{
|
Process_Info_Recipe_Event?.Invoke(new Object(), new RecipeEventArgs(status));
|
}
|
|
public void Set_Process_Info_Defferent()
|
{
|
if (cur_process_info == null) return;
|
|
Process_Info_Recipe recipe = Process_Info_Manager.Instance.Get_Recipe(cur_process_info.Name);
|
|
if (recipe == null) return;
|
|
tb_Hatch_Distance.BackColor = cur_process_info.Hatch_Distance == recipe.Hatch_Distance ? Color.White : Color.Red;
|
cbb_WaveForm.BackColor = cur_process_info.Waveform == recipe.Waveform ? Color.White : Color.Red;
|
|
tb_Work_Area_X.BackColor = cur_process_info.Work_Area_X == recipe.Work_Area_X ? Color.White : Color.Red;
|
tb_Work_Area_Y.BackColor = cur_process_info.Work_Area_Y == recipe.Work_Area_Y ? Color.White : Color.Red;
|
|
cb_Reverse_1.BackColor = cur_process_info.Draw_Info_1.Reverse == recipe.Draw_Info_1.Reverse ? Color.White : Color.Red;
|
cb_Draw_1_Draw.BackColor = cur_process_info.Draw_Info_1.Draw == recipe.Draw_Info_1.Draw ? Color.White : Color.Red;
|
tb_Draw_1_Start_X.BackColor = cur_process_info.Draw_Info_1.Start_X == recipe.Draw_Info_1.Start_X ? Color.White : Color.Red;
|
tb_Draw_1_End_X.BackColor = cur_process_info.Draw_Info_1.End_X == recipe.Draw_Info_1.End_X ? Color.White : Color.Red;
|
tb_Draw_1_Start_Y.BackColor = cur_process_info.Draw_Info_1.Start_Y == recipe.Draw_Info_1.Start_Y ? Color.White : Color.Red;
|
tb_Draw_1_End_Y.BackColor = cur_process_info.Draw_Info_1.End_Y == recipe.Draw_Info_1.End_Y ? Color.White : Color.Red;
|
tb_Draw_1_Distance.BackColor = cur_process_info.Draw_Info_1.Distance == recipe.Draw_Info_1.Distance ? Color.White : Color.Red;
|
tb_Draw_1_Repeat.BackColor = cur_process_info.Draw_Info_1.Repeat == recipe.Draw_Info_1.Repeat ? Color.White : Color.Red;
|
|
cb_Reverse_2.BackColor = cur_process_info.Draw_Info_2.Reverse == recipe.Draw_Info_2.Reverse ? Color.White : Color.Red;
|
cb_Draw_2_Draw.BackColor = cur_process_info.Draw_Info_2.Draw == recipe.Draw_Info_2.Draw ? Color.White : Color.Red;
|
tb_Draw_2_Start_X.BackColor = cur_process_info.Draw_Info_2.Start_X == recipe.Draw_Info_2.Start_X ? Color.White : Color.Red;
|
tb_Draw_2_End_X.BackColor = cur_process_info.Draw_Info_2.End_X == recipe.Draw_Info_2.End_X ? Color.White : Color.Red;
|
tb_Draw_2_Start_Y.BackColor = cur_process_info.Draw_Info_2.Start_Y == recipe.Draw_Info_2.Start_Y ? Color.White : Color.Red;
|
tb_Draw_2_End_Y.BackColor = cur_process_info.Draw_Info_2.End_Y == recipe.Draw_Info_2.End_Y ? Color.White : Color.Red;
|
tb_Draw_2_Distance.BackColor = cur_process_info.Draw_Info_2.Distance == recipe.Draw_Info_2.Distance ? Color.White : Color.Red;
|
tb_Draw_2_Repeat.BackColor = cur_process_info.Draw_Info_2.Repeat == recipe.Draw_Info_2.Repeat ? Color.White : Color.Red;
|
|
cb_Reverse_3.BackColor = cur_process_info.Draw_Info_3.Reverse == recipe.Draw_Info_3.Reverse ? Color.White : Color.Red;
|
cb_Draw_3_Draw.BackColor = cur_process_info.Draw_Info_3.Draw == recipe.Draw_Info_3.Draw ? Color.White : Color.Red;
|
tb_Draw_3_Start_X.BackColor = cur_process_info.Draw_Info_3.Start_X == recipe.Draw_Info_3.Start_X ? Color.White : Color.Red;
|
tb_Draw_3_End_X.BackColor = cur_process_info.Draw_Info_3.End_X == recipe.Draw_Info_3.End_X ? Color.White : Color.Red;
|
tb_Draw_3_Start_Y.BackColor = cur_process_info.Draw_Info_3.Start_Y == recipe.Draw_Info_3.Start_Y ? Color.White : Color.Red;
|
tb_Draw_3_End_Y.BackColor = cur_process_info.Draw_Info_3.End_Y == recipe.Draw_Info_3.End_Y ? Color.White : Color.Red;
|
tb_Draw_3_Distance.BackColor = cur_process_info.Draw_Info_3.Distance == recipe.Draw_Info_3.Distance ? Color.White : Color.Red;
|
tb_Draw_3_Repeat.BackColor = cur_process_info.Draw_Info_3.Repeat == recipe.Draw_Info_3.Repeat ? Color.White : Color.Red;
|
|
cb_Reverse_4.BackColor = cur_process_info.Draw_Info_4.Reverse == recipe.Draw_Info_4.Reverse ? Color.White : Color.Red;
|
cb_Draw_4_Draw.BackColor = cur_process_info.Draw_Info_4.Draw == recipe.Draw_Info_4.Draw ? Color.White : Color.Red;
|
tb_Draw_4_Start_X.BackColor = cur_process_info.Draw_Info_4.Start_X == recipe.Draw_Info_4.Start_X ? Color.White : Color.Red;
|
tb_Draw_4_End_X.BackColor = cur_process_info.Draw_Info_4.End_X == recipe.Draw_Info_4.End_X ? Color.White : Color.Red;
|
tb_Draw_4_Start_Y.BackColor = cur_process_info.Draw_Info_4.Start_Y == recipe.Draw_Info_4.Start_Y ? Color.White : Color.Red;
|
tb_Draw_4_End_Y.BackColor = cur_process_info.Draw_Info_4.End_Y == recipe.Draw_Info_4.End_Y ? Color.White : Color.Red;
|
tb_Draw_4_Distance.BackColor = cur_process_info.Draw_Info_4.Distance == recipe.Draw_Info_4.Distance ? Color.White : Color.Red;
|
tb_Draw_4_Repeat.BackColor = cur_process_info.Draw_Info_4.Repeat == recipe.Draw_Info_4.Repeat ? Color.White : Color.Red;
|
|
tb_Mark_Speed.BackColor = cur_process_info.Mark_Speed == recipe.Mark_Speed ? Color.White : Color.Red;
|
tb_Jump_Speed.BackColor = cur_process_info.Jump_Speed == recipe.Jump_Speed ? Color.White : Color.Red;
|
tb_Laser_On_Delay.BackColor = cur_process_info.Laser_On_Delay == recipe.Laser_On_Delay ? Color.White : Color.Red;
|
tb_Laser_Off_Delay.BackColor = cur_process_info.Laser_Off_Delay == recipe.Laser_Off_Delay ? Color.White : Color.Red;
|
tb_Jump_Delay.BackColor = cur_process_info.Jump_Delay == recipe.Jump_Delay ? Color.White : Color.Red;
|
tb_Mark_Delay.BackColor = cur_process_info.Mark_Delay == recipe.Mark_Delay ? Color.White : Color.Red;
|
tb_Frequency.BackColor = cur_process_info.Frequency == recipe.Frequency ? Color.White : Color.Red;
|
tb_Power.BackColor = cur_process_info.Power == recipe.Power ? Color.White : Color.Red;
|
tb_Target_Power.BackColor = cur_process_info.Target_Power_W == recipe.Target_Power_W ? Color.White : Color.Red;
|
tb_CTB_File_Path.BackColor = cur_process_info.CTB_File_Path == recipe.CTB_File_Path ? Color.White : Color.Red;
|
|
tb_Scanner_X_A1.BackColor = cur_process_info.Scanner_X_A1 == recipe.Scanner_X_A1 ? Color.White : Color.Red;
|
tb_Scanner_X_A2.BackColor = cur_process_info.Scanner_X_A2 == recipe.Scanner_X_A2 ? Color.White : Color.Red;
|
tb_Scanner_X_B1.BackColor = cur_process_info.Scanner_X_B1 == recipe.Scanner_X_B1 ? Color.White : Color.Red;
|
tb_Scanner_X_B2.BackColor = cur_process_info.Scanner_X_B2 == recipe.Scanner_X_B2 ? Color.White : Color.Red;
|
|
tb_Scanner_Y_A1.BackColor = cur_process_info.Scanner_Y_A1 == recipe.Scanner_Y_A1 ? Color.White : Color.Red;
|
tb_Scanner_Y_A2.BackColor = cur_process_info.Scanner_Y_A2 == recipe.Scanner_Y_A2 ? Color.White : Color.Red;
|
tb_Scanner_Y_B1.BackColor = cur_process_info.Scanner_Y_B1 == recipe.Scanner_Y_B1 ? Color.White : Color.Red;
|
tb_Scanner_Y_B2.BackColor = cur_process_info.Scanner_Y_B2 == recipe.Scanner_Y_B2 ? Color.White : Color.Red;
|
|
tb_Scanner_Z_A1.BackColor = cur_process_info.Scanner_Z_A1 == recipe.Scanner_Z_A1 ? Color.White : Color.Red;
|
tb_Scanner_Z_A2.BackColor = cur_process_info.Scanner_Z_A2 == recipe.Scanner_Z_A2 ? Color.White : Color.Red;
|
tb_Scanner_Z_B1.BackColor = cur_process_info.Scanner_Z_B1 == recipe.Scanner_Z_B1 ? Color.White : Color.Red;
|
tb_Scanner_Z_B2.BackColor = cur_process_info.Scanner_Z_B2 == recipe.Scanner_Z_B2 ? Color.White : Color.Red;
|
|
tb_Plasma_X_A1.BackColor = cur_process_info.Plasma_X_A1 == recipe.Plasma_X_A1 ? Color.White : Color.Red;
|
tb_Plasma_X_A2.BackColor = cur_process_info.Plasma_X_A2 == recipe.Plasma_X_A2 ? Color.White : Color.Red;
|
tb_Plasma_X_B1.BackColor = cur_process_info.Plasma_X_B1 == recipe.Plasma_X_B1 ? Color.White : Color.Red;
|
tb_Plasma_X_B2.BackColor = cur_process_info.Plasma_X_B2 == recipe.Plasma_X_B2 ? Color.White : Color.Red;
|
tb_Plasma_Y_A1.BackColor = cur_process_info.Plasma_Y_A1 == recipe.Plasma_Y_A1 ? Color.White : Color.Red;
|
tb_Plasma_Y_A2.BackColor = cur_process_info.Plasma_Y_A2 == recipe.Plasma_Y_A2 ? Color.White : Color.Red;
|
tb_Plasma_Y_B1.BackColor = cur_process_info.Plasma_Y_B1 == recipe.Plasma_Y_B1 ? Color.White : Color.Red;
|
tb_Plasma_Y_B2.BackColor = cur_process_info.Plasma_Y_B2 == recipe.Plasma_Y_B2 ? Color.White : Color.Red;
|
tb_Plasma_Distance.BackColor = cur_process_info.Plasma_Distance == recipe.Plasma_Distance ? Color.White : Color.Red;
|
tb_Plasma_Speed.BackColor = cur_process_info.Plasma_Speed == recipe.Plasma_Speed ? Color.White : Color.Red;
|
}
|
|
public void Set_Process_Info_Recipe_UI()
|
{
|
if (cur_process_info == null) return;
|
|
lb_Process_Recipe_Name.Text = cur_process_info.Name;
|
lb_Process_Recipe_Time.Text = cur_process_info.Create_Time.ToString();
|
|
tb_Hatch_Distance.Text = cur_process_info.Hatch_Distance.ToString();
|
cbb_WaveForm.Text = cur_process_info.Waveform.ToString();
|
|
tb_Work_Area_X.Text = cur_process_info.Work_Area_X.ToString();
|
tb_Work_Area_Y.Text = cur_process_info.Work_Area_Y.ToString();
|
|
cb_Reverse_1.Checked = cur_process_info.Draw_Info_1.Reverse;
|
cb_Draw_1_Draw.Checked = cur_process_info.Draw_Info_1.Draw;
|
tb_Draw_1_Start_X.Text = cur_process_info.Draw_Info_1.Start_X.ToString();
|
tb_Draw_1_End_X.Text = cur_process_info.Draw_Info_1.End_X.ToString();
|
tb_Draw_1_Start_Y.Text = cur_process_info.Draw_Info_1.Start_Y.ToString();
|
tb_Draw_1_End_Y.Text = cur_process_info.Draw_Info_1.End_Y.ToString();
|
tb_Draw_1_Distance.Text = cur_process_info.Draw_Info_1.Distance.ToString();
|
tb_Draw_1_Repeat.Text = cur_process_info.Draw_Info_1.Repeat.ToString();
|
|
cb_Reverse_2.Checked = cur_process_info.Draw_Info_2.Reverse;
|
cb_Draw_2_Draw.Checked = cur_process_info.Draw_Info_2.Draw;
|
tb_Draw_2_Start_X.Text = cur_process_info.Draw_Info_2.Start_X.ToString();
|
tb_Draw_2_End_X.Text = cur_process_info.Draw_Info_2.End_X.ToString();
|
tb_Draw_2_Start_Y.Text = cur_process_info.Draw_Info_2.Start_Y.ToString();
|
tb_Draw_2_End_Y.Text = cur_process_info.Draw_Info_2.End_Y.ToString();
|
tb_Draw_2_Distance.Text = cur_process_info.Draw_Info_2.Distance.ToString();
|
tb_Draw_2_Repeat.Text = cur_process_info.Draw_Info_2.Repeat.ToString();
|
|
cb_Reverse_3.Checked = cur_process_info.Draw_Info_3.Reverse;
|
cb_Draw_3_Draw.Checked = cur_process_info.Draw_Info_3.Draw;
|
tb_Draw_3_Start_X.Text = cur_process_info.Draw_Info_3.Start_X.ToString();
|
tb_Draw_3_End_X.Text = cur_process_info.Draw_Info_3.End_X.ToString();
|
tb_Draw_3_Start_Y.Text = cur_process_info.Draw_Info_3.Start_Y.ToString();
|
tb_Draw_3_End_Y.Text = cur_process_info.Draw_Info_3.End_Y.ToString();
|
tb_Draw_3_Distance.Text = cur_process_info.Draw_Info_3.Distance.ToString();
|
tb_Draw_3_Repeat.Text = cur_process_info.Draw_Info_3.Repeat.ToString();
|
|
cb_Reverse_4.Checked = cur_process_info.Draw_Info_4.Reverse;
|
cb_Draw_4_Draw.Checked = cur_process_info.Draw_Info_4.Draw;
|
tb_Draw_4_Start_X.Text = cur_process_info.Draw_Info_4.Start_X.ToString();
|
tb_Draw_4_End_X.Text = cur_process_info.Draw_Info_4.End_X.ToString();
|
tb_Draw_4_Start_Y.Text = cur_process_info.Draw_Info_4.Start_Y.ToString();
|
tb_Draw_4_End_Y.Text = cur_process_info.Draw_Info_4.End_Y.ToString();
|
tb_Draw_4_Distance.Text = cur_process_info.Draw_Info_4.Distance.ToString();
|
tb_Draw_4_Repeat.Text = cur_process_info.Draw_Info_4.Repeat.ToString();
|
|
tb_Mark_Speed.Text = cur_process_info.Mark_Speed.ToString();
|
tb_Jump_Speed.Text = cur_process_info.Jump_Speed.ToString();
|
tb_Laser_On_Delay.Text = cur_process_info.Laser_On_Delay.ToString();
|
tb_Laser_Off_Delay.Text = cur_process_info.Laser_Off_Delay.ToString();
|
tb_Jump_Delay.Text = cur_process_info.Jump_Delay.ToString();
|
tb_Mark_Delay.Text = cur_process_info.Mark_Delay.ToString();
|
tb_Frequency.Text = cur_process_info.Frequency.ToString();
|
tb_Power.Text = cur_process_info.Power.ToString();
|
tb_Target_Power.Text = cur_process_info.Target_Power_W.ToString();
|
tb_CTB_File_Path.Text = cur_process_info.CTB_File_Path.ToString();
|
|
tb_Scanner_X_A1.Text = cur_process_info.Scanner_X_A1.ToString();
|
tb_Scanner_X_A2.Text = cur_process_info.Scanner_X_A2.ToString();
|
tb_Scanner_X_B1.Text = cur_process_info.Scanner_X_B1.ToString();
|
tb_Scanner_X_B2.Text = cur_process_info.Scanner_X_B2.ToString();
|
tb_Scanner_Y_A1.Text = cur_process_info.Scanner_Y_A1.ToString();
|
tb_Scanner_Y_A2.Text = cur_process_info.Scanner_Y_A2.ToString();
|
tb_Scanner_Y_B1.Text = cur_process_info.Scanner_Y_B1.ToString();
|
tb_Scanner_Y_B2.Text = cur_process_info.Scanner_Y_B2.ToString();
|
tb_Scanner_Z_A1.Text = cur_process_info.Scanner_Z_A1.ToString();
|
tb_Scanner_Z_A2.Text = cur_process_info.Scanner_Z_A2.ToString();
|
tb_Scanner_Z_B1.Text = cur_process_info.Scanner_Z_B1.ToString();
|
tb_Scanner_Z_B2.Text = cur_process_info.Scanner_Z_B2.ToString();
|
|
tb_Plasma_X_A1.Text = cur_process_info.Plasma_X_A1.ToString();
|
tb_Plasma_X_A2.Text = cur_process_info.Plasma_X_A2.ToString();
|
tb_Plasma_X_B1.Text = cur_process_info.Plasma_X_B1.ToString();
|
tb_Plasma_X_B2.Text = cur_process_info.Plasma_X_B2.ToString();
|
tb_Plasma_Y_A1.Text = cur_process_info.Plasma_Y_A1.ToString();
|
tb_Plasma_Y_A2.Text = cur_process_info.Plasma_Y_A2.ToString();
|
tb_Plasma_Y_B1.Text = cur_process_info.Plasma_Y_B1.ToString();
|
tb_Plasma_Y_B2.Text = cur_process_info.Plasma_Y_B2.ToString();
|
|
tb_Plasma_Distance.Text = cur_process_info.Plasma_Distance.ToString();
|
tb_Plasma_Speed.Text = cur_process_info.Plasma_Speed.ToString();
|
}
|
|
public void Reset_Process_Info_UI()
|
{
|
lb_Process_Recipe_Name.Text = "";
|
lb_Process_Recipe_Time.Text = "";
|
|
tb_Hatch_Distance.Text = "";
|
cbb_WaveForm.Text = "";
|
|
tb_Work_Area_X.Text = "";
|
tb_Work_Area_Y.Text = "";
|
|
tb_Draw_1_Start_X.Text = "";
|
tb_Draw_1_End_X.Text = "";
|
tb_Draw_1_Start_Y.Text = "";
|
tb_Draw_1_End_Y.Text = "";
|
tb_Draw_1_Distance.Text = "";
|
tb_Draw_1_Repeat.Text = "";
|
|
tb_Draw_2_Start_X.Text = "";
|
tb_Draw_2_End_X.Text = "";
|
tb_Draw_2_Start_Y.Text = "";
|
tb_Draw_2_End_Y.Text = "";
|
tb_Draw_2_Distance.Text = "";
|
tb_Draw_2_Repeat.Text = "";
|
|
tb_Draw_3_Start_X.Text = "";
|
tb_Draw_3_End_X.Text = "";
|
tb_Draw_3_Start_Y.Text = "";
|
tb_Draw_3_End_Y.Text = "";
|
tb_Draw_3_Distance.Text = "";
|
tb_Draw_3_Repeat.Text = "";
|
|
tb_Draw_4_Start_X.Text = "";
|
tb_Draw_4_End_X.Text = "";
|
tb_Draw_4_Start_Y.Text = "";
|
tb_Draw_4_End_Y.Text = "";
|
tb_Draw_4_Distance.Text = "";
|
tb_Draw_4_Repeat.Text = "";
|
|
tb_Mark_Speed.Text = "";
|
tb_Jump_Speed.Text = "";
|
tb_Laser_On_Delay.Text = "";
|
tb_Laser_Off_Delay.Text = "";
|
tb_Jump_Delay.Text = "";
|
tb_Mark_Delay.Text = "";
|
tb_Frequency.Text = "";
|
tb_Power.Text = "";
|
tb_CTB_File_Path.Text = "";
|
|
tb_Scanner_X_A1.Text = "";
|
tb_Scanner_X_A2.Text = "";
|
tb_Scanner_X_B1.Text = "";
|
tb_Scanner_X_B2.Text = "";
|
tb_Scanner_Y_A1.Text = "";
|
tb_Scanner_Y_A2.Text = "";
|
tb_Scanner_Y_B1.Text = "";
|
tb_Scanner_Y_B2.Text = "";
|
tb_Scanner_Z_A1.Text = "";
|
tb_Scanner_Z_A2.Text = "";
|
tb_Scanner_Z_B1.Text = "";
|
tb_Scanner_Z_B2.Text = "";
|
|
tb_Plasma_X_A1.Text = "";
|
tb_Plasma_X_A2.Text = "";
|
tb_Plasma_X_B1.Text = "";
|
tb_Plasma_X_B2.Text = "";
|
tb_Plasma_Y_A1.Text = "";
|
tb_Plasma_Y_A2.Text = "";
|
tb_Plasma_Y_B1.Text = "";
|
tb_Plasma_Y_B2.Text = "";
|
|
tb_Plasma_Distance.Text = "";
|
tb_Plasma_Speed.Text = "";
|
}
|
|
private void Refresh_lv_Process_Info_Recipes()
|
{
|
Process_Info_Manager.Instance.Refresh_Process_Info();
|
|
lv_Process_Info_Recipes.Items.Clear();
|
|
Process_Info_Recipe[] recipes = Process_Info_Manager.Instance.Get_Recipes();
|
|
foreach (Process_Info_Recipe recipe in recipes)
|
{
|
lv_Process_Info_Recipes.Items.Add(recipe.Name);
|
}
|
|
if (cur_process_info == null)
|
{
|
pnl_Process_Info_Recipe.Enabled = false;
|
}
|
else
|
{
|
if (_Parent._equip.User.Level <= En_User_Level.Operator)
|
{
|
pnl_Process_Info_Recipe.Enabled = false;
|
}
|
else
|
{
|
pnl_Process_Info_Recipe.Enabled = true;
|
}
|
}
|
}
|
|
private void Form_Panel_Type_Info_Recipe_Event(object obj, RecipeEventArgs e)
|
{
|
switch (e.Status)
|
{
|
case Recipe_Event_Status.New:
|
{
|
Refresh_lv_Panel_Type_Info_Recipes();
|
Set_Panel_Type_Info_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Delete:
|
{
|
Refresh_lv_Panel_Type_Info_Recipes();
|
Set_Panel_Type_Info_Defferent();
|
Reset_Panel_Type_Info_UI();
|
break;
|
}
|
case Recipe_Event_Status.Save:
|
{
|
Set_Panel_Type_Info_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Cancel:
|
{
|
Set_Panel_Type_Info_Recipe_UI();
|
Set_Panel_Type_Info_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Update:
|
{
|
Set_Panel_Type_Info_Recipe_UI();
|
Set_Panel_Type_Info_Defferent();
|
break;
|
}
|
}
|
}
|
|
public static void On_Panel_Type_Info_Receipe_Event(Recipe_Event_Status status)
|
{
|
Panel_Type_Info_Recipe_Event?.Invoke(new Object(), new RecipeEventArgs(status));
|
}
|
|
public void Set_Panel_Type_Info_Defferent()
|
{
|
if (cur_panel_type_info == null) return;
|
|
Panel_Type_Info_Recipe recipe = Panel_Type_Info_Manager.Instance.Get_Recipe(cur_panel_type_info.Name);
|
|
if (recipe == null) return;
|
tb_Panel_Type_Info_Align_Mark_1_X.BackColor = cur_panel_type_info.Align_Mark_1_X == recipe.Align_Mark_1_X ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Align_Mark_1_Y.BackColor = cur_panel_type_info.Align_Mark_1_Y == recipe.Align_Mark_1_Y ? Color.White : Color.Red;
|
|
tb_Panel_Type_Info_Align_Mark_2_X.BackColor = cur_panel_type_info.Align_Mark_2_X == recipe.Align_Mark_2_X ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Align_Mark_2_Y.BackColor = cur_panel_type_info.Align_Mark_2_Y == recipe.Align_Mark_2_Y ? Color.White : Color.Red;
|
|
tb_Panel_Type_Info_MCR_X.BackColor = cur_panel_type_info.MCR_Mark_X == recipe.MCR_Mark_X ? Color.White : Color.Red;
|
tb_Panel_Type_Info_MCR_Y.BackColor = cur_panel_type_info.MCR_Mark_Y == recipe.MCR_Mark_Y ? Color.White : Color.Red;
|
|
tb_Panel_Type_Info_Offset_X_A1.BackColor = cur_panel_type_info.Scanner_Offset_X_A1 == recipe.Scanner_Offset_X_A1 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_Y_A1.BackColor = cur_panel_type_info.Scanner_Offset_Y_A1 == recipe.Scanner_Offset_Y_A1 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_T_A1.BackColor = cur_panel_type_info.Scanner_Offset_T_A1 == recipe.Scanner_Offset_T_A1 ? Color.White : Color.Red;
|
|
tb_Panel_Type_Info_Offset_X_A2.BackColor = cur_panel_type_info.Scanner_Offset_X_A2 == recipe.Scanner_Offset_X_A2 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_Y_A2.BackColor = cur_panel_type_info.Scanner_Offset_Y_A2 == recipe.Scanner_Offset_Y_A2 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_T_A2.BackColor = cur_panel_type_info.Scanner_Offset_T_A2 == recipe.Scanner_Offset_T_A2 ? Color.White : Color.Red;
|
|
tb_Panel_Type_Info_Offset_X_B1.BackColor = cur_panel_type_info.Scanner_Offset_X_B1 == recipe.Scanner_Offset_X_B1 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_Y_B1.BackColor = cur_panel_type_info.Scanner_Offset_Y_B1 == recipe.Scanner_Offset_Y_B1 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_T_B1.BackColor = cur_panel_type_info.Scanner_Offset_T_B1 == recipe.Scanner_Offset_T_B1 ? Color.White : Color.Red;
|
|
tb_Panel_Type_Info_Offset_X_B2.BackColor = cur_panel_type_info.Scanner_Offset_X_B2 == recipe.Scanner_Offset_X_B2 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_Y_B2.BackColor = cur_panel_type_info.Scanner_Offset_Y_B2 == recipe.Scanner_Offset_Y_B2 ? Color.White : Color.Red;
|
tb_Panel_Type_Info_Offset_T_B2.BackColor = cur_panel_type_info.Scanner_Offset_T_B2 == recipe.Scanner_Offset_T_B2 ? Color.White : Color.Red;
|
}
|
|
public void Set_Panel_Type_Info_Recipe_UI()
|
{
|
if (cur_panel_type_info == null) return;
|
|
lb_Panel_Type_Info_Name.Text = cur_panel_type_info.Name;
|
lb_Panel_Type_Info_Time.Text = cur_panel_type_info.Create_Time.ToString();
|
|
tb_Panel_Type_Info_Align_Mark_1_X.Text = cur_panel_type_info.Align_Mark_1_X.ToString();
|
tb_Panel_Type_Info_Align_Mark_1_Y.Text = cur_panel_type_info.Align_Mark_1_Y.ToString();
|
|
|
tb_Panel_Type_Info_Align_Mark_2_X.Text = cur_panel_type_info.Align_Mark_2_X.ToString();
|
tb_Panel_Type_Info_Align_Mark_2_Y.Text = cur_panel_type_info.Align_Mark_2_Y.ToString();
|
|
|
tb_Panel_Type_Info_MCR_X.Text = cur_panel_type_info.MCR_Mark_X.ToString();
|
tb_Panel_Type_Info_MCR_Y.Text = cur_panel_type_info.MCR_Mark_Y.ToString();
|
|
|
tb_Panel_Type_Info_Offset_X_A1.Text = cur_panel_type_info.Scanner_Offset_X_A1.ToString();
|
tb_Panel_Type_Info_Offset_Y_A1.Text = cur_panel_type_info.Scanner_Offset_Y_A1.ToString();
|
tb_Panel_Type_Info_Offset_T_A1.Text = cur_panel_type_info.Scanner_Offset_T_A1.ToString();
|
|
tb_Panel_Type_Info_Offset_X_A2.Text = cur_panel_type_info.Scanner_Offset_X_A2.ToString();
|
tb_Panel_Type_Info_Offset_Y_A2.Text = cur_panel_type_info.Scanner_Offset_Y_A2.ToString();
|
tb_Panel_Type_Info_Offset_T_A2.Text = cur_panel_type_info.Scanner_Offset_T_A2.ToString();
|
|
|
tb_Panel_Type_Info_Offset_X_B1.Text = cur_panel_type_info.Scanner_Offset_X_B1.ToString();
|
tb_Panel_Type_Info_Offset_Y_B1.Text = cur_panel_type_info.Scanner_Offset_Y_B1.ToString();
|
tb_Panel_Type_Info_Offset_T_B1.Text = cur_panel_type_info.Scanner_Offset_T_B1.ToString();
|
|
tb_Panel_Type_Info_Offset_X_B2.Text = cur_panel_type_info.Scanner_Offset_X_B2.ToString();
|
tb_Panel_Type_Info_Offset_Y_B2.Text = cur_panel_type_info.Scanner_Offset_Y_B2.ToString();
|
tb_Panel_Type_Info_Offset_T_B2.Text = cur_panel_type_info.Scanner_Offset_T_B2.ToString();
|
}
|
|
public void Reset_Panel_Type_Info_UI()
|
{
|
lb_Panel_Type_Info_Name.Text = "";
|
lb_Panel_Type_Info_Time.Text = "";
|
|
tb_Panel_Type_Info_Align_Mark_1_X.Text = "";
|
tb_Panel_Type_Info_Align_Mark_1_Y.Text = "";
|
|
tb_Panel_Type_Info_Align_Mark_2_X.Text = "";
|
tb_Panel_Type_Info_Align_Mark_2_Y.Text = "";
|
|
tb_Panel_Type_Info_MCR_X.Text = "";
|
tb_Panel_Type_Info_MCR_Y.Text = "";
|
|
tb_Panel_Type_Info_Offset_X_A1.Text = "";
|
tb_Panel_Type_Info_Offset_Y_A1.Text = "";
|
tb_Panel_Type_Info_Offset_T_A1.Text = "";
|
|
tb_Panel_Type_Info_Offset_X_A2.Text = "";
|
tb_Panel_Type_Info_Offset_Y_A2.Text = "";
|
tb_Panel_Type_Info_Offset_T_A2.Text = "";
|
|
tb_Panel_Type_Info_Offset_X_B1.Text = "";
|
tb_Panel_Type_Info_Offset_Y_B1.Text = "";
|
tb_Panel_Type_Info_Offset_T_B1.Text = "";
|
|
tb_Panel_Type_Info_Offset_X_B2.Text = "";
|
tb_Panel_Type_Info_Offset_Y_B2.Text = "";
|
tb_Panel_Type_Info_Offset_T_B2.Text = "";
|
}
|
|
public void Refresh_lv_Panel_Type_Info_Recipes()
|
{
|
Panel_Type_Info_Manager.Instance.Refresh_Panel_Type_Info();
|
|
lv_Panel_Type_Info_Recipes.Items.Clear();
|
|
Panel_Type_Info_Recipe[] recipes = Panel_Type_Info_Manager.Instance.Get_Recipes();
|
|
foreach (Panel_Type_Info_Recipe recipe in recipes)
|
{
|
lv_Panel_Type_Info_Recipes.Items.Add(recipe.Name);
|
}
|
|
if (cur_panel_type_info == null)
|
{
|
pnl_Panel_Type_Info_Recipe.Enabled = false;
|
}
|
else
|
{
|
if (_Parent._equip.User.Level <= En_User_Level.Operator)
|
{
|
pnl_Panel_Type_Info_Recipe.Enabled = false;
|
}
|
else
|
{
|
pnl_Panel_Type_Info_Recipe.Enabled = true;
|
}
|
}
|
}
|
|
private void Form_Recipe_Main_Main_Recipe_Event(object obj, RecipeEventArgs e)
|
{
|
switch (e.Status)
|
{
|
case Recipe_Event_Status.New:
|
{
|
Refresh_lv_Main_Recipes();
|
Set_Main_Recipe_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Delete:
|
{
|
Refresh_lv_Main_Recipes();
|
Set_Main_Recipe_Defferent();
|
Reset_Main_Recipe_UI();
|
break;
|
}
|
case Recipe_Event_Status.Save:
|
{
|
Set_Main_Recipe_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Cancel:
|
{
|
Set_Main_Recipe_UI();
|
Set_Main_Recipe_Defferent();
|
break;
|
}
|
case Recipe_Event_Status.Update:
|
{
|
Set_Main_Recipe_UI();
|
Set_Main_Recipe_Defferent();
|
break;
|
}
|
}
|
}
|
|
public static void On_Main_Receipe_Event(Recipe_Event_Status status)
|
{
|
Main_Recipe_Event?.Invoke(new Object(), new RecipeEventArgs(status));
|
}
|
|
public void Refresh_lv_Main_Recipes()
|
{
|
Main_Recipe_Manager.Instance.Refresh_Main_Recipe();
|
|
lv_Main_Recipes.Items.Clear();
|
|
Main_Recipe[] recipes = Main_Recipe_Manager.Instance.Get_Recipes();
|
|
foreach (Main_Recipe recipe in recipes)
|
{
|
lv_Main_Recipes.Items.Add(recipe.Name);
|
}
|
|
cbb_Panel_Type_Info_Recipe.Items.Clear();
|
Cbb_Process_Info_Recipe.Items.Clear();
|
cbb_Tray_Info_Recipe.Items.Clear();
|
cbb_Vision_Info_Recipe.Items.Clear();
|
|
cbb_Panel_Type_Info_Recipe.Items.Add("");
|
Cbb_Process_Info_Recipe.Items.Add("");
|
cbb_Tray_Info_Recipe.Items.Add("");
|
cbb_Vision_Info_Recipe.Items.Add("");
|
foreach (Panel_Type_Info_Recipe info in Panel_Type_Info_Manager.Instance.Get_Recipes())
|
{
|
cbb_Panel_Type_Info_Recipe.Items.Add(info.Name);
|
}
|
|
foreach (Process_Info_Recipe info in Process_Info_Manager.Instance.Get_Recipes())
|
{
|
Cbb_Process_Info_Recipe.Items.Add(info.Name);
|
}
|
|
foreach (Tray_Info_Recipe info in Tray_Info_Manager.Instance.Get_Recipes())
|
{
|
cbb_Tray_Info_Recipe.Items.Add(info.Name);
|
}
|
|
foreach (Vision_Info_Recipe info in Vision_Info_Manager.Instance.Get_Recipes())
|
{
|
cbb_Vision_Info_Recipe.Items.Add(info.Name);
|
}
|
|
if (cur_main_recipe == null)
|
{
|
pnl_Main_Recipe.Enabled = false;
|
}
|
else
|
{
|
pnl_Main_Recipe.Enabled = true;
|
}
|
}
|
|
public void Set_Main_Recipe_Defferent()
|
{
|
if (cur_main_recipe == null) return;
|
|
Main_Recipe recipe = Main_Recipe_Manager.Instance.Get_Recipe(cur_main_recipe.Name);
|
|
if (recipe == null) return;
|
|
if (cur_main_recipe.panel_type_info == null || recipe.panel_type_info == null)
|
cbb_Panel_Type_Info_Recipe.BackColor = Color.White;
|
else
|
cbb_Panel_Type_Info_Recipe.BackColor = cur_main_recipe.panel_type_info.Name == recipe.panel_type_info.Name ? Color.White : Color.Red;
|
|
if (cur_main_recipe.process_info == null || recipe.process_info == null)
|
Cbb_Process_Info_Recipe.BackColor = Color.White;
|
else
|
Cbb_Process_Info_Recipe.BackColor = cur_main_recipe.process_info.Name == recipe.process_info.Name ? Color.White : Color.Red;
|
|
if (cur_main_recipe.tray_info == null || recipe.tray_info == null)
|
cbb_Tray_Info_Recipe.BackColor = Color.White;
|
else
|
cbb_Tray_Info_Recipe.BackColor = cur_main_recipe.tray_info.Name == recipe.tray_info.Name ? Color.White : Color.Red;
|
|
if (cur_main_recipe.vision_info == null || recipe.vision_info == null)
|
cbb_Vision_Info_Recipe.BackColor = Color.White;
|
else
|
cbb_Vision_Info_Recipe.BackColor = cur_main_recipe.vision_info.Name == recipe.vision_info.Name ? Color.White : Color.Red;
|
}
|
|
public void Reset_Main_Recipe_UI()
|
{
|
cbb_Panel_Type_Info_Recipe.Text = "";
|
Cbb_Process_Info_Recipe.Text = "";
|
cbb_Tray_Info_Recipe.Text = "";
|
cbb_Vision_Info_Recipe.Text = "";
|
}
|
|
public void Set_Main_Recipe_UI()
|
{
|
if (cur_main_recipe == null) return;
|
|
lb_Main_Recipe_Name.Text = cur_main_recipe.Name;
|
lb_Main_Recipe_Time.Text = cur_main_recipe.Create_Time.ToString();
|
|
if (cur_main_recipe.panel_type_info == null)
|
cbb_Panel_Type_Info_Recipe.Text = "";
|
else
|
cbb_Panel_Type_Info_Recipe.Text = cur_main_recipe.panel_type_info.Name;
|
|
if (cur_main_recipe.process_info == null)
|
Cbb_Process_Info_Recipe.Text = "";
|
else
|
Cbb_Process_Info_Recipe.Text = cur_main_recipe.process_info.Name;
|
|
if (cur_main_recipe.tray_info == null)
|
cbb_Tray_Info_Recipe.Text = "";
|
else
|
cbb_Tray_Info_Recipe.Text = cur_main_recipe.tray_info.Name;
|
|
if (cur_main_recipe.vision_info == null)
|
cbb_Vision_Info_Recipe.Text = "";
|
else
|
cbb_Vision_Info_Recipe.Text = cur_main_recipe.vision_info.Name;
|
}
|
|
#endregion
|
}
|
}
|