3837 lines
		
	
	
		
			200 KiB
		
	
	
	
		
			C#
		
	
			
		
		
	
	
			3837 lines
		
	
	
		
			200 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.Threading;
 | |
| using System.Windows.Forms;
 | |
| 
 | |
| using SmartX;
 | |
| using INT63DC_2C.Controls;
 | |
| using INT63DC_2C.DialogForms;
 | |
| using INT63DC_ImageDll;
 | |
| 
 | |
| namespace INT63DC_2C.Forms
 | |
| {
 | |
|     public partial class FormMainDisplay : Form
 | |
|     {
 | |
|         #region Field
 | |
|         private FormMain m_ParentForm;
 | |
|         private int SubmenuIndex;
 | |
|         private bool IsFistAlarmView;
 | |
|         
 | |
|         private Color ColorButtonAccessTrue;
 | |
|         private Color ColorButtonAccessFalse;
 | |
| 
 | |
|         private DataStore.FormMainDisplayStore MainDisplay;
 | |
| 
 | |
|         private ControlMainDisplayAlarm MainDisplayAlarmList;
 | |
| 
 | |
|         private ControlMainDisplayEachBarGraph6 MainDisplayEachBarGraph6;
 | |
|         private ControlMainDisplayEachBarGraph7 MainDisplayEachBarGraph7;
 | |
|         private ControlMainDisplayEachBarGraph8 MainDisplayEachBarGraph8;
 | |
|         private ControlMainDisplayEachBarGraph10 MainDisplayEachBarGraph10;
 | |
|         private ControlMainDisplayEachBarGraph12 MainDisplayEachBarGraph12;
 | |
|         private ControlMainDisplayEachBarGraph16 MainDisplayEachBarGraph16;
 | |
|         private ControlMainDisplayDotGraph2 MainDisplayDotGraph2;
 | |
|         private ControlMainDisplayDotGraph3 MainDisplayDotGraph3;
 | |
|         private ControlMainDisplayDotGraph4 MainDisplayDotGraph4;
 | |
|         private ControlMainDisplayDotGraph5 MainDisplayDotGraph5;
 | |
|         private ControlMainDisplayDotGraph6 MainDisplayDotGraph6;
 | |
|         private ControlMainDisplayDotGraph7 MainDisplayDotGraph7;
 | |
|         private ControlMainDisplayDotGraph8 MainDisplayDotGraph8;
 | |
|         private ControlMainDisplayDotGraph10 MainDisplayDotGraph10;
 | |
|         private ControlMainDisplayDotGraph12 MainDisplayDotGraph12;
 | |
|         private ControlMainDisplayDotGraph16 MainDisplayDotGraph16;
 | |
|         private ControlMainDisplayTable6 MainDisplayTable6;
 | |
|         private ControlMainDisplayTable7 MainDisplayTable7;
 | |
|         private ControlMainDisplayTable8 MainDisplayTable8;
 | |
|         private ControlMainDisplayTable10 MainDisplayTable10;
 | |
|         private ControlMainDisplayTable12 MainDisplayTable12;
 | |
|         public ControlMainDisplayTable16 MainDisplayTable16;
 | |
|         //public ControlMainDisplayTable16_1 MainDisplayTable16_1;
 | |
| 
 | |
|         private ControlMainDisplay2 MainDisplay2;
 | |
|         private ControlMainDisplay3 MainDisplay3;
 | |
|         private ControlMainDisplay4 MainDisplay4;
 | |
|         private ControlMainDisplay5 MainDisplay5;
 | |
|         //private ControlMainDisplay6 MainDisplay6;
 | |
|         #endregion
 | |
| 
 | |
|         #region Constructor
 | |
|         public FormMainDisplay(FormMain parent)
 | |
|         {
 | |
|             InitializeComponent();
 | |
| 
 | |
|             this.ParentForm = parent;
 | |
| 
 | |
|             this.InitializeDesign();
 | |
|             this.InitializeControl();
 | |
|             this.DefaultSetting();
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Property
 | |
|         public FormMain ParentForm
 | |
|         {
 | |
|             get { return this.m_ParentForm; }
 | |
|             private set { this.m_ParentForm = value; }
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Method
 | |
|         /// <summary>
 | |
|         /// 언어별 화면 디자인
 | |
|         /// </summary>
 | |
|         private void InitializeDesign()
 | |
|         {
 | |
|             ImageDll images = new ImageDll();
 | |
|             Font font = new Font("New Gulim", 8F, FontStyle.Regular);
 | |
|             Font font1 = new Font("New Gulim", 14F, FontStyle.Bold);
 | |
| 
 | |
|             switch (this.ParentForm.SystemConfig.Language)
 | |
|             {
 | |
|                 case DataStore.LanguageID.Korean:
 | |
|                     #region Korean
 | |
|                     if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(929, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.korFormMainMenuSmallDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.korFormMainMenuSmallDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.korFormMainMenuSmallUp));
 | |
|                     }
 | |
|                     else
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(839, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.korFormMainMenuDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.korFormMainMenuDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.korFormMainMenuUp));
 | |
|                     }
 | |
|                     #endregion
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.English:
 | |
|                     #region English
 | |
|                     this.buttonOver.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainOverDown));
 | |
|                     this.buttonOver.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainOverUp));
 | |
|                     this.buttonPass.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainPassDown));
 | |
|                     this.buttonPass.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainPassUp));
 | |
|                     this.buttonUnder.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainUnderDown));
 | |
|                     this.buttonUnder.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainUnderUp));
 | |
|                     this.buttonTare.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainTareDown));
 | |
|                     this.buttonTare.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainTareUp));
 | |
| 
 | |
|                     this.buttonScaleZero.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainZeroDown));
 | |
|                     this.buttonScaleZero.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainZeroUp));
 | |
|                     this.buttonClear.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainClearDisable));
 | |
|                     this.buttonClear.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainClearDown));
 | |
|                     this.buttonClear.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainClearUp));
 | |
|                     if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(929, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainMenuSmallDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainMenuSmallDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainMenuSmallUp));
 | |
|                     }
 | |
|                     else
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(839, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainMenuDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainMenuDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainMenuUp));
 | |
|                     }
 | |
|                     this.buttonSubMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainSubMenuDisable));
 | |
|                     this.buttonSubMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainSubMenuDown));
 | |
|                     this.buttonSubMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engFormMainSubMenuUp));
 | |
|                     this.buttonBypassDirection.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSubMenuNGUp));
 | |
|                     this.buttonBypassDirection.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSubMenuPassUp));
 | |
|                     this.buttonBypassOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSubMenuContinueUp));
 | |
|                     this.buttonBypassOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSubMenuOnceUp));
 | |
|                     this.buttonSamplingOnce.DownImage = this.buttonLeakSamplingOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSubMenuContinueUp));
 | |
|                     this.buttonSamplingOnce.UpImage = this.buttonLeakSamplingOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.engSubMenuOnceUp));
 | |
| 
 | |
|                     this.groupBoxSorter.Text = "Sorter settings";
 | |
|                     this.labelStaticSorter1DelayTime.Text = "Sorter1 Delay";
 | |
|                     this.labelStaticSorter1RunTime.Text = "Sorter1 Run";
 | |
|                     this.labelStaticSorter2DelayTime.Text = "Sorter2 Delay";
 | |
|                     this.labelStaticSorter2RunTime.Text = "Sorter2 Run";
 | |
|                     this.labelStaticSorter3DelayTime.Text = "Sorter3 Delay";
 | |
|                     this.labelStaticSorter3RunTime.Text = "Sorter3 Run";
 | |
|                     this.labelStaticSorter4DelayTime.Text = "Sorter4 Delay";
 | |
|                     this.labelStaticSorter4RunTime.Text = "Sorter4 Run";
 | |
|                     this.labelStaticEntryGateDelayTime.Text = "Entry gate delay";
 | |
|                     this.labelStaticEntryGateRunTime.Text = "Entry gate run";
 | |
|                     this.labelStaticDischargeStopperDelayTime.Font = font;
 | |
|                     this.labelStaticDischargeStopperDelayTime.Text = "Discharge stopper delay";
 | |
|                     this.labelStaticDischargeStopperRunTime.Font = font;
 | |
|                     this.labelStaticDischargeStopperRunTime.Text = "Discharge stopper run";
 | |
|                     this.labelStaticStopper2DelayTime.Text = "Stopper2 Delay";
 | |
|                     this.labelStaticStopper2RunTime.Text = "Stopper2 Run";
 | |
| 
 | |
|                     this.groupBoxJudgmentSetting.Text = "Judgment settings";
 | |
|                     this.labelStaticFilter.Text = "Filter";
 | |
|                     this.labelStaticJudgmentDelayTime.Text = "J.Delay";
 | |
|                     this.labelStaticJudgmentCount.Text = "J.Count";
 | |
|                     this.labelStaticForcedZeroDelayTime.Text = "Forced zero delay";
 | |
|                     this.labelStaticTurnDelayTime.Text = "Turn Delay";
 | |
| 
 | |
|                     this.labelMessage1.Text = "Inverter Alarm";
 | |
|                     this.labelMessage3.Text = "Pinch point Alarm";
 | |
|                     this.labelMessage5.Text = "Please set the servo motor origin";
 | |
| 
 | |
|                     this.labelStaticSamplingCount.Text = "Count";
 | |
|                     this.labelStaticSamplingTime.Text = "Time(min)";
 | |
| 
 | |
|                     this.labelStaticLeakSamplingTime.Text = "Time(min)";
 | |
| 
 | |
|                     this.labelStaticOverRange.Text = "Over";
 | |
|                     this.labelStaticPassRange.Text = "Pass";
 | |
|                     this.labelStaticUnderRange.Text = "Under";
 | |
|                     this.labelStaticOverRangeLimit.Text = "Over Limit";
 | |
|                     this.labelStaticUnderRangeLimit.Text = "Under Limit";
 | |
|                     #endregion
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Chinese:
 | |
|                     #region Chinese
 | |
|                     this.buttonOver.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainOverDown));
 | |
|                     this.buttonOver.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainOverUp));
 | |
|                     this.buttonPass.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainPassDown));
 | |
|                     this.buttonPass.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainPassUp));
 | |
|                     this.buttonUnder.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainUnderDown));
 | |
|                     this.buttonUnder.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainUnderUp));
 | |
|                     this.buttonTare.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainTareDown));
 | |
|                     this.buttonTare.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainTareUp));
 | |
| 
 | |
|                     this.buttonScaleZero.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainZeroDown));
 | |
|                     this.buttonScaleZero.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainZeroUp));
 | |
|                     this.buttonClear.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainClearDisable));
 | |
|                     this.buttonClear.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainClearDown));
 | |
|                     this.buttonClear.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainClearUp));
 | |
|                     if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(929, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainMenuSmallDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainMenuSmallDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainMenuSmallUp));
 | |
|                     }
 | |
|                     else
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(839, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainMenuDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainMenuDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainMenuUp));
 | |
|                     }
 | |
|                     this.buttonSubMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainSubMenuDisable));
 | |
|                     this.buttonSubMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainSubMenuDown));
 | |
|                     this.buttonSubMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainSubMenuUp));
 | |
|                     this.buttonBypassDirection.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSubMenuNGUp));
 | |
|                     this.buttonBypassDirection.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSubMenuPassUp));
 | |
|                     this.buttonBypassOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSubMenuContinueUp));
 | |
|                     this.buttonBypassOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSubMenuOnceUp));
 | |
|                     this.buttonUser.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainLoginDisable));
 | |
|                     this.buttonUser.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainLogOutDown));
 | |
|                     this.buttonUser.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnFormMainLoginUp));
 | |
|                     this.buttonSamplingOnce.DownImage = this.buttonLeakSamplingOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSubMenuContinueUp));
 | |
|                     this.buttonSamplingOnce.UpImage = this.buttonLeakSamplingOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.chnSubMenuOnceUp));
 | |
| 
 | |
|                     this.groupBoxSorter.Text = "筛选设定";
 | |
|                     this.labelStaticSorter1DelayTime.Text = "分类机1 延迟时间";
 | |
|                     this.labelStaticSorter1RunTime.Text = "分类机1 运行时间";
 | |
|                     this.labelStaticSorter2DelayTime.Text = "分类机2 延迟时间";
 | |
|                     this.labelStaticSorter2RunTime.Text = "分类机2 运行时间";
 | |
|                     this.labelStaticSorter3DelayTime.Text = "分类机3 延迟时间";
 | |
|                     this.labelStaticSorter3RunTime.Text = "分类机3 运行时间";
 | |
|                     this.labelStaticSorter4DelayTime.Text = "分类机4 延迟时间";
 | |
|                     this.labelStaticSorter4RunTime.Text = "分类机4 运行时间";
 | |
|                     this.labelStaticEntryGateDelayTime.Text = "料门延迟时间";
 | |
|                     this.labelStaticEntryGateRunTime.Text = "料门动作时间";
 | |
|                     this.labelStaticDischargeStopperDelayTime.Text = "出料限位器延迟时间";
 | |
|                     this.labelStaticDischargeStopperRunTime.Text = "出料限位器动作时间";
 | |
|                     this.labelStaticStopper2DelayTime.Text = "限位2 器延迟时间";
 | |
|                     this.labelStaticStopper2RunTime.Text = "限位2 器动作时间";
 | |
| 
 | |
|                     this.groupBoxJudgmentSetting.Text = "判断设置";
 | |
|                     this.labelStaticFilter.Text = "滤波器";
 | |
|                     this.labelStaticJudgmentDelayTime.Text = "判断延迟";
 | |
|                     this.labelStaticJudgmentCount.Text = "重复延迟";
 | |
|                     this.labelStaticTurnDelayTime.Text = "旋转延迟";
 | |
|                     this.labelStaticForcedZeroDelayTime.Text = "零延迟时间";
 | |
| 
 | |
|                     this.labelMessage1.Text = "变频器报警";
 | |
|                     this.labelMessage3.Text = "Pinch point Alarm";
 | |
|                     this.labelMessage5.Text = "伺服电机不在远点";
 | |
|                     this.buttonClose.Text = "关闭";
 | |
| 
 | |
|                     this.labelTitleTotalCount.Text = "计数";
 | |
|                     this.labelTitleNG.Text = "不良";
 | |
|                     this.labelTitleBypass.Text = "选别选项";
 | |
|                     this.labelTitleScreen.Text = "屏幕";
 | |
| 
 | |
|                     this.labelTitleSampling.Text = "取样";
 | |
|                     this.labelStaticSamplingCount.Text = "计数";
 | |
|                     this.labelStaticSamplingTime.Text = "时间(分钟)";
 | |
| 
 | |
|                     this.labelTitleLeakSampling.Text = "泄露 取样";
 | |
|                     this.labelStaticLeakSamplingTime.Text = "时间(分钟)";
 | |
| 
 | |
|                     this.labelStaticOverRange.Text = "上限";
 | |
|                     this.labelStaticPassRange.Text = "标准";
 | |
|                     this.labelStaticUnderRange.Text = "下限";
 | |
|                     this.labelStaticOverRangeLimit.Text = "上极限报警";
 | |
|                     this.labelStaticUnderRangeLimit.Text = "下极限报警";
 | |
|                     #endregion
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Czech:
 | |
|                     #region Czech
 | |
|                     this.buttonOver.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainOverDown));
 | |
|                     this.buttonOver.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainOverUp));
 | |
|                     this.buttonPass.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainPassDown));
 | |
|                     this.buttonPass.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainPassUp));
 | |
|                     this.buttonUnder.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainUnderDown));
 | |
|                     this.buttonUnder.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainUnderUp));
 | |
|                     this.buttonTare.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainTareDown));
 | |
|                     this.buttonTare.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainTareUp));
 | |
| 
 | |
|                     this.buttonScaleZero.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainZeroDown));
 | |
|                     this.buttonScaleZero.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainZeroUp));
 | |
|                     this.buttonClear.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainClearDisable));
 | |
|                     this.buttonClear.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainClearDown));
 | |
|                     this.buttonClear.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainClearUp));
 | |
|                     if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(929, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainMenuSmallDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainMenuSmallDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainMenuSmallUp));
 | |
|                     }
 | |
|                     else
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(839, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainMenuDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainMenuDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainMenuUp));
 | |
|                     }
 | |
|                     this.buttonSubMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainSubMenuDisable));
 | |
|                     this.buttonSubMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainSubMenuDown));
 | |
|                     this.buttonSubMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeFormMainSubMenuUp));
 | |
|                     this.buttonBypassDirection.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSubMenuNGUp));
 | |
|                     this.buttonBypassDirection.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSubMenuPassUp));
 | |
|                     this.buttonBypassOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSubMenuContinueUp));
 | |
|                     this.buttonBypassOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSubMenuOnceUp));
 | |
|                     this.buttonSamplingOnce.DownImage = this.buttonLeakSamplingOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSubMenuContinueUp));
 | |
|                     this.buttonSamplingOnce.UpImage = this.buttonLeakSamplingOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.czeSubMenuOnceUp));
 | |
| 
 | |
|                     this.groupBoxSorter.Text = "Nastavení třídiče";
 | |
|                     this.labelStaticSorter1DelayTime.Text = "Vyřazovač1 Zpoždění";
 | |
|                     this.labelStaticSorter1RunTime.Text = "Vyřazovač1 Čas chodu";
 | |
|                     this.labelStaticSorter2DelayTime.Text = "Vyřazovač2 Zpoždění";
 | |
|                     this.labelStaticSorter2RunTime.Text = "Vyřazovač2 Čas chodu";
 | |
|                     this.labelStaticSorter3DelayTime.Text = "Vyřazovač3 Zpoždění";
 | |
|                     this.labelStaticSorter3RunTime.Text = "Vyřazovač3 Čas chodu";
 | |
|                     this.labelStaticSorter4DelayTime.Text = "Vyřazovač4 Zpoždění";
 | |
|                     this.labelStaticSorter4RunTime.Text = "Vyřazovač4 Čas chodu";
 | |
|                     this.labelStaticEntryGateDelayTime.Text = "zpoždění vstupní brány";
 | |
|                     this.labelStaticEntryGateRunTime.Text = "Provozní vjezdové brány";
 | |
|                     this.labelStaticDischargeStopperDelayTime.Text = "zpoždění vybíjecí zátky";
 | |
|                     this.labelStaticDischargeStopperRunTime.Text = "provozu vypouštěcí zátky";
 | |
|                     this.labelStaticStopper2DelayTime.Text = "Zastavování2 Zpoždění";
 | |
|                     this.labelStaticStopper2RunTime.Text = "Zastavování2 Čas chodu";
 | |
| 
 | |
|                     this.groupBoxJudgmentSetting.Text = "Nastavení rozhodnutí";
 | |
|                     this.labelStaticFilter.Text = "Filtr";
 | |
|                     this.labelStaticJudgmentDelayTime.Text = "Zpoždění kapsy";
 | |
|                     this.labelStaticJudgmentCount.Text = "Číslo kapsy";
 | |
