..
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
<ProjectReference Include="..\SubProject\BMS\BMS.csproj" />
|
||||
<ProjectReference Include="..\SubProject\CommData\CommData.csproj" />
|
||||
<ProjectReference Include="..\SubProject\CommUtil\arCommUtil.csproj" />
|
||||
<ProjectReference Include="..\SubProject\MSSQLCommand\MSSQLCommand.csproj" />
|
||||
<ProjectReference Include="..\SubProject\Patch\SWPatch.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Speech.Synthesis;
|
||||
using System.Media;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
@@ -184,6 +185,11 @@ namespace Project
|
||||
|
||||
public static void init()
|
||||
{
|
||||
// 전역 예외 처리기 등록
|
||||
Application.ThreadException += Application_ThreadException;
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
Application.ApplicationExit += Application_ApplicationExit;
|
||||
|
||||
Result = new CResult();
|
||||
|
||||
//state machine
|
||||
@@ -237,6 +243,47 @@ namespace Project
|
||||
else PUB.PatchVersion = string.Empty;
|
||||
}
|
||||
|
||||
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string errorMessage = $"Thread Exception: {e.Exception.Message}\nStack Trace: {e.Exception.StackTrace}";
|
||||
log.AddE(errorMessage);
|
||||
MessageBox.Show($"프로그램 오류가 발생했습니다.\n{errorMessage}", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 로깅 실패 시 무시
|
||||
}
|
||||
}
|
||||
|
||||
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Exception ex = e.ExceptionObject as Exception;
|
||||
string errorMessage = $"Unhandled Exception: {ex?.Message}\nStack Trace: {ex?.StackTrace}";
|
||||
log.AddE(errorMessage);
|
||||
MessageBox.Show($"프로그램 오류가 발생했습니다.\n{errorMessage}", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 로깅 실패 시 무시
|
||||
}
|
||||
}
|
||||
|
||||
private static void Application_ApplicationExit(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
log.Add("프로그램 종료", "Application_ApplicationExit 이벤트 발생");
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 로깅 실패 시 무시
|
||||
}
|
||||
}
|
||||
|
||||
public static Boolean CheckManualChargeMode(bool Prompt = true )
|
||||
{
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true)
|
||||
|
||||
@@ -196,9 +196,7 @@ namespace Project
|
||||
case arDev.Narumi.DataType.TAG:
|
||||
{
|
||||
//자동 실행 중이다.
|
||||
|
||||
PUB.log.Add($"RFID값에서 위치정보를 추출할 수 있도록 해야한다");
|
||||
|
||||
PUB.Result.LastTAG = PUB.AGV.data.TagNo.ToString();
|
||||
|
||||
var curpos = ParsePosition(PUB.AGV.data.TagNo, out string dirForward);
|
||||
@@ -214,6 +212,8 @@ namespace Project
|
||||
ctlPos1.SetDirection(dirForward);
|
||||
ctlPos1.Invalidate();
|
||||
|
||||
|
||||
|
||||
//pot not를 보면 일단 바로 멈추게한다
|
||||
if (PUB.Result.CurrentPos == ePosition.POT || PUB.Result.CurrentPos == ePosition.NOT)
|
||||
{
|
||||
|
||||
1
Cs_HMI/Project/ViewForm/fAuto.Designer.cs
generated
1
Cs_HMI/Project/ViewForm/fAuto.Designer.cs
generated
@@ -66,6 +66,7 @@
|
||||
// panel1
|
||||
//
|
||||
panel1.Dock = DockStyle.Fill;
|
||||
panel1.Font = new Font("Tahoma", 8F, FontStyle.Bold);
|
||||
panel1.Location = new Point(0, 0);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new Size(1014, 579);
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Windows.Forms;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
namespace Project.ViewForm
|
||||
{
|
||||
@@ -29,6 +30,7 @@ namespace Project.ViewForm
|
||||
this.mapctl = new AGVMapControl.MapControl();
|
||||
this.mapctl.Dock = DockStyle.Fill;
|
||||
this.mapctl.Visible = true;
|
||||
this.mapctl.Font = this.panel1.Font;
|
||||
this.mapctl.BackColor = Color.FromArgb(32, 32, 32);
|
||||
this.panel1.Controls.Add(mapctl);
|
||||
}
|
||||
@@ -39,6 +41,21 @@ namespace Project.ViewForm
|
||||
ctlAuto1.dev_bms = PUB.BMS;
|
||||
ctlAuto1.dev_xbe = PUB.XBE;
|
||||
this.timer1.Start();
|
||||
PUB.AGV.DataReceive += AGV_DataReceive;
|
||||
|
||||
var fn = new System.IO.FileInfo( AR.UTIL.CurrentPath+ "\\sample.route");
|
||||
if (fn.Exists) this.mapctl.LoadFromFile(fn.FullName);
|
||||
}
|
||||
private void AGV_DataReceive(object sender, arDev.Narumi.DataEventArgs e)
|
||||
{
|
||||
|
||||
switch (e.DataType)
|
||||
{
|
||||
case arDev.Narumi.DataType.TAG:
|
||||
var tagno = PUB.AGV.data.TagNo;
|
||||
this.mapctl.AGVMoveToRFID(tagno.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void CtlAuto1_ButtonClick(CtlAuto.UIButton idx)
|
||||
@@ -63,6 +80,7 @@ namespace Project.ViewForm
|
||||
timer1.Stop();
|
||||
PUB.sm.StepChanged -= Sm_StepChanged;
|
||||
this.ctlAuto1.ButtonClick -= CtlAuto1_ButtonClick;
|
||||
PUB.AGV.DataReceive -= AGV_DataReceive;
|
||||
}
|
||||
|
||||
bool tmrun = false;
|
||||
|
||||
3604
Cs_HMI/Project/fMain.Designer.cs
generated
3604
Cs_HMI/Project/fMain.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
@@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user