220 lines
15 KiB
C#
220 lines
15 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_0H.Forms;
|
|
using ITC81DB_0H_ImageDll;
|
|
|
|
namespace ITC81DB_0H.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.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.buttonBLDCMotorSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDisable));
|
|
this.buttonBLDCMotorSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDown));
|
|
this.buttonBLDCMotorSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCUp));
|
|
}
|
|
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.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.buttonBLDCMotorSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDisable));
|
|
this.buttonBLDCMotorSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDown));
|
|
this.buttonBLDCMotorSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCUp));
|
|
}
|
|
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.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.buttonBLDCMotorSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDisable));
|
|
this.buttonBLDCMotorSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDown));
|
|
this.buttonBLDCMotorSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCUp));
|
|
}
|
|
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.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.buttonBLDCMotorSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDisable));
|
|
this.buttonBLDCMotorSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDown));
|
|
this.buttonBLDCMotorSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCUp));
|
|
}
|
|
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.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.buttonBLDCMotorSetting.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDisable));
|
|
this.buttonBLDCMotorSetting.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCDown));
|
|
this.buttonBLDCMotorSetting.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpBLDCUp));
|
|
}
|
|
}
|
|
private void DefaultSetting()
|
|
{
|
|
this.CurrentMenu = DataStore.MenuBottomSystem.Help;
|
|
}
|
|
|
|
public void UpdateDisplayMenuButton(DataStore.MenuBottomSystem menu)
|
|
{
|
|
switch (menu)
|
|
{
|
|
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);
|
|
|
|
this.buttonBLDCMotorSetting.Visible = this.ParentForm.ParentForm.SystemConfig1.IsBLDCON;
|
|
}
|
|
#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.buttonExternalOutput)
|
|
this.CurrentMenu = DataStore.MenuBottomSystem.ExternalOutput;
|
|
else if (button == this.buttonIOTest)
|
|
this.CurrentMenu = DataStore.MenuBottomSystem.IOTest;
|
|
else if (button == this.buttonBLDCMotorSetting)
|
|
this.CurrentMenu = DataStore.MenuBottomSystem.BLDCMotorSetting;
|
|
else
|
|
this.CurrentMenu = DataStore.MenuBottomSystem.Help;
|
|
|
|
this.ParentForm.DisplayBottomSystem(this.CurrentMenu);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|