|                     this.labelStaticTurnDelayTime.Text = "Zpoždění rotace";
 | |
|                     this.labelStaticForcedZeroDelayTime.Font = font;
 | |
|                     this.labelStaticForcedZeroDelayTime.Text = "Vynucená nulového zpoždění";
 | |
| 
 | |
|                     this.labelMessage1.Text = "Invertor měniče";
 | |
|                     this.labelMessage3.Text = "Pinch point Alarm";
 | |
|                     this.labelMessage5.Text = "Nastavte prosím původ servomotoru";
 | |
| 
 | |
|                     this.labelTitleSampling.Text = "vzorkování";
 | |
|                     this.labelStaticSamplingCount.Text = "Počet";
 | |
|                     this.labelStaticSamplingTime.Text = "Čas(min)";
 | |
| 
 | |
|                     this.labelTitleLeakSampling.Text = "unikat Počet";
 | |
|                     this.labelStaticLeakSamplingTime.Text = "Čas(min)";
 | |
| 
 | |
|                     this.labelStaticOverRange.Text = "Max.";
 | |
|                     this.labelStaticPassRange.Text = "Váha";
 | |
|                     this.labelStaticUnderRange.Text = "Min.";
 | |
|                     this.labelStaticOverRangeLimit.Text = "Max. omezit";
 | |
|                     this.labelStaticUnderRangeLimit.Text = "Min. omezit";
 | |
|                     #endregion
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.German:
 | |
|                     #region German
 | |
|                     this.buttonOver.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainOverDown));
 | |
|                     this.buttonOver.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainOverUp));
 | |
|                     this.buttonPass.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainPassDown));
 | |
|                     this.buttonPass.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainPassUp));
 | |
|                     this.buttonUnder.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainUnderDown));
 | |
|                     this.buttonUnder.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainUnderUp));
 | |
|                     this.buttonTare.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainTareDown));
 | |
|                     this.buttonTare.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainTareUp));
 | |
| 
 | |
|                     this.buttonScaleZero.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainZeroDown));
 | |
|                     this.buttonScaleZero.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainZeroUp));
 | |
|                     this.buttonClear.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainClearDisable));
 | |
|                     this.buttonClear.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainClearDown));
 | |
|                     this.buttonClear.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainClearUp));
 | |
|                     if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(929, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainMenuSmallDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainMenuSmallDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainMenuSmallUp));
 | |
|                     }
 | |
|                     else
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(839, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainMenuDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainMenuDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainMenuUp));
 | |
|                     }
 | |
|                     this.buttonSubMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainSubMenuDisable));
 | |
|                     this.buttonSubMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainSubMenuDown));
 | |
|                     this.buttonSubMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerFormMainSubMenuUp));
 | |
|                     this.buttonBypassDirection.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSubMenuNGUp));
 | |
|                     this.buttonBypassDirection.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSubMenuPassUp));
 | |
|                     this.buttonBypassOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSubMenuContinueUp));
 | |
|                     this.buttonBypassOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSubMenuOnceUp));
 | |
|                     this.buttonSamplingOnce.DownImage = this.buttonLeakSamplingOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSubMenuContinueUp));
 | |
|                     this.buttonSamplingOnce.UpImage = this.buttonLeakSamplingOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.gerSubMenuOnceUp));
 | |
| 
 | |
|                     this.groupBoxSorter.Text = "Sortierereinstellung";
 | |
|                     this.labelStaticSorter1DelayTime.Text = "Sortierer1 Vezögerung";
 | |
|                     this.labelStaticSorter1RunTime.Text = "Sortierer1 Laufzeit";
 | |
|                     this.labelStaticSorter2DelayTime.Text = "Sortierer2 Vezögerung";
 | |
|                     this.labelStaticSorter2RunTime.Text = "Sortierer2 Laufzeit";
 | |
|                     this.labelStaticSorter3DelayTime.Text = "Sortierer3 Vezögerung";
 | |
|                     this.labelStaticSorter3RunTime.Text = "Sortierer3 Laufzeit";
 | |
|                     this.labelStaticSorter4DelayTime.Text = "Sortierer4 Vezögerung";
 | |
|                     this.labelStaticSorter4RunTime.Text = "Sortierer4 Laufzeit";
 | |
|                     this.labelStaticEntryGateDelayTime.Font = font;
 | |
|                     this.labelStaticEntryGateDelayTime.Text = "Verzögerungszeit Eingangstors";
 | |
|                     this.labelStaticEntryGateRunTime.Font = font;
 | |
|                     this.labelStaticEntryGateRunTime.Text = "Einfahrtstor Betriebszeit";
 | |
|                     this.labelStaticDischargeStopperDelayTime.Font = font;
 | |
|                     this.labelStaticDischargeStopperDelayTime.Text = "Verzögerungszeit Entladestoppers";
 | |
|                     this.labelStaticDischargeStopperRunTime.Font = font;
 | |
|                     this.labelStaticDischargeStopperRunTime.Text = "Betriebszeit Entladungsstoppers";
 | |
|                     this.labelStaticStopper2DelayTime.Text = "Stoppen2 Vezögerung";
 | |
|                     this.labelStaticStopper2RunTime.Text = "Stoppen2 Laufzeit";
 | |
| 
 | |
|                     this.groupBoxJudgmentSetting.Text = "Tascheneinstellung";
 | |
|                     this.labelStaticFilter.Text = "Filter";
 | |
|                     this.labelStaticJudgmentDelayTime.Text = "Taschenverzögerung";
 | |
|                     this.labelStaticJudgmentCount.Text = "Taschennummer";
 | |
|                     this.labelStaticTurnDelayTime.Text = "Rotationsverzögerung";
 | |
|                     this.labelStaticForcedZeroDelayTime.Font = font;
 | |
|                     this.labelStaticForcedZeroDelayTime.Text = "Erzwungene Null-Verzögerung";
 | |
| 
 | |
|                     this.labelMessage1.Text = "Wechselrichteralarm";
 | |
|                     this.labelMessage3.Text = "Pinch point Alarm";
 | |
|                     this.labelMessage5.Text = "Bitte stellen Sie den Ursprung des Servomotors ein";
 | |
| 
 | |
|                     this.labelTitleSampling.Text = "Probenahme";
 | |
|                     this.labelStaticSamplingCount.Text = "Zahl";
 | |
|                     this.labelStaticSamplingTime.Text = "Zeit(min)";
 | |
| 
 | |
|                     this.labelTitleLeakSampling.Text = "Leck Probenahme";
 | |
|                     this.labelStaticLeakSamplingTime.Text = "Zeit(min)";
 | |
| 
 | |
|                     this.labelStaticOverRange.Text = "Max.";
 | |
|                     this.labelStaticPassRange.Text = "Bestehen";
 | |
|                     this.labelStaticUnderRange.Text = "Min.";
 | |
|                     this.labelStaticOverRangeLimit.Text = "Max. Grenze";
 | |
|                     this.labelStaticUnderRangeLimit.Text = "Min. Grenze";
 | |
|                     #endregion
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Japanese:
 | |
|                     #region Japanese
 | |
|                     this.buttonOver.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainOverDown));
 | |
|                     this.buttonOver.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainOverUp));
 | |
|                     this.buttonPass.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainPassDown));
 | |
|                     this.buttonPass.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainPassUp));
 | |
|                     this.buttonUnder.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainUnderDown));
 | |
|                     this.buttonUnder.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainUnderUp));
 | |
|                     this.buttonTare.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainTareDown));
 | |
|                     this.buttonTare.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainTareUp));
 | |
| 
 | |
|                     this.buttonScaleZero.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainZeroDown));
 | |
|                     this.buttonScaleZero.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainZeroUp));
 | |
|                     this.buttonClear.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainClearDisable));
 | |
|                     this.buttonClear.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainClearDown));
 | |
|                     this.buttonClear.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainClearUp));
 | |
|                     if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(929, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainMenuSmallDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainMenuSmallDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainMenuSmallUp));
 | |
|                     }
 | |
|                     else
 | |
|                     {
 | |
|                         this.buttonMenu.Location = new Point(839, 666);
 | |
| 
 | |
|                         this.buttonMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainMenuDisable));
 | |
|                         this.buttonMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainMenuDown));
 | |
|                         this.buttonMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainMenuUp));
 | |
|                     }
 | |
|                     this.buttonSubMenu.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainSubMenuDisable));
 | |
|                     this.buttonSubMenu.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainSubMenuDown));
 | |
|                     this.buttonSubMenu.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainSubMenuUp));
 | |
|                     this.buttonBypassDirection.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSubMenuNGUp));
 | |
|                     this.buttonBypassDirection.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSubMenuPassUp));
 | |
|                     this.buttonBypassOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSubMenuContinueUp));
 | |
|                     this.buttonBypassOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSubMenuOnceUp));
 | |
|                     this.buttonUser.DisableImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainLoginDisable));
 | |
|                     this.buttonUser.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainLogoffUp));
 | |
|                     this.buttonUser.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnFormMainLoginUp));
 | |
|                     this.buttonSamplingOnce.DownImage = this.buttonLeakSamplingOnce.DownImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSubMenuContinueUp));
 | |
|                     this.buttonSamplingOnce.UpImage = this.buttonLeakSamplingOnce.UpImage = new Bitmap(images.GetImage(ImageDll.ButtonImages.jpnSubMenuOnceUp));
 | |
| 
 | |
|                     this.groupBoxSorter.Text = "ソㅡタㅡ設定";
 | |
|                     this.labelStaticSorter1DelayTime.Text = "ソㅡタㅡ1 遅延時間";
 | |
|                     this.labelStaticSorter1RunTime.Text = "ソㅡタㅡ1 運転時間";
 | |
|                     this.labelStaticSorter2DelayTime.Text = "ソㅡタㅡ2 遅延時間";
 | |
|                     this.labelStaticSorter2RunTime.Text = "ソㅡタㅡ2 運転時間";
 | |
|                     this.labelStaticSorter3DelayTime.Text = "ソㅡタㅡ3 遅延時間";
 | |
|                     this.labelStaticSorter3RunTime.Text = "ソㅡタㅡ3 運転時間";
 | |
|                     this.labelStaticSorter4DelayTime.Text = "ソㅡタㅡ4 遅延時間";
 | |
|                     this.labelStaticSorter4RunTime.Text = "ソㅡタㅡ4 運転時間";
 | |
|                     this.labelStaticEntryGateDelayTime.Text = "エントリㅡゲㅡトの遅延時間";
 | |
|                     this.labelStaticEntryGateRunTime.Text = "エントリㅡゲㅡトの運転時間";
 | |
|                     this.labelStaticDischargeStopperDelayTime.Font = font;
 | |
|                     this.labelStaticDischargeStopperDelayTime.Text = "排出ストッパㅡの遅延時間";
 | |
|                     this.labelStaticDischargeStopperRunTime.Font = font;
 | |
|                     this.labelStaticDischargeStopperRunTime.Text = "排出ストッパㅡの運転時間";
 | |
|                     this.labelStaticStopper2DelayTime.Text = "ストッパー2 遅延時間";
 | |
|                     this.labelStaticStopper2RunTime.Text = "ストッパー2 運転時間";
 | |
| 
 | |
|                     this.groupBoxJudgmentSetting.Text = "判定設定";
 | |
|                     this.labelStaticFilter.Text = "フィルタㅡ";
 | |
|                     this.labelStaticJudgmentDelayTime.Text = "判定の遅れ";
 | |
|                     this.labelStaticJudgmentCount.Text = "判定番号";
 | |
|                     this.labelStaticForcedZeroDelayTime.Text = "強制ゼロ遅延時間";
 | |
|                     this.labelStaticTurnDelayTime.Text = "タㅡン遅延";
 | |
| 
 | |
|                     this.labelTitleTotalCount.Text = "総カウント";
 | |
|                     this.labelTitleNG.Text = "合計NG";
 | |
|                     this.labelTitleBypass.Text = "バイパス";
 | |
|                     this.labelTitleScreen.Text = "画面";
 | |
|                     this.labelTitleSampling.Text = "サンプリング";
 | |
| 
 | |
|                     this.labelMessage1.Text = "インバㅡタㅡアラㅡム";
 | |
| 
 | |
|                     this.labelMessage3.Text = "ピンチポイントアラㅡム";
 | |
|                     this.labelMessage5.Text = "サㅡボモㅡタの原点を設定してください";
 | |
|                     this.buttonClose.Text = "クロㅡズ";
 | |
| 
 | |
|                     this.labelTitleTotalCount.Font = font1;
 | |
|                     this.labelTitleTotalCount.Text = "総カウント";
 | |
|                     this.labelTitleNG.Text = "不良";
 | |
|                     this.labelTitleBypass.Text = "バイパスモㅡド";
 | |
|                     this.labelTitleScreen.Text = "画面";
 | |
|                     this.labelStaticSamplingCount.Text = "カウント";
 | |
|                     this.labelStaticSamplingTime.Text = "時間(分)";
 | |
| 
 | |
|                     this.labelTitleLeakSampling.Text = "リーク サンプリング";
 | |
|                     this.labelStaticLeakSamplingTime.Text = "時間(分)";
 | |
| 
 | |
|                     this.labelStaticOverRange.Text = "上限";
 | |
|                     this.labelStaticPassRange.Text = "合格";
 | |
|                     this.labelStaticUnderRange.Text = "不足";
 | |
|                     this.labelStaticOverRangeLimit.Text = "上限リミット";
 | |
|                     this.labelStaticUnderRangeLimit.Text = "下限リミット";
 | |
| 
 | |
|                     // label 크기 재조정 및 글씨 크기 재조정
 | |
|                     this.labelTitleTotalCount.Font = new Font("New Gulim", 15F, System.Drawing.FontStyle.Bold);
 | |
|                     this.labelTitleTotalCount.Location = new Point(25, 704);
 | |
|                     this.labelTitleTotalCount.Size = new Size(113, 41);
 | |
| 
 | |
|                     this.labelTotalCount.Font = new Font("Tahoma", 16F, System.Drawing.FontStyle.Bold);
 | |
|                     this.labelTotalCount.Location = new Point(144, 704);
 | |
|                     this.labelTotalCount.Size = new Size(128, 41);
 | |
| 
 | |
|                     this.labelTitleNG.Font = new Font("New Gulim", 15F, System.Drawing.FontStyle.Bold);
 | |
|                     this.labelTitleNG.Location = new Point(307, 704);
 | |
|                     this.labelTitleNG.Size = new Size(71, 41);
 | |
| 
 | |
|                     this.labelNGCount.Font = new Font("Tahoma", 16F, System.Drawing.FontStyle.Bold);
 | |
|                     this.labelNGCount.Location = new Point(384, 704);
 | |
|                     this.labelNGCount.Size = new Size(111, 41);
 | |
|                     #endregion
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
|         }
 | |
|         private void InitializeControl()
 | |
