main
parent
46d909ad5f
commit
975e2bd713
|
@ -276,6 +276,48 @@ namespace INT_PT002.Controls
|
||||||
this.Invoke(new ConnetedIPStatusCallback(this.ConnectedIPStatusOut), value);
|
this.Invoke(new ConnetedIPStatusCallback(this.ConnectedIPStatusOut), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ModbusSetting()
|
||||||
|
{
|
||||||
|
if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_COMM_MODE == 1)
|
||||||
|
{
|
||||||
|
this.ParentForm.ParentForm.ChildFormMainDisplay.InitialEthernetIcon();
|
||||||
|
|
||||||
|
if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_OP_MODE == 1)
|
||||||
|
{
|
||||||
|
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(true);
|
||||||
|
this.groupBoxModbusSetting.Visible = true;
|
||||||
|
|
||||||
|
this.labelModbusRole.Text = "Slave";
|
||||||
|
this.labelFunctions.Text = "04: Read input register";
|
||||||
|
|
||||||
|
this.labelTitleStartAddress.Visible = false;
|
||||||
|
this.labelStartAddress.Visible = false;
|
||||||
|
}
|
||||||
|
else if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_OP_MODE == 2)
|
||||||
|
{
|
||||||
|
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(true);
|
||||||
|
this.groupBoxModbusSetting.Visible = true;
|
||||||
|
|
||||||
|
this.labelModbusRole.Text = "Master";
|
||||||
|
this.labelFunctions.Text = "16: Write multiple register";
|
||||||
|
|
||||||
|
this.labelTitleStartAddress.Visible = true;
|
||||||
|
this.labelStartAddress.Visible = true;
|
||||||
|
this.labelStartAddress.Text = this.ParentForm.ParentForm.SystemConfig.MODBUS_TCP_START_ADDRESS.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(false);
|
||||||
|
this.groupBoxModbusSetting.Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(false);
|
||||||
|
this.groupBoxModbusSetting.Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void DisplayRefresh()
|
public void DisplayRefresh()
|
||||||
{
|
{
|
||||||
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplayMode = Define.E_DisplayModeStore.Ethernet;
|
this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplayMode = Define.E_DisplayModeStore.Ethernet;
|
||||||
|
@ -290,7 +332,7 @@ namespace INT_PT002.Controls
|
||||||
this.comboBoxEthernetMode.SelectedIndexChanged += new EventHandler(this.comboBoxEthernetMode_SelectedIndexChanged);
|
this.comboBoxEthernetMode.SelectedIndexChanged += new EventHandler(this.comboBoxEthernetMode_SelectedIndexChanged);
|
||||||
this.comboBoxEthernetOpMode.SelectedIndexChanged += new EventHandler(this.comboBoxEthernetOpMode_SelectedIndexChanged);
|
this.comboBoxEthernetOpMode.SelectedIndexChanged += new EventHandler(this.comboBoxEthernetOpMode_SelectedIndexChanged);
|
||||||
|
|
||||||
this.groupBoxModbusSetting.Visible = false;
|
this.ModbusSetting();
|
||||||
|
|
||||||
if (this.comboBoxEthernetOpMode.SelectedIndex == 1)
|
if (this.comboBoxEthernetOpMode.SelectedIndex == 1)
|
||||||
{
|
{
|
||||||
|
@ -369,9 +411,6 @@ namespace INT_PT002.Controls
|
||||||
this.ParentForm.ParentForm.SystemConfig.ETHERNET_OP_MODE = 1;
|
this.ParentForm.ParentForm.SystemConfig.ETHERNET_OP_MODE = 1;
|
||||||
afterOpMode = "Server";
|
afterOpMode = "Server";
|
||||||
|
|
||||||
this.labelModbusRole.Text = "Slave";
|
|
||||||
this.labelFunctions.Text = "04: Read input register";
|
|
||||||
|
|
||||||
this.buttonStartServer.Enabled = true;
|
this.buttonStartServer.Enabled = true;
|
||||||
this.buttonStopServer.Enabled = true;
|
this.buttonStopServer.Enabled = true;
|
||||||
this.buttonStartClient.Enabled = false;
|
this.buttonStartClient.Enabled = false;
|
||||||
|
@ -387,9 +426,6 @@ namespace INT_PT002.Controls
|
||||||
this.ParentForm.ParentForm.EthernetClientDisconnect();
|
this.ParentForm.ParentForm.EthernetClientDisconnect();
|
||||||
afterOpMode = "Client";
|
afterOpMode = "Client";
|
||||||
|
|
||||||
this.labelModbusRole.Text = "Master";
|
|
||||||
this.labelFunctions.Text = "04: Read input register";
|
|
||||||
|
|
||||||
this.ParentForm.ParentForm.ChildFormMainDisplay.TimerServer(false);
|
this.ParentForm.ParentForm.ChildFormMainDisplay.TimerServer(false);
|
||||||
|
|
||||||
this.labelConnectedIP.Text = "-";
|
this.labelConnectedIP.Text = "-";
|
||||||
|
@ -423,19 +459,8 @@ namespace INT_PT002.Controls
|
||||||
this.ParentForm.ParentForm.SystemConfig.ETHERNET_COMM_MODE = mode;
|
this.ParentForm.ParentForm.SystemConfig.ETHERNET_COMM_MODE = mode;
|
||||||
afterComMode = this.ReturnCommunicationModeName(mode);
|
afterComMode = this.ReturnCommunicationModeName(mode);
|
||||||
|
|
||||||
if (this.ParentForm.ParentForm.SystemConfig.ETHERNET_COMM_MODE == (int)Define.E_CommMode.f1_Modbus)
|
|
||||||
{
|
|
||||||
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(true);
|
|
||||||
this.groupBoxModbusSetting.Visible = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.ParentForm.ParentForm.ChildFormMainDisplay.MainButtonModbusAdd(false);
|
|
||||||
this.groupBoxModbusSetting.Visible = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
|
this.ParentForm.ParentForm.SaveSystemConfigurationFile(this.ParentForm.ParentForm.SystemConfig);
|
||||||
this.ParentForm.ParentForm.ChildFormMainDisplay.InitialEthernetIcon();
|
this.ModbusSetting();
|
||||||
|
|
||||||
this.buttonSaveMode.Visible = false;
|
this.buttonSaveMode.Visible = false;
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,41 @@ namespace INT_PT002.Forms
|
||||||
if (Directory.Exists(this.PathDataBackupFolder) == false)
|
if (Directory.Exists(this.PathDataBackupFolder) == false)
|
||||||
Directory.CreateDirectory(this.PathDataBackupFolder);
|
Directory.CreateDirectory(this.PathDataBackupFolder);
|
||||||
}
|
}
|
||||||
|
private void DefaultSetting2()
|
||||||
|
{
|
||||||
|
// 이더넷
|
||||||
|
if (this.SystemConfig.ETHERNET_OP_MODE == 1)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (string.Compare(this.smartConfigs.IPSettings.DeviceIP, "0.0.0.0") != 0)
|
||||||
|
this.EthernetServerStart();
|
||||||
|
|
||||||
|
this.ChildFormMainDisplay.TimerServer(true);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.SystemConfig.ETHERNET_OP_MODE == 2)
|
||||||
|
{
|
||||||
|
this.EthernetClientDisconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.SystemConfig.ETHERNET_COMM_MODE != (int)Define.E_CommMode.f0_None)
|
||||||
|
{
|
||||||
|
switch (this.SystemConfig.ETHERNET_COMM_MODE)
|
||||||
|
{
|
||||||
|
case (int)Define.E_CommMode.f1_Modbus:
|
||||||
|
this.ChildFormMainDisplay.MainButtonModbusAdd(true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.ChildFormMainDisplay.InitialEthernetIcon();
|
||||||
|
}
|
||||||
private void InitializeUserManager()
|
private void InitializeUserManager()
|
||||||
{
|
{
|
||||||
UserManager.UserListNewDataEvent += this.UserManager_UserListNewDataEvent;
|
UserManager.UserListNewDataEvent += this.UserManager_UserListNewDataEvent;
|
||||||
|
@ -3706,7 +3741,7 @@ namespace INT_PT002.Forms
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Modbus
|
#region Modbus - Servo Motor
|
||||||
public void ModbusOpen()
|
public void ModbusOpen()
|
||||||
{
|
{
|
||||||
if (this.smartModbus.IsOpen == true)
|
if (this.smartModbus.IsOpen == true)
|
||||||
|
@ -3833,6 +3868,9 @@ namespace INT_PT002.Forms
|
||||||
// 초기 파라미터 전송
|
// 초기 파라미터 전송
|
||||||
this.TransferSystemParameter9039();
|
this.TransferSystemParameter9039();
|
||||||
|
|
||||||
|
// 이더넷 설정
|
||||||
|
this.DefaultSetting2();
|
||||||
|
|
||||||
// timer1 Get user List Name
|
// timer1 Get user List Name
|
||||||
//UserManager.UserManager_GetUserListName();
|
//UserManager.UserManager_GetUserListName();
|
||||||
this.timerUserList.Enabled = true;
|
this.timerUserList.Enabled = true;
|
||||||
|
|
|
@ -656,7 +656,7 @@
|
||||||
this.labelExpireOfPassword.BackGroundColor = System.Drawing.Color.SkyBlue;
|
this.labelExpireOfPassword.BackGroundColor = System.Drawing.Color.SkyBlue;
|
||||||
this.labelExpireOfPassword.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(42)))), ((int)(((byte)(82)))));
|
this.labelExpireOfPassword.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(42)))), ((int)(((byte)(82)))));
|
||||||
this.labelExpireOfPassword.BorderStyle = SmartX.SmartLabel.BorderStyles.None;
|
this.labelExpireOfPassword.BorderStyle = SmartX.SmartLabel.BorderStyles.None;
|
||||||
this.labelExpireOfPassword.Font = new System.Drawing.Font("New Gulim", 10F, System.Drawing.FontStyle.Bold);
|
this.labelExpireOfPassword.Font = new System.Drawing.Font("새굴림", 10F, System.Drawing.FontStyle.Bold);
|
||||||
this.labelExpireOfPassword.LineSpacing = 0F;
|
this.labelExpireOfPassword.LineSpacing = 0F;
|
||||||
this.labelExpireOfPassword.Location = new System.Drawing.Point(786, 126);
|
this.labelExpireOfPassword.Location = new System.Drawing.Point(786, 126);
|
||||||
this.labelExpireOfPassword.Name = "labelExpireOfPassword";
|
this.labelExpireOfPassword.Name = "labelExpireOfPassword";
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue