635 lines
41 KiB
C#
635 lines
41 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Collections.ObjectModel;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
using INT63DC_ImageDll;
|
|
|
|
namespace INT63DC_2C.Forms
|
|
{
|
|
public partial class FormUserGroupEditor : Form
|
|
{
|
|
#region Field
|
|
private FormMain m_ParentForm;
|
|
|
|
private Collection<Point> CollectionLevel1Location;
|
|
private Collection<Point> CollectionLevel2Location;
|
|
private Collection<Point> CollectionLevel3Location;
|
|
|
|
private Collection<Control> CollectionLevel1Control;
|
|
private Collection<Control> CollectionLevel2Control;
|
|
private Collection<Control> CollectionLevel3Control;
|
|
private Collection<Control> CollectionLevel4Control;
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public FormUserGroupEditor(FormMain parent)
|
|
{
|
|
InitializeComponent();
|
|
|
|
this.ParentForm = parent;
|
|
this.InitializeDesign();
|
|
this.DefaultSetting();
|
|
}
|
|
#endregion
|
|
|
|
#region Property
|
|
public FormMain ParentForm
|
|
{
|
|
get { return this.m_ParentForm; }
|
|
private set { this.m_ParentForm = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Method
|
|
public void InitializeDesign()
|
|
{
|
|
ImageDll images = new ImageDll();
|
|
|
|
switch (this.ParentForm.SystemConfig.Language)
|
|
{
|
|
case DataStore.LanguageID.Korean:
|
|
break;
|
|
case DataStore.LanguageID.English:
|
|
case DataStore.LanguageID.Czech:
|
|
case DataStore.LanguageID.German:
|
|
this.labelTitle.Text = "Group Editor";
|
|
|
|
this.buttonBack.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engBackDisable));
|
|
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engBackDown));
|
|
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engBackUp));
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSaveUp));
|
|
break;
|
|
case DataStore.LanguageID.Chinese:
|
|
#region Chinese
|
|
this.labelTitle.Text = "组编辑";
|
|
|
|
this.labelTitle1.Text = "级别1";
|
|
this.labelTitle2.Text = "级别2";
|
|
this.labelTitle3.Text = "级别3";
|
|
|
|
this.labelStaticMainDisplayAccess.Text = "主显示访问";
|
|
this.labelStaticProductNo.Text = "编号";
|
|
this.labelStaticWeightSetting.Text = "体重设定";
|
|
this.labelStaticClear.Text = "消除";
|
|
this.labelStaticSubMenu.Text = "子菜单";
|
|
|
|
this.labelStaticMenu.Text = "菜单";
|
|
this.labelStaticTimeSetting.Text = "时间设定";
|
|
this.labelStaticInformation.Text = "系统信息";
|
|
this.labelStaticDataBackup.Text = "数据备份";
|
|
this.labelStaticCalibration.Text = "校准";
|
|
this.labelStaticConfiguration.Text = "选项";
|
|
this.labelStaticUpdate.Text = "更新";
|
|
this.labelStaticSystemSetting.Text = "系统设定";
|
|
this.labelStaticFactoryReset.Text = "回复出厂设置";
|
|
this.labelStaticMotorSetting.Text = "设置电机";
|
|
this.labelStaticEquipmentSetting.Text = "设备设置";
|
|
this.labelStaticIOTest.Text = "I/O测试";
|
|
this.labelStaticUserSetting.Text = "用户设置";
|
|
this.labelTitleDataStatistics.Text = "数据统计";
|
|
|
|
this.buttonBack.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnBackDisable));
|
|
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnBackDown));
|
|
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnBackUp));
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSaveUp));
|
|
#endregion
|
|
break;
|
|
case DataStore.LanguageID.Japanese:
|
|
#region Japanese
|
|
this.labelTitle.Text = "グルㅡプエディタㅡ";
|
|
|
|
this.labelTitle1.Text = "Level 1";
|
|
this.labelTitle2.Text = "Level 2";
|
|
this.labelTitle3.Text = "Level 3";
|
|
|
|
this.labelStaticMainDisplayAccess.Text = "メインディスプレイ";
|
|
this.labelStaticProductNo.Text = "番号";
|
|
this.labelStaticWeightSetting.Text = "設定値";
|
|
this.labelStaticClear.Text = "クリア";
|
|
this.labelStaticSubMenu.Text = "サブメニュㅡ";
|
|
|
|
this.labelStaticMenu.Text = "メニュㅡ";
|
|
this.labelStaticTimeSetting.Text = "時間設定";
|
|
this.labelStaticInformation.Text = "情報";
|
|
this.labelStaticDataBackup.Text = "デㅡタバックアップ";
|
|
this.labelStaticCalibration.Text = "校正";
|
|
this.labelStaticConfiguration.Text = "構成";
|
|
this.labelStaticUpdate.Text = "更新";
|
|
this.labelStaticSystemSetting.Text = "システム設定";
|
|
this.labelStaticFactoryReset.Text = "初期化";
|
|
this.labelStaticMotorSetting.Text = "モㅡタㅡ設定";
|
|
this.labelStaticEquipmentSetting.Text = "装置設定";
|
|
this.labelStaticIOTest.Text = "I/Oテスト";
|
|
this.labelStaticUserSetting.Text = "ユㅡザㅡの設定";
|
|
this.labelTitleDataStatistics.Text = "デㅡタ統計";
|
|
|
|
this.buttonBack.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnBackDisable));
|
|
this.buttonBack.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnBackDown));
|
|
this.buttonBack.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnBackUp));
|
|
|
|
this.buttonSave.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSaveDisable));
|
|
this.buttonSave.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSaveDown));
|
|
this.buttonSave.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSaveUp));
|
|
#endregion
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
private void DefaultSetting()
|
|
{
|
|
this.CollectionLevel1Location = new Collection<Point>();
|
|
this.CollectionLevel1Location.Add(this.labelTitle1.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MainProductNo.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MainWeightSet.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MainClear.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MainSubMenu.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuTimeSetting.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuInformation.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuDataBackup.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuConfiguration.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuCalibration.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuSystemSetting.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuMotorSetting.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuIOTest.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuUpdate.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuFactoryReset.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuUserSetting.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuUserGroupSetting.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuEquipmentSetting.Location);
|
|
this.CollectionLevel1Location.Add(this.checkBoxL1MenuDataStatistics.Location);
|
|
|
|
this.CollectionLevel2Location = new Collection<Point>();
|
|
this.CollectionLevel2Location.Add(this.labelTitle2.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MainProductNo.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MainWeightSet.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MainClear.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MainSubMenu.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuTimeSetting.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuInformation.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuDataBackup.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuConfiguration.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuCalibration.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuSystemSetting.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuMotorSetting.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuIOTest.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuUpdate.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuFactoryReset.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuUserSetting.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuUserGroupSetting.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuEquipmentSetting.Location);
|
|
this.CollectionLevel2Location.Add(this.checkBoxL2MenuDataStatistics.Location);
|
|
|
|
this.CollectionLevel3Location = new Collection<Point>();
|
|
this.CollectionLevel3Location.Add(this.labelTitle3.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MainProductNo.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MainWeightSet.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MainClear.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MainSubMenu.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuTimeSetting.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuInformation.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuDataBackup.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuConfiguration.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuCalibration.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuSystemSetting.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuMotorSetting.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuIOTest.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuUpdate.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuFactoryReset.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuUserSetting.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuUserGroupSetting.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuEquipmentSetting.Location);
|
|
this.CollectionLevel3Location.Add(this.checkBoxL3MenuDataStatistics.Location);
|
|
|
|
this.CollectionLevel1Control = new Collection<Control>();
|
|
this.CollectionLevel1Control.Add(this.labelTitle1);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MainProductNo);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MainWeightSet);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MainClear);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MainSubMenu);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuTimeSetting);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuInformation);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuDataBackup);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuConfiguration);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuCalibration);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuSystemSetting);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuMotorSetting);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuIOTest);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuUpdate);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuFactoryReset);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuUserSetting);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuUserGroupSetting);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuEquipmentSetting);
|
|
this.CollectionLevel1Control.Add(this.checkBoxL1MenuDataStatistics);
|
|
|
|
this.CollectionLevel2Control = new Collection<Control>();
|
|
this.CollectionLevel2Control.Add(this.labelTitle2);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MainProductNo);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MainWeightSet);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MainClear);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MainSubMenu);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuTimeSetting);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuInformation);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuDataBackup);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuConfiguration);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuCalibration);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuSystemSetting);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuMotorSetting);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuIOTest);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuUpdate);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuFactoryReset);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuUserSetting);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuUserGroupSetting);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuEquipmentSetting);
|
|
this.CollectionLevel2Control.Add(this.checkBoxL2MenuDataStatistics);
|
|
|
|
this.CollectionLevel3Control = new Collection<Control>();
|
|
this.CollectionLevel3Control.Add(this.labelTitle3);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MainProductNo);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MainWeightSet);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MainClear);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MainSubMenu);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuTimeSetting);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuInformation);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuDataBackup);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuConfiguration);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuCalibration);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuSystemSetting);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuMotorSetting);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuIOTest);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuUpdate);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuFactoryReset);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuUserSetting);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuUserGroupSetting);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuEquipmentSetting);
|
|
this.CollectionLevel3Control.Add(this.checkBoxL3MenuDataStatistics);
|
|
|
|
this.CollectionLevel4Control = new Collection<Control>();
|
|
this.CollectionLevel4Control.Add(this.labelTitle4);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMainProductNo);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMainWeightSet);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMainClear);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMainSubMenu);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuTimeSetting);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuInformation);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuDataBackup);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuConfiguration);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuCalibration);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuSystemSetting);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuMotorSetting);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuIOTest);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuUpdate);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuFactoryReset);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuUserSetting);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuUserGroupSetting);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuEquipmentSetting);
|
|
this.CollectionLevel4Control.Add(this.checkBoxNotLoginMenuDataStatistics);
|
|
|
|
this.UpdateDisplay(this.ParentForm.CurrentUserGroup);
|
|
}
|
|
|
|
private void UpdateDisplay(UserGroup group)
|
|
{
|
|
#region Level1
|
|
this.checkBoxL1MainProductNo.Checked = group.Level1.IsMainDisplayProductNo;
|
|
this.checkBoxL1MainWeightSet.Checked = group.Level1.IsMainDisplayWeightSetting;
|
|
this.checkBoxL1MainClear.Checked = group.Level1.IsMainDisplayClear;
|
|
this.checkBoxL1MainSubMenu.Checked = group.Level1.IsMainDisplaySubMenu;
|
|
|
|
this.checkBoxL1MenuCalibration.Checked = group.Level1.IsMenuCalibration;
|
|
this.checkBoxL1MenuConfiguration.Checked = group.Level1.IsMenuConfiguration;
|
|
this.checkBoxL1MenuDataBackup.Checked = group.Level1.IsMenuDataBackup;
|
|
this.checkBoxL1MenuDataStatistics.Checked = group.Level1.IsMenuDataStatistics;
|
|
this.checkBoxL1MenuEquipmentSetting.Checked = group.Level1.IsMenuEquipmentSetting;
|
|
this.checkBoxL1MenuFactoryReset.Checked = group.Level1.IsMenuFactoryReset;
|
|
this.checkBoxL1MenuInformation.Checked = group.Level1.IsMenuInformation;
|
|
this.checkBoxL1MenuIOTest.Checked = group.Level1.IsMenuIOTest;
|
|
this.checkBoxL1MenuMotorSetting.Checked = group.Level1.IsMenuMotorSetting;
|
|
this.checkBoxL1MenuSystemSetting.Checked = group.Level1.IsMenuSystemSetting;
|
|
this.checkBoxL1MenuTimeSetting.Checked = group.Level1.IsMenuTimeSetting;
|
|
this.checkBoxL1MenuUpdate.Checked = group.Level1.IsMenuUpdate;
|
|
this.checkBoxL1MenuUserGroupSetting.Checked = group.Level1.IsMenuUserGroupSetting;
|
|
this.checkBoxL1MenuUserSetting.Checked = group.Level1.IsMenuUserSetting;
|
|
#endregion
|
|
|
|
#region Level2
|
|
this.checkBoxL2MainProductNo.Checked = group.Level2.IsMainDisplayProductNo;
|
|
this.checkBoxL2MainWeightSet.Checked = group.Level2.IsMainDisplayWeightSetting;
|
|
this.checkBoxL2MainClear.Checked = group.Level2.IsMainDisplayClear;
|
|
this.checkBoxL2MainSubMenu.Checked = group.Level2.IsMainDisplaySubMenu;
|
|
|
|
this.checkBoxL2MenuCalibration.Checked = group.Level2.IsMenuCalibration;
|
|
this.checkBoxL2MenuConfiguration.Checked = group.Level2.IsMenuConfiguration;
|
|
this.checkBoxL2MenuDataBackup.Checked = group.Level2.IsMenuDataBackup;
|
|
this.checkBoxL2MenuDataStatistics.Checked = group.Level2.IsMenuDataStatistics;
|
|
this.checkBoxL2MenuEquipmentSetting.Checked = group.Level2.IsMenuEquipmentSetting;
|
|
this.checkBoxL2MenuFactoryReset.Checked = group.Level2.IsMenuFactoryReset;
|
|
this.checkBoxL2MenuInformation.Checked = group.Level2.IsMenuInformation;
|
|
this.checkBoxL2MenuIOTest.Checked = group.Level2.IsMenuIOTest;
|
|
this.checkBoxL2MenuMotorSetting.Checked = group.Level2.IsMenuMotorSetting;
|
|
this.checkBoxL2MenuSystemSetting.Checked = group.Level2.IsMenuSystemSetting;
|
|
this.checkBoxL2MenuTimeSetting.Checked = group.Level2.IsMenuTimeSetting;
|
|
this.checkBoxL2MenuUpdate.Checked = group.Level2.IsMenuUpdate;
|
|
this.checkBoxL2MenuUserGroupSetting.Checked = group.Level2.IsMenuUserGroupSetting;
|
|
this.checkBoxL2MenuUserSetting.Checked = group.Level2.IsMenuUserSetting;
|
|
#endregion
|
|
|
|
#region Level3
|
|
this.checkBoxL3MainProductNo.Checked = group.Level3.IsMainDisplayProductNo;
|
|
this.checkBoxL3MainWeightSet.Checked = group.Level3.IsMainDisplayWeightSetting;
|
|
this.checkBoxL3MainClear.Checked = group.Level3.IsMainDisplayClear;
|
|
this.checkBoxL3MainSubMenu.Checked = group.Level3.IsMainDisplaySubMenu;
|
|
|
|
this.checkBoxL3MenuCalibration.Checked = group.Level3.IsMenuCalibration;
|
|
this.checkBoxL3MenuConfiguration.Checked = group.Level3.IsMenuConfiguration;
|
|
this.checkBoxL3MenuDataBackup.Checked = group.Level3.IsMenuDataBackup;
|
|
this.checkBoxL3MenuDataStatistics.Checked = group.Level3.IsMenuDataStatistics;
|
|
this.checkBoxL3MenuEquipmentSetting.Checked = group.Level3.IsMenuEquipmentSetting;
|
|
this.checkBoxL3MenuFactoryReset.Checked = group.Level3.IsMenuFactoryReset;
|
|
this.checkBoxL3MenuInformation.Checked = group.Level3.IsMenuInformation;
|
|
this.checkBoxL3MenuIOTest.Checked = group.Level3.IsMenuIOTest;
|
|
this.checkBoxL3MenuMotorSetting.Checked = group.Level3.IsMenuMotorSetting;
|
|
this.checkBoxL3MenuSystemSetting.Checked = group.Level3.IsMenuSystemSetting;
|
|
this.checkBoxL3MenuTimeSetting.Checked = group.Level3.IsMenuTimeSetting;
|
|
this.checkBoxL3MenuUpdate.Checked = group.Level3.IsMenuUpdate;
|
|
this.checkBoxL3MenuUserGroupSetting.Checked = group.Level3.IsMenuUserGroupSetting;
|
|
this.checkBoxL3MenuUserSetting.Checked = group.Level3.IsMenuUserSetting;
|
|
#endregion
|
|
|
|
#region NotLogin
|
|
this.checkBoxNotLoginMainProductNo.Checked = group.NotLogin.IsMainDisplayProductNo;
|
|
this.checkBoxNotLoginMainWeightSet.Checked = group.NotLogin.IsMainDisplayWeightSetting;
|
|
this.checkBoxNotLoginMainClear.Checked = group.NotLogin.IsMainDisplayClear;
|
|
this.checkBoxNotLoginMainSubMenu.Checked = group.NotLogin.IsMainDisplaySubMenu;
|
|
|
|
this.checkBoxNotLoginMenuCalibration.Checked = group.NotLogin.IsMenuCalibration;
|
|
this.checkBoxNotLoginMenuConfiguration.Checked = group.NotLogin.IsMenuConfiguration;
|
|
this.checkBoxNotLoginMenuDataBackup.Checked = group.NotLogin.IsMenuDataBackup;
|
|
this.checkBoxNotLoginMenuDataStatistics.Checked = group.NotLogin.IsMenuDataStatistics;
|
|
this.checkBoxNotLoginMenuEquipmentSetting.Checked = group.NotLogin.IsMenuEquipmentSetting;
|
|
this.checkBoxNotLoginMenuFactoryReset.Checked = group.NotLogin.IsMenuFactoryReset;
|
|
this.checkBoxNotLoginMenuInformation.Checked = group.NotLogin.IsMenuInformation;
|
|
this.checkBoxNotLoginMenuIOTest.Checked = group.NotLogin.IsMenuIOTest;
|
|
this.checkBoxNotLoginMenuMotorSetting.Checked = group.NotLogin.IsMenuMotorSetting;
|
|
this.checkBoxNotLoginMenuSystemSetting.Checked = group.NotLogin.IsMenuSystemSetting;
|
|
this.checkBoxNotLoginMenuTimeSetting.Checked = group.NotLogin.IsMenuTimeSetting;
|
|
this.checkBoxNotLoginMenuUpdate.Checked = group.NotLogin.IsMenuUpdate;
|
|
this.checkBoxNotLoginMenuUserGroupSetting.Checked = group.NotLogin.IsMenuUserGroupSetting;
|
|
this.checkBoxNotLoginMenuUserSetting.Checked = group.NotLogin.IsMenuUserSetting;
|
|
#endregion
|
|
}
|
|
|
|
public void DisplayRefresh()
|
|
{
|
|
this.UpdateDisplay(this.ParentForm.CurrentUserGroup);
|
|
|
|
this.buttonSave.Visible = false;
|
|
|
|
// Not login 미사용으로 Visible = false 처리함
|
|
for (int i = 0; i < this.CollectionLevel1Control.Count; i++)
|
|
this.CollectionLevel4Control[i].Visible = false;
|
|
|
|
// 현재 데이터 통계 메뉴가 없어서 Visible = false 처리함
|
|
// 추후에 데이터 통계 메뉴 추가 되면 삭제
|
|
this.labelTitleDataStatistics.Visible = false;
|
|
this.checkBoxL1MenuDataStatistics.Visible = false;
|
|
this.checkBoxL2MenuDataStatistics.Visible = false;
|
|
this.checkBoxL3MenuDataStatistics.Visible = false;
|
|
this.checkBoxNotLoginMenuDataStatistics.Visible = false;
|
|
}
|
|
#endregion
|
|
|
|
#region Event Handler
|
|
private void buttonBack_Click(object sender, EventArgs e)
|
|
{
|
|
this.ParentForm.ChildFormUserSetting.DisplayRefresh();
|
|
((FormMain)(Owner)).smartForm.Show((int)DataStore.FormStore.FormUserSetting);
|
|
}
|
|
private void buttonSave_Click(object sender, EventArgs e)
|
|
{
|
|
#region Level1
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayProductNo = this.checkBoxL1MainProductNo.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayWeightSetting = this.checkBoxL1MainWeightSet.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayClear = this.checkBoxL1MainClear.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMainDisplaySubMenu = this.checkBoxL1MainSubMenu.Checked;
|
|
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuCalibration = this.checkBoxL1MenuCalibration.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuConfiguration = this.checkBoxL1MenuConfiguration.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuDataBackup = this.checkBoxL1MenuDataBackup.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuDataStatistics = this.checkBoxL1MenuDataStatistics.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuEquipmentSetting = this.checkBoxL1MenuEquipmentSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuFactoryReset = this.checkBoxL1MenuFactoryReset.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuInformation = this.checkBoxL1MenuInformation.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuIOTest = this.checkBoxL1MenuIOTest.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuMotorSetting = this.checkBoxL1MenuMotorSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuSystemSetting = this.checkBoxL1MenuSystemSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuTimeSetting = this.checkBoxL1MenuTimeSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuUpdate = this.checkBoxL1MenuUpdate.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuUserGroupSetting = this.checkBoxL1MenuUserGroupSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level1.IsMenuUserSetting = this.checkBoxL1MenuUserSetting.Checked;
|
|
#endregion
|
|
|
|
#region Level2
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayProductNo = this.checkBoxL2MainProductNo.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayWeightSetting = this.checkBoxL2MainWeightSet.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayClear = this.checkBoxL2MainClear.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMainDisplaySubMenu = this.checkBoxL2MainSubMenu.Checked;
|
|
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuCalibration = this.checkBoxL2MenuCalibration.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuConfiguration = this.checkBoxL2MenuConfiguration.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuDataBackup = this.checkBoxL2MenuDataBackup.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuDataStatistics = this.checkBoxL2MenuDataStatistics.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuEquipmentSetting = this.checkBoxL2MenuEquipmentSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuFactoryReset = this.checkBoxL2MenuFactoryReset.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuInformation = this.checkBoxL2MenuInformation.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuIOTest = this.checkBoxL2MenuIOTest.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuMotorSetting = this.checkBoxL2MenuMotorSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuSystemSetting = this.checkBoxL2MenuSystemSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuTimeSetting = this.checkBoxL2MenuTimeSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuUpdate = this.checkBoxL2MenuUpdate.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuUserGroupSetting = this.checkBoxL2MenuUserGroupSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level2.IsMenuUserSetting = this.checkBoxL2MenuUserSetting.Checked;
|
|
#endregion
|
|
|
|
#region Level3
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayProductNo = this.checkBoxL3MainProductNo.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayWeightSetting = this.checkBoxL3MainWeightSet.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayClear = this.checkBoxL3MainClear.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMainDisplaySubMenu = this.checkBoxL3MainSubMenu.Checked;
|
|
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuCalibration = this.checkBoxL3MenuCalibration.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuConfiguration = this.checkBoxL3MenuConfiguration.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuDataBackup = this.checkBoxL3MenuDataBackup.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuDataStatistics = this.checkBoxL3MenuDataStatistics.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuEquipmentSetting = this.checkBoxL3MenuEquipmentSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuFactoryReset = this.checkBoxL3MenuFactoryReset.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuInformation = this.checkBoxL3MenuInformation.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuIOTest = this.checkBoxL3MenuIOTest.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuMotorSetting = this.checkBoxL3MenuMotorSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuSystemSetting = this.checkBoxL3MenuSystemSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuTimeSetting = this.checkBoxL3MenuTimeSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuUpdate = this.checkBoxL3MenuUpdate.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuUserGroupSetting = this.checkBoxL3MenuUserGroupSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.Level3.IsMenuUserSetting = true;
|
|
#endregion
|
|
|
|
#region NotLogin
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayProductNo = this.checkBoxNotLoginMainProductNo.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayWeightSetting = this.checkBoxNotLoginMainWeightSet.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayClear = this.checkBoxNotLoginMainClear.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplaySubMenu = this.checkBoxNotLoginMainSubMenu.Checked;
|
|
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuCalibration = this.checkBoxNotLoginMenuCalibration.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuConfiguration = this.checkBoxNotLoginMenuConfiguration.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuDataBackup = this.checkBoxNotLoginMenuDataBackup.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuDataStatistics = this.checkBoxNotLoginMenuDataStatistics.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuEquipmentSetting = this.checkBoxNotLoginMenuEquipmentSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuFactoryReset = this.checkBoxNotLoginMenuFactoryReset.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuInformation = this.checkBoxNotLoginMenuInformation.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuIOTest = this.checkBoxNotLoginMenuIOTest.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuMotorSetting = this.checkBoxNotLoginMenuMotorSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuSystemSetting = this.checkBoxNotLoginMenuSystemSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuTimeSetting = this.checkBoxNotLoginMenuTimeSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuUpdate = this.checkBoxNotLoginMenuUpdate.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuUserGroupSetting = this.checkBoxNotLoginMenuUserGroupSetting.Checked;
|
|
this.ParentForm.CurrentUserGroup.NotLogin.IsMenuUserSetting = this.checkBoxNotLoginMenuUserSetting.Checked;
|
|
#endregion
|
|
|
|
this.ParentForm.SaveUserGroupFile(this.ParentForm.CurrentUserGroup);
|
|
|
|
this.buttonSave.Visible = false;
|
|
}
|
|
|
|
private void labelTitle1_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level3Manager ||
|
|
this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
|
|
{
|
|
this.checkBoxL1MainProductNo.Checked = true;
|
|
this.checkBoxL1MainWeightSet.Checked = true;
|
|
this.checkBoxL1MainClear.Checked = true;
|
|
this.checkBoxL1MainSubMenu.Checked = true;
|
|
|
|
this.checkBoxL1MenuInformation.Checked = true;
|
|
this.checkBoxL1MenuDataBackup.Checked = true;
|
|
this.checkBoxL1MenuConfiguration.Checked = true;
|
|
this.checkBoxL1MenuCalibration.Checked = true;
|
|
this.checkBoxL1MenuSystemSetting.Checked = true;
|
|
this.checkBoxL1MenuMotorSetting.Checked = true;
|
|
this.checkBoxL1MenuIOTest.Checked = true;
|
|
this.checkBoxL1MenuUpdate.Checked = true;
|
|
this.checkBoxL1MenuFactoryReset.Checked = true;
|
|
this.checkBoxL1MenuUserSetting.Checked = true;
|
|
this.checkBoxL1MenuUserGroupSetting.Checked = true;
|
|
this.checkBoxL1MenuEquipmentSetting.Checked = true;
|
|
this.checkBoxL1MenuDataStatistics.Checked = true;
|
|
this.checkBoxL1MenuTimeSetting.Checked = true;
|
|
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
private void labelTitle2_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level3Manager ||
|
|
this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
|
|
{
|
|
this.checkBoxL2MainProductNo.Checked = true;
|
|
this.checkBoxL2MainWeightSet.Checked = true;
|
|
this.checkBoxL2MainClear.Checked = true;
|
|
this.checkBoxL2MainSubMenu.Checked = true;
|
|
|
|
this.checkBoxL2MenuInformation.Checked = true;
|
|
this.checkBoxL2MenuDataBackup.Checked = true;
|
|
this.checkBoxL2MenuConfiguration.Checked = true;
|
|
this.checkBoxL2MenuCalibration.Checked = true;
|
|
this.checkBoxL2MenuSystemSetting.Checked = true;
|
|
this.checkBoxL2MenuMotorSetting.Checked = true;
|
|
this.checkBoxL2MenuIOTest.Checked = true;
|
|
this.checkBoxL2MenuUpdate.Checked = true;
|
|
this.checkBoxL2MenuFactoryReset.Checked = true;
|
|
this.checkBoxL2MenuUserSetting.Checked = true;
|
|
this.checkBoxL2MenuUserGroupSetting.Checked = true;
|
|
this.checkBoxL2MenuEquipmentSetting.Checked = true;
|
|
this.checkBoxL2MenuDataStatistics.Checked = true;
|
|
this.checkBoxL2MenuTimeSetting.Checked = true;
|
|
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
private void labelTitle3_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level3Manager ||
|
|
this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
|
|
{
|
|
this.checkBoxL3MainProductNo.Checked = true;
|
|
this.checkBoxL3MainWeightSet.Checked = true;
|
|
this.checkBoxL3MainClear.Checked = true;
|
|
this.checkBoxL3MainSubMenu.Checked = true;
|
|
|
|
this.checkBoxL3MenuInformation.Checked = true;
|
|
this.checkBoxL3MenuDataBackup.Checked = true;
|
|
this.checkBoxL3MenuConfiguration.Checked = true;
|
|
this.checkBoxL3MenuCalibration.Checked = true;
|
|
this.checkBoxL3MenuSystemSetting.Checked = true;
|
|
this.checkBoxL3MenuMotorSetting.Checked = true;
|
|
this.checkBoxL3MenuIOTest.Checked = true;
|
|
this.checkBoxL3MenuUpdate.Checked = true;
|
|
this.checkBoxL3MenuFactoryReset.Checked = true;
|
|
this.checkBoxL3MenuUserSetting.Checked = true;
|
|
this.checkBoxL3MenuUserGroupSetting.Checked = true;
|
|
this.checkBoxL3MenuEquipmentSetting.Checked = true;
|
|
this.checkBoxL3MenuDataStatistics.Checked = true;
|
|
this.checkBoxL3MenuTimeSetting.Checked = true;
|
|
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
private void labelTitle4_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level3Manager ||
|
|
this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
|
|
{
|
|
this.checkBoxNotLoginMainProductNo.Checked = true;
|
|
this.checkBoxNotLoginMainWeightSet.Checked = true;
|
|
this.checkBoxNotLoginMainClear.Checked = true;
|
|
this.checkBoxNotLoginMainSubMenu.Checked = true;
|
|
|
|
this.checkBoxNotLoginMenuInformation.Checked = true;
|
|
this.checkBoxNotLoginMenuDataBackup.Checked = true;
|
|
this.checkBoxNotLoginMenuConfiguration.Checked = true;
|
|
this.checkBoxNotLoginMenuCalibration.Checked = true;
|
|
this.checkBoxNotLoginMenuSystemSetting.Checked = true;
|
|
this.checkBoxNotLoginMenuMotorSetting.Checked = true;
|
|
this.checkBoxNotLoginMenuIOTest.Checked = true;
|
|
this.checkBoxNotLoginMenuUpdate.Checked = true;
|
|
this.checkBoxNotLoginMenuFactoryReset.Checked = true;
|
|
this.checkBoxNotLoginMenuUserSetting.Checked = true;
|
|
this.checkBoxNotLoginMenuUserGroupSetting.Checked = true;
|
|
this.checkBoxNotLoginMenuEquipmentSetting.Checked = true;
|
|
this.checkBoxNotLoginMenuDataStatistics.Checked = true;
|
|
this.checkBoxNotLoginMenuTimeSetting.Checked = true;
|
|
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
}
|
|
|
|
private void checkBox_Click(object sender, EventArgs e)
|
|
{
|
|
if (this.buttonSave.Visible == false)
|
|
this.buttonSave.Visible = true;
|
|
}
|
|
#endregion
|
|
}
|
|
} |