|         {
 | |
|             if (this.ParentForm.IsBootingComplete == false)
 | |
|                 this.buttonProductNo.Text = "**";
 | |
|             else
 | |
|                 this.buttonProductNo.Text = this.ParentForm.SystemConfig.ProductNumber.ToString();
 | |
| 
 | |
|             this.buttonUnder.Text = this.labelUnderRange.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.UnderRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             this.buttonPass.Text = this.labelPassRange.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.PassRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             this.buttonOver.Text = this.labelOverRange.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.OverRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             this.buttonTare.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.TareRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             this.labelUnderRangeLimit.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.UnderRangeLimit, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             this.labelOverRangeLimit.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.OverRangeLimit, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
| 
 | |
|             this.labelProductName.Text = this.ParentForm.CurrentProductItem.Name;
 | |
|             this.labelLotNo.Text = this.ParentForm.CurrentProductItem.LotNo;
 | |
|             this.labelProductionSpeed.Text = "0";
 | |
| 
 | |
|             if (this.ParentForm.SystemConfig.IsBypassDirectionPass == true)
 | |
|                 this.buttonBypassDirection.ButtonUp();
 | |
|             else
 | |
|                 this.buttonBypassDirection.ButtonDown();
 | |
| 
 | |
|             if (this.ParentForm.SystemConfig.IsBypassOnce == true)
 | |
|             {
 | |
|                 this.buttonBypassOnce.ButtonUp();
 | |
|                 this.buttonBypassRun.Mode = SmartButton.BUTTONMODE.NORMAL;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.buttonBypassOnce.ButtonDown();
 | |
|                 this.buttonBypassRun.Mode = SmartButton.BUTTONMODE.PUSH;
 | |
|             }
 | |
| 
 | |
|             this.panelSetting.Location = new Point(429, 74);
 | |
|             this.panelSetting.Visible = false;
 | |
|             this.panelSetting.BringToFront();
 | |
| 
 | |
|             this.panelSubMenu1.Location = new Point(4, 573);
 | |
|             this.panelSubMenu1.Visible = false;
 | |
|             this.panelSubMenu1.BringToFront();
 | |
| 
 | |
|             this.panelSubMenu2.Location = new Point(4, 573);
 | |
|             this.panelSubMenu2.Visible = false;
 | |
|             this.panelSubMenu2.BringToFront();
 | |
| 
 | |
|             this.panelSubMenu3.Location = new Point(4, 573);
 | |
|             this.panelSubMenu3.Visible = false;
 | |
|             this.panelSubMenu3.BringToFront();
 | |
| 
 | |
|             this.MainDisplayAlarmList = new ControlMainDisplayAlarm();
 | |
|             this.Controls.Add(this.MainDisplayAlarmList);
 | |
|             this.MainDisplayAlarmList.Location = new Point(658, 74);
 | |
|             this.MainDisplayAlarmList.Visible = false;
 | |
| 
 | |
|             // ICON 
 | |
|             this.pictureBoxUSBBackOn.Visible = this.ParentForm.SystemConfig.IsDataBackup;
 | |
|             this.pictureBoxBypass.Visible = this.ParentForm.SystemConfig.IsBypassMode;
 | |
| 
 | |
|             if (this.ParentForm.SystemConfig.Serial3Mode != 0)
 | |
|                 this.pictureBoxCH3.Visible = true;
 | |
|             else
 | |
|                 this.pictureBoxCH3.Visible = false;
 | |
| 
 | |
|             this.buttonBarGraphForm.ButtonDown();
 | |
| 
 | |
|             // Sorter 3
 | |
|             if (this.ParentForm.SystemConfig.Sorter3Location == 0)
 | |
|             {
 | |
|                 this.labelStaticSorter3DelayTime.Visible = false;
 | |
|                 this.labelStaticSorter3RunTime.Visible = false;
 | |
|                 this.labelSorter3DelayTime.Visible = false;
 | |
|                 this.labelSorter3RunTime.Visible = false;
 | |
| 
 | |
|                 this.labelTitleSampling.Visible = false;
 | |
|                 this.labelStaticSamplingTime.Visible = false;
 | |
|                 this.labelStaticSamplingCount.Visible = false;
 | |
|                 this.labelSamplingTime.Visible = false;
 | |
|                 this.labelSamplingCount.Visible = false;
 | |
|                 this.buttonSamplingOnce.Visible = false;
 | |
|                 this.buttonSampling.Visible = false;
 | |
|             }
 | |
| 
 | |
|             // Sorter 4
 | |
|             if (this.ParentForm.SystemConfig.Sorter4Location == 0)
 | |
|             {
 | |
|                 this.labelStaticSorter4DelayTime.Visible = false;
 | |
|                 this.labelStaticSorter4RunTime.Visible = false;
 | |
|                 this.labelSorter4DelayTime.Visible = false;
 | |
|                 this.labelSorter4RunTime.Visible = false;
 | |
| 
 | |
|                 this.labelStaticStopper2DelayTime.Visible = false;
 | |
|                 this.labelStaticStopper2RunTime.Visible = false;
 | |
|                 this.labelStopper2DelayTime.Visible = false;
 | |
|                 this.labelStopper2RunTime.Visible = false;
 | |
|             }
 | |
| 
 | |
|             // IsDeveloperMode
 | |
|             if (this.ParentForm.IsDeveloperMode == true)
 | |
|             {
 | |
|                 this.labelComRetry.Visible = true;
 | |
|                 this.labelComRetry3th.Visible = true;
 | |
|                 this.labelOverrun.Visible = true;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.labelComRetry.Visible = false;
 | |
|                 this.labelComRetry3th.Visible = false;
 | |
|                 this.labelOverrun.Visible = false;
 | |
|             }
 | |
| 
 | |
|             this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|             switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|             {
 | |
|                 case 2:
 | |
|                     this.MainDisplay2 = new ControlMainDisplay2(this);
 | |
|                     this.Controls.Add(this.MainDisplay2);
 | |
|                     this.MainDisplay2.BringToFront();
 | |
|                     this.MainDisplay2.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph2 = new ControlMainDisplayDotGraph2(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph2);
 | |
|                     this.MainDisplayDotGraph2.BringToFront();
 | |
|                     this.MainDisplayDotGraph2.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 3:
 | |
|                     this.MainDisplay3 = new ControlMainDisplay3(this);
 | |
|                     this.Controls.Add(this.MainDisplay3);
 | |
|                     this.MainDisplay3.BringToFront();
 | |
|                     this.MainDisplay3.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph3 = new ControlMainDisplayDotGraph3(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph3);
 | |
|                     this.MainDisplayDotGraph3.BringToFront();
 | |
|                     this.MainDisplayDotGraph3.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 4:
 | |
|                     this.MainDisplay4 = new ControlMainDisplay4(this);
 | |
|                     this.Controls.Add(this.MainDisplay4);
 | |
|                     this.MainDisplay4.BringToFront();
 | |
|                     this.MainDisplay4.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph4 = new ControlMainDisplayDotGraph4(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph4);
 | |
|                     this.MainDisplayDotGraph4.BringToFront();
 | |
|                     this.MainDisplayDotGraph4.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 5:
 | |
|                     this.MainDisplay5 = new ControlMainDisplay5(this);
 | |
|                     this.Controls.Add(this.MainDisplay5);
 | |
|                     this.MainDisplay5.BringToFront();
 | |
|                     this.MainDisplay5.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph5 = new ControlMainDisplayDotGraph5(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph5);
 | |
|                     this.MainDisplayDotGraph5.BringToFront();
 | |
|                     this.MainDisplayDotGraph5.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 6:
 | |
|                     this.MainDisplayEachBarGraph6 = new ControlMainDisplayEachBarGraph6(this);
 | |
|                     this.Controls.Add(this.MainDisplayEachBarGraph6);
 | |
|                     this.MainDisplayEachBarGraph6.BringToFront();
 | |
|                     this.MainDisplayEachBarGraph6.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph6 = new ControlMainDisplayDotGraph6(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph6);
 | |
|                     this.MainDisplayDotGraph6.BringToFront();
 | |
|                     this.MainDisplayDotGraph6.Location = new Point(0, 75);
 | |
| 
 | |
|                     this.MainDisplayTable6 = new ControlMainDisplayTable6(this);
 | |
|                     this.Controls.Add(this.MainDisplayTable6);
 | |
|                     this.MainDisplayTable6.BringToFront();
 | |
|                     this.MainDisplayTable6.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 7:
 | |
|                     this.MainDisplayEachBarGraph7 = new ControlMainDisplayEachBarGraph7(this);
 | |
|                     this.Controls.Add(this.MainDisplayEachBarGraph7);
 | |
|                     this.MainDisplayEachBarGraph7.BringToFront();
 | |
|                     this.MainDisplayEachBarGraph7.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph7 = new ControlMainDisplayDotGraph7(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph7);
 | |
|                     this.MainDisplayDotGraph7.BringToFront();
 | |
|                     this.MainDisplayDotGraph7.Location = new Point(0, 75);
 | |
| 
 | |
|                     this.MainDisplayTable7 = new ControlMainDisplayTable7(this);
 | |
|                     this.Controls.Add(this.MainDisplayTable7);
 | |
|                     this.MainDisplayTable7.BringToFront();
 | |
|                     this.MainDisplayTable7.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 8:
 | |
|                     this.MainDisplayEachBarGraph8 = new ControlMainDisplayEachBarGraph8(this);
 | |
|                     this.Controls.Add(this.MainDisplayEachBarGraph8);
 | |
|                     this.MainDisplayEachBarGraph8.BringToFront();
 | |
|                     this.MainDisplayEachBarGraph8.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph8 = new ControlMainDisplayDotGraph8(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph8);
 | |
|                     this.MainDisplayDotGraph8.BringToFront();
 | |
|                     this.MainDisplayDotGraph8.Location = new Point(0, 75);
 | |
| 
 | |
|                     this.MainDisplayTable8 = new ControlMainDisplayTable8(this);
 | |
|                     this.Controls.Add(this.MainDisplayTable8);
 | |
|                     this.MainDisplayTable8.BringToFront();
 | |
|                     this.MainDisplayTable8.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 10:
 | |
|                     this.MainDisplayEachBarGraph10 = new ControlMainDisplayEachBarGraph10(this);
 | |
|                     this.Controls.Add(this.MainDisplayEachBarGraph10);
 | |
|                     this.MainDisplayEachBarGraph10.BringToFront();
 | |
|                     this.MainDisplayEachBarGraph10.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph10 = new ControlMainDisplayDotGraph10(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph10);
 | |
|                     this.MainDisplayDotGraph10.BringToFront();
 | |
|                     this.MainDisplayDotGraph10.Location = new Point(0, 75);
 | |
| 
 | |
|                     this.MainDisplayTable10 = new ControlMainDisplayTable10(this);
 | |
|                     this.Controls.Add(this.MainDisplayTable10);
 | |
|                     this.MainDisplayTable10.BringToFront();
 | |
|                     this.MainDisplayTable10.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 12:
 | |
|                     this.MainDisplayEachBarGraph12 = new ControlMainDisplayEachBarGraph12(this);
 | |
|                     this.Controls.Add(this.MainDisplayEachBarGraph12);
 | |
|                     this.MainDisplayEachBarGraph12.BringToFront();
 | |
|                     this.MainDisplayEachBarGraph12.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph12 = new ControlMainDisplayDotGraph12(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph12);
 | |
|                     this.MainDisplayDotGraph12.BringToFront();
 | |
|                     this.MainDisplayDotGraph12.Location = new Point(0, 75);
 | |
| 
 | |
|                     this.MainDisplayTable12 = new ControlMainDisplayTable12(this);
 | |
|                     this.Controls.Add(this.MainDisplayTable12);
 | |
|                     this.MainDisplayTable12.BringToFront();
 | |
|                     this.MainDisplayTable12.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 case 16:
 | |
|                     this.MainDisplayEachBarGraph16 = new ControlMainDisplayEachBarGraph16(this);
 | |
|                     this.Controls.Add(this.MainDisplayEachBarGraph16);
 | |
|                     this.MainDisplayEachBarGraph16.BringToFront();
 | |
|                     this.MainDisplayEachBarGraph16.Location = new Point(0, 75);
 | |
|                     this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|                     this.MainDisplayDotGraph16 = new ControlMainDisplayDotGraph16(this);
 | |
|                     this.Controls.Add(this.MainDisplayDotGraph16);
 | |
|                     this.MainDisplayDotGraph16.BringToFront();
 | |
|                     this.MainDisplayDotGraph16.Location = new Point(0, 75);
 | |
| 
 | |
|                     this.MainDisplayTable16 = new ControlMainDisplayTable16(this);
 | |
|                     this.Controls.Add(this.MainDisplayTable16);
 | |
|                     this.MainDisplayTable16.BringToFront();
 | |
|                     this.MainDisplayTable16.Location = new Point(0, 75);
 | |
| 
 | |
|                     //this.MainDisplayTable16_1 = new ControlMainDisplayTable16_1(this);
 | |
|                     //this.Controls.Add(this.MainDisplayTable16_1);
 | |
|                     //this.MainDisplayTable16_1.BringToFront();
 | |
|                     //this.MainDisplayTable16_1.Location = new Point(0, 75);
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
|             this.UpdateDisplay(this.MainDisplay);
 | |
|         }
 | |
|         private void DefaultSetting()
 | |
|         {
 | |
|             int x = 0, y = 0;
 | |
| 
 | |
|             this.SubmenuIndex = 0;
 | |
|             this.IsFistAlarmView = false;
 | |
| 
 | |
|             this.ColorButtonAccessTrue = Color.Black;
 | |
|             this.ColorButtonAccessFalse = Color.DimGray;
 | |
| 
 | |
|             this.RescaleControl();
 | |
| 
 | |
|             // AlarmMessageBox1
 | |
|             x = Screen.PrimaryScreen.Bounds.Width / 2 - this.panelAlarmMessageBox1.Size.Width / 2;
 | |
|             y = Screen.PrimaryScreen.Bounds.Height / 2 - this.panelAlarmMessageBox1.Size.Height / 2;
 | |
|             this.panelAlarmMessageBox1.Location = new Point(x, y);
 | |
|             this.panelAlarmMessageBox1.Visible = false;
 | |
|             this.panelAlarmMessageBox1.BringToFront();
 | |
|             // AlarmMessageBox2
 | |
|             this.panelAlarmMessageBox2.Location = new Point(x, y);
 | |
|             this.panelAlarmMessageBox2.Visible = false;
 | |
|             this.panelAlarmMessageBox2.BringToFront();
 | |
|             // AlarmMessageBox3
 | |
|             this.panelAlarmMessageBox3.Location = new Point(x, y);
 | |
|             this.panelAlarmMessageBox3.Visible = false;
 | |
|             this.panelAlarmMessageBox3.BringToFront();
 | |
|             // AlarmMessageBox4
 | |
|             this.panelAlarmMessageBox4.Location = new Point(x, y);
 | |
|             this.panelAlarmMessageBox4.Visible = false;
 | |
|             this.panelAlarmMessageBox4.BringToFront();
 | |
| 
 | |
|             if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                 this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser, this.ParentForm.CurrentUserGroup);
 | |
|             else
 | |
|             {
 | |
|                 this.buttonUser.Visible = false;
 | |
|                 this.labelUserID.Visible = false;
 | |
|                 this.labelUserLevel.Visible = false;
 | |
| 
 | |
|                 this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.NotLogin;
 | |
|             }
 | |
| 
 | |
|             // 샘플링
 | |
|             if (this.ParentForm.SystemConfig.IsSamplingOnce == true)
 | |
|             {
 | |
|                 this.buttonSamplingOnce.ButtonUp();
 | |
|                 this.buttonSampling.Mode = SmartButton.BUTTONMODE.NORMAL;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.buttonSamplingOnce.ButtonDown();
 | |
|                 this.buttonSampling.Mode = SmartButton.BUTTONMODE.PUSH;
 | |
|             }
 | |
|             this.labelSamplingTime.Text = this.ParentForm.SystemConfig.SamplingTime.ToString();
 | |
|             this.labelSamplingCount.Text = this.ParentForm.SystemConfig.SamplingCount.ToString();
 | |
|             this.buttonSampling.Enabled = false;
 | |
| 
 | |
|             // Leak Sampling
 | |
|             if (this.ParentForm.SystemConfig.IsLeakSamplingOnce == true)
 | |
|             {
 | |
|                 this.buttonLeakSamplingOnce.ButtonUp();
 | |
|                 this.buttonLeakSampling.Mode = SmartButton.BUTTONMODE.NORMAL;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.buttonLeakSamplingOnce.ButtonDown();
 | |
|                 this.buttonLeakSampling.Mode = SmartButton.BUTTONMODE.PUSH;
 | |
|             }
 | |
|             this.labelLeakSamplingTime.Text = this.ParentForm.SystemConfig.LeakSamplingTime.ToString();
 | |
|             this.buttonLeakSampling.Enabled = false;
 | |
| 
 | |
|             // Interlock weight stop
 | |
|             if (this.ParentForm.SystemConfig.IsWeightLimitEnable == true)
 | |
|                 this.buttonOnOff.ButtonDown();
 | |
|             else
 | |
|                 this.buttonOnOff.ButtonUp();
 | |
|         }
 | |
| 
 | |
|         public void RescaleControl()
 | |
|         {
 | |
|             switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|             {
 | |
|                 case 2:
 | |
|                     if (this.MainDisplay2 != null)
 | |
|                         this.MainDisplay2.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph2 != null)
 | |
|                         this.MainDisplayDotGraph2.RescaleControl();
 | |
|                     break;
 | |
|                 case 3:
 | |
|                     if (this.MainDisplay3 != null)
 | |
|                         this.MainDisplay3.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph3 != null)
 | |
|                         this.MainDisplayDotGraph3.RescaleControl();
 | |
|                     break;
 | |
|                 case 4:
 | |
|                     if (this.MainDisplay4 != null)
 | |
|                         this.MainDisplay4.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph4 != null)
 | |
|                         this.MainDisplayDotGraph4.RescaleControl();
 | |
|                     break;
 | |
|                 case 5:
 | |
|                     if (this.MainDisplay5 != null)
 | |
|                         this.MainDisplay5.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph5 != null)
 | |
|                         this.MainDisplayDotGraph5.RescaleControl();
 | |
|                     break;
 | |
|                 case 6:
 | |
|                     if (this.MainDisplayEachBarGraph6 != null)
 | |
|                         this.MainDisplayEachBarGraph6.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph6 != null)
 | |
|                         this.MainDisplayDotGraph6.RescaleControl();
 | |
|                     break;
 | |
|                 case 7:
 | |
|                     if (this.MainDisplayEachBarGraph7 != null)
 | |
|                         this.MainDisplayEachBarGraph7.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph7 != null)
 | |
|                         this.MainDisplayDotGraph7.RescaleControl();
 | |
|                     break;
 | |
|                 case 8:
 | |
|                     if (this.MainDisplayEachBarGraph8 != null)
 | |
|                         this.MainDisplayEachBarGraph8.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph8 != null)
 | |
|                         this.MainDisplayDotGraph8.RescaleControl();
 | |
|                     break;
 | |
|                 case 10:
 | |
|                     if (this.MainDisplayEachBarGraph10 != null)
 | |
|                         this.MainDisplayEachBarGraph10.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph10 != null)
 | |
|                         this.MainDisplayDotGraph10.RescaleControl();
 | |
|                     break;
 | |
|                 case 12:
 | |
|                     if (this.MainDisplayEachBarGraph12 != null)
 | |
|                         this.MainDisplayEachBarGraph12.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph12 != null)
 | |
|                         this.MainDisplayDotGraph12.RescaleControl();
 | |
|                     break;
 | |
|                 case 16:
 | |
|                     if (this.MainDisplayEachBarGraph16 != null)
 | |
|                         this.MainDisplayEachBarGraph16.RescaleControl();
 | |
|                     if (this.MainDisplayDotGraph16 != null)
 | |
|                         this.MainDisplayDotGraph16.RescaleControl();
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
|         }
 | |
|         private void UpdateDisplay(DataStore.FormMainDisplayStore displayForm)
 | |
|         {
 | |
|             if (displayForm == DataStore.FormMainDisplayStore.FormMainDisplayBarGraph)
 | |
|             {
 | |
|                 #region BarGraph
 | |
|                 switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|                 {
 | |
|                     case 2:
 | |
|                         if (this.MainDisplay2 != null)
 | |
|                             this.MainDisplay2.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph2 != null)
 | |
|                             this.MainDisplayDotGraph2.Visible = false;
 | |
|                         break;
 | |
|                     case 3:
 | |
|                         if (this.MainDisplay3 != null)
 | |
|                             this.MainDisplay3.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph3 != null)
 | |
|                             this.MainDisplayDotGraph3.Visible = false;
 | |
|                         break;
 | |
|                     case 4:
 | |
|                         if (this.MainDisplay4 != null)
 | |
|                             this.MainDisplay4.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph4 != null)
 | |
|                             this.MainDisplayDotGraph4.Visible = false;
 | |
|                         break;
 | |
|                     case 5:
 | |
|                         if (this.MainDisplay5 != null)
 | |
|                             this.MainDisplay5.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph5 != null)
 | |
|                             this.MainDisplayDotGraph5.Visible = false;
 | |
|                         break;
 | |
|                     case 6:
 | |
|                         if (this.MainDisplayEachBarGraph6 != null)
 | |
|                             this.MainDisplayEachBarGraph6.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph6 != null)
 | |
|                             this.MainDisplayDotGraph6.Visible = false;
 | |
|                         if (this.MainDisplayTable6 != null)
 | |
|                             this.MainDisplayTable6.Visible = false;
 | |
|                         break;
 | |
|                     case 7:
 | |
|                         if (this.MainDisplayEachBarGraph7 != null)
 | |
|                             this.MainDisplayEachBarGraph7.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph7 != null)
 | |
|                             this.MainDisplayDotGraph7.Visible = false;
 | |
|                         if (this.MainDisplayTable7 != null)
 | |
|                             this.MainDisplayTable7.Visible = false;
 | |
|                         break;
 | |
|                     case 8:
 | |
|                         if (this.MainDisplayEachBarGraph8 != null)
 | |
|                             this.MainDisplayEachBarGraph8.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph8 != null)
 | |
|                             this.MainDisplayDotGraph8.Visible = false;
 | |
|                         if (this.MainDisplayTable8 != null)
 | |
|                             this.MainDisplayTable8.Visible = false;
 | |
|                         break;
 | |
|                     case 10:
 | |
|                         if (this.MainDisplayEachBarGraph10 != null)
 | |
|                             this.MainDisplayEachBarGraph10.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph10 != null)
 | |
|                             this.MainDisplayDotGraph10.Visible = false;
 | |
|                         if (this.MainDisplayTable10 != null)
 | |
|                             this.MainDisplayTable10.Visible = false;
 | |
|                         break;
 | |
|                     case 12:
 | |
|                         if (this.MainDisplayEachBarGraph12 != null)
 | |
|                             this.MainDisplayEachBarGraph12.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph12 != null)
 | |
|                             this.MainDisplayDotGraph12.Visible = false;
 | |
|                         if (this.MainDisplayTable12 != null)
 | |
|                             this.MainDisplayTable12.Visible = false;
 | |
|                         break;
 | |
