2020-08-31 02:13:02 +00:00
|
|
|
|
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;
|
2020-08-31 06:52:43 +00:00
|
|
|
|
using ITC81DB_0H.Controls;
|
|
|
|
|
using ITC81DB_0H.DialogForms;
|
2022-07-22 00:43:48 +00:00
|
|
|
|
using ITC81DB_2H_ImageDll;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
using ITC81DB_2H.Datastore;
|
|
|
|
|
using ITC81DB_0H.Part11_UserManager;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2020-08-31 06:52:43 +00:00
|
|
|
|
namespace ITC81DB_0H.Forms
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
public partial class FormMainDisplay : Form
|
|
|
|
|
{
|
|
|
|
|
#region Field
|
|
|
|
|
private FormMain m_ParentForm;
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public bool IsCurrentValueDouble;
|
|
|
|
|
private Define.E_MainDisplayStore CurrentDisplay;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-06-21 10:11:37 +00:00
|
|
|
|
public ControlMainDisplayAlarm MainAlarm;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
public ControlMainDisplayWeightBigScreen MainDisplayWeightBigScreen;
|
|
|
|
|
public ControlMainDisplayWeightSmall MainDisplayWeightSmall;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public ControlMainDisplayStopDataStatistics MainDataStatistics;
|
|
|
|
|
public ControlMainDisplayStart MainBarGraph;
|
|
|
|
|
public ControlMainDisplayStartGraph MainLineGraph;
|
|
|
|
|
public ControlMainDisplayStartList MainList;
|
|
|
|
|
public ControlMainDisplayMenu MainSubMenu;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
public ControlMainDisplayFeedback MainDisplayFeedback;
|
2023-02-23 08:34:29 +00:00
|
|
|
|
public ControlMainDisplayModbus MainDisplayModbus;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Constructor
|
|
|
|
|
public FormMainDisplay(FormMain parent)
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
this.ParentForm = parent;
|
|
|
|
|
|
|
|
|
|
this.InitializeDesign();
|
|
|
|
|
this.DefaultSetting();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Property
|
|
|
|
|
public FormMain ParentForm
|
|
|
|
|
{
|
|
|
|
|
get { return this.m_ParentForm; }
|
|
|
|
|
private set { this.m_ParentForm = value; }
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Method
|
|
|
|
|
public void InitializeDesign()
|
|
|
|
|
{
|
|
|
|
|
Class1 images = new Class1();
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.English)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
this.buttonZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayZeroDisable));
|
|
|
|
|
this.buttonZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayZeroDown));
|
|
|
|
|
this.buttonZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayZeroUp));
|
|
|
|
|
this.buttonPrint.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayPrintDisable));
|
|
|
|
|
this.buttonPrint.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayPrintDown));
|
|
|
|
|
this.buttonPrint.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayPrintUp));
|
|
|
|
|
this.buttonWeightInputMode.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayDeviationUp));
|
|
|
|
|
this.buttonWeightInputMode.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayWeightUp));
|
|
|
|
|
this.buttonClear.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayClearDisable));
|
|
|
|
|
this.buttonClear.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayClearDown));
|
|
|
|
|
this.buttonClear.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayClearUp));
|
|
|
|
|
this.buttonUser.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayLoginDisable));
|
|
|
|
|
this.buttonUser.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayLogOutDown));
|
|
|
|
|
this.buttonUser.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayLoginUp));
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Chinese)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
this.buttonZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainZeroDisable));
|
|
|
|
|
this.buttonZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainZeroDown));
|
|
|
|
|
this.buttonZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainZeroUp));
|
|
|
|
|
this.buttonPrint.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainPrintDisable));
|
|
|
|
|
this.buttonPrint.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainPrintDown));
|
|
|
|
|
this.buttonPrint.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainPrintUp));
|
|
|
|
|
this.buttonWeightInputMode.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainDeviationUp));
|
|
|
|
|
this.buttonWeightInputMode.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainWeightUp));
|
|
|
|
|
this.buttonClear.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainClearDisable));
|
|
|
|
|
this.buttonClear.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainClearDown));
|
|
|
|
|
this.buttonClear.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainClearUp));
|
|
|
|
|
this.buttonUser.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainLoginDisable));
|
|
|
|
|
this.buttonUser.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainLogOutDown));
|
|
|
|
|
this.buttonUser.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.chnMainLoginUp));
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Czech)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Russian)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
this.buttonZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayZeroDisable));
|
|
|
|
|
this.buttonZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayZeroDown));
|
|
|
|
|
this.buttonZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayZeroUp));
|
|
|
|
|
this.buttonPrint.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayPrintDisable));
|
|
|
|
|
this.buttonPrint.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayPrintDown));
|
|
|
|
|
this.buttonPrint.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayPrintUp));
|
|
|
|
|
this.buttonWeightInputMode.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayDeviationUp));
|
|
|
|
|
this.buttonWeightInputMode.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayWeightUp));
|
|
|
|
|
this.buttonClear.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayClearDisable));
|
|
|
|
|
this.buttonClear.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayClearDown));
|
|
|
|
|
this.buttonClear.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayClearUp));
|
|
|
|
|
this.buttonUser.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayLoginDisable));
|
|
|
|
|
this.buttonUser.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayLogOutDown));
|
|
|
|
|
this.buttonUser.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.rusFormMainDisplayLoginUp));
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.German)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
this.buttonZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayZeroDisable));
|
|
|
|
|
this.buttonZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayZeroDown));
|
|
|
|
|
this.buttonZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayZeroUp));
|
|
|
|
|
this.buttonPrint.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayPrintDisable));
|
|
|
|
|
this.buttonPrint.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayPrintDown));
|
|
|
|
|
this.buttonPrint.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayPrintUp));
|
|
|
|
|
this.buttonWeightInputMode.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayDeviationUp));
|
|
|
|
|
this.buttonWeightInputMode.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayWeightUp));
|
|
|
|
|
this.buttonClear.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayClearDisable));
|
|
|
|
|
this.buttonClear.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayClearDown));
|
|
|
|
|
this.buttonClear.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayClearUp));
|
|
|
|
|
this.buttonUser.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayLoginDisable));
|
|
|
|
|
this.buttonUser.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayLogOutDown));
|
|
|
|
|
this.buttonUser.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.gerFormMainDisplayLoginUp));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.buttonZero.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayZeroDisable));
|
|
|
|
|
this.buttonZero.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayZeroDown));
|
|
|
|
|
this.buttonZero.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayZeroUp));
|
|
|
|
|
this.buttonPrint.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayPrintDisable));
|
|
|
|
|
this.buttonPrint.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayPrintDown));
|
|
|
|
|
this.buttonPrint.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayPrintUp));
|
|
|
|
|
this.buttonWeightInputMode.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayDeviationUp));
|
|
|
|
|
this.buttonWeightInputMode.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayWeightUp));
|
|
|
|
|
this.buttonClear.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayClearDisable));
|
|
|
|
|
this.buttonClear.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayClearDown));
|
|
|
|
|
this.buttonClear.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.korFormMainDisplayClearUp));
|
|
|
|
|
this.buttonUser.DisableImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayLoginDisable));
|
|
|
|
|
this.buttonUser.DownImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayLogOutDown));
|
|
|
|
|
this.buttonUser.UpImage = new Bitmap(images.GetImage(Class1.ButtonImages.engFormMainDisplayLoginUp));
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.CurrentSystemStatus.CurrentWeightInputMode == Define.E_WeightInputMode.Deviation)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.buttonWeightInputMode.ButtonDown();
|
|
|
|
|
else
|
|
|
|
|
this.buttonWeightInputMode.ButtonUp();
|
|
|
|
|
}
|
|
|
|
|
private void InitializeControl()
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.IsCurrentValueDouble = false;
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen = new ControlMainDisplayWeightBigScreen(this);
|
|
|
|
|
this.MainDisplayWeightSmall = new ControlMainDisplayWeightSmall(this);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainDataStatistics = new ControlMainDisplayStopDataStatistics(this);
|
|
|
|
|
this.MainBarGraph = new ControlMainDisplayStart(this);
|
|
|
|
|
this.MainLineGraph = new ControlMainDisplayStartGraph(this);
|
|
|
|
|
this.MainList = new ControlMainDisplayStartList(this);
|
|
|
|
|
this.MainSubMenu = new ControlMainDisplayMenu(this);
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.MainAlarm = new ControlMainDisplayAlarm();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayFeedback = new ControlMainDisplayFeedback(this);
|
2023-02-23 08:34:29 +00:00
|
|
|
|
this.MainDisplayModbus = new ControlMainDisplayModbus(this);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.MainDisplayWeightBigScreen.Location = new Point(0, 65);
|
|
|
|
|
this.MainDisplayWeightSmall.Location = new Point(0, 65);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainDataStatistics.Location = new Point(0, 313);
|
|
|
|
|
this.MainBarGraph.Location = new Point(0, 313);
|
|
|
|
|
this.MainLineGraph.Location = new Point(0, 313);
|
|
|
|
|
this.MainList.Location = new Point(0, 213);
|
|
|
|
|
this.MainSubMenu.Location = new Point(0, 213);
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.MainAlarm.Location = new Point(390, 60);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayFeedback.Location = new Point(0, 313);
|
2023-02-23 08:34:29 +00:00
|
|
|
|
this.MainDisplayModbus.Location = new Point(0, 213);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.Controls.Add(this.MainDisplayWeightBigScreen);
|
|
|
|
|
this.Controls.Add(this.MainDisplayWeightSmall);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.Controls.Add(this.MainDataStatistics);
|
|
|
|
|
this.Controls.Add(this.MainBarGraph);
|
|
|
|
|
this.Controls.Add(this.MainLineGraph);
|
|
|
|
|
this.Controls.Add(this.MainList);
|
|
|
|
|
this.Controls.Add(this.MainSubMenu);
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.Controls.Add(this.MainAlarm);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.Controls.Add(this.MainDisplayFeedback);
|
2023-02-23 08:34:29 +00:00
|
|
|
|
this.Controls.Add(this.MainDisplayModbus);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsLogin == true)
|
|
|
|
|
{
|
|
|
|
|
this.labelUserID.Visible = true;
|
|
|
|
|
this.labelUserLevel.Visible = true;
|
|
|
|
|
this.buttonUser.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.labelUserID.Visible = false;
|
|
|
|
|
this.labelUserLevel.Visible = false;
|
|
|
|
|
this.buttonUser.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void DefaultSetting()
|
|
|
|
|
{
|
|
|
|
|
if (this.ParentForm.IsBootingComplete == false)
|
|
|
|
|
this.buttonProductNo.Text = "**";
|
|
|
|
|
else
|
|
|
|
|
this.buttonProductNo.Text = this.ParentForm.SystemConfig1.ProductNumber.ToString();
|
|
|
|
|
|
|
|
|
|
this.pictureBoxStop.Visible = true;
|
|
|
|
|
this.pictureBoxStart.Visible = false;
|
|
|
|
|
|
|
|
|
|
this.InitializeControl();
|
|
|
|
|
|
|
|
|
|
// 알람 표시
|
|
|
|
|
this.pictureBoxIconAlarm.Visible = false;
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.MainAlarm.Visible = false;
|
|
|
|
|
this.MainAlarm.BringToFront();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.buttonPrint.Visible = this.ParentForm.SystemConfig1.IsPrinterEnable;
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsPrintPerProductEnable == true)
|
|
|
|
|
this.buttonPrint.ButtonDown();
|
|
|
|
|
else
|
|
|
|
|
this.buttonPrint.ButtonUp();
|
|
|
|
|
|
|
|
|
|
if (int.Parse(this.ParentForm.CurrentSystemParameter1.EquipmentType) == 4)
|
|
|
|
|
this.buttonConveyorUpDown.Visible = true;
|
|
|
|
|
else
|
|
|
|
|
this.buttonConveyorUpDown.Visible = false;
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsLogin == true)
|
|
|
|
|
this.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
else
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.ParentForm.CurrentSystemStatus.CurrentUser.Group = Define.E_UserGroup.Admin;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.BarGraph;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DisplayHiddenMenu(bool visible)
|
|
|
|
|
{
|
|
|
|
|
if (visible == false)
|
|
|
|
|
{
|
|
|
|
|
this.labelBarcode.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.labelBarcode.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-23 08:34:29 +00:00
|
|
|
|
public void BottomButtonLocation(int buttonNo, SmartX.SmartButton button)
|
|
|
|
|
{
|
|
|
|
|
switch (buttonNo)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
button.Location = new Point(385, 0);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
button.Location = new Point(456, 0);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
button.Location = new Point(527, 0);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-06-21 10:11:37 +00:00
|
|
|
|
public void AlarmOccurs(string errorNameKor, string errorNameEng)
|
|
|
|
|
{
|
|
|
|
|
if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Korean)
|
|
|
|
|
{
|
|
|
|
|
this.MainAlarm.listBoxMessage.Items.Add(errorNameKor);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.MainAlarm.listBoxMessage.Items.Add(errorNameEng);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-08-31 02:13:02 +00:00
|
|
|
|
public void UpdateDisplayAlarmView(WeightData data)
|
|
|
|
|
{
|
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateDisplayAlarmView(this.ParentForm.CurrentWeightData);
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateDisplayAlarmView(this.ParentForm.CurrentWeightData);
|
|
|
|
|
|
|
|
|
|
if (data.IsLoadCellError == true || data.IsInverterError == true || data.IsEmergencyStop == true || data.IsDoorInterlock == true
|
|
|
|
|
|| data.IsPressureSensingError == true || data.IsSorterError == true || data.IsStackUpSensorError == true
|
|
|
|
|
|| data.IsEntrySensorError == true)
|
|
|
|
|
{
|
|
|
|
|
if (this.pictureBoxIconAlarm.Visible == false)
|
|
|
|
|
this.pictureBoxIconAlarm.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.pictureBoxIconAlarm.Visible = false;
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.MainAlarm.Visible = false;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.labelSorterAlarm.Visible = false;
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsExternalInputLamp == true && this.ParentForm.IsLampOnDataSend == true)
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.LampOnContinuousDisable, CommunicationID.MainBoard);
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsExternalInputBuzzer == true && this.ParentForm.IsBuzzerOnDataSend == true)
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.BuzzerOnContinuousDisable, CommunicationID.MainBoard);
|
|
|
|
|
|
|
|
|
|
this.ParentForm.IsLampOnDataSend = false;
|
|
|
|
|
this.ParentForm.IsBuzzerOnDataSend = false;
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.MainAlarm.listBoxMessage.Items.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
if (data.IsLoadCellError == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("a2_로드셀 에러", "a2_LoadCell Error");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (data.IsInverterError == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("a9_인버터 에러", "a9_Inverter Error");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (data.IsEmergencyStop == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("a8_비상정지", "a8_Emergency Stop");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (data.IsDoorInterlock == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("a4_문 열림 감지", "a4_Door Interlock");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (data.IsPressureSensingError == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("a3_공압 낮음", "a3_Low Pressure");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (data.IsEntrySensorError == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("a1_진입센서 에러", "a1_Entry Sensor Error");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (data.IsSorterError == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("7_선별부 에러", "a7_Sorter Error");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (data.IsStackUpSensorError == true)
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.AlarmOccurs("a6_적체 에러", "a6_Stack up Error");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
public void ProductChange(int productNumber)
|
|
|
|
|
{
|
|
|
|
|
this.buttonProductNo.Text = "**";
|
|
|
|
|
|
|
|
|
|
this.ParentForm.TransferProductParameter(productNumber);
|
|
|
|
|
}
|
|
|
|
|
public void RescaleControl(ProductItem item)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainBarGraph.RescaleProgressBar(item);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
public void ClearCurrentData()
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.CurrentWeightData.ClearCount();
|
|
|
|
|
this.ParentForm.SaveCounterFile(this.ParentForm.CurrentWeightData, this.ParentForm.SystemConfig1.ProductNumber - 1);
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainBarGraph != null)
|
|
|
|
|
this.MainBarGraph.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainLineGraph != null)
|
|
|
|
|
this.MainLineGraph.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainList != null)
|
|
|
|
|
this.MainList.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainDataStatistics != null)
|
|
|
|
|
this.MainDataStatistics.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.ParentForm.ClearAlarm(0);
|
|
|
|
|
}
|
|
|
|
|
public void ClearAllData()
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < this.ParentForm.ProductCount; i++)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.CollectionWeightData[i].ClearCount();
|
|
|
|
|
this.ParentForm.SaveCounterFile(this.ParentForm.CollectionWeightData);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainBarGraph != null)
|
|
|
|
|
this.MainBarGraph.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainLineGraph != null)
|
|
|
|
|
this.MainLineGraph.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainList != null)
|
|
|
|
|
this.MainList.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainDataStatistics != null)
|
|
|
|
|
this.MainDataStatistics.Clear();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
2023-02-23 08:34:29 +00:00
|
|
|
|
public void Clear()
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.ClearQueue();
|
|
|
|
|
|
|
|
|
|
this.ClearCurrentData();
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.Clear, CommunicationID.SubBoard1);
|
|
|
|
|
}
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-02-27 11:52:59 +00:00
|
|
|
|
public void TimerDetectConnected(bool bValue)
|
|
|
|
|
{
|
|
|
|
|
if (bValue == true)
|
|
|
|
|
{
|
2023-03-05 22:42:06 +00:00
|
|
|
|
//this.timerClientConnectCheck.Enabled = false;
|
|
|
|
|
if (this.timerClientConnectCheck.Enabled == false)
|
|
|
|
|
this.timerClientConnectCheck.Enabled = true;
|
2023-02-27 11:52:59 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2023-03-05 22:42:06 +00:00
|
|
|
|
if (this.timerClientConnectCheck.Enabled == true)
|
|
|
|
|
this.timerClientConnectCheck.Enabled = false;
|
2023-02-27 11:52:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void UpdateDisplayUser(SystemStatus status)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
string id = "", group = "", expireDate = "";
|
|
|
|
|
|
|
|
|
|
this.labelExpireOfPassword.Visible = true;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
switch (status.CurrentUser.Group)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_UserGroup.LogOut:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
id = "";
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.German)
|
|
|
|
|
group = "Ausloggen";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Chinese)
|
|
|
|
|
group = "登出";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Russian)
|
|
|
|
|
group = "Выйти.";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Spanish)
|
|
|
|
|
group = "Cerrar sesión";
|
2020-08-31 02:13:02 +00:00
|
|
|
|
else
|
2023-05-24 04:16:07 +00:00
|
|
|
|
group = "Log out";
|
|
|
|
|
|
|
|
|
|
this.labelExpireOfPassword.Visible = false;
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
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.labelProductName.Enabled = false;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.buttonSubMenu.Enabled = false;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_UserGroup.Level1:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
id = status.CurrentUser.ID;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
group = this.ParentForm.SystemConfig2.UserGroupLevel1Name;
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOn)
|
|
|
|
|
this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOn;
|
|
|
|
|
|
|
|
|
|
this.buttonUser.ButtonDown();
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplaySubMenu;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (status.Equipment == Define.E_EquipmentStatus.Stop)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.buttonMenu.Enabled = true;
|
|
|
|
|
else
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_UserGroup.Level2:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
id = status.CurrentUser.ID;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
group = this.ParentForm.SystemConfig2.UserGroupLevel2Name;
|
|
|
|
|
|
|
|
|
|
if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOn)
|
|
|
|
|
this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOn;
|
|
|
|
|
|
|
|
|
|
this.buttonUser.ButtonDown();
|
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplaySubMenu;
|
|
|
|
|
|
|
|
|
|
if (status.Equipment == Define.E_EquipmentStatus.Stop)
|
|
|
|
|
this.buttonMenu.Enabled = true;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
else
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_UserGroup.Level3:
|
|
|
|
|
id = status.CurrentUser.ID;
|
|
|
|
|
group = this.ParentForm.SystemConfig2.UserGroupLevel3Name;
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.labelUserLevel.ForeColor != this.ParentForm.ColorLogOn)
|
|
|
|
|
this.labelUserLevel.ForeColor = this.labelUserID.ForeColor = this.ParentForm.ColorLogOn;
|
|
|
|
|
|
|
|
|
|
this.buttonUser.ButtonDown();
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplaySubMenu;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (status.Equipment == Define.E_EquipmentStatus.Stop)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.buttonMenu.Enabled = true;
|
|
|
|
|
else
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_UserGroup.Admin:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
id = status.CurrentUser.ID;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.German)
|
|
|
|
|
group = "Administrator";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Chinese)
|
|
|
|
|
group = "行政";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Russian)
|
|
|
|
|
group = "Администратор";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Spanish)
|
|
|
|
|
group = "Administrator";
|
2020-08-31 02:13:02 +00:00
|
|
|
|
else
|
2023-05-24 04:16:07 +00:00
|
|
|
|
group = "Administrator";
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
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.labelProductName.Enabled = true;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.buttonSubMenu.Enabled = true;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (status.Equipment == Define.E_EquipmentStatus.Stop)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.buttonMenu.Enabled = true;
|
|
|
|
|
else
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_UserGroup.Developer:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
id = status.CurrentUser.ID;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.German)
|
|
|
|
|
group = "Entwickler";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Chinese)
|
|
|
|
|
group = "开发商";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Russian)
|
|
|
|
|
group = "Разработчик";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Spanish)
|
|
|
|
|
group = "Desarrollador";
|
2020-08-31 02:13:02 +00:00
|
|
|
|
else
|
2023-05-24 04:16:07 +00:00
|
|
|
|
group = "Developer";
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
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.labelProductName.Enabled = true;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.buttonSubMenu.Enabled = true;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (status.Equipment == Define.E_EquipmentStatus.Stop)
|
|
|
|
|
this.buttonMenu.Enabled = true;
|
|
|
|
|
else
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_UserGroup.NotLogin:
|
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplaySubMenu;
|
|
|
|
|
|
|
|
|
|
this.labelExpireOfPassword.Visible = false;
|
|
|
|
|
|
|
|
|
|
if (status.Equipment == Define.E_EquipmentStatus.Stop)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.buttonMenu.Enabled = true;
|
|
|
|
|
else
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
id = "";
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.German)
|
|
|
|
|
group = "Ausloggen";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Chinese)
|
|
|
|
|
group = "登出";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Russian)
|
|
|
|
|
group = "Выйти.";
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.Language == Define.E_LanguageID.Spanish)
|
|
|
|
|
group = "Cerrar sesión";
|
2020-08-31 02:13:02 +00:00
|
|
|
|
else
|
2023-05-24 04:16:07 +00:00
|
|
|
|
group = "Log out";
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
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.buttonMenu.Enabled = false;
|
|
|
|
|
this.labelProductName.Enabled = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.SystemConfig1.IsLogin == true)
|
|
|
|
|
{
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
{
|
|
|
|
|
expireDate = this.DisplayExpireOfPassword(status.CurrentUser.Group);
|
|
|
|
|
if (expireDate != "-")
|
|
|
|
|
{
|
|
|
|
|
int intExpireDate = int.Parse(expireDate);
|
|
|
|
|
|
|
|
|
|
if (intExpireDate == 0)
|
|
|
|
|
{
|
|
|
|
|
this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOff;
|
|
|
|
|
this.labelExpireOfPassword.Text = "D-0";
|
|
|
|
|
}
|
|
|
|
|
else if (intExpireDate < 0)
|
|
|
|
|
{
|
2023-06-21 10:11:37 +00:00
|
|
|
|
if (intExpireDate * -1 > this.ParentForm.CurrentSystemStatus.CurrentUser.ExpirePassword)
|
|
|
|
|
expireDate = "-" + (this.ParentForm.CurrentSystemStatus.CurrentUser.ExpirePassword - 1).ToString();
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.labelExpireOfPassword.Text = "D" + expireDate;
|
|
|
|
|
if (intExpireDate >= -10)
|
|
|
|
|
this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOff;
|
|
|
|
|
else
|
|
|
|
|
this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn;
|
|
|
|
|
this.labelExpireOfPassword.Text = "D+" + expireDate;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn;
|
|
|
|
|
this.labelExpireOfPassword.Text = "-";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.labelExpireOfPassword.ForeColor = this.ParentForm.ColorLogOn;
|
|
|
|
|
this.labelExpireOfPassword.Text = "-";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.labelUserLevel.Text != group)
|
|
|
|
|
this.labelUserLevel.Text = group;
|
|
|
|
|
if (this.labelUserID.Text != id)
|
|
|
|
|
this.labelUserID.Text = id;
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void UpdateEquipmentStatusDisplay(Define.E_EquipmentStatus status)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (status == Define.E_EquipmentStatus.Start)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
this.pictureBoxStart.Visible = true;
|
|
|
|
|
this.pictureBoxStop.Visible = false;
|
|
|
|
|
this.buttonProductNo.Enabled = false;
|
|
|
|
|
this.labelProductName.Enabled = false;
|
|
|
|
|
|
|
|
|
|
this.buttonConveyorUpDown.Enabled = false;
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainBarGraph.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
this.MainLineGraph.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
this.MainList.UpdateEquipmentStatusDisplay(status);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
//this.CurrentDisplay = Define.E_MainDisplayStore.DisplayStartBarGraph;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
//this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.pictureBoxStart.Visible = false;
|
|
|
|
|
this.pictureBoxStop.Visible = true;
|
|
|
|
|
|
|
|
|
|
this.buttonConveyorUpDown.Enabled = true;
|
|
|
|
|
this.buttonConveyorUpDown.ButtonUp();
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.ParentForm.CurrentSystemStatus.CurrentUser.Group == Define.E_UserGroup.LogOut)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
this.buttonProductNo.Enabled = false;
|
|
|
|
|
this.labelProductName.Enabled = false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.buttonProductNo.Enabled = true;
|
|
|
|
|
this.labelProductName.Enabled = true;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainBarGraph.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
this.MainLineGraph.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
this.MainList.UpdateEquipmentStatusDisplay(status);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateEquipmentStatusDisplay(status);
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
//this.CurrentDisplay = Define.E_MainDisplayStore.DisplayStartBarGraph;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
//this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void UpdateCurrentProductDisplay(Define.E_EquipmentStatus status, ProductItem pItem, WeightData wData)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
string value = "";
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
if (this.MainDisplayWeightBigScreen != null)
|
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateCurrentProductDisplay(status, pItem, wData);
|
|
|
|
|
if (this.MainDisplayWeightSmall != null)
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateCurrentProductDisplay(status, pItem, wData);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainBarGraph != null)
|
|
|
|
|
this.MainBarGraph.UpdateCurrentProductDisplay(status, pItem, wData);
|
|
|
|
|
if (this.MainLineGraph != null)
|
|
|
|
|
this.MainLineGraph.UpdateCurrentProductDisplay(status, pItem, wData);
|
|
|
|
|
if (this.MainList != null)
|
|
|
|
|
this.MainList.UpdateCurrentProductDisplay(status, pItem, wData);
|
|
|
|
|
if (this.MainDataStatistics != null)
|
|
|
|
|
this.MainDataStatistics.UpdateCurrentProductDisplay(status, pItem, wData);
|
|
|
|
|
if(this.MainSubMenu != null && this.CurrentDisplay == Define.E_MainDisplayStore.SubMenu)
|
|
|
|
|
this.MainSubMenu.UpdateControl(this.ParentForm.CurrentJudgmentSetItem, this.ParentForm.CurrentSystemParameter4);
|
|
|
|
|
}
|
|
|
|
|
public void UpdateStopWeightDisplay(Define.E_EquipmentStatus status, WeightData data)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
string value = "";
|
|
|
|
|
|
|
|
|
|
// 알람표시
|
|
|
|
|
this.UpdateDisplayAlarmView(data);
|
|
|
|
|
|
|
|
|
|
if (this.MainDisplayWeightBigScreen != null)
|
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateStopWeightDisplay(status, data);
|
|
|
|
|
if (this.MainDisplayWeightSmall != null)
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateStopWeightDisplay(status, data);
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void UpdateStartWeightDisplay(Define.E_EquipmentStatus status, ProductItem pItem, WeightData wData)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
string value = "";
|
|
|
|
|
|
|
|
|
|
// 알람표시
|
|
|
|
|
this.UpdateDisplayAlarmView(wData);
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (wData.JudgmentStatus == Define.E_JudgmentStatus.Empty)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (this.MainDisplayWeightBigScreen != null)
|
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateStartWeightDisplay(status, wData);
|
|
|
|
|
if (this.MainDisplayWeightSmall != null)
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateStartWeightDisplay(status, wData);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.MainBarGraph != null)
|
|
|
|
|
this.MainBarGraph.UpdateStartWeightDisplay(status, wData);
|
|
|
|
|
if (this.MainLineGraph != null)
|
|
|
|
|
this.MainLineGraph.UpdateStartWeightDisplay(status, wData);
|
|
|
|
|
if (this.MainList != null)
|
|
|
|
|
this.MainList.UpdateStartWeightDisplay(status, pItem, wData);
|
|
|
|
|
if (this.MainDataStatistics != null)
|
|
|
|
|
this.MainDataStatistics.UpdateStartWeightDisplay(status, wData);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
2023-02-23 08:34:29 +00:00
|
|
|
|
public void ChangeProductNumber(int productNumber)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingParameter.ProductNumber, "",
|
|
|
|
|
this.ParentForm.SystemConfig1.ProductNumber.ToString(), productNumber.ToString());
|
|
|
|
|
|
2023-02-23 08:34:29 +00:00
|
|
|
|
this.ParentForm.ClearAlarm(0);
|
|
|
|
|
this.SendCommProductChange(productNumber);
|
|
|
|
|
}
|
|
|
|
|
public void SendCommProductChange(int productNumber)
|
|
|
|
|
{
|
|
|
|
|
this.buttonProductNo.Text = "**";
|
|
|
|
|
this.ParentForm.TransferProductParameter(productNumber);
|
|
|
|
|
}
|
2020-08-31 02:13:02 +00:00
|
|
|
|
public void UpdateBarcodeDisplay(Barcode barcode)
|
|
|
|
|
{
|
|
|
|
|
if (this.MainDisplayWeightBigScreen != null)
|
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateBarcodeDisplay(barcode);
|
|
|
|
|
if (this.MainDisplayWeightSmall != null)
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateBarcodeDisplay(barcode);
|
|
|
|
|
}
|
|
|
|
|
public void UpdateEthernetStatusDisplay(bool status)
|
|
|
|
|
{
|
|
|
|
|
if (this.MainDisplayWeightBigScreen != null)
|
|
|
|
|
this.MainDisplayWeightBigScreen.UpdateEthernetStatusDisplay(status);
|
|
|
|
|
if (this.MainDisplayWeightSmall != null)
|
|
|
|
|
this.MainDisplayWeightSmall.UpdateEthernetStatusDisplay(status);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void UpdateMainDisplay(SystemStatus status)
|
|
|
|
|
{
|
|
|
|
|
switch (status.CurrentUser.Group)
|
|
|
|
|
{
|
|
|
|
|
case Define.E_UserGroup.LogOut:
|
|
|
|
|
this.buttonProductNo.Enabled = false;
|
|
|
|
|
this.buttonClear.Enabled = false;
|
|
|
|
|
this.labelProductName.Enabled = false;
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_UserGroup.Level1:
|
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.Level1.IsMainDisplaySubMenu;
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_UserGroup.Level2:
|
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.Level2.IsMainDisplaySubMenu;
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_UserGroup.Level3:
|
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.Level3.IsMainDisplaySubMenu;
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_UserGroup.Admin:
|
|
|
|
|
case Define.E_UserGroup.Developer:
|
|
|
|
|
this.buttonProductNo.Enabled = true;
|
|
|
|
|
this.buttonClear.Enabled = true;
|
|
|
|
|
this.labelProductName.Enabled = true;
|
|
|
|
|
this.buttonSubMenu.Enabled = true;
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_UserGroup.NotLogin:
|
|
|
|
|
this.buttonProductNo.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayProductNo;
|
|
|
|
|
this.labelProductName.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayProductNo;
|
|
|
|
|
this.buttonClear.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplayClear;
|
|
|
|
|
this.buttonSubMenu.Enabled = this.ParentForm.CurrentUserGroup.NotLogin.IsMainDisplaySubMenu;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
this.buttonUser.ButtonUp();
|
|
|
|
|
this.buttonProductNo.Enabled = false;
|
|
|
|
|
this.buttonClear.Enabled = false;
|
|
|
|
|
this.buttonMenu.Enabled = false;
|
|
|
|
|
this.labelProductName.Enabled = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Login()
|
|
|
|
|
{
|
|
|
|
|
int extract = 0;
|
|
|
|
|
|
|
|
|
|
DialogFormLogOn logOn = new DialogFormLogOn(this.ParentForm, this.ParentForm.SystemConfig1.Language, this.ParentForm.SystemConfig3.IsPart11);
|
|
|
|
|
if (logOn.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.ChildFormMenu.CenterEquipUserGroupEditor.UpdateAllMenu(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
this.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
|
|
|
|
|
this.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
this.ParentForm.ChildFormMenu.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
|
|
|
|
|
this.buttonUser.ButtonDown();
|
|
|
|
|
|
|
|
|
|
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.Login, "");
|
|
|
|
|
|
|
|
|
|
switch (this.CurrentDisplay)
|
|
|
|
|
{
|
|
|
|
|
case Define.E_MainDisplayStore.SubMenu:
|
|
|
|
|
this.MainSubMenu.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.BarGraph:
|
|
|
|
|
this.MainBarGraph.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.LineGraph:
|
|
|
|
|
this.MainLineGraph.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.List:
|
|
|
|
|
this.MainList.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.DataStat:
|
|
|
|
|
this.MainDataStatistics.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.buttonUser.ButtonUp();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public void Logout()
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.CurrentSystemStatus.CurrentUser.Group = Define.E_UserGroup.LogOut;
|
|
|
|
|
this.buttonUser.ButtonUp();
|
|
|
|
|
|
|
|
|
|
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.Logout, "");
|
|
|
|
|
|
|
|
|
|
this.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
this.UpdateDisplayUser(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
|
|
|
|
|
switch (this.CurrentDisplay)
|
|
|
|
|
{
|
|
|
|
|
case Define.E_MainDisplayStore.SubMenu:
|
|
|
|
|
this.MainSubMenu.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.BarGraph:
|
|
|
|
|
this.MainBarGraph.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.LineGraph:
|
|
|
|
|
this.MainLineGraph.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.List:
|
|
|
|
|
this.MainList.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_MainDisplayStore.DataStat:
|
|
|
|
|
this.MainDataStatistics.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public void Part11AutomaticLogoutReset()
|
|
|
|
|
{
|
|
|
|
|
UserManager.UserManager_AutoLogoutTimeoutReset();
|
|
|
|
|
}
|
|
|
|
|
private bool UI_Invoke(ThreadStart invoker)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (this.InvokeRequired)
|
|
|
|
|
{
|
|
|
|
|
if (this.IsDisposed)
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
this.Invoke(invoker);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
invoker();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string DisplayExpireOfPassword(Define.E_UserGroup group)
|
|
|
|
|
{
|
|
|
|
|
string ret = "";
|
|
|
|
|
|
|
|
|
|
if (group == Define.E_UserGroup.Admin || group == Define.E_UserGroup.Developer)
|
|
|
|
|
ret = "-";
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TimeSpan resultTime = DateTime.Now - this.ParentForm.CurrentSystemStatus.CurrentUser.DateExpireRegister;
|
|
|
|
|
ret = resultTime.Days.ToString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
2023-06-21 10:11:37 +00:00
|
|
|
|
public void CallBackUserListModifyInfoData(UserManager.UserMgr_user_info_t user)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.CurrentSystemStatus.CurrentUser.DateExpireRegister = DateTime.Now.AddDays(this.ParentForm.CurrentSystemStatus.CurrentUser.ExpirePassword - 1);
|
|
|
|
|
this.DisplayExpireOfPassword(this.ParentForm.CurrentSystemStatus.CurrentUser.Group);
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void CallBackUserListLoginTimeoutDataEvent(UserManager.UserMgr_login_timeout_t user)
|
|
|
|
|
{
|
|
|
|
|
string code = "", message1 = "", message2 = "";
|
|
|
|
|
int warningTime = 0;
|
|
|
|
|
|
|
|
|
|
if (user.remainder_time != 0)
|
|
|
|
|
{
|
|
|
|
|
switch (this.ParentForm.SystemConfig1.Language)
|
|
|
|
|
{
|
|
|
|
|
case Define.E_LanguageID.Korean:
|
|
|
|
|
code = "로그인";
|
|
|
|
|
message1 = "잠시 후에 로그아웃 됩니다.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.English:
|
|
|
|
|
code = "Login";
|
|
|
|
|
message1 = "You will be logged out after a while.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.Chinese:
|
|
|
|
|
code = "登录";
|
|
|
|
|
message1 = "您将在一段时间后退出.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.Russian:
|
|
|
|
|
code = "Авторизоваться";
|
|
|
|
|
message1 = "Вы выйдете из системы через";
|
|
|
|
|
message2 = "некоторое время.";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.German:
|
|
|
|
|
code = "Anmeldung";
|
|
|
|
|
message1 = "Sie werden nach einiger Zeit abgemeldet.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.Spanish:
|
|
|
|
|
code = "Acceso";
|
|
|
|
|
message1 = "Se cerrará la sesión después de un tiempo.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
warningTime = this.ParentForm.FlagAutomaticLogoutWarningTime - 2;
|
|
|
|
|
|
|
|
|
|
this.UI_Invoke(delegate
|
|
|
|
|
{
|
|
|
|
|
DialogFormMessage msg = new DialogFormMessage(Define.E_MessageBoxIcon.Asterisk, code, message1, message2, warningTime);
|
|
|
|
|
if (msg.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
switch (this.ParentForm.SystemConfig1.Language)
|
|
|
|
|
{
|
|
|
|
|
case Define.E_LanguageID.Korean:
|
|
|
|
|
code = "Login";
|
|
|
|
|
message1 = "자동 로그아웃 되었습니다";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.English:
|
|
|
|
|
code = "Login";
|
|
|
|
|
message1 = "Automatically logged out";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.Chinese:
|
|
|
|
|
code = "登录";
|
|
|
|
|
message1 = "自动登出.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.Russian:
|
|
|
|
|
code = "Авторизоваться";
|
|
|
|
|
message1 = "Автоматически вышел из системы";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.German:
|
|
|
|
|
code = "Anmeldung";
|
|
|
|
|
message1 = "Automatisch abgemeldet.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
case Define.E_LanguageID.Spanish:
|
|
|
|
|
code = "Acceso";
|
|
|
|
|
message1 = "Cerrar sesión automáticamente.";
|
|
|
|
|
message2 = "";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// User Logout
|
|
|
|
|
UserManager.UserManager_UserLogout();
|
|
|
|
|
|
|
|
|
|
this.UI_Invoke(delegate
|
|
|
|
|
{
|
|
|
|
|
this.Logout();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.UI_Invoke(delegate
|
|
|
|
|
{
|
|
|
|
|
DialogFormMessage msg = new DialogFormMessage(Define.E_MessageBoxIcon.Asterisk, code, message1, message2, 0);
|
|
|
|
|
msg.ShowDialog();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-23 08:34:29 +00:00
|
|
|
|
public void UpdateModbusScreen()
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.CurrentDisplay == Define.E_MainDisplayStore.Modbus)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-02-23 08:34:29 +00:00
|
|
|
|
this.ParentForm.Update30000ModbusItem();
|
|
|
|
|
this.MainDisplayModbus.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public void MainBottomModbusIconAdd(bool bValue)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.IsOPCModbusUsing = bValue;
|
|
|
|
|
this.CurrentBottomMenuControlEnable();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CurrentBottomMenuControlEnable()
|
|
|
|
|
{
|
|
|
|
|
Collection<SmartButton> buttons = new Collection<SmartButton>();
|
|
|
|
|
bool feedback = this.MainDisplayFeedback.IsUsingFeedback();
|
|
|
|
|
int sampleCount = int.Parse(this.ParentForm.CurrentSystemParameter2.OPT1SamplingCount);
|
|
|
|
|
bool modbus = this.ParentForm.IsOPCModbusUsing;
|
|
|
|
|
|
|
|
|
|
buttons.Clear();
|
|
|
|
|
buttons.Add(this.buttonFeedback);
|
|
|
|
|
buttons.Add(this.buttonModbus);
|
|
|
|
|
for (int i = 0; i < buttons.Count; i++)
|
|
|
|
|
buttons[i].Visible = false;
|
|
|
|
|
|
|
|
|
|
buttons.Clear();
|
|
|
|
|
if (feedback == true && sampleCount != 0)
|
|
|
|
|
{
|
|
|
|
|
buttons.Add(this.buttonFeedback);
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.ParentForm.CurrentSystemParameter2.OPT1OverRangeInt <= 0 && this.ParentForm.CurrentSystemParameter2.OPT1UnderRangeInt <= 0)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.UpdateFeedbackData(this.ParentForm.CurrentProductItem, this.ParentForm.CurrentSystemParameter2);
|
|
|
|
|
this.ParentForm.UpdateFeedbackDeviation(this.ParentForm.CurrentProductItem, this.ParentForm.CurrentSystemParameter2);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
this.ParentForm.UpdateFeedbackDeviation(this.ParentForm.CurrentProductItem, this.ParentForm.CurrentSystemParameter2);
|
|
|
|
|
}
|
2023-02-23 08:34:29 +00:00
|
|
|
|
if (modbus == true)
|
|
|
|
|
buttons.Add(this.buttonModbus);
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < buttons.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
this.BottomButtonLocation(i + 1, buttons[i]);
|
|
|
|
|
buttons[i].Visible = true;
|
|
|
|
|
}
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void UpdateDisplayMenuButton(Define.E_MainDisplayStore main)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.buttonSubMenu.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|
|
|
|
this.buttonSubMenu.ButtonUp();
|
2023-02-23 08:34:29 +00:00
|
|
|
|
if (this.buttonBargraph.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|
|
|
|
this.buttonBargraph.ButtonUp();
|
|
|
|
|
if (this.buttonLinegraph.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|
|
|
|
this.buttonLinegraph.ButtonUp();
|
|
|
|
|
if (this.buttonList.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|
|
|
|
this.buttonList.ButtonUp();
|
|
|
|
|
if (this.buttonDataStat.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|
|
|
|
this.buttonDataStat.ButtonUp();
|
|
|
|
|
if (this.buttonFeedback.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|
|
|
|
this.buttonFeedback.ButtonUp();
|
|
|
|
|
if (this.buttonModbus.ButtonStatus != SmartButton.BUTSTATUS.UP)
|
|
|
|
|
this.buttonModbus.ButtonUp();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
switch (main)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.SubMenu:
|
|
|
|
|
if (this.buttonSubMenu.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.buttonSubMenu.ButtonDown();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.BarGraph:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonBargraph.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.buttonBargraph.ButtonDown();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.LineGraph:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonLinegraph.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.buttonLinegraph.ButtonDown();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.List:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonList.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.buttonList.ButtonDown();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.DataStat:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonDataStat.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.buttonDataStat.ButtonDown();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.Feedback:
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonFeedback.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.buttonFeedback.ButtonDown();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.Modbus:
|
2023-02-23 08:34:29 +00:00
|
|
|
|
if (this.buttonModbus.ButtonStatus != SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.buttonModbus.ButtonDown();
|
|
|
|
|
break;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
public void DisplayBottomMain(Define.E_MainDisplayStore main)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
|
|
|
|
switch (main)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.SubMenu:
|
|
|
|
|
this.UpdateDisplayMenuButton(Define.E_MainDisplayStore.SubMenu);
|
|
|
|
|
this.MainSubMenu.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightSmall.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
//this.MainDisplayWeightBigScreen.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainSubMenu.BringToFront();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
//this.MainDisplayWeightBigScreen.BringToFront();
|
|
|
|
|
this.MainDisplayWeightSmall.BringToFront();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.BarGraph:
|
|
|
|
|
this.UpdateDisplayMenuButton(Define.E_MainDisplayStore.BarGraph);
|
|
|
|
|
this.MainBarGraph.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainBarGraph.BringToFront();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.BringToFront();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.LineGraph:
|
|
|
|
|
this.UpdateDisplayMenuButton(Define.E_MainDisplayStore.LineGraph);
|
|
|
|
|
this.MainLineGraph.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainLineGraph.BringToFront();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.BringToFront();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.List:
|
|
|
|
|
this.UpdateDisplayMenuButton(Define.E_MainDisplayStore.List);
|
|
|
|
|
this.MainList.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightSmall.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainList.BringToFront();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightSmall.BringToFront();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.DataStat:
|
|
|
|
|
this.UpdateDisplayMenuButton(Define.E_MainDisplayStore.DataStat);
|
|
|
|
|
this.MainDataStatistics.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.MainDataStatistics.BringToFront();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayWeightBigScreen.BringToFront();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.Feedback:
|
|
|
|
|
this.UpdateDisplayMenuButton(Define.E_MainDisplayStore.Feedback);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.MainDisplayFeedback.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
this.MainDisplayWeightBigScreen.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
this.MainDisplayFeedback.BringToFront();
|
|
|
|
|
this.MainDisplayWeightBigScreen.BringToFront();
|
|
|
|
|
break;
|
2023-05-24 04:16:07 +00:00
|
|
|
|
case Define.E_MainDisplayStore.Modbus:
|
2023-02-23 08:34:29 +00:00
|
|
|
|
this.ParentForm.Update30000ModbusItem();
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.UpdateDisplayMenuButton(Define.E_MainDisplayStore.Modbus);
|
2023-02-23 08:34:29 +00:00
|
|
|
|
this.MainDisplayModbus.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
|
|
|
|
this.MainDisplayModbus.BringToFront();
|
|
|
|
|
this.MainDisplayWeightSmall.BringToFront();
|
|
|
|
|
break;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void TimerServer(bool value)
|
|
|
|
|
{
|
|
|
|
|
if (value == false)
|
|
|
|
|
{
|
2023-02-27 11:52:59 +00:00
|
|
|
|
if (this.timerClientConnectCheck.Enabled == true)
|
|
|
|
|
this.timerClientConnectCheck.Enabled = false;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2023-02-27 11:52:59 +00:00
|
|
|
|
if (this.timerClientConnectCheck.Enabled == false)
|
|
|
|
|
this.timerClientConnectCheck.Enabled = true;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateTimeDisplay()
|
|
|
|
|
{
|
|
|
|
|
this.labelTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DisplayRefresh(SystemStatus status)
|
|
|
|
|
{
|
|
|
|
|
string feedbackValue = "";
|
|
|
|
|
int value;
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.ParentForm.CurrentSystemStatus.CurrentDisplay = Define.E_DisplayStore.MainDisplay;
|
|
|
|
|
this.ParentForm.SetDisplayMode(Define.E_DisplayMode.Normal);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.ProductChange(this.ParentForm.SystemConfig1.ProductNumber);
|
|
|
|
|
|
2023-06-21 10:11:37 +00:00
|
|
|
|
// Log - smartFile Close
|
|
|
|
|
this.ParentForm.ChildFormMenu.FileClose();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.buttonPrint.Visible = this.ParentForm.SystemConfig1.IsPrinterEnable;
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsPrintPerProductEnable == true)
|
|
|
|
|
this.buttonPrint.ButtonDown();
|
|
|
|
|
else
|
|
|
|
|
this.buttonPrint.ButtonUp();
|
|
|
|
|
|
|
|
|
|
if (int.Parse(this.ParentForm.CurrentSystemParameter1.EquipmentType) == 4)
|
|
|
|
|
{
|
|
|
|
|
this.buttonConveyorUpDown.Visible = true;
|
|
|
|
|
this.buttonConveyorUpDown.ButtonUp();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
this.buttonConveyorUpDown.Visible = false;
|
|
|
|
|
|
|
|
|
|
this.UpdateDisplayUser(status);
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.CurrentDisplay == Define.E_MainDisplayStore.Feedback)
|
2023-02-23 08:34:29 +00:00
|
|
|
|
{
|
|
|
|
|
if (this.buttonFeedback.Visible == false)
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.BarGraph;
|
2023-02-23 08:34:29 +00:00
|
|
|
|
}
|
2023-05-24 04:16:07 +00:00
|
|
|
|
if (this.CurrentDisplay == Define.E_MainDisplayStore.Modbus)
|
2023-02-23 08:34:29 +00:00
|
|
|
|
{
|
|
|
|
|
if (this.buttonModbus.Visible == false)
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.BarGraph;
|
2023-02-23 08:34:29 +00:00
|
|
|
|
}
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
//this.CurrentDisplay = Define.E_MainDisplayStore.DisplayStartBarGraph;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
//this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
//this.MainDisplayWeightBigScreen.DisplayRefresh(status);
|
|
|
|
|
//this.MainDisplayWeightSmall.DisplayRefresh(status);
|
|
|
|
|
//this.MainDisplayMenu.DisplayRefresh(status);
|
|
|
|
|
//this.MainDisplayStart.DisplayRefresh(status);
|
|
|
|
|
//this.MainDisplayFeedback.DisplayRefresh(status);
|
|
|
|
|
//this.MainDisplayStartGraph.DisplayRefresh(status);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Override Member
|
|
|
|
|
protected override void OnLoad(EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
base.OnLoad(e);
|
|
|
|
|
|
|
|
|
|
//this.InitializeDesign();
|
|
|
|
|
//this.DefaultSetting();
|
|
|
|
|
|
|
|
|
|
//this.smartMemory1.ParentWindow = this;
|
|
|
|
|
//this.smartMemory1.MemoryStatusInfomationShow(SmartX.SmartMemory.VIEWPOSITION.CENTER);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Event Handler
|
|
|
|
|
private void buttonZero_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.Zero, "");
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.Zero, CommunicationID.SubBoard1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonProductNo_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
string message = "";
|
|
|
|
|
DialogFormNumKeyPad myKeyPad = new DialogFormNumKeyPad(this.buttonProductNo.Text, 4, 0, false, this.ParentForm.SystemConfig1.Language);
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (myKeyPad.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
if (myKeyPad.doubleValue < 1 || myKeyPad.doubleValue > this.ParentForm.ProductCount)
|
|
|
|
|
{
|
|
|
|
|
// 입력범위를 확인하세요
|
|
|
|
|
message = string.Format("1 ~ {0}", this.ParentForm.ProductCount);
|
|
|
|
|
DialogFormMessage myMsg = new DialogFormMessage(1, this.ParentForm.SystemConfig1.Language, message);
|
|
|
|
|
myMsg.ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.ClearAlarm(0);
|
|
|
|
|
this.ProductChange(myKeyPad.IntValue);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void labelProductName_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
int listIndex = 0, listViewIndex = 0;
|
|
|
|
|
Collection<string> productNames = new Collection<string>();
|
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.ParentForm.LoadProductName(ref productNames);
|
|
|
|
|
|
|
|
|
|
listIndex = this.ParentForm.SystemConfig1.ProductNumber - 1;
|
|
|
|
|
listViewIndex = (listIndex / 10) * 10;
|
|
|
|
|
if (listViewIndex > this.ParentForm.ProductCount - 10)
|
|
|
|
|
listViewIndex = this.ParentForm.ProductCount - 10;
|
|
|
|
|
|
|
|
|
|
DialogFormProductList product = new DialogFormProductList(productNames, listViewIndex);
|
|
|
|
|
product.Location = new Point(79, 60);
|
|
|
|
|
|
|
|
|
|
if (product.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.ClearAlarm(0);
|
|
|
|
|
this.ProductChange(product.SelectedProductNumber);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void pictureBoxStart_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard);
|
|
|
|
|
}
|
|
|
|
|
private void pictureBoxStop_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.Start, CommunicationID.MainBoard);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void timerPrinting_Tick(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//this.timerPrinting.Enabled = false;
|
|
|
|
|
//this.buttonPrint.Enabled = true;
|
|
|
|
|
//this.buttonClear.Enabled = true;
|
|
|
|
|
}
|
2023-03-05 22:42:06 +00:00
|
|
|
|
private void timerClientConnectCheck_Tick(object sender, EventArgs e)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-03-05 22:42:06 +00:00
|
|
|
|
if (this.ParentForm.smartTCPMultiServer.IsStart == true)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-03-05 22:42:06 +00:00
|
|
|
|
if (this.ParentForm.smartTCPMultiServer.ClientInfoList == null)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-03-05 22:42:06 +00:00
|
|
|
|
this.UpdateEthernetStatusDisplay(false);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
2023-03-05 22:42:06 +00:00
|
|
|
|
else
|
2023-03-03 09:22:52 +00:00
|
|
|
|
{
|
2023-03-05 22:42:06 +00:00
|
|
|
|
this.UpdateEthernetStatusDisplay(true);
|
2023-03-03 09:22:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-03-05 22:42:06 +00:00
|
|
|
|
|
|
|
|
|
//try
|
|
|
|
|
//{
|
|
|
|
|
// if (this.ParentForm.smartTCPMultiServer.IsStart == true)
|
|
|
|
|
// {
|
|
|
|
|
// if (this.ParentForm.smartTCPMultiServer.ClientInfoList == null)
|
|
|
|
|
// {
|
|
|
|
|
// this.ParentForm.DelegateUISeverStatus(false);
|
|
|
|
|
|
|
|
|
|
// // 로그
|
|
|
|
|
// if (this.ParentForm.IsCommunicationLogOpen == true)
|
|
|
|
|
// this.ParentForm.smartFileCommunicationLog.WriteString(string.Format("ClientConnectCheck ({0:yyyy-MM-dd HH:mm:ss}): false", DateTime.Now));
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// this.ParentForm.DelegateUISeverStatus(true);
|
|
|
|
|
|
|
|
|
|
// // 로그
|
|
|
|
|
// if (this.ParentForm.IsCommunicationLogOpen == true)
|
|
|
|
|
// this.ParentForm.smartFileCommunicationLog.WriteString(string.Format("ClientConnectCheck ({0:yyyy-MM-dd HH:mm:ss}): true", DateTime.Now));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// //this.ThreadClientConnected.Join();
|
|
|
|
|
|
|
|
|
|
// //if (this.GCCount > 1800)
|
|
|
|
|
// //{
|
|
|
|
|
// // System.GC.Collect();
|
|
|
|
|
// // System.GC.WaitForPendingFinalizers();
|
|
|
|
|
// // this.GCCount = 0;
|
|
|
|
|
// //}
|
|
|
|
|
// //else
|
|
|
|
|
// // this.GCCount++;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
//catch (Exception ex)
|
|
|
|
|
//{
|
|
|
|
|
// FormMain.Exception(ex);
|
|
|
|
|
//}
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void pictureBoxIconAlarm_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2023-06-21 10:11:37 +00:00
|
|
|
|
if (this.MainAlarm.Visible == true)
|
|
|
|
|
this.MainAlarm.Visible = false;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
2023-06-21 10:11:37 +00:00
|
|
|
|
this.MainAlarm.BringToFront();
|
|
|
|
|
this.MainAlarm.Visible = true;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsExternalInputLamp == true && this.ParentForm.IsLampOnDataSend == true)
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.LampOnContinuousDisable, CommunicationID.MainBoard);
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsExternalInputBuzzer == true && this.ParentForm.IsBuzzerOnDataSend == true)
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.BuzzerOnContinuousDisable, CommunicationID.MainBoard);
|
|
|
|
|
}
|
|
|
|
|
private void labelSorterAlarm_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.AlarmNgClearSorter, CommunicationID.MainBoard);
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsExternalInputLamp == true && this.ParentForm.IsLampOnDataSend == true)
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.LampOnContinuousDisable, CommunicationID.MainBoard);
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsExternalInputBuzzer == true && this.ParentForm.IsBuzzerOnDataSend == true)
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.BuzzerOnContinuousDisable, CommunicationID.MainBoard);
|
|
|
|
|
this.labelSorterAlarm.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonPrint_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonPrint.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.SystemConfig1.IsPrintPerProductEnable = true;
|
|
|
|
|
this.ParentForm.PrintingHeadLine();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.SystemConfig1.IsPrintPerProductEnable = false;
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.SystemConfig1.SerialCOM1Mode == 3)
|
|
|
|
|
this.ParentForm.TransferSerialCOM1("\n\n\n\n");
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.SerialCOM3Mode == 3)
|
|
|
|
|
this.ParentForm.TransferSerialCOM3("\n\n\n\n");
|
|
|
|
|
else if (this.ParentForm.SystemConfig1.SerialCOM4Mode == 3)
|
|
|
|
|
this.ParentForm.TransferSerialCOM4("\n\n\n\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.ParentForm.SaveSystemConfigurationFile1(this.ParentForm.SystemConfig1);
|
|
|
|
|
|
|
|
|
|
//this.buttonPrint.Enabled = false;
|
|
|
|
|
//this.buttonClear.Enabled = false;
|
|
|
|
|
//this.timerPrinting.Interval = 10000;
|
|
|
|
|
//this.timerPrinting.Enabled = true;
|
|
|
|
|
|
|
|
|
|
//this.ParentForm.PrintingWeight(this.ParentForm.CurrentWeightData, this.ParentForm.CurrentProductItem);
|
|
|
|
|
}
|
|
|
|
|
private void buttonClear_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.ParentForm.SetTrackingHistoryData(Define.E_TrackingOperation.Clear, "");
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
if (this.ParentForm.CurrentWeightData.TotalCount == 0 && this.ParentForm.SystemConfig1.IsBarcodeEnable == true)
|
|
|
|
|
{
|
|
|
|
|
#region 바코드 사용 시 전체 품목 데이터 소거
|
|
|
|
|
DialogFormYesNo myDlg = new DialogFormYesNo(this.ParentForm.SystemConfig1.Language, 19);
|
|
|
|
|
if (myDlg.ShowDialog() == DialogResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
SmartSplash splash = new SmartSplash();
|
|
|
|
|
splash.CenterPosition = true;
|
|
|
|
|
splash.AnimationInterval = 200;
|
|
|
|
|
splash.LoadingImagePathname = "SmartLoading4";
|
|
|
|
|
splash.Start();
|
|
|
|
|
|
|
|
|
|
this.ClearAllData();
|
|
|
|
|
|
|
|
|
|
this.ParentForm.CurrentBarcode.Clear();
|
|
|
|
|
this.UpdateBarcodeDisplay(this.ParentForm.CurrentBarcode);
|
|
|
|
|
|
|
|
|
|
splash.Finish();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
#region 현재 품목 데이터 소거
|
|
|
|
|
DialogFormYesNo myDlg = new DialogFormYesNo(this.ParentForm.SystemConfig1.Language, 8);
|
|
|
|
|
if (myDlg.ShowDialog() == DialogResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.ClearQueue();
|
|
|
|
|
|
|
|
|
|
this.ClearCurrentData();
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.Clear, CommunicationID.SubBoard1);
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.SystemConfig1.IsBarcodeEnable == true)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.CurrentBarcode.Clear();
|
|
|
|
|
this.UpdateBarcodeDisplay(this.ParentForm.CurrentBarcode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void buttonUser_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// 인테크 : Intech / I20090810!
|
|
|
|
|
// 관리자 : admin00 / admin12!
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.CurrentSystemStatus.CurrentUser.Group == Define.E_UserGroup.LogOut)
|
|
|
|
|
{
|
|
|
|
|
this.Login();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DialogFormYesNo msg = new DialogFormYesNo(this.ParentForm.SystemConfig1.Language, 12);
|
|
|
|
|
if (msg.ShowDialog() == DialogResult.Yes)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.Logout();
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void buttonWeightInputMode_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonWeightInputMode.ButtonStatus == SmartX.SmartButton.BUTSTATUS.DOWN)
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.ParentForm.CurrentSystemStatus.CurrentWeightInputMode = Define.E_WeightInputMode.Deviation;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
else
|
2023-05-24 04:16:07 +00:00
|
|
|
|
this.ParentForm.CurrentSystemStatus.CurrentWeightInputMode = Define.E_WeightInputMode.Weight;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.UpdateCurrentProductDisplay(this.ParentForm.CurrentSystemStatus.Equipment, this.ParentForm.CurrentProductItem, this.ParentForm.CurrentWeightData);
|
|
|
|
|
}
|
|
|
|
|
private void buttonConveyorUpDown_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.buttonConveyorUpDown.ButtonStatus == SmartX.SmartButton.BUTSTATUS.DOWN)
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.MotorDown, CommunicationID.MainBoard);
|
|
|
|
|
else
|
|
|
|
|
this.ParentForm.TransferData(CommunicationCommand.MotorUp, CommunicationID.MainBoard);
|
|
|
|
|
}
|
|
|
|
|
private void buttonHiddenMenu_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
if (this.ParentForm.SystemConfig1.IsLogin == false)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.ChildFormMenu.DisplayHiddenMenu(this.ParentForm.CurrentSystemStatus.CurrentDisplay, this.ParentForm.SystemConfig1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void buttonMenu_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
if (this.ParentForm.CurrentSystemStatus.Equipment == Define.E_EquipmentStatus.Stop)
|
2020-08-31 02:13:02 +00:00
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
UserManager.UserManager_AutoLogoutTimeoutPause();
|
|
|
|
|
|
2020-08-31 02:13:02 +00:00
|
|
|
|
this.ParentForm.ChildFormMenu.DisplayRefresh(this.ParentForm.CurrentSystemStatus);
|
2023-05-24 04:16:07 +00:00
|
|
|
|
((FormMain)(Owner)).smartForm.Show((int)Define.E_FormStore.FormMenu);
|
2020-08-31 02:13:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonStop_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.BarGraph;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
private void buttonBargraph_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.BarGraph;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
private void buttonLinegraph_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.LineGraph;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
private void buttonList_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.List;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
private void buttonDataStat_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.DataStat;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
private void buttonStartMenu_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.SubMenu;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
|
|
|
|
private void buttonFeedback_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.Feedback;
|
2020-08-31 02:13:02 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
2023-02-23 08:34:29 +00:00
|
|
|
|
}
|
|
|
|
|
private void buttonModbus_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-05-24 04:16:07 +00:00
|
|
|
|
// Automatic Logout Reset
|
|
|
|
|
if (this.ParentForm.SystemConfig3.IsPart11 == true)
|
|
|
|
|
this.Part11AutomaticLogoutReset();
|
|
|
|
|
|
|
|
|
|
this.CurrentDisplay = Define.E_MainDisplayStore.Modbus;
|
2023-02-23 08:34:29 +00:00
|
|
|
|
|
|
|
|
|
this.DisplayBottomMain(this.CurrentDisplay);
|
|
|
|
|
}
|
2020-08-31 02:13:02 +00:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
private void buttonExit_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.ParentForm.CloseSmartUartLink();
|
|
|
|
|
this.ParentForm.smartFileCommunicationLog.Close();
|
|
|
|
|
this.ParentForm.smartFileCheckLog.Close();
|
|
|
|
|
this.ParentForm.Close();
|
|
|
|
|
}
|
|
|
|
|
private void buttonMemory_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.smartMemory1.ParentWindow = this;
|
|
|
|
|
this.smartMemory1.MemoryStatusInfomationShow(SmartX.SmartMemory.VIEWPOSITION.CENTER);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|