437 lines
24 KiB
C#
437 lines
24 KiB
C#
|
|
using System;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.Data;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Windows.Forms;
|
|||
|
|
|
|||
|
|
using INT_LKD.Forms;
|
|||
|
|
using INT_LKD.DataStore;
|
|||
|
|
|
|||
|
|
namespace INT_LKD.Controls
|
|||
|
|
{
|
|||
|
|
public partial class ControlMenuUserGroupEditor : UserControl
|
|||
|
|
{
|
|||
|
|
#region Field
|
|||
|
|
private FormMenu m_ParentForm;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Constructor
|
|||
|
|
public ControlMenuUserGroupEditor(FormMenu parent)
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
|
|||
|
|
this.ParentForm = parent;
|
|||
|
|
this.Initialize();
|
|||
|
|
this.InitializeDesign();
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Property
|
|||
|
|
public FormMenu ParentForm
|
|||
|
|
{
|
|||
|
|
get { return this.m_ParentForm; }
|
|||
|
|
private set { this.m_ParentForm = value; }
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Method
|
|||
|
|
private void Initialize()
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
public void InitializeDesign()
|
|||
|
|
{
|
|||
|
|
switch (this.ParentForm.ParentForm.SystemConfig.LANGUAGE)
|
|||
|
|
{
|
|||
|
|
case Define.E_LanguageID.Chinese:
|
|||
|
|
this.smartGroupBox1.Text = "用户设置 > 组编辑";
|
|||
|
|
|
|||
|
|
this.labelTitleMain.Text = "主菜单";
|
|||
|
|
this.labelTitleMainProductChange.Text = "产品变化";
|
|||
|
|
this.labelTitleMainClear.Text = "消除";
|
|||
|
|
this.labelTitleMainSubMenu.Text = "子菜单";
|
|||
|
|
|
|||
|
|
this.labelTitleMenu.Text = "菜单";
|
|||
|
|
this.labelTitleMenuRecipe.Text = "配方设置";
|
|||
|
|
this.labelTitleMenuUserSetting.Text = "用户编辑";
|
|||
|
|
this.labelTitleMenuIOTest.Text = "I/O 测试";
|
|||
|
|
this.labelTitleMenuHistoryLog.Text = "日志_历史记录";
|
|||
|
|
this.labelTitleMenuInspectionLog.Text = "日志_检查";
|
|||
|
|
this.labelTitleMenuAlarmLog.Text = "日志_报警";
|
|||
|
|
this.labelTitleMenuInformation.Text = "信息";
|
|||
|
|
this.labelTitleMenuEthernet.Text = "以太网";
|
|||
|
|
|
|||
|
|
this.buttonGroupNameChange.ButtonText = "更改姓名";
|
|||
|
|
this.buttonSave.ButtonText = "保存";
|
|||
|
|
break;
|
|||
|
|
default:
|
|||
|
|
this.smartGroupBox1.Text = "User > GroupEditor";
|
|||
|
|
|
|||
|
|
this.labelTitleMain.Text = "Main";
|
|||
|
|
this.labelTitleMainProductChange.Text = "Product change";
|
|||
|
|
this.labelTitleMainClear.Text = "Clear data";
|
|||
|
|
this.labelTitleMainSubMenu.Text = "Submenu";
|
|||
|
|
|
|||
|
|
this.labelTitleMenu.Text = "Menu";
|
|||
|
|
this.labelTitleMenuRecipe.Text = "Recipe setting";
|
|||
|
|
this.labelTitleMenuUserSetting.Text = "User editing";
|
|||
|
|
this.labelTitleMenuIOTest.Text = "I/O Test";
|
|||
|
|
this.labelTitleMenuHistoryLog.Text = "Log_History";
|
|||
|
|
this.labelTitleMenuInspectionLog.Text = "Log_Inspection";
|
|||
|
|
this.labelTitleMenuAlarmLog.Text = "Log_Alarm";
|
|||
|
|
this.labelTitleMenuInformation.Text = "Information";
|
|||
|
|
this.labelTitleMenuEthernet.Text = "Ethernet";
|
|||
|
|
|
|||
|
|
this.buttonGroupNameChange.ButtonText = "Change name";
|
|||
|
|
this.buttonSave.ButtonText = "Save";
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void KeyboardClose()
|
|||
|
|
{
|
|||
|
|
this.smartKeyboard.Hide();
|
|||
|
|
|
|||
|
|
this.groupBoxLevel1.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel2.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel3.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
|
|||
|
|
this.textBoxLevel1.Visible = false;
|
|||
|
|
this.textBoxLevel2.Visible = false;
|
|||
|
|
this.textBoxLevel3.Visible = false;
|
|||
|
|
|
|||
|
|
this.groupBoxLevel1.Enabled = true;
|
|||
|
|
this.groupBoxLevel2.Enabled = true;
|
|||
|
|
this.groupBoxLevel3.Enabled = true;
|
|||
|
|
|
|||
|
|
this.buttonSave.Enabled = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void UpdateDisplay(UserGroup group, SystemConfiguration system)
|
|||
|
|
{
|
|||
|
|
this.groupBoxLevel1.Text = this.textBoxLevel1.Text = system.LEVEL1_NAME;
|
|||
|
|
this.groupBoxLevel2.Text = this.textBoxLevel2.Text = system.LEVEL2_NAME;
|
|||
|
|
this.groupBoxLevel3.Text = this.textBoxLevel3.Text = system.LEVEL3_NAME;
|
|||
|
|
|
|||
|
|
this.groupBoxLevel1.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel2.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel3.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
|
|||
|
|
#region Level1
|
|||
|
|
this.checkBoxL1MainProductChange.Checked = group.Level1.IsMainDisplayProductChange;
|
|||
|
|
this.checkBoxL1MainClear.Checked = group.Level1.IsMainDisplayClear;
|
|||
|
|
this.checkBoxL1MainSubMenu.Checked = group.Level1.IsMainDisplaySubMenu;
|
|||
|
|
|
|||
|
|
this.checkBoxL1MenuProduct.Checked = group.Level1.IsMenuRecipe;
|
|||
|
|
this.checkBoxL1MenuUserSetting.Checked = group.Level1.IsMenuUserSetting;
|
|||
|
|
this.checkBoxL1MenuUserGroupEditor.Checked = group.Level1.IsMenuUserGroupEditor;
|
|||
|
|
this.checkBoxL1MenuIOTest.Checked = group.Level1.IsMenuIOTest;
|
|||
|
|
this.checkBoxL1MenuHistoryLog.Checked = group.Level1.IsMenuHistoryLog;
|
|||
|
|
this.checkBoxL1MenuInspectionLog.Checked = group.Level1.IsMenuInspectionLog;
|
|||
|
|
this.checkBoxL1MenuAlarmLog.Checked = group.Level1.IsMenuAlarmLog;
|
|||
|
|
this.checkBoxL1MenuInformation.Checked = group.Level1.IsMenuInformation;
|
|||
|
|
this.checkBoxL1MenuEquipment.Checked = group.Level1.IsMenuEquipment;
|
|||
|
|
this.checkBoxL1MenuEthernet.Checked = group.Level1.IsMenuEthernet;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Level2
|
|||
|
|
this.checkBoxL2MainProductChange.Checked = group.Level2.IsMainDisplayProductChange;
|
|||
|
|
this.checkBoxL2MainClear.Checked = group.Level2.IsMainDisplayClear;
|
|||
|
|
this.checkBoxL2MainSubMenu.Checked = group.Level2.IsMainDisplaySubMenu;
|
|||
|
|
|
|||
|
|
this.checkBoxL2MenuProduct.Checked = group.Level2.IsMenuRecipe;
|
|||
|
|
this.checkBoxL2MenuUserSetting.Checked = group.Level2.IsMenuUserSetting;
|
|||
|
|
this.checkBoxL2MenuUserGroupEditor.Checked = group.Level2.IsMenuUserGroupEditor;
|
|||
|
|
this.checkBoxL2MenuIOTest.Checked = group.Level2.IsMenuIOTest;
|
|||
|
|
this.checkBoxL2MenuHistoryLog.Checked = group.Level2.IsMenuHistoryLog;
|
|||
|
|
this.checkBoxL2MenuInspectionLog.Checked = group.Level2.IsMenuInspectionLog;
|
|||
|
|
this.checkBoxL2MenuAlarmLog.Checked = group.Level2.IsMenuAlarmLog;
|
|||
|
|
this.checkBoxL2MenuInformation.Checked = group.Level2.IsMenuInformation;
|
|||
|
|
this.checkBoxL2MenuEquipment.Checked = group.Level2.IsMenuEquipment;
|
|||
|
|
this.checkBoxL2MenuEthernet.Checked = group.Level2.IsMenuEthernet;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Level3
|
|||
|
|
this.checkBoxL3MainProductChange.Checked = group.Level3.IsMainDisplayProductChange;
|
|||
|
|
this.checkBoxL3MainClear.Checked = group.Level3.IsMainDisplayClear;
|
|||
|
|
this.checkBoxL3MainSubMenu.Checked = group.Level3.IsMainDisplaySubMenu;
|
|||
|
|
|
|||
|
|
this.checkBoxL3MenuProduct.Checked = group.Level3.IsMenuRecipe;
|
|||
|
|
this.checkBoxL3MenuUserSetting.Checked = group.Level3.IsMenuUserSetting;
|
|||
|
|
this.checkBoxL3MenuUserGroupEditor.Checked = group.Level3.IsMenuUserGroupEditor;
|
|||
|
|
this.checkBoxL3MenuIOTest.Checked = group.Level3.IsMenuIOTest;
|
|||
|
|
this.checkBoxL3MenuHistoryLog.Checked = group.Level3.IsMenuHistoryLog;
|
|||
|
|
this.checkBoxL3MenuInspectionLog.Checked = group.Level3.IsMenuInspectionLog;
|
|||
|
|
this.checkBoxL3MenuAlarmLog.Checked = group.Level3.IsMenuAlarmLog;
|
|||
|
|
this.checkBoxL3MenuInformation.Checked = group.Level3.IsMenuInformation;
|
|||
|
|
this.checkBoxL3MenuEquipment.Checked = group.Level3.IsMenuEquipment;
|
|||
|
|
this.checkBoxL3MenuEthernet.Checked = group.Level3.IsMenuEthernet;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Default
|
|||
|
|
this.checkBoxDefaultMainProductChange.Checked = group.Admin.IsMainDisplayProductChange;
|
|||
|
|
this.checkBoxDefaultMainClear.Checked = group.Admin.IsMainDisplayClear;
|
|||
|
|
this.checkBoxDefaultMainSubMenu.Checked = group.Admin.IsMainDisplaySubMenu;
|
|||
|
|
|
|||
|
|
this.checkBoxDefaultMenuProduct.Checked = group.Admin.IsMenuRecipe;
|
|||
|
|
this.checkBoxDefaultMenuUserSetting.Checked = group.Admin.IsMenuUserSetting;
|
|||
|
|
this.checkBoxDefaultMenuUserGroupEditor.Checked = group.Admin.IsMenuUserGroupEditor;
|
|||
|
|
this.checkBoxDefaultMenuIOTest.Checked = group.Admin.IsMenuIOTest;
|
|||
|
|
this.checkBoxDefaultMenuEquipmentLog.Checked = group.Admin.IsMenuHistoryLog;
|
|||
|
|
this.checkBoxDefaultMenuCheckLog.Checked = group.Admin.IsMenuInspectionLog;
|
|||
|
|
this.checkBoxDefaultMenuAlarmList.Checked = group.Admin.IsMenuAlarmLog;
|
|||
|
|
this.checkBoxDefaultMenuInformation.Checked = group.Admin.IsMenuInformation;
|
|||
|
|
this.checkBoxDefaultMenuEquipment.Checked = group.Admin.IsMenuEquipment;
|
|||
|
|
this.checkBoxDefaultMenuEthernet.Checked = group.Admin.IsMenuEthernet;
|
|||
|
|
#endregion
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void DisplayRefresh()
|
|||
|
|
{
|
|||
|
|
this.ParentForm.ParentForm.SetDisplayMode(Define.E_EquipmentMode.Menu);
|
|||
|
|
|
|||
|
|
this.UpdateDisplay(this.ParentForm.ParentForm.CurrentUserGroup, this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
|
|||
|
|
this.buttonSave.Visible = false;
|
|||
|
|
this.buttonGroupNameChange.Visible = false;
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Event Handler
|
|||
|
|
private void checkBox_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (this.buttonSave.Visible == false)
|
|||
|
|
this.buttonSave.Visible = true;
|
|||
|
|
}
|
|||
|
|
private void groupBox_DoubleClick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
SmartX.SmartGroupBox groupBox = sender as SmartX.SmartGroupBox;
|
|||
|
|
|
|||
|
|
if (groupBox == this.groupBoxLevel1)
|
|||
|
|
{
|
|||
|
|
this.groupBoxLevel1.FrameLineColor1 = Color.FromArgb(0, 192, 0);
|
|||
|
|
this.groupBoxLevel2.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel3.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
}
|
|||
|
|
else if (groupBox == this.groupBoxLevel2)
|
|||
|
|
{
|
|||
|
|
this.groupBoxLevel1.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel2.FrameLineColor1 = Color.FromArgb(0, 192, 0);
|
|||
|
|
this.groupBoxLevel3.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
}
|
|||
|
|
else if (groupBox == this.groupBoxLevel3)
|
|||
|
|
{
|
|||
|
|
this.groupBoxLevel1.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel2.FrameLineColor1 = Color.FromArgb(58, 110, 165);
|
|||
|
|
this.groupBoxLevel3.FrameLineColor1 = Color.FromArgb(0, 192, 0);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
this.buttonGroupNameChange.Visible = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void textBoxLevel1_KeyPress(object sender, KeyPressEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (e.KeyChar == '\r')
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.SystemConfig.LEVEL1_NAME = this.textBoxLevel1.Text;
|
|||
|
|
this.groupBoxLevel1.Text = this.textBoxLevel1.Text;
|
|||
|
|
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
this.ParentForm.ParentForm.ChildFormMenu.UpdateLevelNameDisplay(this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
this.KeyboardClose();
|
|||
|
|
}
|
|||
|
|
else if (e.KeyChar == 27)
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
|
|||
|
|
this.KeyboardClose();
|
|||
|
|
this.UpdateDisplay(this.ParentForm.ParentForm.CurrentUserGroup, this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
}
|
|||
|
|
else if (e.KeyChar == '<' || e.KeyChar == '>' || e.KeyChar == '|' || e.KeyChar == '"' || e.KeyChar == '?'
|
|||
|
|
|| e.KeyChar == '*' || e.KeyChar == ':' || e.KeyChar == '/' || e.KeyChar == '\\')
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
private void textBoxLevel2_KeyPress(object sender, KeyPressEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (e.KeyChar == '\r')
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.SystemConfig.LEVEL2_NAME = this.textBoxLevel2.Text;
|
|||
|
|
this.groupBoxLevel2.Text = this.textBoxLevel2.Text;
|
|||
|
|
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
this.ParentForm.ParentForm.ChildFormMenu.UpdateLevelNameDisplay(this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
this.KeyboardClose();
|
|||
|
|
}
|
|||
|
|
else if (e.KeyChar == 27)
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
|
|||
|
|
this.KeyboardClose();
|
|||
|
|
this.UpdateDisplay(this.ParentForm.ParentForm.CurrentUserGroup, this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
}
|
|||
|
|
else if (e.KeyChar == '<' || e.KeyChar == '>' || e.KeyChar == '|' || e.KeyChar == '"' || e.KeyChar == '?'
|
|||
|
|
|| e.KeyChar == '*' || e.KeyChar == ':' || e.KeyChar == '/' || e.KeyChar == '\\')
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
private void textBoxLevel3_KeyPress(object sender, KeyPressEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (e.KeyChar == '\r')
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.SystemConfig.LEVEL3_NAME = this.textBoxLevel3.Text;
|
|||
|
|
this.groupBoxLevel3.Text = this.textBoxLevel3.Text;
|
|||
|
|
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
this.ParentForm.ParentForm.ChildFormMenu.UpdateLevelNameDisplay(this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
this.KeyboardClose();
|
|||
|
|
}
|
|||
|
|
else if (e.KeyChar == 27)
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
|
|||
|
|
this.KeyboardClose();
|
|||
|
|
this.UpdateDisplay(this.ParentForm.ParentForm.CurrentUserGroup, this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
}
|
|||
|
|
else if (e.KeyChar == '<' || e.KeyChar == '>' || e.KeyChar == '|' || e.KeyChar == '"' || e.KeyChar == '?'
|
|||
|
|
|| e.KeyChar == '*' || e.KeyChar == ':' || e.KeyChar == '/' || e.KeyChar == '\\')
|
|||
|
|
{
|
|||
|
|
e.Handled = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
private void smartKeyboard_OnXKeyClick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
this.KeyboardClose();
|
|||
|
|
this.UpdateDisplay(this.ParentForm.ParentForm.CurrentUserGroup, this.ParentForm.ParentForm.SystemConfig);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void buttonGroupNameChange_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
this.smartKeyboard.KeyboardType = SmartX.SmartKeyboard.KEYBOARDTYPES.NORMAL;
|
|||
|
|
this.smartKeyboard.Location = new Point(5, 132);
|
|||
|
|
this.smartKeyboard.Size = new Size(897, 352);
|
|||
|
|
this.smartKeyboard.Hide();
|
|||
|
|
|
|||
|
|
if (this.groupBoxLevel1.FrameLineColor1 == Color.FromArgb(0, 192, 0))
|
|||
|
|
{
|
|||
|
|
this.textBoxLevel1.Visible = true;
|
|||
|
|
this.smartKeyboard.TargetInputObject = this.textBoxLevel1;
|
|||
|
|
this.textBoxLevel1.Select(this.textBoxLevel1.Text.Length, 0);
|
|||
|
|
}
|
|||
|
|
else if (this.groupBoxLevel2.FrameLineColor1 == Color.FromArgb(0, 192, 0))
|
|||
|
|
{
|
|||
|
|
this.textBoxLevel2.Visible = true;
|
|||
|
|
this.smartKeyboard.TargetInputObject = this.textBoxLevel2;
|
|||
|
|
this.textBoxLevel2.Select(this.textBoxLevel2.Text.Length, 0);
|
|||
|
|
}
|
|||
|
|
else if (this.groupBoxLevel3.FrameLineColor1 == Color.FromArgb(0, 192, 0))
|
|||
|
|
{
|
|||
|
|
this.textBoxLevel3.Visible = true;
|
|||
|
|
this.smartKeyboard.TargetInputObject = this.textBoxLevel3;
|
|||
|
|
this.textBoxLevel3.Select(this.textBoxLevel3.Text.Length, 0);
|
|||
|
|
}
|
|||
|
|
this.smartKeyboard.Show();
|
|||
|
|
|
|||
|
|
this.buttonSave.Enabled = false;
|
|||
|
|
this.buttonGroupNameChange.Visible = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void buttonSave_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
#region Level1
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMainDisplayProductChange = this.checkBoxL1MainProductChange.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMainDisplayClear = this.checkBoxL1MainClear.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMainDisplaySubMenu = this.checkBoxL1MainSubMenu.Checked;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuRecipe = this.checkBoxL1MenuProduct.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuUserSetting = this.checkBoxL1MenuUserSetting.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuUserGroupEditor = this.checkBoxL1MenuUserGroupEditor.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuIOTest = this.checkBoxL1MenuIOTest.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuHistoryLog = this.checkBoxL1MenuHistoryLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuInspectionLog = this.checkBoxL1MenuInspectionLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuAlarmLog = this.checkBoxL1MenuAlarmLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuInformation = this.checkBoxL1MenuInformation.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuEquipment = this.checkBoxL1MenuEquipment.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsMenuEthernet = this.checkBoxL1MenuEthernet.Checked;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Level2
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMainDisplayProductChange = this.checkBoxL2MainProductChange.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMainDisplayClear = this.checkBoxL2MainClear.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMainDisplaySubMenu = this.checkBoxL2MainSubMenu.Checked;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuRecipe = this.checkBoxL2MenuProduct.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuUserSetting = this.checkBoxL2MenuUserSetting.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuUserGroupEditor = this.checkBoxL2MenuUserGroupEditor.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuIOTest = this.checkBoxL2MenuIOTest.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuHistoryLog = this.checkBoxL2MenuHistoryLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuInspectionLog = this.checkBoxL2MenuInspectionLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuAlarmLog = this.checkBoxL2MenuAlarmLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuInformation = this.checkBoxL2MenuInformation.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuEquipment = this.checkBoxL2MenuEquipment.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsMenuEthernet = this.checkBoxL2MenuEthernet.Checked;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Level3
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMainDisplayProductChange = this.checkBoxL3MainProductChange.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMainDisplayClear = this.checkBoxL3MainClear.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMainDisplaySubMenu = this.checkBoxL3MainSubMenu.Checked;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuRecipe = this.checkBoxL3MenuProduct.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuUserSetting = this.checkBoxL3MenuUserSetting.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuUserGroupEditor = this.checkBoxL3MenuUserGroupEditor.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuIOTest = this.checkBoxL3MenuIOTest.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuHistoryLog = this.checkBoxL3MenuHistoryLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuInspectionLog = this.checkBoxL3MenuInspectionLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuAlarmLog = this.checkBoxL3MenuAlarmLog.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuInformation = this.checkBoxL3MenuInformation.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuEquipment = this.checkBoxL3MenuEquipment.Checked;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsMenuEthernet = this.checkBoxL3MenuEthernet.Checked;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region Admin
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMainDisplayProductChange = this.checkBoxDefaultMainProductChange.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMainDisplayClear = this.checkBoxDefaultMainClear.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMainDisplaySubMenu = this.checkBoxDefaultMainSubMenu.Checked;
|
|||
|
|
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuRecipe = this.checkBoxDefaultMenuProduct.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuUserSetting = this.checkBoxDefaultMenuUserSetting.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuUserGroupEditor = this.checkBoxDefaultMenuUserGroupEditor.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuIOTest = this.checkBoxDefaultMenuIOTest.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuHistoryLog = this.checkBoxDefaultMenuEquipmentLog.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuInspectionLog = this.checkBoxDefaultMenuCheckLog.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuAlarmLog = this.checkBoxDefaultMenuAlarmList.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuInformation = this.checkBoxDefaultMenuInformation.Checked;
|
|||
|
|
//this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuStatus = this.checkBoxDefaultMenuStatus.Checked;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMainDisplayProductChange = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMainDisplayClear = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMainDisplaySubMenu = true;
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuRecipe = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuUserSetting = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuUserGroupEditor = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuIOTest = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuHistoryLog = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuInspectionLog = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuAlarmLog = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuInformation = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuEquipment = true;
|
|||
|
|
this.ParentForm.ParentForm.CurrentUserGroup.Admin.IsMenuEthernet = true;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
this.ParentForm.ParentForm.SaveUserGroupFile(this.ParentForm.ParentForm.CurrentUserGroup);
|
|||
|
|
|
|||
|
|
this.buttonSave.Visible = false;
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
}
|
|||
|
|
}
|