|                     case 16:
 | |
|                         if (this.MainDisplayEachBarGraph16 != null)
 | |
|                             this.MainDisplayEachBarGraph16.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph16 != null)
 | |
|                             this.MainDisplayDotGraph16.Visible = false;
 | |
|                         if (this.MainDisplayTable16 != null)
 | |
|                             this.MainDisplayTable16.Visible = false;
 | |
|                         //if (this.MainDisplayTable16_1 != null)
 | |
|                         //    this.MainDisplayTable16_1.Visible = false;
 | |
|                         break;
 | |
|                     default:
 | |
|                         break;
 | |
|                 }
 | |
|                 #endregion
 | |
|                 this.UpdateDisplayButton(SmartButton.BUTSTATUS.DOWN, SmartButton.BUTSTATUS.UP, SmartButton.BUTSTATUS.UP);
 | |
|             }
 | |
|             else if (displayForm == DataStore.FormMainDisplayStore.FormMainDisplayDotGraph)
 | |
|             {
 | |
|                 #region DotGraph
 | |
|                 switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|                 {
 | |
|                     case 2:
 | |
|                         if (this.MainDisplay2 != null)
 | |
|                             this.MainDisplay2.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph2 != null)
 | |
|                             this.MainDisplayDotGraph2.Visible = true;
 | |
|                         break;
 | |
|                     case 3:
 | |
|                         if (this.MainDisplay3 != null)
 | |
|                             this.MainDisplay3.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph3 != null)
 | |
|                             this.MainDisplayDotGraph3.Visible = true;
 | |
|                         break;
 | |
|                     case 4:
 | |
|                         if (this.MainDisplay4 != null)
 | |
|                             this.MainDisplay4.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph4 != null)
 | |
|                             this.MainDisplayDotGraph4.Visible = true;
 | |
|                         break;
 | |
|                     case 5:
 | |
|                         if (this.MainDisplay5 != null)
 | |
|                             this.MainDisplay5.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph5 != null)
 | |
|                             this.MainDisplayDotGraph5.Visible = true;
 | |
|                         break;
 | |
|                     case 6:
 | |
|                         if (this.MainDisplayEachBarGraph6 != null)
 | |
|                             this.MainDisplayEachBarGraph6.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph6 != null)
 | |
|                             this.MainDisplayDotGraph6.Visible = true;
 | |
|                         if (this.MainDisplayTable6 != null)
 | |
|                             this.MainDisplayTable6.Visible = false;
 | |
|                         break;
 | |
|                     case 7:
 | |
|                         if (this.MainDisplayEachBarGraph7 != null)
 | |
|                             this.MainDisplayEachBarGraph7.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph7 != null)
 | |
|                             this.MainDisplayDotGraph7.Visible = true;
 | |
|                         if (this.MainDisplayTable7 != null)
 | |
|                             this.MainDisplayTable7.Visible = false;
 | |
|                         break;
 | |
|                     case 8:
 | |
|                         if (this.MainDisplayEachBarGraph8 != null)
 | |
|                             this.MainDisplayEachBarGraph8.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph8 != null)
 | |
|                             this.MainDisplayDotGraph8.Visible = true;
 | |
|                         if (this.MainDisplayTable8 != null)
 | |
|                             this.MainDisplayTable8.Visible = false;
 | |
|                         break;
 | |
|                     case 10:
 | |
|                         if (this.MainDisplayEachBarGraph10 != null)
 | |
|                             this.MainDisplayEachBarGraph10.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph10 != null)
 | |
|                             this.MainDisplayDotGraph10.Visible = true;
 | |
|                         if (this.MainDisplayTable10 != null)
 | |
|                             this.MainDisplayTable10.Visible = false;
 | |
|                         break;
 | |
|                     case 12:
 | |
|                         if (this.MainDisplayEachBarGraph12 != null)
 | |
|                             this.MainDisplayEachBarGraph12.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph12 != null)
 | |
|                             this.MainDisplayDotGraph12.Visible = true;
 | |
|                         if (this.MainDisplayTable12 != null)
 | |
|                             this.MainDisplayTable12.Visible = false;
 | |
|                         break;
 | |
|                     case 16:
 | |
|                         if (this.MainDisplayEachBarGraph16 != null)
 | |
|                             this.MainDisplayEachBarGraph16.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph16 != null)
 | |
|                             this.MainDisplayDotGraph16.Visible = true;
 | |
|                         if (this.MainDisplayTable16 != null)
 | |
|                             this.MainDisplayTable16.Visible = false;
 | |
|                         //if (this.MainDisplayTable16_1 != null)
 | |
|                         //    this.MainDisplayTable16_1.Visible = false;
 | |
|                         break;
 | |
|                     default:
 | |
|                         break;
 | |
|                 }
 | |
|                 #endregion
 | |
|                 this.UpdateDisplayButton(SmartButton.BUTSTATUS.UP, SmartButton.BUTSTATUS.DOWN, SmartButton.BUTSTATUS.UP);
 | |
|             }
 | |
|             else if (displayForm == DataStore.FormMainDisplayStore.FormMainDisplayTable)
 | |
|             {
 | |
|                 #region Table
 | |
|                 switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|                 {
 | |
|                     case 2:
 | |
|                         if (this.MainDisplay2 != null)
 | |
|                             this.MainDisplay2.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph2 != null)
 | |
|                             this.MainDisplayDotGraph2.Visible = false;
 | |
|                         break;
 | |
|                     case 3:
 | |
|                         if (this.MainDisplay3 != null)
 | |
|                             this.MainDisplay3.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph3 != null)
 | |
|                             this.MainDisplayDotGraph3.Visible = false;
 | |
|                         break;
 | |
|                     case 4:
 | |
|                         if (this.MainDisplay4 != null)
 | |
|                             this.MainDisplay4.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph4 != null)
 | |
|                             this.MainDisplayDotGraph4.Visible = false;
 | |
|                         break;
 | |
|                     case 5:
 | |
|                         if (this.MainDisplay5 != null)
 | |
|                             this.MainDisplay5.Visible = true;
 | |
|                         if (this.MainDisplayDotGraph5 != null)
 | |
|                             this.MainDisplayDotGraph5.Visible = false;
 | |
|                         break;
 | |
|                     case 6:
 | |
|                         if (this.MainDisplayEachBarGraph6 != null)
 | |
|                             this.MainDisplayEachBarGraph6.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph6 != null)
 | |
|                             this.MainDisplayDotGraph6.Visible = false;
 | |
|                         if (this.MainDisplayTable6 != null)
 | |
|                             this.MainDisplayTable6.Visible = true;
 | |
|                         break;
 | |
|                     case 7:
 | |
|                         if (this.MainDisplayEachBarGraph7 != null)
 | |
|                             this.MainDisplayEachBarGraph7.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph7 != null)
 | |
|                             this.MainDisplayDotGraph7.Visible = false;
 | |
|                         if (this.MainDisplayTable7 != null)
 | |
|                             this.MainDisplayTable7.Visible = true;
 | |
|                         break;
 | |
|                     case 8:
 | |
|                         if (this.MainDisplayEachBarGraph8 != null)
 | |
|                             this.MainDisplayEachBarGraph8.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph8 != null)
 | |
|                             this.MainDisplayDotGraph8.Visible = false;
 | |
|                         if (this.MainDisplayTable8 != null)
 | |
|                             this.MainDisplayTable8.Visible = true;
 | |
|                         break;
 | |
|                     case 10:
 | |
|                         if (this.MainDisplayEachBarGraph10 != null)
 | |
|                             this.MainDisplayEachBarGraph10.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph10 != null)
 | |
|                             this.MainDisplayDotGraph10.Visible = false;
 | |
|                         if (this.MainDisplayTable10 != null)
 | |
|                             this.MainDisplayTable10.Visible = true;
 | |
|                         break;
 | |
|                     case 12:
 | |
|                         if (this.MainDisplayEachBarGraph12 != null)
 | |
|                             this.MainDisplayEachBarGraph12.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph12 != null)
 | |
|                             this.MainDisplayDotGraph12.Visible = false;
 | |
|                         if (this.MainDisplayTable12 != null)
 | |
|                             this.MainDisplayTable12.Visible = true;
 | |
|                         break;
 | |
|                     case 16:
 | |
|                         if (this.MainDisplayEachBarGraph16 != null)
 | |
|                             this.MainDisplayEachBarGraph16.Visible = false;
 | |
|                         if (this.MainDisplayDotGraph16 != null)
 | |
|                             this.MainDisplayDotGraph16.Visible = false;
 | |
|                         if (this.MainDisplayTable16 != null)
 | |
|                             this.MainDisplayTable16.Visible = true;
 | |
|                         //if (this.MainDisplayTable16_1 != null)
 | |
|                         //    this.MainDisplayTable16_1.Visible = true;
 | |
|                         break;
 | |
|                     default:
 | |
|                         break;
 | |
|                 }
 | |
|                 #endregion
 | |
|                 this.UpdateDisplayButton(SmartButton.BUTSTATUS.UP, SmartButton.BUTSTATUS.UP, SmartButton.BUTSTATUS.DOWN);
 | |
|             }
 | |
|         }
 | |
|         private void UpdateDisplayButton(SmartButton.BUTSTATUS buttonBar, SmartButton.BUTSTATUS buttonDot, SmartButton.BUTSTATUS buttonTable)
 | |
|         {
 | |
|             if(buttonBar == SmartButton.BUTSTATUS.DOWN)
 | |
|                 this.buttonBarGraphForm.ButtonDown();
 | |
|             else
 | |
|                 this.buttonBarGraphForm.ButtonUp();
 | |
| 
 | |
|             if (buttonDot == SmartButton.BUTSTATUS.DOWN)
 | |
|                 this.buttonDotGraphForm.ButtonDown();
 | |
|             else
 | |
|                 this.buttonDotGraphForm.ButtonUp();
 | |
| 
 | |
|             if (buttonTable == SmartButton.BUTSTATUS.DOWN)
 | |
|                 this.buttonTableForm.ButtonDown();
 | |
|             else
 | |
|                 this.buttonTableForm.ButtonUp();
 | |
|         }
 | |
|         private void UpdateDisplayUser(User user, UserGroup setGroup)
 | |
|         {
 | |
|             string id = "", group = "";
 | |
|             Color colorButtonText = this.ColorButtonAccessFalse;
 | |
| 
 | |
|             switch (user.Group)
 | |
|             {
 | |
|                 case DataStore.UserGroup.Level1Operator:
 | |
|                     id = user.ID;
 | |
|                     if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
 | |
|                         group = "级别1";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Czech)
 | |
|                         group = "Úroveň1`";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.German)
 | |
|                         group = "Stufe1";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Japanese)
 | |
|                         group = "Level1";
 | |
|                     else
 | |
|                         group = "Level1";
 | |
| 
 | |
|                     if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOn)
 | |
|                         this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOn;
 | |
| 
 | |
|                     this.buttonUser.ButtonDown();
 | |
|                     this.buttonProductNo.Enabled = setGroup.Level1.IsMainDisplayProductNo;
 | |
|                     this.buttonClear.Enabled = setGroup.Level1.IsMainDisplayClear;
 | |
|                     this.buttonSubMenu.Enabled = setGroup.Level1.IsMainDisplaySubMenu;
 | |
|                     this.buttonUnder.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.buttonPass.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.buttonOver.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.buttonTare.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.labelOverRange.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.labelPassRange.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.labelUnderRange.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.labelOverRangeLimit.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.labelUnderRangeLimit.Enabled = setGroup.Level1.IsMainDisplayWeightSetting;
 | |
|                     this.groupBoxJudgmentSetting.Enabled = setGroup.Level1.IsMenuSystemSetting;
 | |
|                     this.groupBoxSorter.Enabled = setGroup.Level1.IsMenuSystemSetting;
 | |
| 
 | |
|                     if (setGroup.Level1.IsMainDisplayWeightSetting == true)
 | |
|                         colorButtonText = this.ColorButtonAccessTrue;
 | |
|                     else
 | |
|                         colorButtonText = this.ColorButtonAccessFalse;
 | |
| 
 | |
|                     if (setGroup.Level1.IsMainDisplayProductNo == true)
 | |
|                         this.buttonProductNo.TextColor = Color.Black;
 | |
|                     else
 | |
|                         this.buttonProductNo.TextColor = Color.DimGray;
 | |
|                     break;
 | |
|                 case DataStore.UserGroup.Level2Engineer:
 | |
|                     id = user.ID;
 | |
|                     if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
 | |
|                         group = "级别2";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Czech)
 | |
|                         group = "Úroveň2`";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.German)
 | |
|                         group = "Stufe2";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Japanese)
 | |
|                         group = "Level2";
 | |
|                     else
 | |
|                         group = "Level2";
 | |
| 
 | |
|                     if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOn)
 | |
|                         this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOn;
 | |
| 
 | |
|                     this.buttonUser.ButtonDown();
 | |
|                     this.buttonProductNo.Enabled = setGroup.Level2.IsMainDisplayProductNo;
 | |
|                     this.buttonClear.Enabled = setGroup.Level2.IsMainDisplayClear;
 | |
|                     this.buttonSubMenu.Enabled = setGroup.Level2.IsMainDisplaySubMenu;
 | |
|                     this.buttonUnder.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.buttonPass.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.buttonOver.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.buttonTare.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.labelOverRange.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.labelPassRange.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.labelUnderRange.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.labelOverRangeLimit.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.labelUnderRangeLimit.Enabled = setGroup.Level2.IsMainDisplayWeightSetting;
 | |
|                     this.groupBoxJudgmentSetting.Enabled = setGroup.Level2.IsMenuSystemSetting;
 | |
|                     this.groupBoxSorter.Enabled = setGroup.Level2.IsMenuSystemSetting;
 | |
| 
 | |
|                     if (setGroup.Level2.IsMainDisplayWeightSetting == true)
 | |
|                         colorButtonText = this.ColorButtonAccessTrue;
 | |
|                     else
 | |
|                         colorButtonText = this.ColorButtonAccessFalse;
 | |
| 
 | |
|                     if (setGroup.Level2.IsMainDisplayProductNo == true)
 | |
|                         this.buttonProductNo.TextColor = Color.Black;
 | |
|                     else
 | |
|                         this.buttonProductNo.TextColor = Color.DimGray;
 | |
|                     break;
 | |
|                 case DataStore.UserGroup.Level3Manager:
 | |
|                     id = user.ID;
 | |
|                     if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
 | |
|                         group = "级别3";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Czech)
 | |
|                         group = "Úroveň3`";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.German)
 | |
|                         group = "Stufe3";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Japanese)
 | |
|                         group = "Level3";
 | |
|                     else
 | |
|                         group = "Level3";
 | |
| 
 | |
|                     if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOn)
 | |
|                         this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOn;
 | |
| 
 | |
|                     this.buttonUser.ButtonDown();
 | |
|                     this.buttonProductNo.Enabled = setGroup.Level3.IsMainDisplayProductNo;
 | |
|                     this.buttonClear.Enabled = setGroup.Level3.IsMainDisplayClear;
 | |
|                     this.buttonSubMenu.Enabled = setGroup.Level3.IsMainDisplaySubMenu;
 | |
|                     this.buttonUnder.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.buttonPass.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.buttonOver.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.buttonTare.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.labelOverRange.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.labelPassRange.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.labelUnderRange.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.labelOverRangeLimit.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.labelUnderRangeLimit.Enabled = setGroup.Level3.IsMainDisplayWeightSetting;
 | |
|                     this.groupBoxJudgmentSetting.Enabled = setGroup.Level3.IsMenuSystemSetting;
 | |
|                     this.groupBoxSorter.Enabled = setGroup.Level3.IsMenuSystemSetting;
 | |
| 
 | |
|                     if (setGroup.Level3.IsMainDisplayWeightSetting == true)
 | |
|                         colorButtonText = this.ColorButtonAccessTrue;
 | |
|                     else
 | |
|                         colorButtonText = this.ColorButtonAccessFalse;
 | |
| 
 | |
|                     if (setGroup.Level3.IsMainDisplayProductNo == true)
 | |
|                         this.buttonProductNo.TextColor = Color.Black;
 | |
|                     else
 | |
|                         this.buttonProductNo.TextColor = Color.DimGray;
 | |
|                     break;
 | |
|                 case DataStore.UserGroup.Level4Developer:
 | |
|                     id = user.ID;
 | |
|                     if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
 | |
|                         group = "级别4";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Czech)
 | |
|                         group = "Úroveň4`";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.German)
 | |
|                         group = "Stufe4";
 | |
|                     else if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Japanese)
 | |
|                         group = "Level4";
 | |
|                     else
 | |
|                         group = "Level4";
 | |
| 
 | |
|                     if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOn)
 | |
|                         this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOn;
 | |
| 
 | |
|                     this.buttonUser.ButtonDown();
 | |
|                     this.buttonProductNo.Enabled = true;
 | |
|                     this.buttonClear.Enabled = true;
 | |
|                     this.buttonSubMenu.Enabled = true;
 | |
|                     this.buttonUnder.Enabled = true;
 | |
|                     this.buttonPass.Enabled = true;
 | |
|                     this.buttonOver.Enabled = true;
 | |
|                     this.buttonTare.Enabled = true;
 | |
|                     this.labelOverRange.Enabled = true;
 | |
|                     this.labelPassRange.Enabled = true;
 | |
|                     this.labelUnderRange.Enabled = true;
 | |
|                     this.labelOverRangeLimit.Enabled = true;
 | |
|                     this.labelUnderRangeLimit.Enabled = true;
 | |
|                     this.groupBoxJudgmentSetting.Enabled = true;
 | |
|                     this.groupBoxSorter.Enabled = true;
 | |
| 
 | |
|                     colorButtonText = this.ColorButtonAccessTrue;
 | |
|                     this.buttonProductNo.TextColor = Color.Black;
 | |
|                     break;
 | |
|                 case DataStore.UserGroup.LogOff:
 | |
|                     id = "";
 | |
|                     if (this.ParentForm.SystemConfig.Language == DataStore.LanguageID.Chinese)
 | |
|                         group = "关闭";
 | |
|                     else
 | |
|                         group = "Off";
 | |
| 
 | |
|                     if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOff)
 | |
|                         this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOff;
 | |
| 
 | |
|                     this.buttonUser.ButtonUp();
 | |
|                     this.buttonProductNo.Enabled = false;
 | |
|                     this.buttonClear.Enabled = false;
 | |
|                     this.buttonSubMenu.Enabled = false;
 | |
|                     this.buttonUnder.Enabled = false;
 | |
|                     this.buttonPass.Enabled = false;
 | |
|                     this.buttonOver.Enabled = false;
 | |
|                     this.buttonTare.Enabled = false;
 | |
|                     this.labelOverRange.Enabled = false;
 | |
|                     this.labelPassRange.Enabled = false;
 | |
|                     this.labelUnderRange.Enabled = false;
 | |
|                     this.labelOverRangeLimit.Enabled = false;
 | |
|                     this.labelUnderRangeLimit.Enabled = false;
 | |
|                     this.groupBoxJudgmentSetting.Enabled = false;
 | |
