add mapcontrol
add remote path(gitlab)
This commit is contained in:
26
Cs_HMI/.vscode/launch.json
vendored
Normal file
26
Cs_HMI/.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||||
|
// Use hover for the description of the existing attributes
|
||||||
|
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
|
||||||
|
"name": ".NET Core Launch (console)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
|
"program": "../../../Amkor/AGV4/Debug/net8.0-windows/AGV4.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}/Project",
|
||||||
|
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||||
|
"console": "internalConsole",
|
||||||
|
"stopAtEntry": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
41
Cs_HMI/.vscode/tasks.json
vendored
Normal file
41
Cs_HMI/.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/AGVCSharp.sln",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/AGVCSharp.sln",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/AGVCSharp.sln"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -42,6 +42,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arCommUtil", "SubProject\Co
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ENIGProtocol", "..\..\Protocol\enigprotocol\ENIGProtocol.csproj", "{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ENIGProtocol", "..\..\Protocol\enigprotocol\ENIGProtocol.csproj", "{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGVMapControl", "SubProject\AGVMapControl\AGVMapControl.csproj", "{D37909BE-DCD9-4408-AF06-28F92C69F83D}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -231,6 +233,18 @@ Global
|
|||||||
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}.Release|x64.Build.0 = Release|Any CPU
|
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}.Release|x86.ActiveCfg = Release|Any CPU
|
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}.Release|x86.Build.0 = Release|Any CPU
|
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -249,6 +263,7 @@ Global
|
|||||||
{AAF68D20-4590-4AB0-BB91-E0DD04C91DEC} = {C423C39A-44E7-4F09-B2F7-7943975FF948}
|
{AAF68D20-4590-4AB0-BB91-E0DD04C91DEC} = {C423C39A-44E7-4F09-B2F7-7943975FF948}
|
||||||
{14E8C9A5-013E-49BA-B435-FFFFFF7DD623} = {C423C39A-44E7-4F09-B2F7-7943975FF948}
|
{14E8C9A5-013E-49BA-B435-FFFFFF7DD623} = {C423C39A-44E7-4F09-B2F7-7943975FF948}
|
||||||
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C} = {C423C39A-44E7-4F09-B2F7-7943975FF948}
|
{16BD025D-CB0F-4A4B-A452-8FE629F02F0C} = {C423C39A-44E7-4F09-B2F7-7943975FF948}
|
||||||
|
{D37909BE-DCD9-4408-AF06-28F92C69F83D} = {C423C39A-44E7-4F09-B2F7-7943975FF948}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {B5B1FD72-356F-4840-83E8-B070AC21C8D9}
|
SolutionGuid = {B5B1FD72-356F-4840-83E8-B070AC21C8D9}
|
||||||
|
|||||||
@@ -8,12 +8,15 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<BaseOutputPath>D:\Amkor\AGV4</BaseOutputPath>
|
<BaseOutputPath>D:\Amkor\AGV4</BaseOutputPath>
|
||||||
|
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
|
||||||
|
<UseResourceDedicatedThread>true</UseResourceDedicatedThread>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\Protocol\enigprotocol\ENIGProtocol.csproj" />
|
<ProjectReference Include="..\..\..\Protocol\enigprotocol\ENIGProtocol.csproj" />
|
||||||
<ProjectReference Include="..\StateMachine\StateMachine.csproj" />
|
<ProjectReference Include="..\StateMachine\StateMachine.csproj" />
|
||||||
|
<ProjectReference Include="..\SubProject\AGVMapControl\AGVMapControl.csproj" />
|
||||||
<ProjectReference Include="..\SubProject\AGV\NARUMI.csproj" />
|
<ProjectReference Include="..\SubProject\AGV\NARUMI.csproj" />
|
||||||
<ProjectReference Include="..\SubProject\AGVControl\agvControl.csproj" />
|
<ProjectReference Include="..\SubProject\AGVControl\agvControl.csproj" />
|
||||||
<ProjectReference Include="..\SubProject\arCtl\arControl.csproj" />
|
<ProjectReference Include="..\SubProject\arCtl\arControl.csproj" />
|
||||||
@@ -41,21 +44,19 @@
|
|||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="sample.route">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Winsock_Orcas">
|
<Reference Include="Winsock Orcas">
|
||||||
<HintPath>lib\Winsock_Orcas.dll</HintPath>
|
<HintPath>..\DLL\Winsock Orcas.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="EEProtocol">
|
|
||||||
<HintPath>lib\EEProtocol.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="arUtil">
|
|
||||||
<HintPath>lib\arUtil.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
||||||
<PackageReference Include="System.IO.Ports" Version="9.0.4" />
|
<PackageReference Include="System.IO.Ports" Version="9.0.4" />
|
||||||
<PackageReference Include="System.Management" Version="9.0.4" />
|
<PackageReference Include="System.Management" Version="9.0.4" />
|
||||||
<PackageReference Include="System.Speech" Version="9.0.4" />
|
<PackageReference Include="System.Speech" Version="9.0.4" />
|
||||||
|
|||||||
@@ -108,24 +108,24 @@ public static partial class EEMStatus
|
|||||||
StatusChecktime = DateTime.Now;
|
StatusChecktime = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
//내부실행모드일때에만 파일을 처리한다
|
////내부실행모드일때에만 파일을 처리한다
|
||||||
if (_extrun == false)
|
//if (_extrun == false)
|
||||||
{
|
//{
|
||||||
var tsfile = DateTime.Now - FileCheckTime;
|
// var tsfile = DateTime.Now - FileCheckTime;
|
||||||
if (tsfile.TotalSeconds >= UpdateFileInterval)
|
// if (tsfile.TotalSeconds >= UpdateFileInterval)
|
||||||
{
|
// {
|
||||||
if (UpdateRun == false)
|
// if (UpdateRun == false)
|
||||||
{
|
// {
|
||||||
UpdateRun = true;
|
// UpdateRun = true;
|
||||||
Task.Run(() =>
|
// Task.Run(() =>
|
||||||
{
|
// {
|
||||||
UpdateFileToDB();
|
// UpdateFileToDB();
|
||||||
UpdateRun = false;
|
// UpdateRun = false;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
FileCheckTime = DateTime.Now;
|
// FileCheckTime = DateTime.Now;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -258,7 +258,7 @@ public static partial class EEMStatus
|
|||||||
//var di = new System.IO.DirectoryInfo(path);
|
//var di = new System.IO.DirectoryInfo(path);
|
||||||
//var fi = di.GetFiles("*.sql", System.IO.SearchOption.TopDirectoryOnly).Where(t => t.LastWriteTime < DateTime.Now.AddMinutes(-3)).FirstOrDefault();
|
//var fi = di.GetFiles("*.sql", System.IO.SearchOption.TopDirectoryOnly).Where(t => t.LastWriteTime < DateTime.Now.AddMinutes(-3)).FirstOrDefault();
|
||||||
//if (fi != null) fi.Delete();
|
//if (fi != null) fi.Delete();
|
||||||
if (state == 4 && extrun == false) UpdateFileToDB();
|
//if (state == 4 && extrun == false) UpdateFileToDB();
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -269,97 +269,97 @@ public static partial class EEMStatus
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void UpdateFileToDB()
|
//static void UpdateFileToDB()
|
||||||
{
|
//{
|
||||||
if (mre.WaitOne(1000) == false) return;
|
// if (mre.WaitOne(1000) == false) return;
|
||||||
mre.Reset();
|
// mre.Reset();
|
||||||
var cs = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
|
// var cs = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
|
||||||
var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status");
|
// var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status");
|
||||||
var di = new System.IO.DirectoryInfo(path);
|
// var di = new System.IO.DirectoryInfo(path);
|
||||||
if (di.Exists == false) return;
|
// if (di.Exists == false) return;
|
||||||
var file = di.GetFiles("*.sql", System.IO.SearchOption.TopDirectoryOnly)
|
// var file = di.GetFiles("*.sql", System.IO.SearchOption.TopDirectoryOnly)
|
||||||
.Where(t => t.LastWriteTime < DateTime.Now.AddSeconds(-3))
|
// .Where(t => t.LastWriteTime < DateTime.Now.AddSeconds(-3))
|
||||||
.OrderByDescending(t => t.LastWriteTime).FirstOrDefault();
|
// .OrderByDescending(t => t.LastWriteTime).FirstOrDefault();
|
||||||
|
|
||||||
if (file == null)
|
// if (file == null)
|
||||||
{
|
// {
|
||||||
mre.Set();
|
// mre.Set();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//파일을 찾아야한다
|
// //파일을 찾아야한다
|
||||||
// PUB.log.Add($">> {file.FullName}");
|
// // PUB.log.Add($">> {file.FullName}");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
var sql = System.IO.File.ReadAllText(file.FullName, System.Text.Encoding.Default);
|
// var sql = System.IO.File.ReadAllText(file.FullName, System.Text.Encoding.Default);
|
||||||
if (string.IsNullOrEmpty(sql))
|
// if (string.IsNullOrEmpty(sql))
|
||||||
{
|
// {
|
||||||
//비어잇다면
|
// //비어잇다면
|
||||||
var errpath = System.IO.Path.Combine(di.FullName, "Error");
|
// var errpath = System.IO.Path.Combine(di.FullName, "Error");
|
||||||
var errfile = System.IO.Path.Combine(errpath, file.Name);
|
// var errfile = System.IO.Path.Combine(errpath, file.Name);
|
||||||
if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
|
// if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
|
||||||
System.IO.File.Move(file.FullName, errfile);// file.MoveTo(errfile);
|
// System.IO.File.Move(file.FullName, errfile);// file.MoveTo(errfile);
|
||||||
// ecnt += 1;
|
// // ecnt += 1;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
// var csstr = PUB.setting.ConnectionString;
|
// // var csstr = PUB.setting.ConnectionString;
|
||||||
// if (string.IsNullOrEmpty(csstr)) csstr = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
|
// // if (string.IsNullOrEmpty(csstr)) csstr = "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!";
|
||||||
var cn = new System.Data.SqlClient.SqlConnection(cs);
|
// var cn = new System.Data.SqlClient.SqlConnection(cs);
|
||||||
var cmd = new System.Data.SqlClient.SqlCommand(sql, cn);
|
// var cmd = new System.Data.SqlClient.SqlCommand(sql, cn);
|
||||||
cn.Open();
|
// cn.Open();
|
||||||
var cnt = cmd.ExecuteNonQuery();
|
// var cnt = cmd.ExecuteNonQuery();
|
||||||
//if (cnt == 0) PUB.log.Add($"Result Empty : {sql}");
|
// //if (cnt == 0) PUB.log.Add($"Result Empty : {sql}");
|
||||||
cn.Close();
|
// cn.Close();
|
||||||
cnt += 1;
|
// cnt += 1;
|
||||||
|
|
||||||
var errpath = System.IO.Path.Combine(di.FullName, "Complete");
|
// var errpath = System.IO.Path.Combine(di.FullName, "Complete");
|
||||||
var errfile = System.IO.Path.Combine(errpath, file.Name);
|
// var errfile = System.IO.Path.Combine(errpath, file.Name);
|
||||||
if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
|
// if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
|
||||||
//file.MoveTo(errfile);
|
// //file.MoveTo(errfile);
|
||||||
System.IO.File.Move(file.FullName, errfile);
|
// System.IO.File.Move(file.FullName, errfile);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
catch (Exception ex)
|
// catch (Exception ex)
|
||||||
{
|
// {
|
||||||
var errpath = System.IO.Path.Combine(di.FullName, "Error");
|
// var errpath = System.IO.Path.Combine(di.FullName, "Error");
|
||||||
var errfile = System.IO.Path.Combine(errpath, file.Name);
|
// var errfile = System.IO.Path.Combine(errpath, file.Name);
|
||||||
if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
|
// if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath);
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
//file.MoveTo(errfile);
|
// //file.MoveTo(errfile);
|
||||||
System.IO.File.Move(file.FullName, errfile);
|
// System.IO.File.Move(file.FullName, errfile);
|
||||||
}
|
// }
|
||||||
catch (Exception ex2)
|
// catch (Exception ex2)
|
||||||
{
|
// {
|
||||||
Console.WriteLine($"move error : {ex2.Message} : {errfile}");
|
// Console.WriteLine($"move error : {ex2.Message} : {errfile}");
|
||||||
}
|
// }
|
||||||
|
|
||||||
//ecnt += 1;
|
// //ecnt += 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
try
|
// try
|
||||||
{
|
// {
|
||||||
//생성된지 10일이 넘은 자료는 삭제한다.
|
// //생성된지 10일이 넘은 자료는 삭제한다.
|
||||||
//시간소비를 피해서 1개의 파일만 작업한다
|
// //시간소비를 피해서 1개의 파일만 작업한다
|
||||||
var sqlfiles = di.GetFiles("*.sql", System.IO.SearchOption.AllDirectories);
|
// var sqlfiles = di.GetFiles("*.sql", System.IO.SearchOption.AllDirectories);
|
||||||
//총3번의 데이터를 처리한다
|
// //총3번의 데이터를 처리한다
|
||||||
var files = sqlfiles.Where(t => t.LastWriteTime < DateTime.Now.AddDays(-10)).Select(t => t.FullName);
|
// var files = sqlfiles.Where(t => t.LastWriteTime < DateTime.Now.AddDays(-10)).Select(t => t.FullName);
|
||||||
int i = 0;
|
// int i = 0;
|
||||||
var dellist = files.TakeWhile(t => i++ < 3);
|
// var dellist = files.TakeWhile(t => i++ < 3);
|
||||||
foreach (var delfile in dellist)
|
// foreach (var delfile in dellist)
|
||||||
System.IO.File.Delete(delfile);
|
// System.IO.File.Delete(delfile);
|
||||||
}
|
// }
|
||||||
catch
|
// catch
|
||||||
{
|
// {
|
||||||
|
|
||||||
}
|
// }
|
||||||
mre.Set();
|
// mre.Set();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,10 @@ using System.Net;
|
|||||||
using System.Management;
|
using System.Management;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using AR;
|
using AR;
|
||||||
using System.Security.Policy;
|
|
||||||
using Project.StateMachine;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Speech.Synthesis;
|
using System.Speech.Synthesis;
|
||||||
using System.Media;
|
using System.Media;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using Microsoft.Data.SqlClient;
|
||||||
|
|
||||||
namespace Project
|
namespace Project
|
||||||
{
|
{
|
||||||
@@ -406,7 +400,7 @@ namespace Project
|
|||||||
var conn = new SqlConnection(AGV4.Properties.Settings.Default.CS);// "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!");
|
var conn = new SqlConnection(AGV4.Properties.Settings.Default.CS);// "Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!");
|
||||||
conn.Open();
|
conn.Open();
|
||||||
string ProcName = "AddPrgmUser3";
|
string ProcName = "AddPrgmUser3";
|
||||||
SqlCommand cmd = new SqlCommand(ProcName, conn)
|
var cmd = new SqlCommand(ProcName, conn)
|
||||||
{
|
{
|
||||||
CommandType = CommandType.StoredProcedure
|
CommandType = CommandType.StoredProcedure
|
||||||
};
|
};
|
||||||
|
|||||||
89
Cs_HMI/Project/ViewForm/fAuto.Designer.cs
generated
89
Cs_HMI/Project/ViewForm/fAuto.Designer.cs
generated
@@ -28,59 +28,68 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
components = new System.ComponentModel.Container();
|
||||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
timer1 = new System.Windows.Forms.Timer(components);
|
||||||
this.ctlAuto1 = new Project.CtlAuto();
|
ctlAuto1 = new CtlAuto();
|
||||||
this.SuspendLayout();
|
panel1 = new Panel();
|
||||||
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// timer1
|
// timer1
|
||||||
//
|
//
|
||||||
this.timer1.Interval = 200;
|
timer1.Interval = 200;
|
||||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
timer1.Tick += timer1_Tick;
|
||||||
//
|
//
|
||||||
// ctlAuto1
|
// ctlAuto1
|
||||||
//
|
//
|
||||||
this.ctlAuto1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
ctlAuto1.BackColor = Color.FromArgb(32, 32, 32);
|
||||||
this.ctlAuto1.BorderColor = System.Drawing.Color.Transparent;
|
ctlAuto1.BorderColor = Color.Transparent;
|
||||||
this.ctlAuto1.Dock = System.Windows.Forms.DockStyle.Fill;
|
ctlAuto1.Font = new Font("맑은 고딕", 20F, FontStyle.Regular, GraphicsUnit.Point, 129);
|
||||||
this.ctlAuto1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
ctlAuto1.Font_BMS_Level = new Font("Bahnschrift Condensed", 250F, FontStyle.Bold, GraphicsUnit.Point, 0);
|
||||||
this.ctlAuto1.Font_BMS_Level = new System.Drawing.Font("Bahnschrift Condensed", 250F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
ctlAuto1.Font_BMS_Volt = new Font("Bahnschrift Condensed", 50.25F, FontStyle.Bold);
|
||||||
this.ctlAuto1.Font_BMS_Volt = new System.Drawing.Font("Bahnschrift Condensed", 50.25F, System.Drawing.FontStyle.Bold);
|
ctlAuto1.Font_MAIN_BMSLevel = new Font("Arial Narrow", 150F, FontStyle.Bold);
|
||||||
this.ctlAuto1.Font_MAIN_BMSLevel = new System.Drawing.Font("Arial Narrow", 150F, System.Drawing.FontStyle.Bold);
|
ctlAuto1.ForeColor = Color.White;
|
||||||
this.ctlAuto1.ForeColor = System.Drawing.Color.White;
|
ctlAuto1.ItemGap = 0;
|
||||||
this.ctlAuto1.ItemGap = 0;
|
ctlAuto1.Items = null;
|
||||||
this.ctlAuto1.Items = null;
|
ctlAuto1.Location = new Point(835, 338);
|
||||||
this.ctlAuto1.Location = new System.Drawing.Point(0, 0);
|
ctlAuto1.MinimumSize = new Size(100, 30);
|
||||||
this.ctlAuto1.MinimumSize = new System.Drawing.Size(100, 30);
|
ctlAuto1.Name = "ctlAuto1";
|
||||||
this.ctlAuto1.Name = "ctlAuto1";
|
ctlAuto1.ProgressMax = 100F;
|
||||||
this.ctlAuto1.ProgressMax = 100F;
|
ctlAuto1.ProgressVal = 50F;
|
||||||
this.ctlAuto1.ProgressVal = 50F;
|
ctlAuto1.Scean = CtlAuto.eScean.Normal;
|
||||||
this.ctlAuto1.Scean = Project.CtlAuto.eScean.Normal;
|
ctlAuto1.Size = new Size(179, 241);
|
||||||
this.ctlAuto1.Size = new System.Drawing.Size(1014, 579);
|
ctlAuto1.StatusMessage = "상태메세지 입니다";
|
||||||
this.ctlAuto1.StatusMessage = "상태메세지 입니다";
|
ctlAuto1.StopMessage = "";
|
||||||
this.ctlAuto1.StopMessage = "";
|
ctlAuto1.StopTime = new DateTime(0L);
|
||||||
this.ctlAuto1.StopTime = new System.DateTime(((long)(0)));
|
ctlAuto1.TabIndex = 20;
|
||||||
this.ctlAuto1.TabIndex = 20;
|
ctlAuto1.Text = "ctlAuto1";
|
||||||
this.ctlAuto1.Text = "ctlAuto1";
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
panel1.Dock = DockStyle.Fill;
|
||||||
|
panel1.Location = new Point(0, 0);
|
||||||
|
panel1.Name = "panel1";
|
||||||
|
panel1.Size = new Size(1014, 579);
|
||||||
|
panel1.TabIndex = 21;
|
||||||
//
|
//
|
||||||
// fAuto
|
// fAuto
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
AutoScaleMode = AutoScaleMode.None;
|
||||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
BackColor = Color.FromArgb(15, 15, 15);
|
||||||
this.ClientSize = new System.Drawing.Size(1014, 579);
|
ClientSize = new Size(1014, 579);
|
||||||
this.Controls.Add(this.ctlAuto1);
|
Controls.Add(panel1);
|
||||||
this.DoubleBuffered = true;
|
Controls.Add(ctlAuto1);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
DoubleBuffered = true;
|
||||||
this.Name = "fAuto";
|
FormBorderStyle = FormBorderStyle.None;
|
||||||
this.Text = "fAuto";
|
Name = "fAuto";
|
||||||
this.Load += new System.EventHandler(this.fAuto_Load);
|
Text = "fAuto";
|
||||||
this.VisibleChanged += new System.EventHandler(this.fAuto_VisibleChanged);
|
Load += fAuto_Load;
|
||||||
this.ResumeLayout(false);
|
VisibleChanged += fAuto_VisibleChanged;
|
||||||
|
ResumeLayout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
private System.Windows.Forms.Timer timer1;
|
private System.Windows.Forms.Timer timer1;
|
||||||
private CtlAuto ctlAuto1;
|
private CtlAuto ctlAuto1;
|
||||||
|
private Panel panel1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ namespace Project.ViewForm
|
|||||||
{
|
{
|
||||||
public partial class fAuto : Form
|
public partial class fAuto : Form
|
||||||
{
|
{
|
||||||
|
AGVMapControl.MapControl mapctl;
|
||||||
public fAuto()
|
public fAuto()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -25,6 +26,11 @@ namespace Project.ViewForm
|
|||||||
this.ctlAuto1.Scean = CtlAuto.eScean.Progress;
|
this.ctlAuto1.Scean = CtlAuto.eScean.Progress;
|
||||||
else
|
else
|
||||||
this.ctlAuto1.Scean = CtlAuto.eScean.Normal;
|
this.ctlAuto1.Scean = CtlAuto.eScean.Normal;
|
||||||
|
this.mapctl = new AGVMapControl.MapControl();
|
||||||
|
this.mapctl.Dock = DockStyle.Fill;
|
||||||
|
this.mapctl.Visible = true;
|
||||||
|
this.mapctl.BackColor = Color.FromArgb(32, 32, 32);
|
||||||
|
this.panel1.Controls.Add(mapctl);
|
||||||
}
|
}
|
||||||
private void fAuto_Load(object sender, EventArgs e)
|
private void fAuto_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
144
Cs_HMI/Project/sample.route
Normal file
144
Cs_HMI/Project/sample.route
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
[RFID_POINTS]
|
||||||
|
100,486,T0002
|
||||||
|
164,494,T0003
|
||||||
|
229,493,T0004
|
||||||
|
309,489,T0005
|
||||||
|
370,490,T0006
|
||||||
|
437,486,T0007
|
||||||
|
483,459,T0008
|
||||||
|
511,421,T0009
|
||||||
|
543,371,T0010
|
||||||
|
569,329,T0011
|
||||||
|
608,289,T0012
|
||||||
|
661,279,T0013
|
||||||
|
700,297,T0014
|
||||||
|
698,349,T0015
|
||||||
|
698,391,T0016
|
||||||
|
699,449,T0017
|
||||||
|
691,491,T0018
|
||||||
|
569,275,T0019
|
||||||
|
518,264,T0020
|
||||||
|
454,264,T0021
|
||||||
|
388,261,T0022
|
||||||
|
314,258,T0023
|
||||||
|
639,234,T0024
|
||||||
|
621,182,T0025
|
||||||
|
629,143,T0026
|
||||||
|
657,101,T0027
|
||||||
|
627,82,T0028
|
||||||
|
560,73,T0029
|
||||||
|
499,65,T0030
|
||||||
|
432,65,T0031
|
||||||
|
264,232,T0032
|
||||||
|
363,60,T0033
|
||||||
|
654,508,T0034
|
||||||
|
96,542,T0050
|
||||||
|
159,542,T0051
|
||||||
|
226,542,T0061
|
||||||
|
309,541,T0070
|
||||||
|
369,542,T0071
|
||||||
|
483,165,T0010
|
||||||
|
735,163,T0011
|
||||||
|
523,170,T0001
|
||||||
|
565,175,T0002
|
||||||
|
597,182,T0003
|
||||||
|
665,181,T0004
|
||||||
|
700,176,T0005
|
||||||
|
721,170,T0006
|
||||||
|
[MAGNET_LINES]
|
||||||
|
99,485,220,492
|
||||||
|
220,492,375,488
|
||||||
|
375,488,457,479
|
||||||
|
457,479,512,432
|
||||||
|
512,432,552,353
|
||||||
|
552,353,602,291
|
||||||
|
602,291,651,278
|
||||||
|
651,278,700,289
|
||||||
|
700,289,704,380
|
||||||
|
704,380,700,469
|
||||||
|
700,469,688,488
|
||||||
|
666,277,637,229
|
||||||
|
637,229,625,170
|
||||||
|
625,170,654,94
|
||||||
|
654,94,624,78
|
||||||
|
624,78,484,63
|
||||||
|
484,63,365,64
|
||||||
|
608,287,523,267
|
||||||
|
523,267,409,260
|
||||||
|
409,260,275,258
|
||||||
|
99,486,95,542
|
||||||
|
161,495,161,543
|
||||||
|
230,496,228,537
|
||||||
|
228,537,228,544
|
||||||
|
306,488,306,543
|
||||||
|
373,489,371,544
|
||||||
|
655,508,691,486
|
||||||
|
481,164,624,183
|
||||||
|
624,183,706,181
|
||||||
|
706,181,743,161
|
||||||
|
[MAP_TEXTS]
|
||||||
|
179,251,-1,-16777216,Arial,12,TOPS-2
|
||||||
|
239,52,-256,-65408,Arial,12,SSOTRON-3
|
||||||
|
617,527,-16711936,-16777216,Arial,12,SSOTRON-1
|
||||||
|
87,551,-16777216,16777215,Arial,12,B1
|
||||||
|
150,551,-16777216,16777215,Arial,12,B2
|
||||||
|
227,553,-16777216,16777215,Arial,12,B3
|
||||||
|
299,555,-16777216,16777215,Arial,12,B4
|
||||||
|
367,554,-16777216,16777215,Arial,12,B5
|
||||||
|
453,128,-16777216,-8323073,Arial,12,CHG1
|
||||||
|
725,124,-16777216,-8323073,Arial,12,CHG2
|
||||||
|
[CUSTOM_LINES]
|
||||||
|
[RFID_LINES]
|
||||||
|
96,542,100,486,T0005,T0002,True,56.14267
|
||||||
|
100,486,164,494,T0002,T0003,True,64.49806
|
||||||
|
164,494,229,493,T0003,T0004,True,65.00769
|
||||||
|
229,493,309,489,T0004,T0005,True,80.09994
|
||||||
|
309,489,370,490,T0005,T0006,True,61.0082
|
||||||
|
370,490,437,486,T0006,T0007,True,67.11929
|
||||||
|
437,486,483,459,T0007,T0008,True,53.33854
|
||||||
|
483,459,511,421,T0008,T0009,True,47.20169
|
||||||
|
511,421,543,371,T0009,T0010,True,59.36329
|
||||||
|
543,371,569,329,T0010,T0011,True,49.39635
|
||||||
|
569,329,608,289,T0011,T0012,True,55.86591
|
||||||
|
608,289,661,279,T0012,T0013,True,53.93515
|
||||||
|
661,279,700,297,T0013,T0014,True,42.95346
|
||||||
|
700,297,698,349,T0014,T0015,True,52.03845
|
||||||
|
698,349,698,391,T0015,T0016,True,42
|
||||||
|
698,391,699,449,T0016,T0017,True,58.00862
|
||||||
|
699,449,691,491,T0017,T0018,True,42.75512
|
||||||
|
691,491,654,508,T0018,T0034,True,40.71855
|
||||||
|
159,542,164,494,T0006,T0003,True,48.25971
|
||||||
|
226,542,229,493,T0007,T0004,True,49.09175
|
||||||
|
309,541,309,489,T0008,T0005,True,52
|
||||||
|
369,542,370,490,T0009,T0006,True,52.00961
|
||||||
|
370,490,370,490,T0006,T0006,True,0
|
||||||
|
608,289,569,275,T0012,T0019,True,41.4367
|
||||||
|
569,275,518,264,T0019,T0020,True,52.17279
|
||||||
|
518,264,454,264,T0020,T0021,True,64
|
||||||
|
454,264,388,261,T0021,T0022,True,66.06815
|
||||||
|
388,261,314,258,T0022,T0023,True,74.06078
|
||||||
|
661,279,639,234,T0013,T0024,True,50.08992
|
||||||
|
639,234,621,182,T0024,T0025,True,55.02727
|
||||||
|
621,182,629,143,T0025,T0026,True,39.81206
|
||||||
|
629,143,657,101,T0026,T0027,True,50.47772
|
||||||
|
657,101,627,82,T0027,T0028,True,35.51056
|
||||||
|
627,82,560,73,T0028,T0029,True,67.60178
|
||||||
|
560,73,499,65,T0029,T0030,True,61.52235
|
||||||
|
483,165,523,170,T0010,T0001,True,40.31129
|
||||||
|
523,170,565,175,T0001,T0002,True,42.29657
|
||||||
|
565,175,597,182,T0002,T0003,True,32.75668
|
||||||
|
597,182,621,182,T0003,T0025,True,24
|
||||||
|
621,182,665,181,T0025,T0004,True,44.01136
|
||||||
|
665,181,700,176,T0004,T0005,True,35.35534
|
||||||
|
700,176,721,170,T0005,T0006,True,21.84033
|
||||||
|
721,170,735,163,T0006,T0011,True,15.65248
|
||||||
|
735,163,721,170,T0011,T0006,True,15.65248
|
||||||
|
721,170,735,163,T0006,T0011,True,15.65248
|
||||||
|
314,258,388,261,T0023,T0022,True,74.06078
|
||||||
|
388,261,454,264,T0022,T0021,True,66.06815
|
||||||
|
454,264,518,264,T0021,T0020,True,64
|
||||||
|
518,264,569,275,T0020,T0019,True,52.17279
|
||||||
|
569,275,608,289,T0019,T0012,True,41.4367
|
||||||
|
264,232,314,258,T0032,T0023,True,56.35601
|
||||||
|
363,60,432,65,T0033,T0031,True,69.18092
|
||||||
|
432,65,499,65,T0031,T0030,True,67
|
||||||
14
Cs_HMI/SubProject/AGVMapControl/AGVMapControl.csproj
Normal file
14
Cs_HMI/SubProject/AGVMapControl/AGVMapControl.csproj
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\CommUtil\arCommUtil.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
37
Cs_HMI/SubProject/AGVMapControl/MapControl.Designer.cs
generated
Normal file
37
Cs_HMI/SubProject/AGVMapControl/MapControl.Designer.cs
generated
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
namespace AGVMapControl
|
||||||
|
{
|
||||||
|
partial class MapControl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
1688
Cs_HMI/SubProject/AGVMapControl/MapControl.cs
Normal file
1688
Cs_HMI/SubProject/AGVMapControl/MapControl.cs
Normal file
File diff suppressed because it is too large
Load Diff
70
Cs_HMI/SubProject/AGVMapControl/Models/AGV.cs
Normal file
70
Cs_HMI/SubProject/AGVMapControl/Models/AGV.cs
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class AGV
|
||||||
|
{
|
||||||
|
public Point CurrentPosition { get; set; }
|
||||||
|
public string CurrentRFID { get; set; }
|
||||||
|
public Direction CurrentDirection { get; set; }
|
||||||
|
public bool IsMoving { get; set; }
|
||||||
|
public List<Point> CurrentPath { get; set; }
|
||||||
|
public List<Point> PlannedPath { get; set; }
|
||||||
|
public List<string> PathRFIDs { get; set; }
|
||||||
|
|
||||||
|
public AGV()
|
||||||
|
{
|
||||||
|
CurrentPath = new List<Point>();
|
||||||
|
PlannedPath = new List<Point>();
|
||||||
|
PathRFIDs = new List<string>();
|
||||||
|
CurrentDirection = Direction.Forward;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Move()
|
||||||
|
{
|
||||||
|
if (CurrentPath.Count > 0)
|
||||||
|
{
|
||||||
|
CurrentPosition = CurrentPath[0];
|
||||||
|
CurrentPath.RemoveAt(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetNewPath(List<Point> path)
|
||||||
|
{
|
||||||
|
CurrentPath = new List<Point>(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearPlannedPath()
|
||||||
|
{
|
||||||
|
PlannedPath.Clear();
|
||||||
|
PathRFIDs.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Direction
|
||||||
|
{
|
||||||
|
Forward,
|
||||||
|
Backward
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PathNode
|
||||||
|
{
|
||||||
|
public Point Location { get; set; }
|
||||||
|
public string RFID { get; set; }
|
||||||
|
public double G { get; set; } // 시작점에서 현재 노드까지의 비용
|
||||||
|
public double H { get; set; } // 현재 노드에서 목표점까지의 예상 비용
|
||||||
|
public double F => G + H; // 총 비용
|
||||||
|
public PathNode Parent { get; set; }
|
||||||
|
|
||||||
|
public PathNode(Point location, string rfid)
|
||||||
|
{
|
||||||
|
Location = location;
|
||||||
|
RFID = rfid;
|
||||||
|
G = 0;
|
||||||
|
H = 0;
|
||||||
|
Parent = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
Cs_HMI/SubProject/AGVMapControl/Models/CustomLine.cs
Normal file
14
Cs_HMI/SubProject/AGVMapControl/Models/CustomLine.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class CustomLine
|
||||||
|
{
|
||||||
|
public Point StartPoint { get; set; }
|
||||||
|
public Point EndPoint { get; set; }
|
||||||
|
public Color LineColor { get; set; }
|
||||||
|
public int LineWidth { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Cs_HMI/SubProject/AGVMapControl/Models/MagnetLine.cs
Normal file
20
Cs_HMI/SubProject/AGVMapControl/Models/MagnetLine.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class MagnetLine
|
||||||
|
{
|
||||||
|
public Point StartPoint { get; set; }
|
||||||
|
public Point EndPoint { get; set; }
|
||||||
|
public List<Point> BranchPoints { get; set; }
|
||||||
|
public Dictionary<Point, BranchDirection> BranchDirections { get; set; }
|
||||||
|
|
||||||
|
public MagnetLine()
|
||||||
|
{
|
||||||
|
BranchPoints = new List<Point>();
|
||||||
|
BranchDirections = new Dictionary<Point, BranchDirection>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
Cs_HMI/SubProject/AGVMapControl/Models/MapData.cs
Normal file
14
Cs_HMI/SubProject/AGVMapControl/Models/MapData.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class MapData
|
||||||
|
{
|
||||||
|
public List<RFIDPoint> RFIDPoints { get; set; } = new List<RFIDPoint>();
|
||||||
|
public List<MagnetLine> MagnetLines { get; set; } = new List<MagnetLine>();
|
||||||
|
public List<MapText> MapTexts { get; set; } = new List<MapText>();
|
||||||
|
public List<CustomLine> CustomLines { get; set; } = new List<CustomLine>();
|
||||||
|
public List<RFIDLine> RFIDLines { get; set; } = new List<RFIDLine>();
|
||||||
|
}
|
||||||
|
}
|
||||||
13
Cs_HMI/SubProject/AGVMapControl/Models/MapElements.cs
Normal file
13
Cs_HMI/SubProject/AGVMapControl/Models/MapElements.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public enum BranchDirection
|
||||||
|
{
|
||||||
|
Left,
|
||||||
|
Straight,
|
||||||
|
Right
|
||||||
|
}
|
||||||
|
}
|
||||||
14
Cs_HMI/SubProject/AGVMapControl/Models/MapText.cs
Normal file
14
Cs_HMI/SubProject/AGVMapControl/Models/MapText.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class MapText
|
||||||
|
{
|
||||||
|
public Point Location { get; set; }
|
||||||
|
public string Text { get; set; }
|
||||||
|
public Color TextColor { get; set; }
|
||||||
|
public Color BackgroundColor { get; set; }
|
||||||
|
public Font Font { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Cs_HMI/SubProject/AGVMapControl/Models/RFIDLine.cs
Normal file
20
Cs_HMI/SubProject/AGVMapControl/Models/RFIDLine.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class RFIDLine
|
||||||
|
{
|
||||||
|
public Point StartPoint { get; set; }
|
||||||
|
public Point EndPoint { get; set; }
|
||||||
|
public string StartRFID { get; set; }
|
||||||
|
public string EndRFID { get; set; }
|
||||||
|
public bool IsBidirectional { get; set; } = true; // 양방향 이동 가능 여부
|
||||||
|
public float Distance { get; set; } // 두 RFID 포인트 사이의 거리
|
||||||
|
|
||||||
|
public List<string> ConnectedRFIDs { get; set; } = new List<string>(); // 연결된 모든 RFID 값들
|
||||||
|
public Dictionary<string, string> NextRFID { get; set; } = new Dictionary<string, string>(); // 각 RFID의 다음 RFID
|
||||||
|
public Dictionary<string, string> PrevRFID { get; set; } = new Dictionary<string, string>(); // 각 RFID의 이전 RFID
|
||||||
|
}
|
||||||
|
}
|
||||||
13
Cs_HMI/SubProject/AGVMapControl/Models/RFIDPoint.cs
Normal file
13
Cs_HMI/SubProject/AGVMapControl/Models/RFIDPoint.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class RFIDPoint
|
||||||
|
{
|
||||||
|
public Point Location { get; set; }
|
||||||
|
public string RFIDValue { get; set; }
|
||||||
|
public string NextRFID { get; set; } // 다음 RFID 포인트의 값
|
||||||
|
public bool IsBidirectional { get; set; } // 양방향 연결 여부
|
||||||
|
}
|
||||||
|
}
|
||||||
34
Cs_HMI/SubProject/AGVMapControl/Models/ToolBarItem.cs
Normal file
34
Cs_HMI/SubProject/AGVMapControl/Models/ToolBarItem.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace AGVMapControl.Models
|
||||||
|
{
|
||||||
|
public class ToolBarItem
|
||||||
|
{
|
||||||
|
private bool _ishovering = false;
|
||||||
|
public int Idx { get; set; }
|
||||||
|
public Rectangle Bounds { get; set; }
|
||||||
|
public bool isHovering
|
||||||
|
{
|
||||||
|
get { return _ishovering; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Dirty = _ishovering != value;
|
||||||
|
_ishovering = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Title { get; set; }
|
||||||
|
public bool Dirty { get; private set; }
|
||||||
|
|
||||||
|
public ToolBarItem()
|
||||||
|
{
|
||||||
|
Bounds = Rectangle.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user