319 lines
24 KiB
C#
319 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 SmartX;
|
|||
|
using ITC81DB.Forms;
|
|||
|
using ITC81DB_ImageDll;
|
|||
|
|
|||
|
namespace ITC81DB.Controls
|
|||
|
{
|
|||
|
public partial class ControlCenterSystemHelp : UserControl
|
|||
|
{
|
|||
|
#region Field
|
|||
|
private FormMenu m_ParentForm;
|
|||
|
|
|||
|
private DataStore.MenuBottomSystem CurrentMenu;
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Constructor
|
|||
|
public ControlCenterSystemHelp(FormMenu parent)
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
|
|||
|
this.ParentForm = parent;
|
|||
|
|
|||
|
this.InitializeDesign();
|
|||
|
this.DefaultSetting();
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Property
|
|||
|
public FormMenu ParentForm
|
|||
|
{
|
|||
|
get { return this.m_ParentForm; }
|
|||
|
private set { this.m_ParentForm = value; }
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
public void InitializeDesign()
|
|||
|
{
|
|||
|
Class1 images = new Class1();
|
|||
|
|
|||
|
if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.English)
|
|||
|
{
|
|||
|
this.buttonCalibration.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpCalibrationDisable));
|
|||
|
this.buttonCalibration.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpCalibrationDown));
|
|||
|
this.buttonCalibration.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpCalibrationUp));
|
|||
|
this.buttonJudgmentSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpJudgmentDisable));
|
|||
|
this.buttonJudgmentSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpJudgmentDown));
|
|||
|
this.buttonJudgmentSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpJudgmentUp));
|
|||
|
this.buttonSorter.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpSorterDisable));
|
|||
|
this.buttonSorter.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpSorterDown));
|
|||
|
this.buttonSorter.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpSorterUp));
|
|||
|
this.buttonAutoZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpAutoZeroDisable));
|
|||
|
this.buttonAutoZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpAutoZeroDown));
|
|||
|
this.buttonAutoZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpAutoZeroUp));
|
|||
|
this.buttonExternalOutput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalOutputDisable));
|
|||
|
this.buttonExternalOutput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalOutputDown));
|
|||
|
this.buttonExternalOutput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalOutputUp));
|
|||
|
this.buttonIOTest.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpIOTestDisable));
|
|||
|
this.buttonIOTest.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpIOTestDown));
|
|||
|
this.buttonIOTest.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpIOTestUp));
|
|||
|
this.buttonExternalInput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalInputDisable));
|
|||
|
this.buttonExternalInput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalInputDown));
|
|||
|
this.buttonExternalInput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalInputUp));
|
|||
|
}
|
|||
|
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.Chinese)
|
|||
|
{
|
|||
|
this.buttonCalibration.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpCalibrationDisable));
|
|||
|
this.buttonCalibration.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpCalibrationDown));
|
|||
|
this.buttonCalibration.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpCalibrationUp));
|
|||
|
this.buttonJudgmentSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpJudgmentDisable));
|
|||
|
this.buttonJudgmentSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpJudgmentDown));
|
|||
|
this.buttonJudgmentSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpJudgmentUp));
|
|||
|
this.buttonSorter.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpSorterDisable));
|
|||
|
this.buttonSorter.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpSorterDown));
|
|||
|
this.buttonSorter.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpSorterUp));
|
|||
|
this.buttonAutoZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpAutoZeroDisable));
|
|||
|
this.buttonAutoZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpAutoZeroDown));
|
|||
|
this.buttonAutoZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpAutoZeroUp));
|
|||
|
this.buttonExternalOutput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpExternalOutputDisable));
|
|||
|
this.buttonExternalOutput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpExternalOutputDown));
|
|||
|
this.buttonExternalOutput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpExternalOutputUp));
|
|||
|
this.buttonIOTest.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpIOTestDisable));
|
|||
|
this.buttonIOTest.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpIOTestDown));
|
|||
|
this.buttonIOTest.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpIOTestUp));
|
|||
|
this.buttonExternalInput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpExternalInputDisable));
|
|||
|
this.buttonExternalInput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpExternalInputDown));
|
|||
|
this.buttonExternalInput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpExternalInputUp));
|
|||
|
}
|
|||
|
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.Czech)
|
|||
|
{
|
|||
|
}
|
|||
|
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.Russian)
|
|||
|
{
|
|||
|
this.buttonCalibration.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpCalibrationDisable));
|
|||
|
this.buttonCalibration.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpCalibrationDown));
|
|||
|
this.buttonCalibration.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpCalibrationUp));
|
|||
|
this.buttonJudgmentSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpJudgmentDisable));
|
|||
|
this.buttonJudgmentSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpJudgmentDown));
|
|||
|
this.buttonJudgmentSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpJudgmentUp));
|
|||
|
this.buttonSorter.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpSorterDisable));
|
|||
|
this.buttonSorter.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpSorterDown));
|
|||
|
this.buttonSorter.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpSorterUp));
|
|||
|
this.buttonAutoZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpAutoZeroDisable));
|
|||
|
this.buttonAutoZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpAutoZeroDown));
|
|||
|
this.buttonAutoZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpAutoZeroUp));
|
|||
|
this.buttonExternalOutput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpExternalOutputDisable));
|
|||
|
this.buttonExternalOutput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpExternalOutputDown));
|
|||
|
this.buttonExternalOutput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpExternalOutputUp));
|
|||
|
this.buttonIOTest.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpIOTestDisable));
|
|||
|
this.buttonIOTest.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpIOTestDown));
|
|||
|
this.buttonIOTest.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpIOTestUp));
|
|||
|
this.buttonExternalInput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpExternalInputDisable));
|
|||
|
this.buttonExternalInput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpExternalInputDown));
|
|||
|
this.buttonExternalInput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpExternalInputUp));
|
|||
|
}
|
|||
|
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.German)
|
|||
|
{
|
|||
|
this.buttonCalibration.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpCalibrationDisable));
|
|||
|
this.buttonCalibration.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpCalibrationDown));
|
|||
|
this.buttonCalibration.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpCalibrationUp));
|
|||
|
this.buttonJudgmentSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpJudgmentDisable));
|
|||
|
this.buttonJudgmentSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpJudgmentDown));
|
|||
|
this.buttonJudgmentSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpJudgmentUp));
|
|||
|
this.buttonSorter.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpSorterDisable));
|
|||
|
this.buttonSorter.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpSorterDown));
|
|||
|
this.buttonSorter.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpSorterUp));
|
|||
|
this.buttonAutoZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpAutoZeroDisable));
|
|||
|
this.buttonAutoZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpAutoZeroDown));
|
|||
|
this.buttonAutoZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpAutoZeroUp));
|
|||
|
this.buttonExternalOutput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpExternalOutputDisable));
|
|||
|
this.buttonExternalOutput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpExternalOutputDown));
|
|||
|
this.buttonExternalOutput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpExternalOutputUp));
|
|||
|
this.buttonIOTest.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpIOTestDisable));
|
|||
|
this.buttonIOTest.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpIOTestDown));
|
|||
|
this.buttonIOTest.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpIOTestUp));
|
|||
|
this.buttonExternalInput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpExternalInputDisable));
|
|||
|
this.buttonExternalInput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpExternalInputDown));
|
|||
|
this.buttonExternalInput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpExternalInputUp));
|
|||
|
}
|
|||
|
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.Spanish)
|
|||
|
{
|
|||
|
this.buttonCalibration.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpCalibrationDisable));
|
|||
|
this.buttonCalibration.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpCalibrationDown));
|
|||
|
this.buttonCalibration.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpCalibrationUp));
|
|||
|
this.buttonJudgmentSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpJudgmentDisable));
|
|||
|
this.buttonJudgmentSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpJudgmentDown));
|
|||
|
this.buttonJudgmentSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpJudgmentUp));
|
|||
|
this.buttonSorter.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpSorterDisable));
|
|||
|
this.buttonSorter.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpSorterDown));
|
|||
|
this.buttonSorter.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpSorterUp));
|
|||
|
this.buttonAutoZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpAutoZeroDisable));
|
|||
|
this.buttonAutoZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpAutoZeroDown));
|
|||
|
this.buttonAutoZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpAutoZeroUp));
|
|||
|
this.buttonExternalOutput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalOutputDisable));
|
|||
|
this.buttonExternalOutput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalOutputDown));
|
|||
|
this.buttonExternalOutput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalOutputUp));
|
|||
|
this.buttonIOTest.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpIOTestDisable));
|
|||
|
this.buttonIOTest.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpIOTestDown));
|
|||
|
this.buttonIOTest.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpIOTestUp));
|
|||
|
this.buttonExternalInput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalInputDisable));
|
|||
|
this.buttonExternalInput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalInputDown));
|
|||
|
this.buttonExternalInput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpExternalInputUp));
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
this.buttonCalibration.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpCalibrationDisable));
|
|||
|
this.buttonCalibration.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpCalibrationDown));
|
|||
|
this.buttonCalibration.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpCalibrationUp));
|
|||
|
this.buttonJudgmentSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpJudgmentDisable));
|
|||
|
this.buttonJudgmentSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpJudgmentDown));
|
|||
|
this.buttonJudgmentSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpJudgmentUp));
|
|||
|
this.buttonSorter.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpSorterDisable));
|
|||
|
this.buttonSorter.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpSorterDown));
|
|||
|
this.buttonSorter.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpSorterUp));
|
|||
|
this.buttonAutoZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpAutoZeroDisable));
|
|||
|
this.buttonAutoZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpAutoZeroDown));
|
|||
|
this.buttonAutoZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpAutoZeroUp));
|
|||
|
this.buttonExternalOutput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpExternalOutputDisable));
|
|||
|
this.buttonExternalOutput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpExternalOutputDown));
|
|||
|
this.buttonExternalOutput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpExternalOutputUp));
|
|||
|
this.buttonIOTest.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpIOTestDisable));
|
|||
|
this.buttonIOTest.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpIOTestDown));
|
|||
|
this.buttonIOTest.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpIOTestUp));
|
|||
|
this.buttonExternalInput.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpExternalInputDisable));
|
|||
|
this.buttonExternalInput.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpExternalInputDown));
|
|||
|
this.buttonExternalInput.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpExternalInputUp));
|
|||
|
}
|
|||
|
}
|
|||
|
private void DefaultSetting()
|
|||
|
{
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.Help;
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateMenuDisplay(SystemStatus status)
|
|||
|
{
|
|||
|
switch (status.CurrentUser.Group)
|
|||
|
{
|
|||
|
case DataStore.UserGroup.Level1Operator:
|
|||
|
this.buttonCalibration.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsSystemCalibration;
|
|||
|
this.buttonJudgmentSetting.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsSystemJudgmentSetting;
|
|||
|
this.buttonSorter.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsSystemSorterSetting;
|
|||
|
this.buttonAutoZero.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsSystemAutoZero;
|
|||
|
this.buttonIOTest.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsSystemIOTest;
|
|||
|
this.buttonExternalOutput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsSystemExternalOutput;
|
|||
|
this.buttonExternalInput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level1.IsSystemExternalInput;
|
|||
|
break;
|
|||
|
case DataStore.UserGroup.Level2Engineer:
|
|||
|
this.buttonCalibration.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsSystemCalibration;
|
|||
|
this.buttonJudgmentSetting.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsSystemJudgmentSetting;
|
|||
|
this.buttonSorter.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsSystemSorterSetting;
|
|||
|
this.buttonAutoZero.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsSystemAutoZero;
|
|||
|
this.buttonIOTest.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsSystemIOTest;
|
|||
|
this.buttonExternalOutput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsSystemExternalOutput;
|
|||
|
this.buttonExternalInput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level2.IsSystemExternalInput;
|
|||
|
break;
|
|||
|
case DataStore.UserGroup.Level3Manager:
|
|||
|
this.buttonCalibration.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsSystemCalibration;
|
|||
|
this.buttonJudgmentSetting.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsSystemJudgmentSetting;
|
|||
|
this.buttonSorter.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsSystemSorterSetting;
|
|||
|
this.buttonAutoZero.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsSystemAutoZero;
|
|||
|
this.buttonIOTest.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsSystemIOTest;
|
|||
|
this.buttonExternalOutput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsSystemExternalOutput;
|
|||
|
this.buttonExternalInput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.Level3.IsSystemExternalInput;
|
|||
|
break;
|
|||
|
case DataStore.UserGroup.Level4Developer:
|
|||
|
this.buttonCalibration.Enabled = true;
|
|||
|
this.buttonJudgmentSetting.Enabled = true;
|
|||
|
this.buttonSorter.Enabled = true;
|
|||
|
this.buttonAutoZero.Enabled = true;
|
|||
|
this.buttonIOTest.Enabled = true;
|
|||
|
this.buttonExternalOutput.Enabled = true;
|
|||
|
this.buttonExternalInput.Enabled = true;
|
|||
|
break;
|
|||
|
case DataStore.UserGroup.NotLogin:
|
|||
|
this.buttonCalibration.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.NotLogin.IsSystemCalibration;
|
|||
|
this.buttonJudgmentSetting.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.NotLogin.IsSystemJudgmentSetting;
|
|||
|
this.buttonSorter.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.NotLogin.IsSystemSorterSetting;
|
|||
|
this.buttonAutoZero.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.NotLogin.IsSystemAutoZero;
|
|||
|
this.buttonIOTest.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.NotLogin.IsSystemIOTest;
|
|||
|
this.buttonExternalOutput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.NotLogin.IsSystemExternalOutput;
|
|||
|
this.buttonExternalInput.Enabled = this.ParentForm.ParentForm.CurrentUserGroup.NotLogin.IsSystemExternalInput;
|
|||
|
break;
|
|||
|
default:
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
public void UpdateDisplayMenuButton(DataStore.MenuBottomSystem menu)
|
|||
|
{
|
|||
|
switch (menu)
|
|||
|
{
|
|||
|
case DataStore.MenuBottomSystem.AutoZero:
|
|||
|
if (this.buttonAutoZero.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|||
|
this.buttonAutoZero.ButtonDown();
|
|||
|
if (this.buttonCalibration.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|||
|
this.buttonCalibration.ButtonUp();
|
|||
|
|
|||
|
break;
|
|||
|
case DataStore.MenuBottomSystem.Calibration:
|
|||
|
break;
|
|||
|
case DataStore.MenuBottomSystem.Help:
|
|||
|
break;
|
|||
|
case DataStore.MenuBottomSystem.IOTest:
|
|||
|
break;
|
|||
|
case DataStore.MenuBottomSystem.JudgmentSetting:
|
|||
|
break;
|
|||
|
case DataStore.MenuBottomSystem.SorterSetting:
|
|||
|
break;
|
|||
|
default:
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void DisplayRefresh(SystemStatus status)
|
|||
|
{
|
|||
|
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplay = DataStore.DisplayStore.SystemHelp;
|
|||
|
this.ParentForm.ParentForm.SetDisplayMode(DataStore.DisplayMode.Menu);
|
|||
|
this.ParentForm.DisplayTitleRoot(this.ParentForm.ParentForm.CurrentSystemStatus);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Event Handler
|
|||
|
private void buttonMenu_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
SmartButton button = sender as SmartButton;
|
|||
|
|
|||
|
if (button == null)
|
|||
|
return;
|
|||
|
|
|||
|
if (button == this.buttonCalibration)
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.Calibration;
|
|||
|
else if (button == this.buttonJudgmentSetting)
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.JudgmentSetting;
|
|||
|
else if (button == this.buttonSorter)
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.SorterSetting;
|
|||
|
else if (button == this.buttonAutoZero)
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.AutoZero;
|
|||
|
else if (button == this.buttonExternalOutput)
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.ExternalOutput;
|
|||
|
else if (button == this.buttonIOTest)
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.IOTest;
|
|||
|
else if (button == this.buttonExternalInput)
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.ExternalInput;
|
|||
|
else
|
|||
|
this.CurrentMenu = DataStore.MenuBottomSystem.Help;
|
|||
|
|
|||
|
this.ParentForm.DisplayBottomSystem(this.CurrentMenu);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|