|                     this.groupBoxSorter.Enabled = false;
 | |
| 
 | |
|                     colorButtonText = this.ColorButtonAccessFalse;
 | |
|                     this.buttonProductNo.TextColor = Color.DimGray;
 | |
|                     break;
 | |
|                 case DataStore.UserGroup.NotLogin:
 | |
|                     this.buttonUser.ButtonDown();
 | |
|                     this.buttonProductNo.Enabled = true;
 | |
|                     this.buttonClear.Enabled = true;
 | |
|                     this.buttonSubMenu.Enabled = true;
 | |
|                     this.buttonUnder.Enabled = true;
 | |
|                     this.buttonPass.Enabled = true;
 | |
|                     this.buttonOver.Enabled = true;
 | |
|                     this.buttonTare.Enabled = true;
 | |
| 
 | |
|                     colorButtonText = this.ColorButtonAccessTrue;
 | |
|                     this.buttonProductNo.TextColor = Color.Black;
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
| 
 | |
|             if (this.labelUserLevel.Text != group)
 | |
|                 this.labelUserLevel.Text = group;
 | |
|             if (this.labelUserID.Text != id)
 | |
|                 this.labelUserID.Text = id;
 | |
| 
 | |
|             if (this.buttonUnder.TextColor != colorButtonText)
 | |
|             {
 | |
|                 this.buttonUnder.TextColor = colorButtonText;
 | |
|                 this.buttonPass.TextColor = colorButtonText;
 | |
|                 this.buttonOver.TextColor = colorButtonText;
 | |
|                 this.buttonTare.TextColor = colorButtonText;
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         public void UpdateCurrentProductDisplay(DataStore.EquipmentStatus status, ProductItem pItem,JudgmentSetItem jItem, Collection<WeightData> weightDatas)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             this.labelTimeroutCount.Visible = false;
 | |
| 
 | |
|             value = pItem.Number.ToString();
 | |
|             if (this.buttonProductNo.Text != value)
 | |
|                 this.buttonProductNo.Text = value;
 | |
| 
 | |
|             value = pItem.Name;
 | |
|             if (this.labelProductName.Text != value)
 | |
|                 this.labelProductName.Text = value;
 | |
| 
 | |
|             value = pItem.LotNo;
 | |
|             if (this.labelLotNo.Text != value)
 | |
|                 this.labelLotNo.Text = value;
 | |
| 
 | |
|             value = Helper.StringToDecimalPlaces(pItem.UnderRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             if (this.buttonUnder.Text != value)
 | |
|             {
 | |
|                 this.buttonUnder.Text = value;
 | |
|                 this.labelUnderRange.Text = value;
 | |
|             }
 | |
| 
 | |
|             value = Helper.StringToDecimalPlaces(pItem.PassRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             if (this.buttonPass.Text != value)
 | |
|             {
 | |
|                 this.buttonPass.Text = value;
 | |
|                 this.labelPassRange.Text = value;
 | |
|             }
 | |
| 
 | |
|             value = Helper.StringToDecimalPlaces(pItem.OverRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             if (this.buttonOver.Text != value)
 | |
|             {
 | |
|                 this.buttonOver.Text = value;
 | |
|                 this.labelOverRange.Text = value;
 | |
|             }
 | |
| 
 | |
|             value = Helper.StringToDecimalPlaces(pItem.TareRange, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             if (this.buttonTare.Text != value)
 | |
|                 this.buttonTare.Text = value;
 | |
| 
 | |
|             value = Helper.StringToDecimalPlaces(pItem.OverRangeLimit, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             if (this.labelOverRangeLimit.Text != value)
 | |
|                 this.labelOverRangeLimit.Text = value;
 | |
| 
 | |
|             value = Helper.StringToDecimalPlaces(pItem.UnderRangeLimit, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|             if (this.labelUnderRangeLimit.Text != value)
 | |
|                 this.labelUnderRangeLimit.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter1DelayTime.ToString();
 | |
|             if (this.labelSorter1DelayTime.Text != value)
 | |
|                 this.labelSorter1DelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter1RunTime.ToString();
 | |
|             if (this.labelSorter1RunTime.Text != value)
 | |
|                 this.labelSorter1RunTime.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter2DelayTime.ToString();
 | |
|             if (this.labelSorter2DelayTime.Text != value)
 | |
|                 this.labelSorter2DelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter2RunTime.ToString();
 | |
|             if (this.labelSorter2RunTime.Text != value)
 | |
|                 this.labelSorter2RunTime.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter3DelayTime;
 | |
|             if (this.labelSorter3DelayTime.Text != value)
 | |
|                 this.labelSorter3DelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter3RunTime;
 | |
|             if (this.labelSorter3RunTime.Text != value)
 | |
|                 this.labelSorter3RunTime.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter4DelayTime;
 | |
|             if (this.labelSorter4DelayTime.Text != value)
 | |
|                 this.labelSorter4DelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.Sorter4RunTime;
 | |
|             if (this.labelSorter4RunTime.Text != value)
 | |
|                 this.labelSorter4RunTime.Text = value;
 | |
| 
 | |
|             value = jItem.EntryGateDelayTime.ToString();
 | |
|             if (this.labelEntryGateDelayTime.Text != value)
 | |
|                 this.labelEntryGateDelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.EntryGateRunTime.ToString();
 | |
|             if (this.labelEntryGateRunTime.Text != value)
 | |
|                 this.labelEntryGateRunTime.Text = value;
 | |
| 
 | |
|             value = jItem.DischargeStopperDelayTime.ToString();
 | |
|             if (this.labelDischargeStopperDelayTime.Text != value)
 | |
|                 this.labelDischargeStopperDelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.DischargeStopperRunTime.ToString();
 | |
|             if (this.labelDischargeStopperRunTime.Text != value)
 | |
|                 this.labelDischargeStopperRunTime.Text = value;
 | |
| 
 | |
|             value = jItem.Stopper2DelayTime.ToString();
 | |
|             if (this.labelStopper2DelayTime.Text != value)
 | |
|                 this.labelStopper2DelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.Stopper2RunTime.ToString();
 | |
|             if (this.labelStopper2RunTime.Text != value)
 | |
|                 this.labelStopper2RunTime.Text = value;
 | |
| 
 | |
|             value = jItem.Filter.ToString();
 | |
|             if (this.labelFilter.Text != value)
 | |
|                 this.labelFilter.Text = value;
 | |
| 
 | |
|             value = jItem.JudgmentDelayTime.ToString();
 | |
|             if (this.labelJudgmentDelayTime.Text != value)
 | |
|                 this.labelJudgmentDelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.JudgmentCount.ToString();
 | |
|             if (this.labelJudgmentCount.Text != value)
 | |
|                 this.labelJudgmentCount.Text = value;
 | |
| 
 | |
|             value = jItem.ForcedZeroDelayTime.ToString();
 | |
|             if (this.labelForcedZeroDelayTime.Text != value)
 | |
|                 this.labelForcedZeroDelayTime.Text = value;
 | |
| 
 | |
|             value = jItem.TurnDelayTime.ToString();
 | |
|             if (this.labelTurnDelayTime.Text != value)
 | |
|                 this.labelTurnDelayTime.Text = value;
 | |
| 
 | |
|             switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|             {
 | |
|                 case 2:
 | |
|                     if (this.MainDisplay2 != null)
 | |
|                         this.MainDisplay2.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph2 != null)
 | |
|                         this.MainDisplayDotGraph2.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 3:
 | |
|                     if (this.MainDisplay3 != null)
 | |
|                         this.MainDisplay3.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph3 != null)
 | |
|                         this.MainDisplayDotGraph3.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 4:
 | |
|                     if (this.MainDisplay4 != null)
 | |
|                         this.MainDisplay4.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph4 != null)
 | |
|                         this.MainDisplayDotGraph4.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 5:
 | |
|                     if (this.MainDisplay5 != null)
 | |
|                         this.MainDisplay5.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph5 != null)
 | |
|                         this.MainDisplayDotGraph5.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 6:
 | |
|                     if (this.MainDisplayEachBarGraph6 != null)
 | |
|                         this.MainDisplayEachBarGraph6.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph6 != null)
 | |
|                         this.MainDisplayDotGraph6.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable6 != null)
 | |
|                         this.MainDisplayTable6.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 7:
 | |
|                     if (this.MainDisplayEachBarGraph7 != null)
 | |
|                         this.MainDisplayEachBarGraph7.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph7 != null)
 | |
|                         this.MainDisplayDotGraph7.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable7 != null)
 | |
|                         this.MainDisplayTable7.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 8:
 | |
|                     if (this.MainDisplayEachBarGraph8 != null)
 | |
|                         this.MainDisplayEachBarGraph8.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph8 != null)
 | |
|                         this.MainDisplayDotGraph8.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable8 != null)
 | |
|                         this.MainDisplayTable8.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 10:
 | |
|                     if (this.MainDisplayEachBarGraph10 != null)
 | |
|                         this.MainDisplayEachBarGraph10.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph10 != null)
 | |
|                         this.MainDisplayDotGraph10.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable10 != null)
 | |
|                         this.MainDisplayTable10.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 12:
 | |
|                     if (this.MainDisplayEachBarGraph12 != null)
 | |
|                         this.MainDisplayEachBarGraph12.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph12 != null)
 | |
|                         this.MainDisplayDotGraph12.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable12 != null)
 | |
|                         this.MainDisplayTable12.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 16:
 | |
|                     if (this.MainDisplayEachBarGraph16 != null)
 | |
|                         this.MainDisplayEachBarGraph16.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph16 != null)
 | |
|                         this.MainDisplayDotGraph16.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable16 != null)
 | |
|                         this.MainDisplayTable16.UpdateCurrentProductDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
| 
 | |
|             this.RescaleControl();
 | |
| 
 | |
|             #region 서보모터 속도 변경
 | |
|             if (this.ParentForm.SystemConfig.MotorSelect == 1)
 | |
|             {
 | |
|                 this.ParentForm.ServoMotorWrite1(1, ServoMotorParameterAddress.Speed1, jItem.FeedSpeed);
 | |
|                 //Thread.Sleep(50);
 | |
|                 this.ParentForm.ServoMotorWrite(1, ServoMotorParameterAddress.SaveAllParameters, ServoMotorParameterAddress.EEPROM);
 | |
| 
 | |
|                 this.buttonMenu.Enabled = true;
 | |
| 
 | |
|                 if (this.ParentForm.SystemConfig.IsLogin == true)
 | |
|                 {
 | |
|                     if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level1Operator ||
 | |
|                         this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level2Engineer ||
 | |
|                         this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level3Manager ||
 | |
|                         this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
 | |
|                     {
 | |
|                         this.buttonProductNo.Enabled = true;
 | |
|                         this.buttonUnder.Enabled = true;
 | |
|                         this.buttonPass.Enabled = true;
 | |
|                         this.buttonOver.Enabled = true;
 | |
|                         this.buttonTare.Enabled = true;
 | |
|                         this.panelSubMenu2.Enabled = true;
 | |
| 
 | |
|                         this.buttonProductNo.TextColor = this.ColorButtonAccessTrue;
 | |
|                         this.buttonUnder.TextColor = this.ColorButtonAccessTrue;
 | |
|                         this.buttonPass.TextColor = this.ColorButtonAccessTrue;
 | |
|                         this.buttonOver.TextColor = this.ColorButtonAccessTrue;
 | |
|                         this.buttonTare.TextColor = this.ColorButtonAccessTrue;
 | |
|                     }
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.buttonProductNo.Enabled = true;
 | |
|                     this.buttonUnder.Enabled = true;
 | |
|                     this.buttonPass.Enabled = true;
 | |
|                     this.buttonOver.Enabled = true;
 | |
|                     this.buttonTare.Enabled = true;
 | |
|                     this.panelSubMenu2.Enabled = true;
 | |
| 
 | |
|                     this.buttonProductNo.TextColor = this.ColorButtonAccessTrue;
 | |
|                     this.buttonUnder.TextColor = this.ColorButtonAccessTrue;
 | |
|                     this.buttonPass.TextColor = this.ColorButtonAccessTrue;
 | |
|                     this.buttonOver.TextColor = this.ColorButtonAccessTrue;
 | |
|                     this.buttonTare.TextColor = this.ColorButtonAccessTrue;
 | |
|                 }
 | |
|             }
 | |
|             #endregion
 | |
|         }
 | |
|         public void UpdateEquipmentStatusDisplay(DataStore.EquipmentStatus status)
 | |
|         {
 | |
|             StringBuilder sb = new StringBuilder();
 | |
| 
 | |
|             if (status == DataStore.EquipmentStatus.Start)
 | |
|             {
 | |
|                 #region Start
 | |
|                 this.pictureBoxStart.Visible = true;
 | |
|                 this.pictureBoxStop.Visible = false;
 | |
|                 this.buttonProductNo.Enabled = false;
 | |
|                 this.labelProductName.Enabled = false;
 | |
| 
 | |
|                 // 샘플링
 | |
|                 this.buttonSampling.Enabled = true;
 | |
|                 // Leak Sampling
 | |
|                 this.buttonLeakSampling.Enabled = true;
 | |
| 
 | |
|                 // 공압 알람 이면 장비 정지
 | |
|                 if(this.ParentForm.CurrentAlarmList.IsPressureError == true)
 | |
|                     this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard);
 | |
|                 #endregion
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 #region Stop
 | |
|                 this.ParentForm.SaveCounterFile1(this.ParentForm.CollectionWeightData, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 if (this.ParentForm.SystemConfig.EquipmentColumns == 16)
 | |
|                     this.ParentForm.SaveCounterFile2(this.ParentForm.CollectionWeightData, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                 this.pictureBoxStart.Visible = false;
 | |
|                 this.pictureBoxStop.Visible = true;
 | |
|                 this.buttonProductNo.Enabled = true;
 | |
|                 this.labelProductName.Enabled = true;
 | |
| 
 | |
|                 if (this.panelSetting.Visible == true)
 | |
|                     this.panelSetting.Visible = false;
 | |
| 
 | |
|                 this.buttonCut.ButtonUp();
 | |
|                 this.timerCutSignal.Enabled = false;
 | |
| 
 | |
|                 // 샘플링
 | |
|                 this.buttonSampling.ButtonUp();
 | |
|                 this.buttonSampling.Enabled = false;
 | |
|                 this.buttonSamplingOnce.Enabled = true;
 | |
|                 this.labelSamplingTime.Enabled = true;
 | |
|                 this.labelSamplingCount.Enabled = true;
 | |
|                 this.labelSamplingTime.BackColor = Color.White;
 | |
|                 this.labelSamplingCount.BackColor = Color.White;
 | |
|                 this.ParentForm.SystemConfig.IsSamplingRun = false;
 | |
|                 this.ParentForm.timerSampling.Enabled = false;
 | |
|                 this.ParentForm.SystemConfig.SamplingCurrentCount = 0;
 | |
| 
 | |
|                 // Leak Sampling
 | |
|                 this.buttonLeakSampling.ButtonUp();
 | |
|                 this.buttonLeakSampling.Enabled = false;
 | |
|                 this.buttonLeakSamplingOnce.Enabled = true;
 | |
|                 this.labelLeakSamplingTime.BackColor = Color.White;
 | |
|                 this.ParentForm.SystemConfig.IsLeakSamplingRun = false;
 | |
|                 this.ParentForm.timerLeakSampling.Enabled = false;
 | |
|                 this.smartTimerLeakRunDelay.Stop();
 | |
|                 #endregion
 | |
|             }
 | |
| 
 | |
|             switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|             {
 | |
|                 case 2:
 | |
|                     if (this.MainDisplay2 != null)
 | |
|                         this.MainDisplay2.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph2 != null)
 | |
|                         this.MainDisplayDotGraph2.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 3:
 | |
|                     if (this.MainDisplay3 != null)
 | |
|                         this.MainDisplay3.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph3 != null)
 | |
|                         this.MainDisplayDotGraph3.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 4:
 | |
|                     if (this.MainDisplay4 != null)
 | |
|                         this.MainDisplay4.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph4 != null)
 | |
|                         this.MainDisplayDotGraph4.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 5:
 | |
|                     if (this.MainDisplay5 != null)
 | |
|                         this.MainDisplay5.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph5 != null)
 | |
|                         this.MainDisplayDotGraph5.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 6:
 | |
|                     if (this.MainDisplayEachBarGraph6 != null)
 | |
|                         this.MainDisplayEachBarGraph6.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph6 != null)
 | |
|                         this.MainDisplayDotGraph6.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayTable6 != null)
 | |
|                         this.MainDisplayTable6.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 7:
 | |
|                     if (this.MainDisplayEachBarGraph7 != null)
 | |
|                         this.MainDisplayEachBarGraph7.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph7 != null)
 | |
|                         this.MainDisplayDotGraph7.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayTable7 != null)
 | |
|                         this.MainDisplayTable7.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 8:
 | |
|                     if (this.MainDisplayEachBarGraph8 != null)
 | |
|                         this.MainDisplayEachBarGraph8.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph8 != null)
 | |
|                         this.MainDisplayDotGraph8.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayTable8 != null)
 | |
|                         this.MainDisplayTable8.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 10:
 | |
|                     if (this.MainDisplayEachBarGraph10 != null)
 | |
|                         this.MainDisplayEachBarGraph10.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph10 != null)
 | |
|                         this.MainDisplayDotGraph10.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayTable10 != null)
 | |
|                         this.MainDisplayTable10.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 12:
 | |
|                     if (this.MainDisplayEachBarGraph12 != null)
 | |
|                         this.MainDisplayEachBarGraph12.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph12 != null)
 | |
|                         this.MainDisplayDotGraph12.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayTable12 != null)
 | |
|                         this.MainDisplayTable12.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 case 16:
 | |
|                     if (this.MainDisplayEachBarGraph16 != null)
 | |
|                         this.MainDisplayEachBarGraph16.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayDotGraph16 != null)
 | |
|                         this.MainDisplayDotGraph16.UpdateEquipmentStatusDisplay(status);
 | |
|                     if (this.MainDisplayTable16 != null)
 | |
|                         this.MainDisplayTable16.UpdateEquipmentStatusDisplay(status);
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
|         }
 | |
|         public void UpdateStopWeightDisplay(DataStore.EquipmentStatus status, Collection<WeightData> weightDatas)
 | |
|         {
 | |
|             switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|             {
 | |
|                 case 2:
 | |
|                     if (this.MainDisplay2 != null)
 | |
|                         this.MainDisplay2.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph2 != null)
 | |
|                         this.MainDisplayDotGraph2.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 3:
 | |
|                     if (this.MainDisplay3 != null)
 | |
|                         this.MainDisplay3.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph3 != null)
 | |
|                         this.MainDisplayDotGraph3.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 4:
 | |
|                     if (this.MainDisplay4 != null)
 | |
|                         this.MainDisplay4.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph4 != null)
 | |
|                         this.MainDisplayDotGraph4.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 5:
 | |
|                     if (this.MainDisplay5 != null)
 | |
|                         this.MainDisplay5.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph5 != null)
 | |
|                         this.MainDisplayDotGraph5.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 6:
 | |
