ITC81DB_2H/ITC81DB_0H/Controls/CenterInformation/ControlCenterInforHelp.cs

131 lines
6.3 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 ITC81DB_0H.Forms;
using ITC81DB_2H_ImageDll;
using SmartX;
namespace ITC81DB_0H.Controls
{
public partial class ControlCenterInforHelp : UserControl
{
#region Field
private FormMenu m_ParentForm;
private DataStore.MenuBottomInformation CurrentMenu;
#endregion
#region Constructor
public ControlCenterInforHelp(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.buttonInformation.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpInformationDisable));
this.buttonInformation.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpInformationDown));
this.buttonInformation.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpInformationUp));
this.buttonAS.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpASDisable));
this.buttonAS.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpASDown));
this.buttonAS.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engHelpASUp));
}
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.Chinese)
{
this.buttonInformation.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpInformationDisable));
this.buttonInformation.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpInformationDown));
this.buttonInformation.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpInformationUp));
this.buttonAS.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpASDisable));
this.buttonAS.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpASDown));
this.buttonAS.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnHelpASUp));
}
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.Czech)
{
}
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.Russian)
{
this.buttonInformation.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpInformationDisable));
this.buttonInformation.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpInformationDown));
this.buttonInformation.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpInformationUp));
this.buttonAS.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpASDisable));
this.buttonAS.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpASDown));
this.buttonAS.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusHelpASUp));
}
else if (this.ParentForm.ParentForm.SystemConfig1.Language == DataStore.LanguageID.German)
{
this.buttonInformation.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpInformationDisable));
this.buttonInformation.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpInformationDown));
this.buttonInformation.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpInformationUp));
this.buttonAS.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpASDisable));
this.buttonAS.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpASDown));
this.buttonAS.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerHelpASUp));
}
else
{
this.buttonInformation.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpInformationDisable));
this.buttonInformation.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpInformationDown));
this.buttonInformation.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpInformationUp));
this.buttonAS.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpASDisable));
this.buttonAS.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpASDown));
this.buttonAS.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korHelpASUp));
}
}
private void DefaultSetting()
{
this.CurrentMenu = DataStore.MenuBottomInformation.Help;
}
public void DisplayRefresh(SystemStatus status)
{
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplay = DataStore.DisplayStore.InforHelp;
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.buttonInformation)
this.CurrentMenu = DataStore.MenuBottomInformation.SystemInformation;
else if (button == this.buttonAS)
this.CurrentMenu = DataStore.MenuBottomInformation.AS;
else
this.CurrentMenu = DataStore.MenuBottomInformation.Help;
this.ParentForm.DisplayBottomInformation(this.CurrentMenu);
}
#endregion
}
}