DispCtrl.cs 현장에서 예외 문제로 소스 행번호 로그 추가
This commit is contained in:
@@ -13,6 +13,7 @@ using System.Diagnostics;
|
|||||||
using vmsnet.Attributes;
|
using vmsnet.Attributes;
|
||||||
using vmsnet.Configures;
|
using vmsnet.Configures;
|
||||||
using AR;
|
using AR;
|
||||||
|
using ScottPlot.TickGenerators.TimeUnits;
|
||||||
|
|
||||||
namespace vmsnet.HMI
|
namespace vmsnet.HMI
|
||||||
{
|
{
|
||||||
@@ -544,6 +545,8 @@ namespace vmsnet.HMI
|
|||||||
/// <param name="grp"></param>
|
/// <param name="grp"></param>
|
||||||
/// <param name="cidx"></param>
|
/// <param name="cidx"></param>
|
||||||
private void DrawCellMatrix(Graphics g, RectangleF srcrect, CGROUP grp, short cidx, Boolean isprint)
|
private void DrawCellMatrix(Graphics g, RectangleF srcrect, CGROUP grp, short cidx, Boolean isprint)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Single height = (Single)srcrect.Height / grp.RowCount; //지정한 갯수를 나눈다.
|
Single height = (Single)srcrect.Height / grp.RowCount; //지정한 갯수를 나눈다.
|
||||||
Single newx = srcrect.Left;
|
Single newx = srcrect.Left;
|
||||||
@@ -1073,6 +1076,30 @@ namespace vmsnet.HMI
|
|||||||
this.Buttons.Add(new CButton(R, Item, EBUTTONTYPE.CELL));
|
this.Buttons.Add(new CButton(R, Item, EBUTTONTYPE.CELL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (NullReferenceException ex1)
|
||||||
|
{
|
||||||
|
// 예외 메시지, 파일명, 행 번호를 로그에 기록
|
||||||
|
var stackTrace = new System.Diagnostics.StackTrace(ex1, true);
|
||||||
|
var frame = stackTrace.GetFrame(0);
|
||||||
|
string fileName = frame.GetFileName();
|
||||||
|
int lineNumber = frame.GetFileLineNumber();
|
||||||
|
|
||||||
|
// UI 디스플레이 중, 예외발생 문제
|
||||||
|
PUB.log.AddE($"NullReferenceException Message={ex1.Message}, 파일명={fileName}, 행번호={lineNumber}");
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex2)
|
||||||
|
{
|
||||||
|
// 예외 메시지, 파일명, 행 번호를 로그에 기록
|
||||||
|
var stackTrace = new System.Diagnostics.StackTrace(ex2, true);
|
||||||
|
var frame = stackTrace.GetFrame(0);
|
||||||
|
string fileName = frame.GetFileName();
|
||||||
|
int lineNumber = frame.GetFileLineNumber();
|
||||||
|
|
||||||
|
// Else Error !!!
|
||||||
|
PUB.log.AddE($"Exception Message={ex2.Message}, 파일명={fileName}, 행번호={lineNumber}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DrawDebugInfo(Graphics g)
|
private void DrawDebugInfo(Graphics g)
|
||||||
{
|
{
|
||||||
@@ -1085,6 +1112,8 @@ namespace vmsnet.HMI
|
|||||||
grp._minitem = null;
|
grp._minitem = null;
|
||||||
grp._maxitem = null;
|
grp._maxitem = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
//그룹내의정보를 설정
|
//그룹내의정보를 설정
|
||||||
Single newx = WinRect.Left + 열번호 * ItemSize.Width;
|
Single newx = WinRect.Left + 열번호 * ItemSize.Width;
|
||||||
Single newy = WinRect.Top + 줄번호 * ItemSize.Height;
|
Single newy = WinRect.Top + 줄번호 * ItemSize.Height;
|
||||||
@@ -1592,9 +1621,32 @@ namespace vmsnet.HMI
|
|||||||
grp._minitem.ismin = true;
|
grp._minitem.ismin = true;
|
||||||
grp._minitemp = grp._minitem;
|
grp._minitemp = grp._minitem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (NullReferenceException ex1)
|
||||||
|
{
|
||||||
|
// 예외 메시지, 파일명, 행 번호를 로그에 기록
|
||||||
|
var stackTrace = new System.Diagnostics.StackTrace(ex1, true);
|
||||||
|
var frame = stackTrace.GetFrame(0);
|
||||||
|
string fileName = frame.GetFileName();
|
||||||
|
int lineNumber = frame.GetFileLineNumber();
|
||||||
|
|
||||||
|
// UI 디스플레이 중, 예외발생 문제
|
||||||
|
PUB.log.AddE($"NullReferenceException Message={ex1.Message}, 파일명={fileName}, 행번호={lineNumber}");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
catch (Exception ex2)
|
||||||
|
{
|
||||||
|
// 예외 메시지, 파일명, 행 번호를 로그에 기록
|
||||||
|
var stackTrace = new System.Diagnostics.StackTrace(ex2, true);
|
||||||
|
var frame = stackTrace.GetFrame(0);
|
||||||
|
string fileName = frame.GetFileName();
|
||||||
|
int lineNumber = frame.GetFileLineNumber();
|
||||||
|
|
||||||
|
// Else Error !!!
|
||||||
|
PUB.log.AddE($"Exception Message={ex2.Message}, 파일명={fileName}, 행번호={lineNumber}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DrawGroups(Graphics g)
|
private void DrawGroups(Graphics g)
|
||||||
{
|
{
|
||||||
_raise_alarm_count = 0; //알람카운트
|
_raise_alarm_count = 0; //알람카운트
|
||||||
@@ -1806,11 +1858,26 @@ namespace vmsnet.HMI
|
|||||||
}
|
}
|
||||||
catch (NullReferenceException ex1)
|
catch (NullReferenceException ex1)
|
||||||
{
|
{
|
||||||
|
// 예외 메시지, 파일명, 행 번호를 로그에 기록
|
||||||
|
var stackTrace = new System.Diagnostics.StackTrace(ex1, true);
|
||||||
|
var frame = stackTrace.GetFrame(0);
|
||||||
|
string fileName = frame.GetFileName();
|
||||||
|
int lineNumber = frame.GetFileLineNumber();
|
||||||
|
|
||||||
// UI 디스플레이 중, 예외발생 문제
|
// UI 디스플레이 중, 예외발생 문제
|
||||||
|
PUB.log.AddE($"NullReferenceException Message={ex1.Message}, 파일명={fileName}, 행번호={lineNumber}");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex2)
|
||||||
{
|
{
|
||||||
// else error !!!
|
// 예외 메시지, 파일명, 행 번호를 로그에 기록
|
||||||
|
var stackTrace = new System.Diagnostics.StackTrace(ex2, true);
|
||||||
|
var frame = stackTrace.GetFrame(0);
|
||||||
|
string fileName = frame.GetFileName();
|
||||||
|
int lineNumber = frame.GetFileLineNumber();
|
||||||
|
|
||||||
|
// Else Error !!!
|
||||||
|
PUB.log.AddE($"Exception Message={ex2.Message}, 파일명={fileName}, 행번호={lineNumber}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,18 +10,18 @@ namespace vmsnet.Configures
|
|||||||
public class RtuConfigure
|
public class RtuConfigure
|
||||||
{
|
{
|
||||||
public int BaudRate { get; set; } = 9600;
|
public int BaudRate { get; set; } = 9600;
|
||||||
|
public int DataBits { get; set; } = 8;
|
||||||
public Parity Parity { get; set; } = Parity.None;
|
public Parity Parity { get; set; } = Parity.None;
|
||||||
public StopBits StopBits { get; set; } = StopBits.One;
|
public StopBits StopBits { get; set; } = StopBits.One;
|
||||||
public int DataBits { get; set; } = 8;
|
|
||||||
|
|
||||||
public RtuConfigure() { }
|
public RtuConfigure() { }
|
||||||
|
|
||||||
public RtuConfigure(int baudRate, Parity parity, StopBits stopBits, int dataBits)
|
public RtuConfigure(int baudRate, Parity parity, StopBits stopBits, int dataBits)
|
||||||
{
|
{
|
||||||
BaudRate = baudRate;
|
BaudRate = baudRate;
|
||||||
|
DataBits = dataBits;
|
||||||
Parity = parity;
|
Parity = parity;
|
||||||
StopBits = stopBits;
|
StopBits = stopBits;
|
||||||
DataBits = dataBits;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
2
cVMS.NET_CS/Setting/Frm_Config.Designer.cs
generated
2
cVMS.NET_CS/Setting/Frm_Config.Designer.cs
generated
@@ -507,7 +507,7 @@ namespace vmsnet
|
|||||||
this.groupBox4.Size = new System.Drawing.Size(347, 218);
|
this.groupBox4.Size = new System.Drawing.Size(347, 218);
|
||||||
this.groupBox4.TabIndex = 45;
|
this.groupBox4.TabIndex = 45;
|
||||||
this.groupBox4.TabStop = false;
|
this.groupBox4.TabStop = false;
|
||||||
this.groupBox4.Text = "Indicator";
|
this.groupBox4.Text = "KA Indicator";
|
||||||
//
|
//
|
||||||
// button5
|
// button5
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -311,6 +311,12 @@ namespace vmsnet
|
|||||||
this.bs_normal.EndEdit();
|
this.bs_normal.EndEdit();
|
||||||
this.bs_win.EndEdit();
|
this.bs_win.EndEdit();
|
||||||
|
|
||||||
|
if (cmbIndiport.Text.Trim() == cmb_plcport.Text.Trim())
|
||||||
|
{
|
||||||
|
UTIL.MsgE("「KA 인디게이터」와 「Alarm PLC」의 통신포트는\n\n동일하게 설정할 수 없습니다.");
|
||||||
|
cmbIndiport.Focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (nudPri1.Value < 1 || nudPri2.Value < 1)
|
if (nudPri1.Value < 1 || nudPri2.Value < 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user