|                     if (this.MainDisplayEachBarGraph6 != null)
 | |
|                         this.MainDisplayEachBarGraph6.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph6 != null)
 | |
|                         this.MainDisplayDotGraph6.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable6 != null)
 | |
|                         this.MainDisplayTable6.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 7:
 | |
|                     if (this.MainDisplayEachBarGraph7 != null)
 | |
|                         this.MainDisplayEachBarGraph7.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph7 != null)
 | |
|                         this.MainDisplayDotGraph7.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable7 != null)
 | |
|                         this.MainDisplayTable7.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 8:
 | |
|                     if (this.MainDisplayEachBarGraph8 != null)
 | |
|                         this.MainDisplayEachBarGraph8.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph8 != null)
 | |
|                         this.MainDisplayDotGraph8.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable8 != null)
 | |
|                         this.MainDisplayTable8.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 10:
 | |
|                     if (this.MainDisplayEachBarGraph10 != null)
 | |
|                         this.MainDisplayEachBarGraph10.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph10 != null)
 | |
|                         this.MainDisplayDotGraph10.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable10 != null)
 | |
|                         this.MainDisplayTable10.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 12:
 | |
|                     if (this.MainDisplayEachBarGraph12 != null)
 | |
|                         this.MainDisplayEachBarGraph12.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph12 != null)
 | |
|                         this.MainDisplayDotGraph12.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable12 != null)
 | |
|                         this.MainDisplayTable12.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 16:
 | |
|                     if (this.MainDisplayEachBarGraph16 != null)
 | |
|                         this.MainDisplayEachBarGraph16.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph16 != null)
 | |
|                         this.MainDisplayDotGraph16.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable16 != null)
 | |
|                         this.MainDisplayTable16.UpdateStopWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
|         }
 | |
|         public void UpdateStartWeightDisplay(DataStore.EquipmentStatus status, Collection<WeightData> weightDatas)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             value = weightDatas[0].ProductionSpeed.ToString();
 | |
|             if (this.labelProductionSpeed.Text != value)
 | |
|                 this.labelProductionSpeed.Text = value;
 | |
| 
 | |
|             switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|             {
 | |
|                 case 2:
 | |
|                     if (this.MainDisplay2 != null)
 | |
|                         this.MainDisplay2.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph2 != null)
 | |
|                         this.MainDisplayDotGraph2.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 3:
 | |
|                     if (this.MainDisplay3 != null)
 | |
|                         this.MainDisplay3.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph3 != null)
 | |
|                         this.MainDisplayDotGraph3.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 4:
 | |
|                     if (this.MainDisplay4 != null)
 | |
|                         this.MainDisplay4.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph4 != null)
 | |
|                         this.MainDisplayDotGraph4.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 5:
 | |
|                     if (this.MainDisplay5 != null)
 | |
|                         this.MainDisplay5.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph5 != null)
 | |
|                         this.MainDisplayDotGraph5.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 6:
 | |
|                     if (this.MainDisplayEachBarGraph6 != null)
 | |
|                         this.MainDisplayEachBarGraph6.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph6 != null)
 | |
|                         this.MainDisplayDotGraph6.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable6 != null)
 | |
|                         this.MainDisplayTable6.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 7:
 | |
|                     if (this.MainDisplayEachBarGraph7 != null)
 | |
|                         this.MainDisplayEachBarGraph7.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph7 != null)
 | |
|                         this.MainDisplayDotGraph7.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable7 != null)
 | |
|                         this.MainDisplayTable7.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 8:
 | |
|                     if (this.MainDisplayEachBarGraph8 != null)
 | |
|                         this.MainDisplayEachBarGraph8.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph8 != null)
 | |
|                         this.MainDisplayDotGraph8.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable8 != null)
 | |
|                         this.MainDisplayTable8.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 10:
 | |
|                     if (this.MainDisplayEachBarGraph10 != null)
 | |
|                         this.MainDisplayEachBarGraph10.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph10 != null)
 | |
|                         this.MainDisplayDotGraph10.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable10 != null)
 | |
|                         this.MainDisplayTable10.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 12:
 | |
|                     if (this.MainDisplayEachBarGraph12 != null)
 | |
|                         this.MainDisplayEachBarGraph12.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph12 != null)
 | |
|                         this.MainDisplayDotGraph12.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable12 != null)
 | |
|                         this.MainDisplayTable12.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 case 16:
 | |
|                     if (this.MainDisplayEachBarGraph16 != null)
 | |
|                         this.MainDisplayEachBarGraph16.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayDotGraph16 != null)
 | |
|                         this.MainDisplayDotGraph16.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     if (this.MainDisplayTable16 != null)
 | |
|                         this.MainDisplayTable16.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     //if (this.MainDisplayTable16_1 != null)
 | |
|                     //    this.MainDisplayTable16_1.UpdateStartWeightDisplay(status, weightDatas);
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
| 
 | |
|             this.SetTotalCount();
 | |
|         }
 | |
|         public void UpdateAlarmMessageDisplay()
 | |
|         {
 | |
|             if (this.panelAlarmMessageBox1.Visible == false)
 | |
|             {
 | |
|                 this.panelAlarmMessageBox1.Visible = true;
 | |
| 
 | |
|                 this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard);
 | |
| 
 | |
|                 if (this.ParentForm.CurrentAlarmList.IsBuzzerStatus == false)
 | |
|                 {
 | |
|                     this.ParentForm.TransferData(CommunicationCommand.BuzzerOn, CommunicationID.MainBoard);
 | |
|                     this.ParentForm.CurrentAlarmList.IsBuzzerStatus = true;
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         public void UpdateDisplayAlarmView(AlarmList alarm)
 | |
|         {
 | |
|             bool isAlarmMessageView = false;
 | |
| 
 | |
|             if (alarm.IsEntrySensorError == true || alarm.IsLoadcellError == true || alarm.IsPressureError == true ||
 | |
|                 alarm.IsEmergencyStop == true || alarm.IsInverterAlarm == true || alarm.IsServoAlarm == true || alarm.IsServoAlarmTorque == true ||
 | |
|                 alarm.IsAlignError == true || alarm.IsPinchPoint == true)
 | |
|             {
 | |
|                 this.pictureBoxAlarm.Visible = true;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.IsFistAlarmView = false;
 | |
|                 this.pictureBoxAlarm.Visible = false;
 | |
|                 this.MainDisplayAlarmList.Visible = false;
 | |
|             }
 | |
| 
 | |
|             this.MainDisplayAlarmList.listBoxMessage.ClearAll();
 | |
| 
 | |
|             if (alarm.IsEntrySensorError == true)
 | |
|             {
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("Entry Sensor Error");
 | |
|                 isAlarmMessageView = true;
 | |
|             }
 | |
|             if (alarm.IsLoadcellError == true)
 | |
|             {
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("LoadCell Error");
 | |
|                 isAlarmMessageView = true;
 | |
|             }
 | |
|             if (alarm.IsPressureError == true)
 | |
|             {
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("Pressure Error");
 | |
|                 isAlarmMessageView = true;
 | |
|             }
 | |
|             if (alarm.IsEmergencyStop == true)
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("Emergency Stop");
 | |
|             if (alarm.IsInverterAlarm == true)
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("Inverter Alarm");
 | |
|             if (alarm.IsServoAlarm == true)
 | |
|             {
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("Servo Alarm");
 | |
|                 isAlarmMessageView = true;
 | |
|             }
 | |
|             if (alarm.IsServoAlarmTorque == true)
 | |
|             {
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("Servo Torque Alarm");
 | |
|                 isAlarmMessageView = true;
 | |
|             }
 | |
|             if (alarm.IsAlignError == true)
 | |
|             {
 | |
|                 this.MainDisplayAlarmList.listBoxMessage.AddItem("Product discharge error");
 | |
|                 isAlarmMessageView = true;
 | |
|             }
 | |
|             if (alarm.IsInverterAlarm == true)
 | |
|                 this.UpdateAlarmMessageDisplay();
 | |
| 
 | |
|             if (this.IsFistAlarmView == false && isAlarmMessageView == true)
 | |
|             {
 | |
|                 this.IsFistAlarmView = true;
 | |
|                 this.UpdateDisplayAlarmMessage1(alarm);
 | |
|             }
 | |
|         }
 | |
|         public void UpdateDisplayProductChangeInfo(int cnt)
 | |
|         {
 | |
|             this.labelTimeroutCount.Visible = true;
 | |
|             this.labelTimeroutCount.Text = cnt.ToString();
 | |
|         }
 | |
|         public void UpdateDisplayPinchPointAlarm(string lane)
 | |
|         {
 | |
|             string message = "";
 | |
|             switch (this.ParentForm.SystemConfig.Language)
 | |
|             {
 | |
|                 case DataStore.LanguageID.Korean:
 | |
|                     message = "제품 끼임 발생!";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.English:
 | |
|                     message = "Pinch point!";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Chinese:
 | |
|                     message = "Pinch point!";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Czech:
 | |
|                     message = "Pinch point!";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.German:
 | |
|                     message = "Pinch point!";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Japanese:
 | |
|                     message = "ピンチポイントアラㅡム!";
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
| 
 | |
|             this.labelMessage3.Text = string.Format("{0} Lane", lane);
 | |
|             this.labelMessage4.Text = message;
 | |
|             this.panelAlarmMessageBox3.BringToFront();
 | |
|             this.panelAlarmMessageBox3.Visible = true;
 | |
|             //if (this.ParentForm.CurrentAlarmList.IsBuzzerStatus == false)
 | |
|             //{
 | |
|             //    this.ParentForm.TransferData(CommunicationCommand.BuzzerOn, CommunicationID.MainBoard);
 | |
|             //    this.ParentForm.CurrentAlarmList.IsBuzzerStatus = true;
 | |
|             //}
 | |
|         }
 | |
|         public void UpdateDisplayAlarmMessage1(AlarmList alarm)
 | |
|         {
 | |
|             this.smartListBox1.ClearAll();
 | |
| 
 | |
|             if (alarm.IsLoadcellError == true)
 | |
|                 this.smartListBox1.AddItem("LoadCell Error");
 | |
|             if (alarm.IsPressureError == true)
 | |
|                 this.smartListBox1.AddItem("Pressure Error");
 | |
|             if (alarm.IsServoAlarm == true)
 | |
|                 this.smartListBox1.AddItem("Servo Alarm");
 | |
|             if (alarm.IsServoAlarmTorque == true)
 | |
|                 this.smartListBox1.AddItem("Servo Torque Alarm");
 | |
|             if (alarm.IsEntrySensorError == true)
 | |
|                 this.smartListBox1.AddItem("Entry Sensor Error");
 | |
|             if (alarm.IsAlignError == true)
 | |
|                 this.smartListBox1.AddItem("Product discharge error");
 | |
| 
 | |
|             // bypass 설정 체크
 | |
|             bool isBypass = false;
 | |
|             if (alarm.IsLoadcellError == true)
 | |
|             { 
 | |
|                 foreach(WeightData data in this.ParentForm.CollectionWeightData)
 | |
|                 {
 | |
|                     if (data.IsBypassMode == true)
 | |
|                     {
 | |
|                         isBypass = true;
 | |
|                         continue;
 | |
|                     }
 | |
|                 }
 | |
|             }
 | |
| 
 | |
|             if (alarm.IsLoadcellError == true)
 | |
|             {
 | |
|                 if (isBypass == true)
 | |
|                     return;
 | |
|             }
 | |
| 
 | |
|             if (this.ParentForm.CurrentAlarmList.IsBuzzerStatus == false)
 | |
|             {
 | |
|                 this.panelAlarmMessageBox2.BringToFront();
 | |
|                 this.panelAlarmMessageBox2.Visible = true;
 | |
| 
 | |
|                 this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard);
 | |
|                 this.ParentForm.TransferData(CommunicationCommand.BuzzerOn, CommunicationID.MainBoard);
 | |
|                 this.ParentForm.CurrentAlarmList.IsBuzzerStatus = true;
 | |
|             }
 | |
|         }
 | |
|         public void UpdateDisplayOverRun(string value)
 | |
|         {
 | |
|             this.labelOverrun.Text = value;
 | |
|         }
 | |
|         public void UpdateDisplayAlarmMessageServoOrigin()
 | |
|         {
 | |
|             if (this.ParentForm.IsServoOrigin == true)
 | |
|             {
 | |
|                 this.panelAlarmMessageBox4.BringToFront();
 | |
|                 this.panelAlarmMessageBox4.Visible = true;
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         public void UpdateDisplayTime()
 | |
|         {
 | |
|             this.labelTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
 | |
|         }
 | |
| 
 | |
|         public void SetTotalCount()
 | |
|         {
 | |
|             int toTalAll = 0, toTalPass = 0, toTalNG = 0;
 | |
| 
 | |
|             for (int i = 0; i < this.ParentForm.SystemConfig.EquipmentColumns; i++)
 | |
|             {
 | |
|                 toTalAll += this.ParentForm.CollectionWeightData[i].TotalCount;
 | |
|                 toTalPass += this.ParentForm.CollectionWeightData[i].PassCount;
 | |
|                 toTalNG += this.ParentForm.CollectionWeightData[i].TotalNGCount;
 | |
|             }
 | |
| 
 | |
|             // Total All Count
 | |
|             // Total Pass Count
 | |
|             if (this.labelTitleTotalCount.Text == "Pass" || this.labelTitleTotalCount.Text == "通过" || this.labelTitleTotalCount.Text == "Váha"
 | |
|                 || this.labelTitleTotalCount.Text == "Bestehen" || this.labelTitleTotalCount.Text == "合格")
 | |
|             {
 | |
|                 //if (this.labelTotalCount.Text != toTalPass.ToString())
 | |
|                 //    this.labelTotalCount.Text = toTalPass.ToString();
 | |
|                 this.labelTotalCount.BeginInvoke(new Action(() =>
 | |
|                     {
 | |
|                         this.labelTotalCount.Text = toTalPass.ToString();
 | |
|                     }));
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 //if (this.labelTotalCount.Text != toTalAll.ToString())
 | |
|                 //    this.labelTotalCount.Text = toTalAll.ToString();
 | |
|                 this.labelTotalCount.BeginInvoke(new Action(() =>
 | |
|                 {
 | |
|                     this.labelTotalCount.Text = toTalAll.ToString();
 | |
|                 }));
 | |
|             }
 | |
| 
 | |
|             // Total NG Count
 | |
|             //if (this.labelNGCount.Text != toTalNG.ToString())
 | |
|             //    this.labelNGCount.Text = toTalNG.ToString();
 | |
|             this.labelNGCount.BeginInvoke(new Action(() =>
 | |
|             {
 | |
|                 this.labelNGCount.Text = toTalNG.ToString();
 | |
|             }));
 | |
|         }
 | |
| 
 | |
|         private void ProductChange(int productNumber)
 | |
|         {
 | |
|             this.buttonProductNo.Text = "**";
 | |
| 
 | |
|             if (this.ParentForm.SystemConfig.MotorSelect == 1)
 | |
|             {
 | |
|                 this.buttonProductNo.Enabled = false;
 | |
|                 this.buttonMenu.Enabled = false;
 | |
|                 this.buttonUnder.Enabled = false;
 | |
|                 this.buttonPass.Enabled = false;
 | |
|                 this.buttonOver.Enabled = false;
 | |
|                 this.buttonTare.Enabled = false;
 | |
|                 this.panelSubMenu2.Enabled = false;
 | |
| 
 | |
|                 this.buttonProductNo.TextColor = this.ColorButtonAccessFalse;
 | |
|                 this.buttonUnder.TextColor = this.ColorButtonAccessFalse;
 | |
|                 this.buttonPass.TextColor = this.ColorButtonAccessFalse;
 | |
|                 this.buttonOver.TextColor = this.ColorButtonAccessFalse;
 | |
|                 this.buttonTare.TextColor = this.ColorButtonAccessFalse;
 | |
|             }
 | |
| 
 | |
|             this.ParentForm.ProductChange(productNumber);
 | |
|         }
 | |
| 
 | |
|         public void DisplayRefresh()
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.ModeNormal, CommunicationID.MainBoard);
 | |
|             this.ParentForm.SystemConfig.CurrentForm = DataStore.FormStore.FormMainDisplay;
 | |
| 
 | |
|             this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
|             this.UpdateDisplay(this.MainDisplay);
 | |
|             this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser, this.ParentForm.CurrentUserGroup);
 | |
|           
 | |
|             if (this.ParentForm.EquipmentStatus == DataStore.EquipmentStatus.Stop)
 | |
|                 this.ProductChange(this.ParentForm.SystemConfig.ProductNumber);
 | |
| 
 | |
|             this.pictureBoxUSBBackOn.Visible = this.ParentForm.SystemConfig.IsDataBackup;
 | |
|             this.pictureBoxBypass.Visible = this.ParentForm.SystemConfig.IsBypassMode;
 | |
|             
 | |
|             if (this.ParentForm.SystemConfig.Serial3Mode != 0)
 | |
|                 this.pictureBoxCH3.Visible = true;
 | |
|             else
 | |
|                 this.pictureBoxCH3.Visible = false;
 | |
| 
 | |
|             if (this.ParentForm.SystemConfig.IsBypassDirectionPass == true)
 | |
|                 this.buttonBypassDirection.ButtonUp();
 | |
|             else
 | |
|                 this.buttonBypassDirection.ButtonDown();
 | |
| 
 | |
|             if (this.ParentForm.SystemConfig.IsBypassOnce == true)
 | |
|             {
 | |
|                 this.buttonBypassOnce.ButtonUp();
 | |
|                 this.buttonBypassRun.Mode = SmartButton.BUTTONMODE.NORMAL;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.buttonBypassOnce.ButtonDown();
 | |
|                 this.buttonBypassRun.Mode = SmartButton.BUTTONMODE.PUSH;
 | |
|             }
 | |
| 
 | |
|             // IsDeveloperMode
 | |
|             if (this.ParentForm.IsDeveloperMode == true)
 | |
|             {
 | |
|                 this.labelComRetry.Visible = true;
 | |
|                 this.labelComRetry3th.Visible = true;
 | |
|                 this.labelOverrun.Visible = true;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.labelComRetry.Visible = false;
 | |
|                 this.labelComRetry3th.Visible = false;
 | |
|                 this.labelOverrun.Visible = false;
 | |
|             }
 | |
| 
 | |
|             // SubMenu
 | |
|             this.panelSubMenu1.Visible = false;
 | |
|             this.panelSubMenu2.Visible = false;
 | |
|             this.SubmenuIndex = 0;
 | |
| 
 | |
|             // CUT 
 | |
|             if (this.ParentForm.SystemConfig.IsCutView == true)
 | |
|             {
 | |
|                 this.labelCutSignalInterval.Visible = true;
 | |
|                 this.buttonCut.Visible = true;
 | |
|                 this.labelBufferCNT.Visible = true;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.labelCutSignalInterval.Visible = false;
 | |
|                 this.buttonCut.Visible = false;
 | |
|                 this.labelBufferCNT.Visible = false;
 | |
|             }
 | |
| 
 | |
|             // Alarm Message4 - Servo Origin
 | |
|             if (this.ParentForm.IsServoOrigin == false)
 | |
|                 this.panelAlarmMessageBox4.Visible = false;
 | |
| 
 | |
|             // Bypass Display
 | |
|             switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|             {
 | |
|                 case 2:
 | |
|                     if (this.MainDisplay2 != null)
 | |
|                         this.MainDisplay2.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph2 != null)
 | |
|                         this.MainDisplayDotGraph2.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 3:
 | |
|                     if (this.MainDisplay3 != null)
 | |
|                         this.MainDisplay3.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph3 != null)
 | |
|                         this.MainDisplayDotGraph3.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 4:
 | |
|                     if (this.MainDisplay4 != null)
 | |
|                         this.MainDisplay4.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph4 != null)
 | |
|                         this.MainDisplayDotGraph4.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 5:
 | |
|                     if (this.MainDisplay5 != null)
 | |
|                         this.MainDisplay5.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph5 != null)
 | |
|                         this.MainDisplayDotGraph5.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 6:
 | |
|                     if (this.MainDisplayEachBarGraph6 != null)
 | |
|                         this.MainDisplayEachBarGraph6.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph6 != null)
 | |
|                         this.MainDisplayDotGraph6.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayTable6 != null)
 | |
|                         this.MainDisplayTable6.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 7:
 | |
|                     if (this.MainDisplayEachBarGraph7 != null)
 | |
|                         this.MainDisplayEachBarGraph7.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph7 != null)
 | |
|                         this.MainDisplayDotGraph7.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayTable7 != null)
 | |
|                         this.MainDisplayTable7.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 8:
 | |
|                     if (this.MainDisplayEachBarGraph8 != null)
 | |
|                         this.MainDisplayEachBarGraph8.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph8 != null)
 | |
|                         this.MainDisplayDotGraph8.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayTable8 != null)
 | |
|                         this.MainDisplayTable8.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 10:
 | |
|                     if (this.MainDisplayEachBarGraph10 != null)
 | |
|                         this.MainDisplayEachBarGraph10.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph10 != null)
 | |
|                         this.MainDisplayDotGraph10.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayTable10 != null)
 | |
|                         this.MainDisplayTable10.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 12:
 | |
|                     if (this.MainDisplayEachBarGraph12 != null)
 | |
|                         this.MainDisplayEachBarGraph12.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph12 != null)
 | |
|                         this.MainDisplayDotGraph12.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayTable12 != null)
 | |
|                         this.MainDisplayTable12.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 case 16:
 | |
|                     if (this.MainDisplayEachBarGraph16 != null)
 | |
|                         this.MainDisplayEachBarGraph16.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayDotGraph16 != null)
 | |
|                         this.MainDisplayDotGraph16.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     if (this.MainDisplayTable16 != null)
 | |
|                         this.MainDisplayTable16.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     //if (this.MainDisplayTable16_1 != null)
 | |
|                     //    this.MainDisplayTable16_1.UpdateBypassDisplay(this.ParentForm.CollectionWeightData);
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
|         }
 | |
|         #endregion
 | |
| 
 | |
|         #region Event Handler
 | |
|         private void pictureBoxStart_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard);
 | |
|         }
 | |
|         private void pictureBoxStop_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.Start, CommunicationID.MainBoard);
 | |
|         }
 | |
|         private void pictureBoxAlarm_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.MainDisplayAlarmList.Visible == true)
 | |
|                 this.MainDisplayAlarmList.Visible = false;
 | |
|             else
 | |
|             {
 | |
|                 this.MainDisplayAlarmList.BringToFront();
 | |
|                 this.MainDisplayAlarmList.Visible = true;
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         private void buttonProductNo_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.buttonProductNo.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 1000)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.ProductChange(myKeyPad.IntValue);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonUnder_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
|             int underRangeLimit = 0, underRange = 0;
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.buttonUnder.Text, 5, this.ParentForm.SystemConfig.DecimalPlaces, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue > Helper.StringToWeight(this.ParentForm.CurrentProductItem.PassRange, this.ParentForm.SystemConfig.DecimalPlaces))
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.ParentForm.CurrentProductItem.UnderRange = myKeyPad.StringValue.Replace(".", "");
 | |
|                     this.buttonUnder.Text = myKeyPad.StringValue;
 | |
|                     this.labelUnderRange.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.RescaleControl();
 | |
| 
 | |
|                     this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.UnderRange);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2002_UnderRange, value);
 | |
| 
 | |
|                     underRangeLimit = int.Parse(this.ParentForm.CurrentProductItem.UnderRangeLimit);
 | |
|                     underRange = int.Parse(this.ParentForm.CurrentProductItem.UnderRange);
 | |
| 
 | |
|                     if (underRange < underRangeLimit)
 | |
|                     {
 | |
|                         this.ParentForm.CurrentProductItem.UnderRangeLimit = "0";
 | |
|                         this.labelUnderRangeLimit.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.UnderRangeLimit, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|                         this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                         // 중량 Limit 설정 확인하세요!
 | |
|                         // Low Limit Range
 | |
|                         DialogFormMessage myMsg = new DialogFormMessage(11, this.ParentForm.SystemConfig.Language);
 | |
|                         myMsg.ShowDialog();
 | |
|                     }
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonPass_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.buttonPass.Text, 5, this.ParentForm.SystemConfig.DecimalPlaces, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if ((myKeyPad.doubleValue > Helper.StringToWeight(this.ParentForm.CurrentProductItem.OverRange, this.ParentForm.SystemConfig.DecimalPlaces))
 | |
|                     || (myKeyPad.doubleValue < Helper.StringToWeight(this.ParentForm.CurrentProductItem.UnderRange, this.ParentForm.SystemConfig.DecimalPlaces)))
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.ParentForm.CurrentProductItem.PassRange = myKeyPad.StringValue.Replace(".", "");
 | |
|                     this.buttonPass.Text = myKeyPad.StringValue;
 | |
|                     this.labelPassRange.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.RescaleControl();
 | |
| 
 | |
|                     this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.PassRange);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2003_PassRange, value);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonOver_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
|             int overRangeLimit = 0, overRange = 0;
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.buttonOver.Text, 5, this.ParentForm.SystemConfig.DecimalPlaces, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < Helper.StringToWeight(this.ParentForm.CurrentProductItem.PassRange, this.ParentForm.SystemConfig.DecimalPlaces))
 | |
|                 {
 | |
|                     this.ParentForm.Refresh();
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.ParentForm.CurrentProductItem.OverRange = myKeyPad.StringValue.Replace(".", "");
 | |
|                     this.buttonOver.Text = myKeyPad.StringValue;
 | |
|                     this.labelOverRange.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.RescaleControl();
 | |
| 
 | |
|                     this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.OverRange);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2004_OverRange, value);
 | |
| 
 | |
|                     overRangeLimit = int.Parse(this.ParentForm.CurrentProductItem.OverRangeLimit);
 | |
|                     overRange = int.Parse(this.ParentForm.CurrentProductItem.OverRange);
 | |
| 
 | |
|                     if (overRange > overRangeLimit)
 | |
|                     {
 | |
|                         this.ParentForm.CurrentProductItem.OverRangeLimit = "99999";
 | |
|                         this.labelOverRangeLimit.Text = Helper.StringToDecimalPlaces(this.ParentForm.CurrentProductItem.OverRangeLimit, this.ParentForm.SystemConfig.DecimalPlaces);
 | |
|                         this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);                        
 | |
| 
 | |
|                         // 중량 Limit 설정 확인하세요!
 | |
|                         // Low Limit Range
 | |
|                         DialogFormMessage myMsg = new DialogFormMessage(11, this.ParentForm.SystemConfig.Language);
 | |
|                         myMsg.ShowDialog();
 | |
|                     }
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonTare_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.buttonTare.Text, 5, this.ParentForm.SystemConfig.DecimalPlaces, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 999.99)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.ParentForm.CurrentProductItem.TareRange = myKeyPad.StringValue.Replace(".", "");
 | |
|                     this.buttonTare.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.TareRange);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2005_TareRange, value);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonClear_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             DialogFormYesNo myDlg = new DialogFormYesNo(this.ParentForm.SystemConfig.Language, 8);
 | |
|             if (myDlg.ShowDialog() == DialogResult.Yes)
 | |
|             {
 | |
|                 switch (this.ParentForm.SystemConfig.EquipmentColumns)
 | |
|                 {
 | |
|                     case 2:
 | |
|                         if (this.MainDisplay2 != null)
 | |
|                             this.MainDisplay2.Clear();
 | |
|                         if (this.MainDisplayDotGraph2 != null)
 | |
|                             this.MainDisplayDotGraph2.Clear();
 | |
|                         break;
 | |
|                     case 3:
 | |
|                         if (this.MainDisplay3 != null)
 | |
|                             this.MainDisplay3.Clear();
 | |
|                         if (this.MainDisplayDotGraph3 != null)
 | |
|                             this.MainDisplayDotGraph3.Clear();
 | |
|                         break;
 | |
|                     case 4:
 | |
|                         if (this.MainDisplay4 != null)
 | |
|                             this.MainDisplay4.Clear();
 | |
|                         if (this.MainDisplayDotGraph4 != null)
 | |
|                             this.MainDisplayDotGraph4.Clear();
 | |
|                         break;
 | |
|                     case 5:
 | |
|                         if (this.MainDisplay5 != null)
 | |
|                             this.MainDisplay5.Clear();
 | |
|                         if (this.MainDisplayDotGraph5 != null)
 | |
|                             this.MainDisplayDotGraph5.Clear();
 | |
|                         break;
 | |
|                     case 6:
 | |
|                         if (this.MainDisplayEachBarGraph6 != null)
 | |
|                             this.MainDisplayEachBarGraph6.Clear();
 | |
|                         if (this.MainDisplayDotGraph6 != null)
 | |
|                             this.MainDisplayDotGraph6.Clear();
 | |
|                         if (this.MainDisplayTable6 != null)
 | |
|                             this.MainDisplayTable6.Clear();
 | |
|                         break;
 | |
|                     case 7:
 | |
|                         if (this.MainDisplayEachBarGraph7 != null)
 | |
|                             this.MainDisplayEachBarGraph7.Clear();
 | |
|                         if (this.MainDisplayDotGraph7 != null)
 | |
|                             this.MainDisplayDotGraph7.Clear();
 | |
|                         if (this.MainDisplayTable7 != null)
 | |
|                             this.MainDisplayTable7.Clear();
 | |
|                         break;
 | |
|                     case 8:
 | |
|                         if (this.MainDisplayEachBarGraph8 != null)
 | |
|                             this.MainDisplayEachBarGraph8.Clear();
 | |
|                         if (this.MainDisplayDotGraph8 != null)
 | |
|                             this.MainDisplayDotGraph8.Clear();
 | |
|                         if (this.MainDisplayTable8 != null)
 | |
|                             this.MainDisplayTable8.Clear();
 | |
|                         break;
 | |
|                     case 10:
 | |
|                         if (this.MainDisplayEachBarGraph10 != null)
 | |
|                             this.MainDisplayEachBarGraph10.Clear();
 | |
|                         if (this.MainDisplayDotGraph10 != null)
 | |
|                             this.MainDisplayDotGraph10.Clear();
 | |
|                         if (this.MainDisplayTable10 != null)
 | |
|                             this.MainDisplayTable10.Clear();
 | |
|                         break;
 | |
|                     case 12:
 | |
|                         if (this.MainDisplayEachBarGraph12 != null)
 | |
|                             this.MainDisplayEachBarGraph12.Clear();
 | |
|                         if (this.MainDisplayDotGraph12 != null)
 | |
|                             this.MainDisplayDotGraph12.Clear();
 | |
|                         if (this.MainDisplayTable12 != null)
 | |
|                             this.MainDisplayTable12.Clear();
 | |
|                         break;
 | |
|                     case 16:
 | |
|                         if (this.MainDisplayEachBarGraph16 != null)
 | |
|                             this.MainDisplayEachBarGraph16.Clear();
 | |
|                         if (this.MainDisplayDotGraph16 != null)
 | |
|                             this.MainDisplayDotGraph16.Clear();
 | |
|                         if (this.MainDisplayTable16 != null)
 | |
|                             this.MainDisplayTable16.Clear();
 | |
|                         //if (this.MainDisplayTable16_1 != null)
 | |
|                         //    this.MainDisplayTable16_1.Clear();
 | |
|                         break;
 | |
|                     default:
 | |
|                         break;
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonMenu_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.ParentForm.EquipmentStatus == DataStore.EquipmentStatus.Stop)
 | |
|             {
 | |
|                 this.ParentForm.ChildFormMenu.DisplayRefresh();
 | |
|                 ((FormMain)(Owner)).smartForm.Show((int)DataStore.FormStore.FormMenu);
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 if (this.ParentForm.SystemConfig.IsLogin == true && this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.Level4Developer)
 | |
|                 {
 | |
|                     this.groupBoxJudgmentSetting.Visible = true;
 | |
|                     this.labelFilter.Visible = true;
 | |
|                     this.labelJudgmentDelayTime.Visible = true;
 | |
|                     this.labelJudgmentCount.Visible = true;
 | |
|                     this.labelStaticFilter.Visible = true;
 | |
|                     this.labelStaticJudgmentDelayTime.Visible = true;
 | |
|                     this.labelStaticJudgmentCount.Visible = true;
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.groupBoxJudgmentSetting.Visible = false;
 | |
|                     this.labelFilter.Visible = false;
 | |
|                     this.labelJudgmentDelayTime.Visible = false;
 | |
|                     this.labelJudgmentCount.Visible = false;
 | |
|                     this.labelStaticFilter.Visible = false;
 | |
|                     this.labelStaticJudgmentDelayTime.Visible = false;
 | |
|                     this.labelStaticJudgmentCount.Visible = false;
 | |
|                 }
 | |
| 
 | |
|                 this.panelSetting.BringToFront();
 | |
|                 this.panelSetting.Visible = true;
 | |
|             }
 | |
|         }
 | |
|         private void buttonDisplay_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             SmartButton button = sender as SmartButton;
 | |
| 
 | |
|             if (button == null)
 | |
|                 return;
 | |
| 
 | |
|             if (button == this.buttonBarGraphForm)
 | |
|                 this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
|             else if (button == this.buttonDotGraphForm)
 | |
|                 this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayDotGraph;
 | |
|             else if (button == this.buttonTableForm)
 | |
|                 this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayTable;
 | |
|             else
 | |
|                 this.MainDisplay = DataStore.FormMainDisplayStore.FormMainDisplayBarGraph;
 | |
| 
 | |
|             this.UpdateDisplay(this.MainDisplay);
 | |
| 
 | |
|             //if (this.ParentForm.EquipmentStatus == DataStore.EquipmentStatus.Start)
 | |
|             //{
 | |
|             //    this.buttonBarGraphForm.Enabled = false;
 | |
|             //    this.buttonDotGraphForm.Enabled = false;
 | |
|             //    this.buttonTableForm.Enabled = false;
 | |
| 
 | |
|             //    this.smartTimerDisplayDelay.Start();
 | |
|             //}
 | |
|         }
 | |
|         private void buttonScaleZero_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.Zero, CommunicationID.SubBoardAll);
 | |
|         }
 | |
|         private void buttonClose_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.panelSetting.Visible = false;
 | |
|         }
 | |
|         private void buttonAlarm1Ok_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.CurrentAlarmList.IsBuzzerStatus = false;
 | |
|             this.ParentForm.TransferData(CommunicationCommand.BuzzerOff, CommunicationID.MainBoard);
 | |
|             this.ParentForm.TransferData(CommunicationCommand.AlarmReset, CommunicationID.MainBoard);
 | |
|             this.panelAlarmMessageBox1.Visible = false;
 | |
|         }
 | |
|         private void buttonAlarm2OK_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.CurrentAlarmList.IsBuzzerStatus = false;
 | |
|             this.ParentForm.TransferData(CommunicationCommand.BuzzerOff, CommunicationID.MainBoard);
 | |
|             this.panelAlarmMessageBox2.Visible = false;
 | |
|         }
 | |
|         private void buttonAlarm3Ok_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.CurrentAlarmList.IsBuzzerStatus = false;
 | |
|             this.ParentForm.TransferData(CommunicationCommand.BuzzerOff, CommunicationID.MainBoard);
 | |
|             this.panelAlarmMessageBox3.Visible = false;
 | |
|         }
 | |
|         private void buttonAlarm4Ok_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.panelAlarmMessageBox4.Visible = false;
 | |
|         }
 | |
|         private void buttonAllNG_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.NgSignal, CommunicationID.SubBoardAll);
 | |
|         }
 | |
|         private void buttonAllPass_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.PassSignal, CommunicationID.SubBoardAll);
 | |
|         }
 | |
|         private void buttonUser_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.ParentForm.SystemConfig.CurrentUser.Group == DataStore.UserGroup.LogOff)
 | |
|             {
 | |
|                 DialogFormLogOn logOn = new DialogFormLogOn(this.ParentForm);
 | |
|                 if (logOn.ShowDialog() == DialogResult.OK)
 | |
|                 {
 | |
|                     //this.DisplayRefresh();
 | |
|                     this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser, this.ParentForm.CurrentUserGroup);
 | |
| 
 | |
|                     this.buttonUser.ButtonDown();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.buttonUser.ButtonUp();
 | |
|                 }
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 DialogFormYesNo msg = new DialogFormYesNo(this.ParentForm.SystemConfig.Language, 12);
 | |
|                 if (msg.ShowDialog() == DialogResult.Yes)
 | |
|                 {
 | |
|                     this.ParentForm.SystemConfig.CurrentUser.Group = DataStore.UserGroup.LogOff;
 | |
|                     this.buttonUser.ButtonUp();
 | |
| 
 | |
|                     //this.DisplayRefresh();
 | |
|                     this.UpdateDisplayUser(this.ParentForm.SystemConfig.CurrentUser, this.ParentForm.CurrentUserGroup);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonBypassDirection_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.buttonBypassDirection.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|                 this.ParentForm.SystemConfig.IsBypassDirectionPass = false;
 | |
|             else
 | |
|                 this.ParentForm.SystemConfig.IsBypassDirectionPass = true;
 | |
|         }
 | |
|         private void buttonBypassOnce_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.buttonBypassOnce.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|             {
 | |
|                 this.ParentForm.SystemConfig.IsBypassOnce = false;
 | |
|                 this.buttonBypassRun.Mode = SmartButton.BUTTONMODE.PUSH;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.ParentForm.SystemConfig.IsBypassOnce = true;
 | |
|                 this.buttonBypassRun.Mode = SmartButton.BUTTONMODE.NORMAL;
 | |
|             }
 | |
|         }
 | |
|         private void buttonBypassRun_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.ParentForm.SystemConfig.IsBypassOnce == true)
 | |
|             {
 | |
|                 if (this.ParentForm.SystemConfig.IsBypassDirectionPass == true)
 | |
|                     this.ParentForm.TransferData(CommunicationCommand.BypassOnce, CommunicationID.MainBoard);
 | |
|                 else
 | |
|                     this.ParentForm.TransferData(CommunicationCommand.ByNGOnce, CommunicationID.MainBoard);
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 if (this.buttonBypassRun.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|                 {
 | |
|                     this.buttonBypassDirection.Enabled = false;
 | |
|                     this.buttonBypassOnce.Enabled = false;
 | |
| 
 | |
|                     if (this.ParentForm.SystemConfig.IsBypassDirectionPass == true)
 | |
|                         this.ParentForm.TransferData(CommunicationCommand.BypassON, CommunicationID.MainBoard);
 | |
|                     else
 | |
|                         this.ParentForm.TransferData(CommunicationCommand.ByNGON, CommunicationID.MainBoard);
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.buttonBypassDirection.Enabled = true;
 | |
|                     this.buttonBypassOnce.Enabled = true;
 | |
| 
 | |
|                     if (this.ParentForm.SystemConfig.IsBypassDirectionPass == true)
 | |
|                         this.ParentForm.TransferData(CommunicationCommand.BypassOFF, CommunicationID.MainBoard);
 | |
|                     else
 | |
|                         this.ParentForm.TransferData(CommunicationCommand.ByNGOFF, CommunicationID.MainBoard);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonSubMenu_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             //if (this.buttonSubMenu.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|             //{
 | |
|             //    this.panelSubMenu.BringToFront();
 | |
|             //    this.panelSubMenu.Visible = true;
 | |
|             //}
 | |
|             //else
 | |
|             //    this.panelSubMenu.Visible = false;
 | |
| 
 | |
|             if (this.SubmenuIndex == 0)
 | |
|             {
 | |
|                 this.panelSubMenu1.BringToFront();
 | |
|                 this.panelSubMenu1.Visible = true;
 | |
| 
 | |
|                 this.panelSubMenu2.Visible = false;
 | |
|                 this.panelSubMenu3.Visible = false;
 | |
| 
 | |
|                 this.SubmenuIndex = 1;
 | |
|             }
 | |
|             else if (this.SubmenuIndex == 1)
 | |
|             {
 | |
|                 this.panelSubMenu2.BringToFront();
 | |
|                 this.panelSubMenu2.Visible = true;
 | |
| 
 | |
|                 this.panelSubMenu1.Visible = false;
 | |
|                 this.panelSubMenu3.Visible = false;
 | |
| 
 | |
|                 this.SubmenuIndex = 2;
 | |
|             }
 | |
|             else if (this.SubmenuIndex == 2)
 | |
|             {
 | |
|                 if (this.ParentForm.SystemConfig.Sorter4Location == 1)
 | |
|                 {
 | |
|                     this.panelSubMenu3.BringToFront();
 | |
|                     this.panelSubMenu3.Visible = true;
 | |
| 
 | |
|                     this.panelSubMenu1.Visible = false;
 | |
|                     this.panelSubMenu2.Visible = false;
 | |
| 
 | |
|                     this.SubmenuIndex = 3;
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.panelSubMenu1.Visible = false;
 | |
|                     this.panelSubMenu2.Visible = false;
 | |
|                     this.panelSubMenu3.Visible = false;
 | |
| 
 | |
|                     this.SubmenuIndex = 0;
 | |
|                 }
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.panelSubMenu1.Visible = false;
 | |
|                 this.panelSubMenu2.Visible = false;
 | |
|                 this.panelSubMenu3.Visible = false;
 | |
| 
 | |
|                 this.SubmenuIndex = 0;
 | |
|             }
 | |
|         }
 | |
|         private void buttonCutSignal_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard);
 | |
|         }
 | |
|         private void buttonHidden_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.ParentForm.SystemConfig.IsLogin == false && this.ParentForm.IsDeveloperMode == false)
 | |
|             {
 | |
|                 this.ParentForm.CurrentUserPasswordType.SetDefinedPassword(OptionPassword.Default);
 | |
|                 DialogFormPasswordKeyPad pass = new DialogFormPasswordKeyPad(this.ParentForm.SystemConfig.Language, this.ParentForm.CurrentUserPasswordType, 8);
 | |
| 
 | |
|                 if (pass.ShowDialog() == DialogResult.OK)
 | |
|                 {
 | |
|                     this.groupBoxJudgmentSetting.Visible = true;
 | |
|                     this.labelFilter.Visible = true;
 | |
|                     this.labelJudgmentDelayTime.Visible = true;
 | |
|                     this.labelJudgmentCount.Visible = true;
 | |
|                     this.labelStaticFilter.Visible = true;
 | |
|                     this.labelStaticJudgmentDelayTime.Visible = true;
 | |
|                     this.labelStaticJudgmentCount.Visible = true;
 | |
|                 }
 | |
|             }
 | |
|             else
 | |
|                 this.groupBoxJudgmentSetting.Visible = true;
 | |
|         }
 | |
| 
 | |
|         private void labelSorter1DelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter1DelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter1DelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter1DelayTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter1DelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5102_Sorter1DelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSorterRunTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter1RunTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter1RunTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter1RunTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter1RunTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5103_Sorter1RunTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSorter2DelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter2DelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter2DelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter2DelayTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter2DelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5105_Sorter2DelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSorter2RunTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter2RunTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter2RunTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter2RunTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter2RunTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5106_Sorter2RunTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSorter3DelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter3DelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter3DelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter3DelayTime = myKeyPad.StringValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter3DelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5108_Sorter3DelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSorter3RunTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter3RunTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter3RunTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter3RunTime = myKeyPad.StringValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter3RunTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5109_Sorter3RunTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSorter4DelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter4DelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter4DelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter4DelayTime = myKeyPad.StringValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter4DelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5111_Sorter4DelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSorter4RunTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSorter4RunTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSorter4RunTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Sorter4RunTime = myKeyPad.StringValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelSorter4RunTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5112_Sorter4RunTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelTotalCount_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             switch (this.ParentForm.SystemConfig.Language)
 | |
|             {
 | |
|                 case DataStore.LanguageID.Korean:
 | |
|                 case DataStore.LanguageID.English:
 | |
|                     if (this.labelTitleTotalCount.Text != "Total")
 | |
|                         this.labelTitleTotalCount.Text = "Total";
 | |
|                     else
 | |
|                         this.labelTitleTotalCount.Text = "Pass";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Chinese:
 | |
|                     if (this.labelTitleTotalCount.Text != "计数")
 | |
|                         this.labelTitleTotalCount.Text = "计数";
 | |
|                     else
 | |
|                         this.labelTitleTotalCount.Text = "通过";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Czech:
 | |
|                     if (this.labelTitleTotalCount.Text != "Celkem")
 | |
|                         this.labelTitleTotalCount.Text = "Celkem";
 | |
|                     else
 | |
|                         this.labelTitleTotalCount.Text = "Váha";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.German:
 | |
|                     if (this.labelTitleTotalCount.Text != "Insgesamt")
 | |
|                         this.labelTitleTotalCount.Text = "Insgesamt";
 | |
|                     else
 | |
|                         this.labelTitleTotalCount.Text = "Bestehen";
 | |
|                     break;
 | |
|                 case DataStore.LanguageID.Japanese:
 | |
|                 if (this.labelTitleTotalCount.Text != "総カウント")
 | |
|                     this.labelTitleTotalCount.Text = "総カウント";
 | |
|                 else
 | |
|                     this.labelTitleTotalCount.Text = "合格";
 | |
|                     break;
 | |
|                 default:
 | |
|                     break;
 | |
|             }
 | |
| 
 | |
|             this.SetTotalCount();
 | |
|         }
 | |
|         private void labelFilter_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelFilter.Text, 2, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 16)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelFilter.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Filter = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelFilter.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoardAll, CommunicationAddress._5001_Filter, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelJudgmentDelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelJudgmentDelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
|             myKeyPad.Location = new Point(300, 90);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelJudgmentDelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.JudgmentDelayTime = myKeyPad.IntValue;
 | |
| 
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelJudgmentDelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoardAll, CommunicationAddress._5002_JudgmentDelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelJudgmentCount_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelJudgmentCount.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 50)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelJudgmentCount.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.JudgmentCount = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelJudgmentCount.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.SubBoardAll, CommunicationAddress._5004_JudgmentCount, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelDischargeStopperRunTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDischargeStopperRunTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelDischargeStopperRunTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.DischargeStopperRunTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelDischargeStopperRunTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5034_DischargeStopperRunTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelDischargeStopperDelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelDischargeStopperDelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelDischargeStopperDelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.DischargeStopperDelayTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelDischargeStopperDelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5034_DischargeStopperDelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelEntryGateRunTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelEntryGateRunTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelEntryGateRunTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.EntryGateRunTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelEntryGateRunTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5033_EntryGateRunTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelEntryGateDelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelEntryGateDelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelEntryGateDelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.EntryGateDelayTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelEntryGateDelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5032_EntryGateDelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelForcedZeroDelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelForcedZeroDelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelForcedZeroDelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.ForcedZeroDelayTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelForcedZeroDelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._4501_ForcedZeroDelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelTurnDelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelTurnDelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelTurnDelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.TurnDelayTime = myKeyPad.IntValue;
 | |
| 
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelTurnDelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5017_TurnDelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveJudgmentSetFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelStopper2DelayTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelStopper2DelayTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelStopper2DelayTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Stopper2DelayTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelStopper2DelayTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5036_Stopper2DelayTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelStopper2RunTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelStopper2RunTime.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 0 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelStopper2RunTime.Text = myKeyPad.StringValue;
 | |
|                     this.ParentForm.CurrentJudgmentSetItem.Stopper2RunTime = myKeyPad.IntValue;
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits4(this.labelStopper2RunTime.Text);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._5037_Stopper2RunTime, value);
 | |
| 
 | |
|                     this.ParentForm.SaveDynamicCorrectionFile(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         private void timerCutSignal_Tick(object sender, EventArgs e)
 | |
|         {
 | |
|             this.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard);
 | |
|         }
 | |
|         private void buttonCut_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.buttonCut.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|                 this.timerCutSignal.Enabled = true;
 | |
|             else
 | |
|                 this.timerCutSignal.Enabled = false;
 | |
|         }
 | |
|         private void labelCutSignalInterval_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelCutSignalInterval.Text, 4, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 9999)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelCutSignalInterval.Text = myKeyPad.StringValue;
 | |
|                     this.timerCutSignal.Interval = myKeyPad.IntValue;
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         private void labelSamplingTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSamplingTime.Text, 2, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 99)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSamplingTime.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.ParentForm.timerSampling.Interval = myKeyPad.IntValue * 60000;
 | |
|                     this.ParentForm.SystemConfig.SamplingTime = myKeyPad.IntValue;
 | |
|                     this.ParentForm.SaveSystemConfigurationFile2(this.ParentForm.SystemConfig);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelSamplingCount_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelSamplingCount.Text, 2, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > 99)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelSamplingCount.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.ParentForm.SystemConfig.SamplingCount = myKeyPad.IntValue;
 | |
|                     this.ParentForm.SaveSystemConfigurationFile2(this.ParentForm.SystemConfig);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonSamplingOnce_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.buttonSamplingOnce.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|             {
 | |
|                 this.ParentForm.SystemConfig.IsSamplingOnce = false;
 | |
|                 this.buttonSampling.Mode = SmartButton.BUTTONMODE.PUSH;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.ParentForm.SystemConfig.IsSamplingOnce = true;
 | |
|                 this.buttonSampling.Mode = SmartButton.BUTTONMODE.NORMAL;
 | |
|             }
 | |
| 
 | |
|             this.ParentForm.SaveSystemConfigurationFile2(this.ParentForm.SystemConfig);
 | |
|         }
 | |
|         private void buttonSampling_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.ParentForm.SystemConfig.IsSamplingOnce == true)
 | |
|             {
 | |
|                 this.ParentForm.TransferData(CommunicationCommand.SamplingSignal, CommunicationID.MainBoard);
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.ParentForm.SystemConfig.SamplingCurrentCount = 0;
 | |
| 
 | |
|                 if (this.buttonSampling.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|                 {
 | |
|                     this.buttonSamplingOnce.Enabled = false;
 | |
|                     this.labelSamplingTime.Enabled = false;
 | |
|                     this.labelSamplingCount.Enabled = false;
 | |
|                     this.labelSamplingTime.BackColor = Color.Gainsboro;
 | |
|                     this.labelSamplingCount.BackColor = Color.Gainsboro;
 | |
|                     this.ParentForm.SystemConfig.IsSamplingRun = true;
 | |
| 
 | |
|                     this.ParentForm.timerSampling.Interval = this.ParentForm.SystemConfig.SamplingTime * 60000;
 | |
|                     this.ParentForm.timerSampling.Enabled = true;
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.buttonSamplingOnce.Enabled = true;
 | |
|                     this.labelSamplingTime.Enabled = true;
 | |
|                     this.labelSamplingCount.Enabled = true;
 | |
|                     this.labelSamplingTime.BackColor = Color.White;
 | |
|                     this.labelSamplingCount.BackColor = Color.White;
 | |
|                     this.ParentForm.SystemConfig.IsSamplingRun = false;
 | |
|                     this.ParentForm.timerSampling.Enabled = false;
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|        
 | |
|         private void buttonLeakSignal_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.ParentForm.SystemConfig.IsLeakSamplingOnce == true)
 | |
|             {
 | |
|                 this.ParentForm.TransferData(CommunicationCommand.LeakSamplingSignal, CommunicationID.MainBoard);
 | |
|                 this.smartTimerLeakRunDelay.Start();
 | |
|                 this.buttonLeakSampling.Enabled = false;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 if (this.buttonLeakSampling.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|                 {
 | |
|                     //this.ParentForm.TransferData(CommunicationCommand.LeakSamplingSignal, CommunicationID.MainBoard);
 | |
| 
 | |
|                     this.buttonLeakSamplingOnce.Enabled = false;
 | |
|                     this.labelLeakSamplingTime.Enabled = false;
 | |
|                     this.labelLeakSamplingTime.BackColor = Color.Gainsboro;
 | |
|                     this.ParentForm.SystemConfig.IsLeakSamplingRun = true;
 | |
| 
 | |
|                     this.ParentForm.timerLeakSampling.Interval = this.ParentForm.SystemConfig.LeakSamplingTime * 60000;
 | |
|                     this.ParentForm.timerLeakSampling.Enabled = true;
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.buttonLeakSamplingOnce.Enabled = true;
 | |
|                     this.labelLeakSamplingTime.Enabled = true;
 | |
|                     this.labelLeakSamplingTime.BackColor = Color.White;
 | |
|                     this.ParentForm.SystemConfig.IsLeakSamplingRun = false;
 | |
|                     this.ParentForm.timerLeakSampling.Enabled = false;
 | |
|                 }
 | |
|             }
 | |
| 
 | |
|         }
 | |
|         private void buttonLeakSamplingOnce_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (this.buttonLeakSamplingOnce.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|             {
 | |
|                 this.ParentForm.SystemConfig.IsLeakSamplingOnce = false;
 | |
|                 this.buttonLeakSampling.Mode = SmartButton.BUTTONMODE.PUSH;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 this.ParentForm.SystemConfig.IsLeakSamplingOnce = true;
 | |
|                 this.buttonLeakSampling.Mode = SmartButton.BUTTONMODE.NORMAL;
 | |
|             }
 | |
| 
 | |
|             this.ParentForm.SaveSystemConfigurationFile2(this.ParentForm.SystemConfig);
 | |
|         }
 | |
|         private void labelLeakSamplingTime_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelLeakSamplingTime.Text, 2, 0, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < 10 || myKeyPad.doubleValue > 99)
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.labelLeakSamplingTime.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.ParentForm.timerLeakSampling.Interval = myKeyPad.IntValue * 60000;
 | |
|                     this.ParentForm.SystemConfig.LeakSamplingTime = myKeyPad.IntValue;
 | |
|                     this.ParentForm.SaveSystemConfigurationFile2(this.ParentForm.SystemConfig);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void smartTimerLeakRunDelay_Tick(object sender, EventArgs e)
 | |
|         {
 | |
|             this.smartTimerLeakRunDelay.Stop();
 | |
|             this.buttonLeakSampling.Enabled = true;
 | |
|         }
 | |
| 
 | |
|         private void labelOverRangeLimit_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelOverRangeLimit.Text, 5, this.ParentForm.SystemConfig.DecimalPlaces, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue < Helper.StringToWeight(this.ParentForm.CurrentProductItem.OverRange, this.ParentForm.SystemConfig.DecimalPlaces))
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.ParentForm.CurrentProductItem.OverRangeLimit = myKeyPad.StringValue.Replace(".", "");
 | |
|                     this.labelOverRangeLimit.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.OverRangeLimit);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2202_OverLimitRange, value);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void labelUnderRangeLimit_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
|             DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.labelUnderRangeLimit.Text, 5, this.ParentForm.SystemConfig.DecimalPlaces, false, this.ParentForm.SystemConfig.Language);
 | |
| 
 | |
|             if (myKeyPad.ShowDialog() == DialogResult.OK)
 | |
|             {
 | |
|                 if (myKeyPad.doubleValue > Helper.StringToWeight(this.ParentForm.CurrentProductItem.UnderRange, this.ParentForm.SystemConfig.DecimalPlaces))
 | |
|                 {
 | |
|                     // 입력범위를 확인하세요
 | |
|                     DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig.Language);
 | |
|                     myMsg.ShowDialog();
 | |
|                 }
 | |
|                 else
 | |
|                 {
 | |
|                     this.ParentForm.CurrentProductItem.UnderRangeLimit = myKeyPad.StringValue.Replace(".", "");
 | |
|                     this.labelUnderRangeLimit.Text = myKeyPad.StringValue;
 | |
| 
 | |
|                     this.ParentForm.SaveProductFile(this.ParentForm.CurrentProductItem, this.ParentForm.SystemConfig.ProductNumber - 1);
 | |
| 
 | |
|                     value = Helper.StringZeroFillDigits7(this.ParentForm.CurrentProductItem.UnderRangeLimit);
 | |
|                     this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._2201_UnderLimitRange, value);
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         private void buttonOnOff_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             string value = "";
 | |
| 
 | |
|             if (this.buttonOnOff.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
 | |
|             {
 | |
|                 value = "0001";
 | |
|                 this.ParentForm.SystemConfig.IsWeightLimitEnable = true;
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 value = "0000";
 | |
|                 this.ParentForm.SystemConfig.IsWeightLimitEnable = false;
 | |
|             }
 | |
| 
 | |
|             this.ParentForm.TransferDataStream(CommunicationCommand.Write, CommunicationID.MainBoard, CommunicationAddress._1023_WeightLimitEnable, value);
 | |
|         }
 | |
| 
 | |
|         private void smartTimerDisplayDelay_Tick(object sender, EventArgs e)
 | |
|         {
 | |
|             this.smartTimerDisplayDelay.Stop();
 | |
| 
 | |
|             this.buttonBarGraphForm.Enabled = true;
 | |
|             this.buttonDotGraphForm.Enabled = true;
 | |
|             this.buttonTableForm.Enabled = true;
 | |
|         }
 | |
|         #endregion
 | |
|     }
 | |
| } |