diff --git a/Cs_HMI/AGVCSharp.sln b/Cs_HMI/AGVCSharp.sln new file mode 100644 index 0000000..11bc2c9 --- /dev/null +++ b/Cs_HMI/AGVCSharp.sln @@ -0,0 +1,274 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34714.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGV4", "Project\AGV4.csproj", "{65F3E762-800C-499E-862F-A535642EC59F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arControl", "SubProject\arCtl\arControl.csproj", "{F31C242C-1B15-4518-9733-48558499FE4B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sub", "Sub", "{C423C39A-44E7-4F09-B2F7-7943975FF948}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{7AF32085-E7A6-4D06-BA6E-C6B1EBAEA99A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arFrameControl", "SubProject\arFrameControl\arFrameControl.csproj", "{A16C9667-5241-4313-888E-548375F85D29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StateMachine", "StateMachine\StateMachine.csproj", "{BBC9BCCF-6262-4355-9CC2-37FF678AC499}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "agvControl", "SubProject\AGVControl\agvControl.csproj", "{8CB883C0-99C3-4DD4-B017-F9B92010A806}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_NLRF100", "TestProject\Test_NLRF100\Test_NLRF100.csproj", "{2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_PLC", "TestProject\Test_ProPLC\Test_PLC.csproj", "{9C027BF1-289F-4CC8-83F0-CB2B975C39C2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_BMS", "TestProject\Test_BMS\Test_BMS.csproj", "{CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMS", "SubProject\BMS\BMS.csproj", "{7A94C30C-6772-4F71-BF9C-0DF071A1BC70}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWPatch", "SubProject\Patch\SWPatch.csproj", "{37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emulator", "Emulator\Emulator.csproj", "{00BBEF50-3899-4BF1-82E0-DF065CB2A88C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PLC.Net45", "SubProject\ProPLC\PLC.Net45.csproj", "{476C8E64-7B6B-4554-ACA2-04302715750F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NARUMI", "SubProject\AGV\NARUMI.csproj", "{8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommData", "SubProject\CommData\CommData.csproj", "{14E8C9A5-013E-49BA-B435-EFEFC77DD623}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Narumi", "TestProject\Test_Narumi\Test_Narumi.csproj", "{EB77976F-4DE4-46A5-8B25-D07226204C32}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSSQLCommand", "SubProject\MSSQLCommand\MSSQLCommand.csproj", "{AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arCommUtil", "SubProject\CommUtil\arCommUtil.csproj", "{14E8C9A5-013E-49BA-B435-FFFFFF7DD623}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {65F3E762-800C-499E-862F-A535642EC59F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65F3E762-800C-499E-862F-A535642EC59F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65F3E762-800C-499E-862F-A535642EC59F}.Debug|x64.ActiveCfg = Debug|Any CPU + {65F3E762-800C-499E-862F-A535642EC59F}.Debug|x64.Build.0 = Debug|Any CPU + {65F3E762-800C-499E-862F-A535642EC59F}.Debug|x86.ActiveCfg = Debug|x86 + {65F3E762-800C-499E-862F-A535642EC59F}.Debug|x86.Build.0 = Debug|x86 + {65F3E762-800C-499E-862F-A535642EC59F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65F3E762-800C-499E-862F-A535642EC59F}.Release|Any CPU.Build.0 = Release|Any CPU + {65F3E762-800C-499E-862F-A535642EC59F}.Release|x64.ActiveCfg = Release|Any CPU + {65F3E762-800C-499E-862F-A535642EC59F}.Release|x86.ActiveCfg = Release|x86 + {65F3E762-800C-499E-862F-A535642EC59F}.Release|x86.Build.0 = Release|x86 + {F31C242C-1B15-4518-9733-48558499FE4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Debug|x64.ActiveCfg = Debug|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Debug|x64.Build.0 = Debug|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Debug|x86.ActiveCfg = Debug|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Release|Any CPU.Build.0 = Release|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Release|x64.ActiveCfg = Release|Any CPU + {F31C242C-1B15-4518-9733-48558499FE4B}.Release|x86.ActiveCfg = Release|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Debug|x64.ActiveCfg = Debug|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Debug|x64.Build.0 = Debug|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Debug|x86.ActiveCfg = Debug|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Release|Any CPU.Build.0 = Release|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Release|x64.ActiveCfg = Release|Any CPU + {A16C9667-5241-4313-888E-548375F85D29}.Release|x86.ActiveCfg = Release|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Debug|x64.ActiveCfg = Debug|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Debug|x64.Build.0 = Debug|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Debug|x86.ActiveCfg = Debug|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Debug|x86.Build.0 = Debug|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Release|Any CPU.Build.0 = Release|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Release|x64.ActiveCfg = Release|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Release|x64.Build.0 = Release|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Release|x86.ActiveCfg = Release|Any CPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499}.Release|x86.Build.0 = Release|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Debug|x64.ActiveCfg = Debug|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Debug|x64.Build.0 = Debug|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Debug|x86.ActiveCfg = Debug|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Debug|x86.Build.0 = Debug|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Release|Any CPU.Build.0 = Release|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Release|x64.ActiveCfg = Release|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Release|x64.Build.0 = Release|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Release|x86.ActiveCfg = Release|Any CPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806}.Release|x86.Build.0 = Release|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Debug|x64.ActiveCfg = Debug|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Debug|x64.Build.0 = Debug|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Debug|x86.ActiveCfg = Debug|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Debug|x86.Build.0 = Debug|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Release|Any CPU.Build.0 = Release|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Release|x64.ActiveCfg = Release|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Release|x64.Build.0 = Release|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Release|x86.ActiveCfg = Release|Any CPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8}.Release|x86.Build.0 = Release|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Debug|x64.ActiveCfg = Debug|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Debug|x64.Build.0 = Debug|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Debug|x86.Build.0 = Debug|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Release|Any CPU.Build.0 = Release|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Release|x64.ActiveCfg = Release|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Release|x64.Build.0 = Release|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Release|x86.ActiveCfg = Release|Any CPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2}.Release|x86.Build.0 = Release|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x64.ActiveCfg = Debug|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x64.Build.0 = Debug|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x86.ActiveCfg = Debug|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Debug|x86.Build.0 = Debug|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|Any CPU.Build.0 = Release|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x64.ActiveCfg = Release|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x64.Build.0 = Release|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x86.ActiveCfg = Release|Any CPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E}.Release|x86.Build.0 = Release|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|x64.ActiveCfg = Debug|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|x64.Build.0 = Debug|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|x86.ActiveCfg = Debug|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|x86.Build.0 = Debug|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|Any CPU.Build.0 = Release|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|x64.ActiveCfg = Release|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|x64.Build.0 = Release|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|x86.ActiveCfg = Release|Any CPU + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|x86.Build.0 = Release|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Debug|x64.ActiveCfg = Debug|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Debug|x64.Build.0 = Debug|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Debug|x86.ActiveCfg = Debug|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Debug|x86.Build.0 = Debug|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Release|Any CPU.Build.0 = Release|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Release|x64.ActiveCfg = Release|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Release|x64.Build.0 = Release|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Release|x86.ActiveCfg = Release|Any CPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1}.Release|x86.Build.0 = Release|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Debug|x64.ActiveCfg = Debug|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Debug|x64.Build.0 = Debug|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Debug|x86.ActiveCfg = Debug|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Debug|x86.Build.0 = Debug|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Release|Any CPU.Build.0 = Release|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Release|x64.ActiveCfg = Release|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Release|x64.Build.0 = Release|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Release|x86.ActiveCfg = Release|Any CPU + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C}.Release|x86.Build.0 = Release|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Debug|x64.ActiveCfg = Debug|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Debug|x64.Build.0 = Debug|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Debug|x86.ActiveCfg = Debug|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Debug|x86.Build.0 = Debug|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Release|Any CPU.Build.0 = Release|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Release|x64.ActiveCfg = Release|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Release|x64.Build.0 = Release|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Release|x86.ActiveCfg = Release|Any CPU + {476C8E64-7B6B-4554-ACA2-04302715750F}.Release|x86.Build.0 = Release|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Debug|x64.ActiveCfg = Debug|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Debug|x64.Build.0 = Debug|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Debug|x86.ActiveCfg = Debug|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Debug|x86.Build.0 = Debug|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Release|Any CPU.Build.0 = Release|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Release|x64.ActiveCfg = Release|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Release|x64.Build.0 = Release|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Release|x86.ActiveCfg = Release|Any CPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7}.Release|x86.Build.0 = Release|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|x64.ActiveCfg = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|x64.Build.0 = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|x86.ActiveCfg = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|x86.Build.0 = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|Any CPU.Build.0 = Release|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|x64.ActiveCfg = Release|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|x64.Build.0 = Release|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|x86.ActiveCfg = Release|Any CPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|x86.Build.0 = Release|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Debug|x64.ActiveCfg = Debug|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Debug|x64.Build.0 = Debug|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Debug|x86.ActiveCfg = Debug|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Debug|x86.Build.0 = Debug|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Release|Any CPU.Build.0 = Release|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Release|x64.ActiveCfg = Release|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Release|x64.Build.0 = Release|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Release|x86.ActiveCfg = Release|Any CPU + {EB77976F-4DE4-46A5-8B25-D07226204C32}.Release|x86.Build.0 = Release|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Debug|x64.ActiveCfg = Debug|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Debug|x64.Build.0 = Debug|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Debug|x86.ActiveCfg = Debug|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Debug|x86.Build.0 = Debug|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Release|Any CPU.Build.0 = Release|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Release|x64.ActiveCfg = Release|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Release|x64.Build.0 = Release|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Release|x86.ActiveCfg = Release|Any CPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC}.Release|x86.Build.0 = Release|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Debug|x64.ActiveCfg = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Debug|x64.Build.0 = Debug|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Debug|x86.ActiveCfg = Debug|x86 + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Debug|x86.Build.0 = Debug|x86 + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Release|Any CPU.Build.0 = Release|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Release|x64.ActiveCfg = Release|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Release|x64.Build.0 = Release|Any CPU + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Release|x86.ActiveCfg = Release|x86 + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {F31C242C-1B15-4518-9733-48558499FE4B} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {A16C9667-5241-4313-888E-548375F85D29} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {8CB883C0-99C3-4DD4-B017-F9B92010A806} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8} = {7AF32085-E7A6-4D06-BA6E-C6B1EBAEA99A} + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2} = {7AF32085-E7A6-4D06-BA6E-C6B1EBAEA99A} + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E} = {7AF32085-E7A6-4D06-BA6E-C6B1EBAEA99A} + {7A94C30C-6772-4F71-BF9C-0DF071A1BC70} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {00BBEF50-3899-4BF1-82E0-DF065CB2A88C} = {7AF32085-E7A6-4D06-BA6E-C6B1EBAEA99A} + {476C8E64-7B6B-4554-ACA2-04302715750F} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {14E8C9A5-013E-49BA-B435-EFEFC77DD623} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {EB77976F-4DE4-46A5-8B25-D07226204C32} = {7AF32085-E7A6-4D06-BA6E-C6B1EBAEA99A} + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + {14E8C9A5-013E-49BA-B435-FFFFFF7DD623} = {C423C39A-44E7-4F09-B2F7-7943975FF948} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B5B1FD72-356F-4840-83E8-B070AC21C8D9} + EndGlobalSection +EndGlobal diff --git a/Cs_HMI/DLL/ArLog.Net4.dll b/Cs_HMI/DLL/ArLog.Net4.dll new file mode 100644 index 0000000..d0414d6 Binary files /dev/null and b/Cs_HMI/DLL/ArLog.Net4.dll differ diff --git a/Cs_HMI/DLL/ArSetting.Net4.dll b/Cs_HMI/DLL/ArSetting.Net4.dll new file mode 100644 index 0000000..edc441b Binary files /dev/null and b/Cs_HMI/DLL/ArSetting.Net4.dll differ diff --git a/Cs_HMI/DLL/Winsock Orcas.dll b/Cs_HMI/DLL/Winsock Orcas.dll new file mode 100644 index 0000000..3ac1126 Binary files /dev/null and b/Cs_HMI/DLL/Winsock Orcas.dll differ diff --git a/Cs_HMI/DLL/arControl.Net4.dll b/Cs_HMI/DLL/arControl.Net4.dll new file mode 100644 index 0000000..65d8279 Binary files /dev/null and b/Cs_HMI/DLL/arControl.Net4.dll differ diff --git a/Cs_HMI/Project/AGV4.csproj b/Cs_HMI/Project/AGV4.csproj new file mode 100644 index 0000000..9abdb03 --- /dev/null +++ b/Cs_HMI/Project/AGV4.csproj @@ -0,0 +1,538 @@ + + + + + Debug + AnyCPU + {65F3E762-800C-499E-862F-A535642EC59F} + WinExe + Project + Amkor + v4.8 + 512 + 게시\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + False + False + False + OnBuildSuccess + False + False + False + obj\$(Configuration)\ + + + + x86 + true + Full + False + ..\..\..\..\..\Amkor\AGV4\ + DEBUG;TRACE + prompt + 4 + false + IDE1006 + + + AnyCPU + pdbonly + true + ..\..\..\ManualMapEditor\ + TRACE + prompt + 4 + false + + + icons8-split-64.ico + + + LocalIntranet + + + false + + + + true + ..\..\..\..\Amkor\OTP2DReading\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + false + + + bin\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + false + + + Project + False + obj\ + + + 4194304 + False + Auto + + + + False + ..\DLL\ArLog.Net4.dll + + + False + ..\DLL\ArSetting.Net4.dll + + + ..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll + + + False + C:\Program Files (x86)\Microsoft SDKs\Speech\v11.0\Assembly\Microsoft.Speech.dll + + + + + + + + + + + + + + + + + ..\DLL\Winsock Orcas.dll + + + + + + + Component + + + CtlAuto.cs + + + Component + + + CtlPos.cs + + + + + + DataSet1.xsd + + + True + True + DataSet1.xsd + + + + + + Form + + + fCounter.cs + + + Form + + + fUpdateForm.cs + + + Form + + + fLog.cs + + + Form + + + fJobSelect.cs + + + Form + + + fSystem.cs + + + Form + + + Form + + + fVolume.cs + + + Form + + + fMessageWindow.cs + + + Form + + + fTouchKey.cs + + + Form + + + fTouchKeyFull.cs + + + Form + + + fTouchNumDot.cs + + + Form + + + fPassword.cs + + + Form + + + fErrorException.cs + + + Form + + + fMain.cs + + + + + + + + + + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + Form + + + + + Form + + + fBms.cs + + + Form + + + fAuto.cs + + + Form + + + fAgv.cs + + + Form + + + fFlag.cs + + + Form + + + fIO.cs + + + Form + + + fSetup.cs + + + Form + + + fManual.cs + + + fCounter.cs + + + fUpdateForm.cs + + + fLog.cs + + + fJobSelect.cs + + + fSystem.cs + + + fVolume.cs + + + fMessageWindow.cs + + + fTouchKey.cs + + + fTouchKeyFull.cs + + + fTouchNumDot.cs + + + fPassword.cs + + + fErrorException.cs + + + fMain.cs + Designer + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + fBms.cs + + + fAuto.cs + + + fAgv.cs + + + fFlag.cs + + + fIO.cs + + + fSetup.cs + + + fManual.cs + + + + DataSet1.xsd + + + Designer + MSDataSetGenerator + DataSet1.Designer.cs + + + DataSet1.xsd + Designer + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4%28x86 및 x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 4.5 + true + + + + + {8cb883c0-99c3-4dd4-b017-f9b92010a806} + agvControl + + + {8bae0eac-3d25-402f-9a65-2ba1ecfe28b7} + NARUMI + + + {7a94c30c-6772-4f71-bf9c-0df071a1bc70} + BMS + + + {bbc9bccf-6262-4355-9cc2-37ff678ac499} + StateMachine + + + {f31c242c-1b15-4518-9733-48558499fe4b} + arControl + + + {a16c9667-5241-4313-888e-548375f85d29} + arFrameControl + + + {14e8c9a5-013e-49ba-b435-efefc77dd623} + CommData + + + {14e8c9a5-013e-49ba-b435-ffffff7dd623} + arCommUtil + + + {476c8e64-7b6b-4554-aca2-04302715750f} + PLC.Net45 + + + + + + rem xcopy "$(TargetDir)*.exe" "\\192.168.1.80\Amkor\AGV2" /Y +rem xcopy "$(TargetDir)*.dll" "\\192.168.1.80\Amkor\AGV2" /Y + + \ No newline at end of file diff --git a/Cs_HMI/Project/CSetting.cs b/Cs_HMI/Project/CSetting.cs new file mode 100644 index 0000000..9889d3b --- /dev/null +++ b/Cs_HMI/Project/CSetting.cs @@ -0,0 +1,580 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; +using System.Drawing.Design; +using System.Management; +using System.Runtime.CompilerServices; +using System.Security.RightsManagement; + +namespace Project +{ + public class MyUITypeEditor : UITypeEditor + { + public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) + { + using (var f = new System.Windows.Forms.Form + { + WindowState = System.Windows.Forms.FormWindowState.Normal, + StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen, + Size = new System.Drawing.Size(800, 400), + MaximizeBox = false, + MinimizeBox = false, + Text = "Select Port", + FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog + }) + { + var lst = new System.Windows.Forms.ListBox + { + Font = new System.Drawing.Font("Consolas", 15, System.Drawing.FontStyle.Bold), + Dock = System.Windows.Forms.DockStyle.Fill, + }; + lst.DoubleClick += (s1, e1) => + { + if (lst.SelectedItem != null) f.DialogResult = System.Windows.Forms.DialogResult.OK; + }; + using (var searcher = new ManagementObjectSearcher("SELECT * FROM WIN32_SerialPort")) + { + var portnames = System.IO.Ports.SerialPort.GetPortNames().OrderBy(t => t); + var ports = searcher.Get().Cast().ToList(); + foreach (var port in portnames) + { + var desc = ""; + var portInfo = ports.Where(t => t["DeviceId"].ToString() == port).FirstOrDefault(); + if (portInfo != null) desc = portInfo["Caption"].ToString(); + lst.Items.Add(string.Format("{0} - {1}", port, desc)); + } + } + f.Controls.Add(lst); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + var name = lst.SelectedItem.ToString().Split('-'); + return name[0].Trim(); + } + else + { + return base.EditValue(context, provider, value); + } + } + + } + public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) + { + return UITypeEditorEditStyle.Modal; + } + } + + public class CSetting : arUtil.Setting + { + #region "log" + + [Category("System Log"), DisplayName("Digital Input/Output"), + Description("입/출력 장치의 상태 변화를 기록 합니다.")] + public Boolean Log_IO { get; set; } + [Category("System Log"), DisplayName("Network Alive Check(Ping)"), + Description("서버와의 통신검사 로그를 기록 합니다")] + public Boolean Log_Ping { get; set; } + [Category("System Log"), DisplayName("S/M Step Change"), + Description("상태머신의 변화 상태를 기록 합니다.")] + public Boolean Log_StepChange { get; set; } + [Category("System Log"), DisplayName("Socket Recv Message"), + Description("서버 수신 메세지를 기록 합니다.")] + public Boolean LOg_SocketRecv { get; set; } + + #endregion + + #region "Communication" + + [Category("Commnunication Setting"), DisplayName("XBee PortName"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))] + public string Port_XBE { get; set; } + + [Category("Commnunication Setting"), DisplayName("RFID PortName"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))] + public string Port_AGV { get; set; } + + [Category("Commnunication Setting"), DisplayName("PLC #1 PortName"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))] + public string Port_PLC { get; set; } + + + [Category("Commnunication Setting"), DisplayName("BMS PortName"), Editor(typeof(MyUITypeEditor), typeof(UITypeEditor))] + public string Port_BAT { get; set; } + + public int ChargerID { get; set; } + + public int Baud_AGV { get; set; } + public int Baud_BAT { get; set; } + public int Baud_PLC { get; set; } + public int Baud_XBE { get; set; } + + //public int QueryInterval_BAT { get; set; } + + + #endregion + + #region "Debug" + [Category("Developer Setting"), DisplayName("Listening Port"), + Description("서버와의 통신을 위한 대기 포트(TCP) - 기본값 : 7979")] + public int listenPort { get; set; } + + [Category("Developer Setting")] + public Boolean UseDebugMode { get; set; } + + #endregion + + #region "Count Reset Setting" + + [Category("Count Reset Setting"), DisplayName("A/M Clear Enable"), + Description("오전 초기화 여부\n작업수량을 초기화 하려면 True 로 설정하세요")] + public Boolean datetime_Check_1 { get; set; } + [Category("Count Reset Setting"), DisplayName("P/M Clear Enable"), + Description("오후 초기화 여부\n작업수량을 초기화 하려면 True 로 설정하세요")] + public Boolean datetime_Check_2 { get; set; } + [Category("Count Reset Setting"), DisplayName("A/M Clear Time(HH:mm)"), + Description("오전 초기화 시간(시:분)\n예) 09:00")] + public string datetime_Reset_1 { get; set; } + [Category("Count Reset Setting"), DisplayName("P/M Clear Time(HH:mm)"), + Description("오후 초기화 시간(시:분)\n예) 19:00")] + public string datetime_Reset_2 { get; set; } + + #endregion + + #region "general" + + + + + [Category("General Setting"), DisplayName("Enable Popup Message"), + Description("오류 발생시 별도의 메세지 창으로 표시합니다. 사용하지 않을 경우에는 우측 상단의 결과창의 메세지를 확인합니다.")] + public Boolean ShowPopUpMessage { get; set; } + [Category("General Setting"), DisplayName("Asset Number"), + Description("자산번호(서버에 값 전송 시 사용됩니다)")] + public string Asset { get; set; } + + [Category("General Setting"), + Description("데이터 자동 소거 기간(일) 비활성=0")] + public int AutoDeleteDay { get; set; } + [Category("General Setting"), + Description("데이터 자동 소거 조건(남은용량 %)")] + public int AutoDeleteThreshold { get; set; } + + [Category("General Setting"), PasswordPropertyText(true)] + public string Password_Setup { get; set; } + + [Category("General Setting"), Browsable(false)] + public string Language { get; set; } + + [Category("General Setting"), DisplayName("Full Screen Window State"), + Description("화면을 전체화면으로 사용 합니다.")] + public Boolean FullScreen { get; set; } + public bool DetectManualCharge { get; set; } + public Boolean StartLog { get; set; } + + #endregion + + #region "TAGS" + public int TAGPOT { get; set; } + public int TAGNOT { get; set; } + public int TAG_F2_F3 { get; set; } + public int TAG_QC_F1 { get; set; } + public int TAG_F1_F2 { get; set; } + public int TAG_F3_F4 { get; set; } + public int TAG_F4_F5 { get; set; } + + public int TAG_QA_QC { get; set; } + public int TAGQAB { get; set; } + public int TAGQAA { get; set; } + + + public int TAGQCB { get; set; } + public int TAGQCA { get; set; } + public int TAGF1A { get; set; } + public int TAGF2A { get; set; } + public int TAGF3A { get; set; } + public int TAGF4A { get; set; } + public int TAGF5A { get; set; } + + public int TAGF1B { get; set; } + public int TAGF2B { get; set; } + public int TAGF3B { get; set; } + public int TAGF4B { get; set; } + public int TAGF5B { get; set; } + #endregion + + #region "Charge" + public int chargerpos { get; set; } + public int ChargetWaitSec { get; set; } + public int ChargeEmergencyLevel { get; set; } + public int ChargeMaxLevel { get; set; } + public int ChargeStartLevel { get; set; } + public Boolean Enable_AutoCharge { get; set; } + + public int ChargeRetryTerm { get; set; } + //public int ChargeIdleInterval { get; set; } + public int ChargeMaxTime { get; set; } + public int ChargeSearchTime { get; set; } + + #endregion + + #region "AGV" + + public bool AutoModeOffAndClearPosition { get; set; } + public string musicfile { get; set; } + + /// + /// FVI로 가능 방향이 Backward 인가? + /// Forward 방향이라면 false 를 한다 + /// + public Boolean AGV_Direction_FVI_Backward { get; set; } + + public Boolean Enable_Speak { get; set; } + + //public Boolean Disable_BMS { get; set; } + //public Boolean Log_BMS_Tx { get; set; } + //public Boolean Log_BMS_Rx { get; set; } + //public double ChargeLimitLow { get; set; } + //public double ChargeLimitHigh { get; set; } + + public string AGV_PANID { get; set; } + public string AGV_CHANNEL { get; set; } + public string AGV_ADDRESS { get; set; } + + public int SCK { get; set; } + public int SSK { get; set; } + public int STT { get; set; } + public int SAD { get; set; } + + public byte ZSpeed { get; set; } + public int SPD_L { get; set; } + public int SPD_M { get; set; } + public int SPD_H { get; set; } + public int SPD_DRIVE { get; set; } + + public int SPD_S { get; set; } + public int SPD_R { get; set; } + + + public int PID_PH { get; set; } + public int PID_PM { get; set; } + public int PID_PL { get; set; } + public int PID_IH { get; set; } + public int PID_IM { get; set; } + public int PID_IL { get; set; } + public int PID_DH { get; set; } + public int PID_DM { get; set; } + public int PID_DL { get; set; } + + public int PID_PS { get; set; } + public int PID_IS { get; set; } + public int PID_DS { get; set; } + + public double WheelSpeedCharge { get; set; } + + //public byte MotorUpTime { get; set; } + //public double AlignSensorThreshold { get; set; } + // public byte BalanceThreshold { get; set; } + // public byte BalanceThresholdUp { get; set; } + // public byte MarkSensorThreshold { get; set; } + //public Boolean Opt_LidarStop { get; set; } + //public Boolean Opt_SlowUp { get; set; } + //public Boolean Opt_Magnet { get; set; } + public byte HomePositionValue { get; set; } + public byte HomeKitNo { get; set; } + + + //public Single interval_bms { get; set; } + public Single interval_xbe { get; set; } + public int interval_bms { get; set; } + public byte interval_iostate { get; set; } + //public Boolean Enable_AutoZDnUp { get; set; } + public int doorSoundTerm { get; set; } + public int musicvol { get; set; } + + public bool Enable_Music { get; set; } + #endregion + + [Category("Report"), + Description("상태기록시 장비 식별코드(4자리)"), + DisplayName("M/C ID")] + public string MCID { get; set; } + + [Category("Report"), + Description("작업 기록을 장비기술(EE) Database 에 기록 합니다. 원격으로 장비 현황을 모니터링 할 수 있습니다"), + DisplayName("SAVE EE-DB")] + public Boolean Save_EEDatabase { get; set; } + [Category("Report"), Description("상태값을 전송하는 간격(초)")] + public int StatusInterval { get; set; } + + + [Category("AutoReboot"), + DisplayName("자동재부팅시간"), + Description("기본값 14:00:00~14:05:00 , 재부팅은 장비가 대기(IDLE)일 때에만 동작하며 지정 시간 범위를 벗어나면 동작하지 않습니다")] + public String AutoRebootTimeStart { get; set; } + [Category("AutoReboot")] + public string AUtoRebootLastTime { get; set; } + + + public bool SetAutoModeOn { get; set; } + public override void AfterLoad() + { + if (StatusInterval < 10) StatusInterval = 300; //5분간격 + + if (SAD == 0) SAD = 999; + if (TAGF1A == 0) + { + TAGNOT = 9000; + + TAGQAB = 9200; + TAGQCB = 9300; + TAGF1B = 9400; + TAGF2B = 9500; + TAGF3B = 9600; + TAGF4B = 9700; + TAGF5B = 9800; + + TAGQAA = 9201; + TAGQCA = 9301; + TAGF1A = 9401; + TAGF2A = 9501; + TAGF3A = 9601; + TAGF4A = 9701; + TAGF5A = 9801; + + TAGPOT = 9900; + + TAG_QA_QC = 9250; + TAG_QC_F1 = 9350; + TAG_F1_F2 = 9450; + TAG_F2_F3 = 9550; + TAG_F3_F4 = 9650; + TAG_F4_F5 = 9750; + } + + if(TAG_F4_F5 == 0) + { + TAG_F4_F5 = 9750; + TAGF5B = 9800; + TAGF5A = 9801; + } + + if (SCK == 0) SCK = 10; + if (SSK == 0) SSK = 10; + if (STT == 0) STT = 30; + if (ChargerID == 0) ChargerID = 203; + if (ChargerID < 200) ChargerID += 200; + + //자동충전요건 + if (ChargetWaitSec == 0) ChargetWaitSec = 3; + if (ChargeStartLevel == 0) ChargeStartLevel = 85; + if (ChargeMaxLevel == 0) ChargeMaxLevel = 85; + if (ChargeEmergencyLevel == 0) ChargeEmergencyLevel = 30; + + if (interval_bms == 0) interval_bms = 1000; + //충전은 대기상태 5분이 경과하면 진행한다 + + + //충전은 10분간격으로 재시도 한다 + if (ChargeRetryTerm == 0) ChargeRetryTerm = 600; + if (doorSoundTerm == 0) doorSoundTerm = 15; //기본 15초 + if (ChargeSearchTime == 0) ChargeSearchTime = 25; + //최대 충전진행 시간(기본 1시간) + if (ChargeMaxTime == 0) ChargeMaxTime = 3600; + if (interval_iostate == 0 || interval_iostate == 255) interval_iostate = 100; + if (ZSpeed == 0) ZSpeed = 20; + if (interval_xbe == 0) interval_xbe = 5.0f; + if (HomePositionValue == 0) HomePositionValue = 4; + if (HomeKitNo == 0) HomeKitNo = 2; + if (datetime_Reset_1 == "") datetime_Reset_1 = "00:00"; + if (datetime_Reset_2 == "") datetime_Reset_2 = "00:00"; + + if (SPD_H == 0) + { + SPD_DRIVE = 200; + SPD_H = 110; + SPD_M = 70; + SPD_L = 30; + SPD_S = 61; + SPD_R = 70; + } + + if (PID_PH == 0) + { + PID_PH = 180; PID_PM = 240; PID_PL = 260; + PID_IH = 610; PID_IM = 640; PID_IL = 660; + PID_DH = 110; PID_DM = 140; PID_DL = 160; + PID_PS = 200; PID_IS = 620; PID_DS = 120; + } + + if (WheelSpeedCharge == 0) WheelSpeedCharge = 10; + + if (AutoDeleteThreshold == 0) AutoDeleteThreshold = 20; + if (Asset == "") Asset = "DEV_SPLIT"; + if (listenPort == 0) listenPort = 7979; + if (Port_XBE == "") Port_XBE = "COM8"; + + if (Language.isEmpty()) Language = "Kor"; + if (Password_Setup.isEmpty()) Password_Setup = "0000"; + if (musicfile.isEmpty()) musicfile = Util.CurrentPath + "music.mp3"; + if (musicvol == 0) musicvol = 50; + + + if (string.IsNullOrEmpty(Port_AGV)) Port_AGV = "COM1"; + if (string.IsNullOrEmpty(Port_PLC)) Port_PLC = "COM2"; + if (string.IsNullOrEmpty(Port_XBE)) Port_XBE = "COM4"; + if (string.IsNullOrEmpty(Port_BAT)) Port_BAT = "COM7"; + + if (Baud_AGV == 0) Baud_AGV = 57600; + if (Baud_PLC == 0) Baud_PLC = 19200; + if (Baud_XBE == 0) Baud_XBE = 9600; + if (Baud_BAT == 0) Baud_BAT = 9600; + + + } + public override void AfterSave() + { + //throw new NotImplementedException(); + } + + public void CopyTo(CSetting dest) + { + //이곳의 모든 쓰기가능한 속성값을 대상에 써준다. + Type thClass = this.GetType(); + foreach (var method in thClass.GetMethods()) + { + //var parameters = method.GetParameters(); + if (!method.Name.StartsWith("get_")) continue; + + string keyname = method.Name.Substring(4); + string methodName = method.Name; + + object odata = GetType().GetMethod(methodName).Invoke(this, null); + var wMethod = dest.GetType().GetMethod(Convert.ToString("set_") + keyname); + if (wMethod != null) wMethod.Invoke(dest, new object[] { odata }); + } + } + } + + + public class CounterSetting : arUtil.Setting, INotifyPropertyChanged + { + public DateTime CountReset { get; set; } + + public event PropertyChangedEventHandler PropertyChanged; + private void NotifyPropertyChanged([CallerMemberName] String propertyName = "") + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + + private int countUp1 = 0; + private int countUp2 = 0; + private int countUp3 = 0; + private int countUp4 = 0; + // private int countUp5 = 0; + private int countchgaerr = 0; + private int countchga = 0; + private int countchgm = 0; + //private int countdn = 0; + private int countqa = 0; + private int countqc = 0; + + //메인카운터 + public int CountUp1 + { + get { return countUp1; } + set { if (value != countUp1) { countUp1 = value; NotifyPropertyChanged(); } } + } + public int CountUp2 + { + get { return countUp2; } + set { if (value != countUp2) { countUp2 = value; NotifyPropertyChanged(); } } + } + public int CountUp3 + { + get { return countUp3; } + set { if (value != countUp3) { countUp3 = value; NotifyPropertyChanged(); } } + } + public int CountUp4 + { + get { return countUp4; } + set { if (value != countUp4) { countUp4 = value; NotifyPropertyChanged(); } } + } + //public int CountUp5 + //{ + // get { return countUp5; } + // set { if (value != countUp5) { countUp5 = value; NotifyPropertyChanged(); } } + //} + + /// + /// 상차수량(FVI 1+2+3+4) + /// + public int CountUp + { + get + { + return CountUp1 + CountUp2 + CountUp3 + CountUp4;// + CountUp5; + } + } + + public int CountChargeE + { + get { return this.countchgaerr; } + set { if (value != countchgaerr) { countchgaerr = value; NotifyPropertyChanged(); } } + } + public int CountChargeA + { + get { return this.countchga; } + set { if (value != countchga) { countchga = value; NotifyPropertyChanged(); } } + } + public int CountChargeM + { + get { return this.countchgm; } + set { if (value != countchgm) { countchgm = value; NotifyPropertyChanged(); } } + } + + /// + /// 하차수량(QC+QA) + /// + public int CountDn + { + get { return this.countqa + this.countqc; } + //set { if (value != countdn) { countdn = value; NotifyPropertyChanged(); } } + } + public int CountQA + { + get { return this.countqa; } + set { if (value != countqa) { countqa = value; NotifyPropertyChanged(); } } + } + public int CountQC + { + get { return this.countqc; } + set { if (value != countqc) { countqc = value; NotifyPropertyChanged(); } } + } + public void CountClear() + { + CountUp1 = 0; + CountUp2 = 0; + CountUp3 = 0; + CountUp4 = 0; + // CountUp5 = 0; + CountQC = 0; + CountQA = 0; + //CountQa2 = 0; + CountReset = DateTime.Now; + PUB.log.Add("Count Clear"); + this.Save(); + } + + public CounterSetting() + { + this.filename = Util.CurrentPath + "counter.xml"; + } + public override void AfterLoad() + { + if (CountReset == null) CountReset = DateTime.Parse("1982-11-23"); + } + public override void AfterSave() + { + //throw new NotImplementedException(); + } + } + +} diff --git a/Cs_HMI/Project/Class/CParser.cs b/Cs_HMI/Project/Class/CParser.cs new file mode 100644 index 0000000..0b64ada --- /dev/null +++ b/Cs_HMI/Project/Class/CParser.cs @@ -0,0 +1,926 @@ +//using System; +//using System.Collections.Generic; +//using System.Diagnostics; +//using System.Globalization; +//using System.IO; +//using System.Linq; +//using System.Reflection; +//using System.Runtime.CompilerServices; +//using System.Security; +//using System.Text; +//using System.Threading.Tasks; +//using System.Collections; + +//namespace Project +//{ +// public class CParser +// { +// private string SrcText; +// private ArrayList CommandList; // //여기엔 Scommand 가 들어있다. +// private System.Text.StringBuilder ErrMsg; +// // Public Log As System.Text.StringBuilder + +// public event MessageEventHandler Message; +// public void raiseMessage(string m, Boolean err) +// { +// if (Message != null) Message(m, err); +// } +// public delegate void MessageEventHandler(string M, bool Err); + +// public CParser() +// { + +// } + +// public new string toString +// { +// get +// { +// if (this.isError == false) +// { +// object Value = ParseCommand(SrcText, true); +// return Value.ToString(); +// } +// return ""; +// } +// } +// public new object GetData +// { +// get +// { +// if (this.isError == false) +// { +// object Value = ParseCommand(SrcText, true); +// return Value; +// } +// return null; +// } +// } +// public bool isError +// { +// get +// { +// if (this.ErrMsg.ToString() != "") +// return true; +// else +// return false; +// } +// } +// private void Check_error(string vSrcText) +// { +// // Return '//임시로 해제 + +// int Lcnt = 0; +// int Rcnt = 0; + +// ErrMsg = new System.Text.StringBuilder(); + +// return; // +// foreach (string EXP_ in vSrcText.Split(';')) // //각명령을 ;로 구분되어잇기떄문에 구분됫것들이 각자의 명령이다. +// { +// var EXP = EXP_.Trim(); +// Lcnt = EXP.ToCharArray().Where(t => t == '(').Count();// MyString.GetInCountChar(EXP, "("); // //파라미터 시작갯수 +// Rcnt = EXP.ToCharArray().Where(t => t == ')').Count();// MyString.GetInCountChar(EXP, ")"); // //파라미터 종료갯수 +// if (Lcnt != Rcnt) +// ErrMsg.AppendLine(EXP + "파라미터 시작기호 ( 와 종료기호 ) 가 일치하지 않습니다"); +// Lcnt = EXP.ToCharArray().Where(t => t == '"').Count();// MyString.GetInCountChar(EXP, Strings.Chr(34)); // //파라미터 시작갯수 +// Rcnt = EXP.ToCharArray().Where(t => t == '"').Count();// MyString.GetInCountChar(EXP, Strings.Chr(34)); // //파라미터 종료갯수 +// if (Lcnt != Rcnt) +// ErrMsg.AppendLine(EXP + "문자열묶음기호(\")가 일치하지 않습니다"); +// } +// } + +// public virtual void CommandText(string s) +// { +// SrcText = s; +// Check_error(SrcText); +// if (this.isError) +// Util.MsgE(ErrMsg.ToString());// Interaction.MsgBox(ErrMsg.ToString(), MsgBoxStyle.Critical, "오류"); +// } + +// protected string Buffer1 = ""; +// protected string Buffer2 = ""; +// protected string Buffer3 = ""; +// protected string Buffer4 = ""; + +// private object ParseCommand(string vSrcText, bool isfirst, object NEwValue = null) +// { +// // //각명령어를 쪼갠다. +// // //중첩명령어의 경우에도 쪼갠다. + +// // Dim Cmd As String '//명령어 +// // Dim Param As String '//명렁파라미터 +// // Dim target As String '//타겏값 +// // Dim Str As String +// // Dim Line As String + +// if (isfirst) +// this.CommandList = new ArrayList();// //처음에만 이것을 초기화한다. + +// vSrcText = vSrcText.Replace("\r\n","\n");//Constants.vbCrLf, Constants.vbLf); +// vSrcText = vSrcText.Replace("\r","\n");//Constants.vbCr, Constants.vbLf); +// vSrcText = vSrcText.Replace("\n\n","\n");//Constants.vbLf + Constants.vbLf, Constants.vbLf); +// vSrcText = vSrcText.Replace(";","\n");// Constants.vbLf); + +// raiseMessage("Command Expression : " + vSrcText, false); +// foreach (string EXP_ in vSrcText.Split('\n')) // //각명령을 ;로 구분되어잇기떄문에 구분됫것들이 각자의 명령이다. +// { +// if (EXP_.Trim() == "") +// continue; +// if (EXP_.Length < 3) +// continue; +// if (EXP_.Substring(0, 2) == "//") +// continue; + +// // Me.Log.AppendLine("New Line Value is : " & NEwValue.ToString) + +// var EXP = EXP_.Trim(); +// bool CmdFind = false; // //명령어를다 찾앗는가? +// bool ParamFind = false; +// System.Text.StringBuilder NewParam = new System.Text.StringBuilder(); +// bool Isfunction = false; +// bool IsFunctionEnd = false; +// short InnerFuncCnt = 0; +// System.Text.StringBuilder NewCmd = new System.Text.StringBuilder(); +// ArrayList ParamList = new ArrayList(); +// bool IsTextInner = false; + +// if (EXP != "") +// { + +// // My.Computer.FileSystem.WriteAllText("c:\command.txT", "expressiong=" & EXP, True) + +// if (EXP.Substring(0, 1) == "\"")//Strings.Chr(34)) +// NEwValue = EXP; // //해당문자자체가 값이된다. +// else +// // //파라미터란 ()사이의 명령어이며, 콤마(,)로 분리된다 +// // //단 "" 사이의 콤마는 인정하지않는다. + +// foreach (char C in EXP.ToCharArray()) +// { +// if (CmdFind == false) +// { +// if (C == '(') +// CmdFind = true; +// else +// NewCmd.Append(C); +// } +// else +// switch (C) +// { +// case ',': +// { +// if (IsTextInner) +// NewParam.Append(C); +// else if (Isfunction == false) +// { +// if (IsFunctionEnd) +// ParamList.Add(NewParam.ToString()); // //파라미터를 찾았으므로 파람리스트에 추가한다. +// else +// ParamList.Add(NewParam.ToString());// //파라미터를 찾았으므로 파람리스트에 추가한다. +// NewParam = new System.Text.StringBuilder(); // //파라미터부분 초기화 +// IsFunctionEnd = false; +// } +// else +// NewParam.Append(C); +// break; +// } + +// case '(': +// { +// if (IsTextInner) +// NewParam.Append(C); +// else if (Isfunction) +// { +// InnerFuncCnt += 1; +// NewParam.Append(C); +// } +// else +// { +// Isfunction = true; // //이파라미터가 또 함수를 가지고있다 ㅠ_ㅠ; +// NewParam.Append(C); +// } + +// break; +// } + +// case ')': +// { +// if (IsTextInner) +// NewParam.Append(C); +// else if (Isfunction) +// { +// if (InnerFuncCnt > 0) +// { +// InnerFuncCnt -= 1; +// NewParam.Append(C); +// } +// else +// { +// Isfunction = false; // //이파라미터가 또 함수를 가지고있다 ㅠ_ㅠ; +// IsFunctionEnd = true; +// NewParam.Append(C); +// } +// } +// else +// { +// if (NewParam.ToString() != "") +// ParamList.Add(NewParam.ToString()); // //파라미터를 찾았으므로 파람리스트에 추가한다. +// NewParam = new System.Text.StringBuilder(); // //파라미터부분 초기화 +// IsFunctionEnd = false; + +// // MsgBox("명령어실행 : " & NewCmd.ToString) +// // //각 파라미터들의 값을 가져온다 +// raiseMessage("New COmmand : " + NewCmd.ToString() + " paramCount=" + ParamList.Count, false); +// switch (NewCmd.ToString().ToUpper()) +// { +// case "MUL": +// { +// if (ParamList.Count != 2) +// raiseMessage("MUL 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// // Me.Log.AppendLine("MUL " & Param1 & vbTab & Param2) + +// if (Param1.ToString().IsNumeric()==false || Param2.ToString().IsNumeric()==false) +// // Me.Log.AppendLine("MUL param error support only number") +// return 0; +// else +// NEwValue = System.Convert.ToDecimal(Param1) * System.Convert.ToDecimal(Param2); +// } + +// break; +// } + +// case "PLUS": +// { +// if (ParamList.Count != 2) +// raiseMessage("PLUS 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); + +// if (Param1.ToString().IsNumeric()==false || Param2.ToString().IsNumeric()==false) +// return 0; +// else +// NEwValue = System.Convert.ToDecimal(Param1) + System.Convert.ToDecimal(Param2); +// } + +// break; +// } + +// case "MINUS": +// { +// if (ParamList.Count != 2) +// raiseMessage("MINUS 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// // Me.Log.AppendLine("PLUS " & Param1 & vbTab & Param2) +// if (Param1.ToString().IsNumeric()==false || Param2.ToString().IsNumeric()==false ) +// // Me.Log.AppendLine("MINUS param error support only number") +// return 0; +// else +// NEwValue = System.Convert.ToDecimal(Param1) - System.Convert.ToDecimal(Param2); +// } + +// break; +// } + +// case "ISEQULE": +// case "EQ" // //둘이 같은지 반환해준다. +// : +// { +// if (ParamList.Count != 2) +// raiseMessage("ISEQULE 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// // MsgBox(ParamList[1].ToString & "/" & NewValue) +// // Me.Log.AppendLine("ISEQULE " & Param1 & vbTab & Param2) +// if (Param1 != Param2) +// { +// raiseMessage("ISEQULE RETURN FALSE", true); +// return false; +// } +// else +// { +// raiseMessage("ISEQULE RETURN TRUE", true); +// return true; +// } +// } + +// break; +// } + +// case "NEQ": +// case "DIFF" // //둘이 다르면 true 반환해준다. +// : +// { +// if (ParamList.Count != 2) +// raiseMessage("DIFF(NEQ) 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// // MsgBox(ParamList[1].ToString & "/" & NewValue) +// // Me.Log.AppendLine("ISEQULE " & Param1 & vbTab & Param2) +// if (Param1 != Param2) +// { +// raiseMessage("DIFF RETURN True", true); +// return true; +// } +// else +// { +// raiseMessage("DIFF RETURN False", true); +// return false; +// } +// } + +// break; +// } + +// case "IF": +// { +// if (ParamList.Count != 2) +// raiseMessage("IF 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// if (Param1.ToString().ToLower() != Param2.ToString().ToLower()) +// { +// raiseMessage("IF문 조건이 서로 다르므로 실행을 종료합니다.", false); +// return ""; // //해당구문전체를 모두 FALSE한다. +// } +// else +// // RaiseEvent RaiseMessage("IF문 조건이 동일 True Case IN(" & Param1 & " " & Param2 & ")") +// Console.WriteLine("sdf"); +// } + +// break; +// } + +// case "IFNOT": +// { +// if (ParamList.Count != 2) +// raiseMessage("IFNOT 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// if (Param1 == Param2) +// { +// raiseMessage("IF문 조건이 서로 같으므로 실행을 종료합니다.", true); +// return ""; // //해당구문전체를 모두 FALSE한다. +// } +// else +// { +// } +// } + +// break; +// } + +// case "MSGBOX": +// case "MSG": +// { +// if (ParamList.Count != 1) +// raiseMessage("MSGBOX 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// Util.MsgE(Param1, MsgBoxStyle.Information, "확인"); +// } + +// break; +// } + +// case "ISNUM": +// { +// if (ParamList.Count != 1) +// raiseMessage("ISNUM 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = Information.IsNumeric(Param1); +// } + +// break; +// } + +// case "NVL": +// { +// if (ParamList.Count != 2) +// raiseMessage("ISEMPTY 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// if (Param1.Trim() == "") +// NEwValue = Param2; +// else +// NEwValue = Param1; +// } + +// break; +// } + +// case "INDEXOF": +// { +// if (ParamList.Count != 2) +// raiseMessage("INDEXOF 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// NEwValue = Param1.IndexOf(Param2) + 1; +// } + +// break; +// } + +// case "LINDEXOF": +// { +// if (ParamList.Count != 2) +// raiseMessage("LINDEXOF 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// NEwValue = Param1.LastIndexOf(Param2) + 1; +// } + +// break; +// } + +// case "REPLACE": +// { +// if (ParamList.Count != 3) +// raiseMessage("REPLACE 함수에 3개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// object Param3 = RunParam(ParamList[2].ToString(), NEwValue.ToString()); +// NEwValue = Param1.ToString().Replace(Param2, Param3); +// } + +// break; +// } + +// case "REMOVECHAR": +// { +// if (ParamList.Count != 2) +// raiseMessage("REMOVESPACE 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// NEwValue = Param1.Trim(Param2.ToCharArray()).ToString().Trim(); +// } + +// break; +// } + +// case "REMOVESCHAR" // //특수기호삭제한다. +// : +// { +// if (ParamList.Count != 1) +// raiseMessage("REMOVESCHAR 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// System.Text.StringBuilder NewString = new System.Text.StringBuilder(); +// foreach (char Cc in Param1.ToCharArray()) +// { +// switch (Strings.Asc(Cc)) +// { +// case object _ when 65 <= Strings.Asc(Cc) && Strings.Asc(Cc) <= 90: +// case object _ when 48 <= Strings.Asc(Cc) && Strings.Asc(Cc) <= 57: +// case object _ when 97 <= Strings.Asc(Cc) && Strings.Asc(Cc) <= 122: +// case object _ when Strings.Asc(Cc) < 0: +// case 32: +// { +// NewString.Append(Cc); +// break; +// } +// } +// } +// NEwValue = NewString.ToString(); +// } + +// break; +// } + +// case "REMOVESPACE": +// { +// if (ParamList.Count != 1) +// raiseMessage("REMOVESPACE 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = Param1.Replace(Strings.Space(1), Constants.vbNullString); +// } + +// break; +// } + +// case "TOUPPER": +// { +// if (ParamList.Count != 1) +// raiseMessage("TOUPPER 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = Param1.ToUpper(); +// } + +// break; +// } + +// case "TRIM": +// { +// if (ParamList.Count != 1) +// raiseMessage("TRIM 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = Param1.Trim(); +// } + +// break; +// } + +// case "TOLOWER": +// { +// if (ParamList.Count != 1) +// raiseMessage("TOLOWER 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = Param1.ToLower(); +// } + +// break; +// } + +// case "LENB": +// { +// if (ParamList.Count != 1) +// raiseMessage("LENB 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = System.Text.Encoding.Default.GetByteCount(Param1.ToString()); +// } + +// break; +// } + +// case "LEN": +// { +// if (ParamList.Count != 1) +// raiseMessage("LEN 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = Param1.Length; +// } + +// break; +// } + +// case "RIGHTADD": +// case "ADDRIGHT": +// { +// if (ParamList.Count != 2) +// raiseMessage("RIGHTADD 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// NEwValue = Param1 + Param2; +// } + +// break; +// } + +// case "ADDNUM": +// { +// if (ParamList.Count != 2) +// raiseMessage("ADDNUM 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// NEwValue = Param1 + Param2; +// } + +// break; +// } + +// case "LEFTADD": +// case "ADDLEFT": +// { +// if (ParamList.Count != 2) +// raiseMessage("LEFTADD 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// NEwValue = Param2 + Param1; +// } + +// break; +// } + +// case "TODATE": +// { +// if (ParamList.Count != 1) +// raiseMessage("TODATE 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = ((DateTime)Param1); +// } + +// break; +// } + +// case "TOSTRING": +// { +// if (ParamList.Count != 1) +// raiseMessage("TOSTRING 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = (System.Convert.ToString(Param1)); +// } + +// break; +// } + +// case "TOINT": +// { +// if (ParamList.Count != 1) +// raiseMessage("TOINT 함수에 1개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// NEwValue = Param1; +// } + +// break; +// } + +// case "NOW": +// { +// NEwValue = DateTime.Now; +// break; +// } + +// case "SUBSTRING": +// case "SUBSTR" // //2개의 파라미터를 사용한다. +// : +// { +// if (ParamList.Count < 2) +// raiseMessage("SUBSTRING 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// object param3 = ""; +// if (ParamList.Count == 3) +// param3 = RunParam(ParamList[2].ToString(), NEwValue.ToString()); +// if (Param1.Trim() == "" || Information.IsNumeric(Param2) == false || System.Convert.ToInt32(Param2) < 0) +// NEwValue = ""; +// else if (param3 != "") +// { +// // //길이를 참고한다. 너무 긴건 처리하지 못하므로 +// if (System.Convert.ToInt32(Param2) + System.Convert.ToInt32(param3) > Param1.Length) +// NEwValue = Param1.Substring(Param2, (Param1.Length - System.Convert.ToInt32(Param2))); +// else +// NEwValue = Param1.Substring(Param2, param3); +// } +// else +// NEwValue = Param1.Substring(Param2); +// } + +// break; +// } + +// case "SAVE1": +// { +// if (ParamList.Count < 1) +// Util.MsgE("SAVE1 함수에 1개의 파라미터가 없습니다"); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// Buffer1 = Param1; +// } + +// break; +// } + +// case "SAVE2": +// { +// if (ParamList.Count < 1) +// Util.MsgE("SAVE1 함수에 1개의 파라미터가 없습니다"); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// Buffer2 = Param1; +// } + +// break; +// } + +// case "SAVE3": +// { +// if (ParamList.Count < 1) +// Util.MsgE("SAVE1 함수에 1개의 파라미터가 없습니다"); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// Buffer3 = Param1; +// } + +// break; +// } + +// case "SAVE4": +// { +// if (ParamList.Count < 1) +// Util.MsgE("SAVE1 함수에 1개의 파라미터가 없습니다"); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// Buffer4 = Param1; +// } + +// break; +// } + +// case "LEFT" // //2개의 파라미터를 사용한다. +// : +// { +// if (ParamList.Count != 2) +// raiseMessage("LEFT 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// NEwValue = Strings.Left(Param1, Param2); +// } + +// break; +// } + +// case "RIGHT" // //2개의 파라미터를 사용한다. +// : +// { +// if (ParamList.Count != 2) +// raiseMessage("RIGHT 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// var Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()).ToString(); +// var Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()).ToString(); +// NEwValue = Param1.Substring(Param1.Length-int.Parse(Param2));// Strings.Right(Param1, Param2); +// } + +// break; +// } + +// case "MID": // //2개의 파라미터를 사용한다. +// { +// if (ParamList.Count != 3) +// raiseMessage("MID 함수에 3개의 파라미터가 없습니다", true); +// else +// { +// var Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// var Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); +// var Param3 = RunParam(ParamList[2].ToString(), NEwValue.ToString()); +// if (Param2 == "-1" || int.Parse(Param3.ToString()) < 1) +// { +// raiseMessage("MID 함수의 시작위치값은 0이상이여야합니다\nMID 함수의 추출길이는 1이상이여야합니다", true); +// NEwValue = ""; +// } +// else +// NEwValue = Param1.ToString().Substring(int.Parse(Param2.ToString()), int.Parse(Param3.ToString())); +// } + +// break; +// } + +// case "FORMAT": +// { +// if (ParamList.Count != 2) +// raiseMessage("FORMAT 함수에 2개의 파라미터가 없습니다", true); +// else +// { +// object Param1 = RunParam(ParamList[0].ToString(), NEwValue.ToString()); +// object Param2 = RunParam(ParamList[1].ToString(), NEwValue.ToString()); + +// // MsgBox(Param1 & "/" & Param2) +// if(Param1.GetType()== typeof(int)) +// NEwValue = ((int)Param1).ToString(Param2.ToString()); +// else +// NEwValue = Param1.ToString(); +// } + +// break; +// } + +// default: +// { +// //raiseMessage("미지원 함수 입니다") +// raiseMessage("미지원 : " + NewCmd.ToString(),true); +// break; +// } +// } +// } + +// break; +// } + +// default: +// { +// if (C == '"') +// { +// IsTextInner = !IsTextInner; +// NewParam.Append(C); +// } +// else if (IsFunctionEnd) +// raiseMessage("내부한수 종결문다음에 , 가 와야하는데 " + C + "가 왔습니다", true); +// else +// NewParam.Append(C); +// break; +// } +// } +// } +// } +// } +// // Me.Log.AppendLine("ParseCOmmand Return : " & NEwValue.ToString) +// return NEwValue; +// } + +// public object RunParam(string vParam, string SrcValue) +// { +// // My.Computer.FileSystem.WriteAllText("c:\log.txT", "runparam param=" & vParam, True) +// vParam = vParam.Trim(); +// if (vParam == "") +// return ""; +// if (vParam.Substring(0, 1) == "\"") +// return vParam.Replace("\"", ""); +// if (vParam.ToUpper() == "TRUE") +// return true; +// if (vParam.ToUpper() == "FALSE") +// return false; + +// // //시작값이 숫자라면 이건 숫자값이다. +// if (vParam.Substring(0, 1).IsNumeric() == true) +// return vParam; + +// // //시작값이 # 라면 원본 데이터이다. +// if (vParam == "#") +// return SrcValue; +// if (vParam == "#1") +// return Buffer1; +// if (vParam == "#2") +// return Buffer2; +// if (vParam == "#3") +// return Buffer3; +// if (vParam == "#4") +// return Buffer4; + +// // //시작값이 숫자도 일반 문자도 공백도 아니라면 영문단어이다. +// // // ( 가 있다면 함수이므로 함수를 실행한다. +// switch (vParam.ToUpper()) +// { +// case "NOW" // //date 타입을 반환한다. +// : +// { +// return DateTime.Now; +// } + +// default: +// { +// if (vParam.IndexOf("(") != -1) +// return this.ParseCommand(vParam, false, SrcValue); +// else +// return "";// return RunUnknown(vParam, SrcValue);// //비지원 목록으로 반환한다. +// break; +// } +// } +// return ""; +// } + +// } +//} + diff --git a/Cs_HMI/Project/Class/CResult.cs b/Cs_HMI/Project/Class/CResult.cs new file mode 100644 index 0000000..76da243 --- /dev/null +++ b/Cs_HMI/Project/Class/CResult.cs @@ -0,0 +1,236 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; + +namespace Project +{ + public class CResult + { + + public bool SMSG_ProgressEnable = false; + //public string SMSG_Text = string.Empty; + public float SMSG_ProgressMax = 0; + public int SMSG_ProgressMin = 0; + public Color SMSG_ProgressForeColor = Color.Red; + public Color SMSG_ForeColor = Color.Black; + public Color SMSG_BackColor = Color.White; + public Color SMSG_BackColor2 = Color.White; + public Color SMSG_ShadowColor = Color.Transparent; + public float SMSG_ProgressValue = 0; + public string SMSG_Tag = string.Empty; + //public event EventHandler SMSG_Update; + //public void UpdateStatusMessage() + //{ + // SMSG_Update?.Invoke(null, null); + //} + /// + /// 작업시작시간 + /// + public DateTime JobStartTime; + + /// + /// 작업종료시간 + /// + public DateTime JobEndTime; + + //public DateTime IdleStartTime = DateTime.Parse("1982-11-23"); + + /// + /// 작업진행시간 + /// + public TimeSpan JobRunTime + { + get + { + if (JobStartTime.Year == 1982) return new TimeSpan(0); + if (JobEndTime.Year == 1982) return DateTime.Now - JobStartTime; + else return JobEndTime - JobStartTime; + } + } + + //public DateTime ChargeStartTime = DateTime.Parse("1982-11-23"); + + + #region "AGV Status Value" + public string PLC1_RawData { get; set; } + public string PLC2_RawData { get; set; } + + + #endregion + + /// + /// 이동대상위치(상차,하차,충전) + /// + private ePosition _targetPos = ePosition.NONE; + + public event EventHandler TargetPosSet; + + public string result_message = ""; + public double result_progressmax = 0; + public double result_progressvalue = 0; + + + public DateTime StopMessageTimePLC = DateTime.Parse("1982-11-23"); + public DateTime StopMessageTimeSWR = DateTime.Parse("1982-11-23"); + public string StopMessagePLC = string.Empty; + public string StopMessageSWR = string.Empty; + //public DateTime LastChar + //geTime = DateTime.Parse("1982-11-23"); + + public ePosition NextPos = ePosition.NONE; + public ePosition TargetPos + { + get + { + return _targetPos; + } + set + { + _targetPos = value; + TargetPosSet?.Invoke(this, null); + + PUB.log.Add(string.Format("대상위치설정:{0}", value)); + } + } + + private char _comandKit { get; set; } + public char CommandKit + { + get + { + return _comandKit; + } + set + { + _comandKit = value; + + PUB.log.Add(string.Format("명령을 내린 KIT 설정 No={0}", value)); + } + } + + + //private ePosition _currentPos = ePosition.NONE; + //public ePosition CurrentPos + //{ + // get + // { + // return _currentPos; + // } + // set + // { + // if (_currentPos != value) //값이바뀔떄만 메세지 220628 + // PUB.log.Add(string.Format("현재위치 설정:{0}->{1}", _currentPos, value)); + + // _currentPos = value; + // } + //} + + private ePosition _currentpos = ePosition.NONE; + private string _currentposcw = string.Empty; + + // public ePosition LastPos = ePosition.NONE; + public string LastTAG { get; set; } = string.Empty; + public ePosition CurrentPos + { + get + { + return _currentpos; } + set + { + + if (_currentpos != value) //값이 바뀔때만 메세지 220628 + PUB.log.Add(string.Format("TAG위치 설정:{0}->{1}", _currentpos, value)); + _currentpos = value; + } + } + + + public string CurrentPosCW + { + get + { + + return _currentposcw; + } + set + { + + if (_currentposcw != value) //값이바뀔때만 메세지 220628 + PUB.log.Add(string.Format("TAG방향 설정:{0}->{1}", _currentposcw, value)); + _currentposcw = value; + } + } + public string Memo; + + public eResult ResultCode { get; set; } + public eECode ResultErrorCode; + public string ResultMessage { get; set; } + + #region "SetResultMessage" + + public void SetResultMessage(eResult code, eECode err, eNextStep systempause, params object[] args) + { + + var rltMsg = UTIL.GetResultCodeMessage(code); + var codeMSg = $"[E{(int)err}] ";// + Util.GetResultCodeMessage(code); + if (err == eECode.MESSAGE_ERROR) + { + codeMSg = $"[{rltMsg} ERROR MESSAGE]\n"; + } + else if (err == eECode.MESSAGE_INFO) + { + codeMSg = $"[{rltMsg} INFORMATION]\n"; + } + + + + var erMsg = UTIL.GetErrorMessage(err, args); + var msg = codeMSg + erMsg; + + this.ResultCode = code; + this.ResultErrorCode = err; + this.ResultMessage = msg; + + if (systempause == eNextStep.PAUSENOMESAGE) this.ResultMessage = string.Empty; //210129 + + PUB.log.AddE(msg); + if (systempause == eNextStep.PAUSE) PUB.sm.SetNewStep(eSMStep.PAUSE); + else if (systempause == eNextStep.PAUSENOMESAGE) PUB.sm.SetNewStep(eSMStep.PAUSE); + else if (systempause == eNextStep.ERROR) PUB.sm.SetNewStep(eSMStep.ERROR); + } + + + #endregion + + + + public Boolean isError { get; set; } + + public int retry = 0; + public DateTime retryTime; + public Device.Socket.Message RecvMessage; + + public CResult() + { + this.Clear(); + } + + + public void Clear() + { + JobStartTime = DateTime.Parse("1982-11-23"); + JobEndTime = DateTime.Parse("1982-11-23"); + + Memo = string.Empty; + isError = false; + ResultCode = eResult.NoError; + ResultMessage = string.Empty; + } + + + } + +} diff --git a/Cs_HMI/Project/Class/EEMStatus.cs b/Cs_HMI/Project/Class/EEMStatus.cs new file mode 100644 index 0000000..edc1653 --- /dev/null +++ b/Cs_HMI/Project/Class/EEMStatus.cs @@ -0,0 +1,379 @@ +using Project; +using Project.Device; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management; +using System.Net; +using System.Net.NetworkInformation; +using System.Text; +using System.Threading.Tasks; +using static Project.StateMachine; + +/// +/// ============================================================================ +/// 장비기술 상태 모니터링 관련 클래스 +/// 이 클래스는 SQLfiletoDB 프로그램과 같이 사용하는 것을 권장합니다. +/// 현재 실행 중인 프로그램의 하위 폴더 Status 에 입력된 상태값을 SQL 파일로 기록합니다. +/// SQLfiletoDB는 SQL파일을 실제 DB에 기록하는 프로그램입니다. +/// ============================================================================ +/// 작성자 : chi +/// 작성일 : 202-06-15 +/// GIT : (none) +/// +public static partial class EEMStatus +{ + static System.Threading.ManualResetEvent mre = new System.Threading.ManualResetEvent(true); + static string ip = string.Empty; + static string mac = string.Empty; + static DateTime StatusChecktime = DateTime.Now; + static DateTime MonitorChecktime = DateTime.Now.AddYears(-1); + static DateTime FileCheckTime = DateTime.Now; + static string monitorfile = string.Empty; + /// + /// UpdateStatusSQL 명령이 동작하는 간격이며 기본 180초(=3분)로 되어 있습니다. + /// + public static int UpdateStatusInterval { get; set; } = 180; + public static int UpdateFileInterval { get; set; } = 3; + static bool queryok = false; + static bool UpdateRun = false; + + public static string IP + { + get + { + if (queryok == false) GetNetworkInfo(); + return ip; + } + set { ip = value; } + } + public static string MAC + { + get + { + if (queryok == false) GetNetworkInfo(); + return mac; + } + set + { + mac = value; + } + } + + /// + /// 현재 시스템의 IP/MAC정보를 취득합니다. + /// + static void GetNetworkInfo() + { + + ip = ""; + mac = ""; + // string prgmName = Application.ProductName; + + var nif = NetworkInterface.GetAllNetworkInterfaces(); + var host = Dns.GetHostEntry(Dns.GetHostName()); + string fullname = System.Net.Dns.GetHostEntry("").HostName; + foreach (IPAddress r in host.AddressList) + { + string str = r.ToString(); + + if (str != "" && str.Substring(0, 3) == "10.") + { + ip = str; + break; + } + } + + string rtn = string.Empty; + ObjectQuery oq = new System.Management.ObjectQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled='TRUE'"); + ManagementObjectSearcher query1 = new ManagementObjectSearcher(oq); + foreach (ManagementObject mo in query1.Get()) + { + string[] address = (string[])mo["IPAddress"]; + if (address[0] == ip && mo["MACAddress"] != null) + { + mac = mo["MACAddress"].ToString(); + break; + } + } + queryok = true; + } + + public static void UpdateStatusSQL(eSMStep status, bool _extrun = false, string remark = "") + { + var tsrun = DateTime.Now - StatusChecktime; + if (tsrun.TotalSeconds >= UpdateStatusInterval) + { + AddStatusSQL(status, "UPDATE", extrun: _extrun); + StatusChecktime = DateTime.Now; + } + + //내부실행모드일때에만 파일을 처리한다 + if (_extrun == false) + { + var tsfile = DateTime.Now - FileCheckTime; + if (tsfile.TotalSeconds >= UpdateFileInterval) + { + if (UpdateRun == false) + { + UpdateRun = true; + Task.Run(() => + { + UpdateFileToDB(); + UpdateRun = false; + }); + } + FileCheckTime = DateTime.Now; + } + } + } + + /// + /// 상태모니터링 프로그램의 실행파일 명 + /// + static string StatusMonitorFile + { + get + { + if (string.IsNullOrEmpty(monitorfile)) + monitorfile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status", "SQLFileToDB.exe"); + return monitorfile; + } + } + + static System.Diagnostics.Process CheckMonitor() + { + if (System.IO.File.Exists(StatusMonitorFile) == false) return null; + + var prcs = System.Diagnostics.Process.GetProcesses(); + return prcs.Where(t => t.ProcessName.ToLower().StartsWith("sqlfiletodb")).FirstOrDefault(); + } + + public static bool RunStatusMonitor() + { + //파일이 없으면 실행 불가 + if (System.IO.File.Exists(StatusMonitorFile) == false) return false; + + //실행프로세스 검사 + var prc = CheckMonitor(); + if (prc == null) + { + try + { + prc = new System.Diagnostics.Process(); + prc.StartInfo = new System.Diagnostics.ProcessStartInfo + { + Arguments = string.Empty, + FileName = StatusMonitorFile, + }; + prc.Start(); + } + catch + { + return false; + } + } + + return true; + } + + /// + /// 작업수량을 입력합니다 + /// + /// + /// + public static string AddStatusCount(int cnt, string remark = "") + { + if (remark.isEmpty()) remark = $"Count Set : {cnt}"; + return AddStatusSQL(PUB.sm.Step, remark, count: cnt); + } + /// + /// 상태메세지를 status 폴더에 기록합니다. + /// + /// 상태머신의 상태값 + /// 비고 + /// 기록일시 + /// 오류발생시 오류메세지가 반환 됩니다 + public static string AddStatusSQL(eSMStep status, string remark = "", DateTime? wdate = null, bool extrun = false, int? count = null) + { + if (queryok == false || MAC.isEmpty()) GetNetworkInfo(); + if (status == eSMStep.CLOSEWAIT || status == eSMStep.CLOSED) return string.Empty; + + if (extrun) + { + //상태모니터링 프로그램을 실행합니다. + var tsMon = DateTime.Now - MonitorChecktime; + if (tsMon.TotalMinutes > 5) RunStatusMonitor(); + } + + try + { + var state = 0; + string cntstr = "null"; + if (count != null) cntstr = count.ToString(); + var alarmid = string.Empty; + var alarmmsg = string.Empty; + if (string.IsNullOrEmpty(remark)) remark = $"STS:{status}"; + + if (status == eSMStep.RUN) state = 1; + else if (status == eSMStep.ERROR || status == eSMStep.EMERGENCY) + { + state = 2; + alarmid = PUB.Result.ResultErrorCode.ToString(); + alarmmsg = PUB.Result.ResultMessage; + } + else if (status == eSMStep.PAUSE) //일시중지도 오류코드가 포함된다, + { + if (PUB.Result.ResultErrorCode == eECode.USER_STEP || PUB.Result.ResultErrorCode == eECode.USER_STOP || PUB.Result.ResultErrorCode.ToString().StartsWith("MESSAGE")) + { + //사용자에의해 멈추는 것은 오류코드를 넣지 않는다. + } + else + { + alarmid = PUB.Result.ResultErrorCode.ToString(); + alarmmsg = PUB.Result.ResultMessage; + } + } + else if (status == eSMStep.INIT) state = 3; //시작 + else if (status == eSMStep.CLOSING) state = 4; //종료 + + //length check + if (alarmid.Length > 10) alarmid = alarmid.Substring(0, 10); + if (remark.Length > 99) remark = remark.Substring(0, 99); + if (alarmmsg.Length > 250) alarmmsg = alarmmsg.Substring(0, 50); + + var mcid = Project.PUB.setting.MCID;//.Data.MCID; + var path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Status"); + var file = System.IO.Path.Combine(path, $"{DateTime.Now.ToString("HHmmssfff")}_{status}.sql"); + var sql = "insert into MCMonitor_Rawdata(Model,status,remark,ip,mac,time,alarmid,alarmmsg,count,version) " + + " values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}',{8},'{9}')"; + + var timestr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + if (wdate != null) timestr = ((DateTime)wdate).ToString("yyyy-MM-dd HH:mm:ss"); + var VersionNumber = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + sql = string.Format(sql, mcid, state, remark.Replace("'", "''"), IP, MAC, timestr, alarmid, alarmmsg, cntstr, VersionNumber); + System.IO.File.WriteAllText(file, sql, System.Text.Encoding.Default); + + ////만들어진지 3분이 지난 파일은 삭제한다. + //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(); + //if (fi != null) fi.Delete(); + if (state == 4 && extrun == false) UpdateFileToDB(); + return string.Empty; + } + catch (Exception ex) + { + return ex.Message; + } + } + + + + static void UpdateFileToDB() + { + if (mre.WaitOne(1000) == false) return; + mre.Reset(); + 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 di = new System.IO.DirectoryInfo(path); + if (di.Exists == false) return; + var file = di.GetFiles("*.sql", System.IO.SearchOption.TopDirectoryOnly) + .Where(t => t.LastWriteTime < DateTime.Now.AddSeconds(-3)) + .OrderByDescending(t => t.LastWriteTime).FirstOrDefault(); + + if (file == null) + { + mre.Set(); + return; + } + + //파일을 찾아야한다 + // PUB.log.Add($">> {file.FullName}"); + + + + try + { + var sql = System.IO.File.ReadAllText(file.FullName, System.Text.Encoding.Default); + if (string.IsNullOrEmpty(sql)) + { + //비어잇다면 + var errpath = System.IO.Path.Combine(di.FullName, "Error"); + var errfile = System.IO.Path.Combine(errpath, file.Name); + if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath); + System.IO.File.Move(file.FullName, errfile);// file.MoveTo(errfile); + // ecnt += 1; + } + else + { + // 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!"; + var cn = new System.Data.SqlClient.SqlConnection(cs); + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + cn.Open(); + var cnt = cmd.ExecuteNonQuery(); + //if (cnt == 0) PUB.log.Add($"Result Empty : {sql}"); + cn.Close(); + cnt += 1; + + var errpath = System.IO.Path.Combine(di.FullName, "Complete"); + var errfile = System.IO.Path.Combine(errpath, file.Name); + if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath); + //file.MoveTo(errfile); + System.IO.File.Move(file.FullName, errfile); + } + + } + catch (Exception ex) + { + var errpath = System.IO.Path.Combine(di.FullName, "Error"); + var errfile = System.IO.Path.Combine(errpath, file.Name); + if (System.IO.Directory.Exists(errpath) == false) System.IO.Directory.CreateDirectory(errpath); + try + { + //file.MoveTo(errfile); + System.IO.File.Move(file.FullName, errfile); + } + catch (Exception ex2) + { + Console.WriteLine($"move error : {ex2.Message} : {errfile}"); + } + + //ecnt += 1; + } + + try + { + //생성된지 10일이 넘은 자료는 삭제한다. + //시간소비를 피해서 1개의 파일만 작업한다 + var sqlfiles = di.GetFiles("*.sql", System.IO.SearchOption.AllDirectories); + //총3번의 데이터를 처리한다 + var files = sqlfiles.Where(t => t.LastWriteTime < DateTime.Now.AddDays(-10)).Select(t => t.FullName); + int i = 0; + var dellist = files.TakeWhile(t => i++ < 3); + foreach (var delfile in dellist) + System.IO.File.Delete(delfile); + } + catch + { + + } + mre.Set(); + } +} + + +/* +================================================= +변경내역 +================================================= +230619 chi UpdateFileToDB 에서 폴더가 없다면 return 하도록 함 +230615 chi UpdateFiletoDB의 ManualResetEvent적용 + Version 항목 추가 +230612 chi 프로그램 시작/종료 alarmid항목 추가 + 완료된 파일 10일간 보존하도록 함 +230522 chi extrun 모드 추가(agv용 - SQL파일을 외부 프로그램에서 처리하도록 함) +230617 chi 파일쓰기함수를 Task 로 처리 + 3분지난데이터 삭제기능 제거 +230516 chi initial commit +*/ diff --git a/Cs_HMI/Project/Class/EnumData.cs b/Cs_HMI/Project/Class/EnumData.cs new file mode 100644 index 0000000..4552f8f --- /dev/null +++ b/Cs_HMI/Project/Class/EnumData.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project +{ + public enum StepResult + { + Wait = 0, + Complete, + Error, + Cancel, + } + public enum eNextStep : byte + { + NOTHING = 0, + PAUSE, + PAUSENOMESAGE, + ERROR + } + + public enum EFlag : byte + { + MINSPACE = 0, + + MOTZ_LIMD, + MOTZ_LIMU, + WAIT_COVER_DOWN, + WAIT_COVER_UP, + POSITION_OUT, + FLAG_CHARGEALIGN, + //FLAG_AUTORUN, + FLAG_MOVING, + FLAG_NEXTSTOP_MARK, + FLAG_DIR_BW, + FLAG_SETUP, + FLAG_GATEOUT, + FLAG_STOP, + FLAG_LIMITHIGH, + FLAG_LIMITHIGHL, + FLAG_LIMITHIGHR, + FLAG_LIMITLOW, + FLAG_LIMITLOWL, + FLAG_LIMITLOWR, + } + + public enum eECode : byte + { + NOERROR, + EMERGENCY, + NOMODELV, + USER_STOP , + USER_STEP, + + AGVCONN, + PLCCONN, + + MESSAGE_INFO, + MESSAGE_ERROR, + + DOOFF, + DOON, + DIOFF, + DION, + + NOTALLOWUP, + } + + + public enum eResult : byte + { + TimeOut, + Dio, + NoError, + Setting, + NoModel, + Emergency, + Sensor, + Hardware, + Motion, + HomeTimeout, + PCBDetect, + Vision, + LOT, + } + + public enum ePosition : byte + { + NONE = 0, + NOT, + QA, + QA_QC, + QC, + CHARGE, + QC_F1, + F1, + F1_F2, + F2, + F2_F3, + F3, + F3_F4, + F4, + F4_F5, + F5, + POT, + } +} diff --git a/Cs_HMI/Project/Class/Lang.cs b/Cs_HMI/Project/Class/Lang.cs new file mode 100644 index 0000000..2e2a579 --- /dev/null +++ b/Cs_HMI/Project/Class/Lang.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Policy; +using System.Text; +using System.Threading.Tasks; + +namespace Project +{ + public static class Lang + { + public static string 상차 = "상차"; + public static string 하차 = "하차"; + public static string 연결실패 = "연결 실패"; + public static string 비상정지 = "비상 정지"; + public static string 홈검색완료 = "홈 검색 완료"; + public static string 현재위치를검색합니다 = "현재 위치를 검색 합니다"; + public static string 충전완료로해제합니다 = "충전 완료로 해제 합니다"; + public static string 오버로드감지 = "오버로드 감지"; + public static string 상차작업을시작합니다 { get { return string.Format("{0} 작업을 시작 합니다",상차); } } + public static string 하차작업을시작합니다 { get { return string.Format("{0} 작업을 시작 합니다", 하차); } } + public static string 안전커버를내려주세요 = "안전 커버를 내려 주세요"; + public static string 안전커버를올려주세요 = "안전 커버를 올려 주세요"; + public static string 안전커버를올리면하차가완료됩니다 = "안전 커버를 올리면 하차가 완료 됩니다"; + public static string 안전커버를올리면상차가완료됩니다 = "안전 커버를 올리면 상차가 완료 됩니다"; + public static string 안전커버를내립니다 = "안전 커버를 내립니다"; + public static string 장비상태초기화 = "장비 상태 초기화"; + public static string 충전을시작합니다 = "충전을 시작 합니다"; + public static string 충전을해제합니다 = "충전을 해제 합니다"; + public static string 충전을위해홈위치로이동합니다 = "충전을 위해 홈 위치로 이동 합니다"; + public static string 충전기검색실패 = "충전기 검색 실패"; + public static string 충전기를검색합니다 = "충전기를 검색 합니다"; + public static string 수동충전을시작합니다 = "수동충전을 시작 합니다"; + public static string 수동충전을해제합니다 = "수동충전을 해제 합니다"; + public static string 하드웨어오류발생 = "하드웨어 오류 발생"; + public static string 하드웨어오류로인해진행할수없습니다 = "하드웨어 오류로 인해 진행할 수 없습니다"; + public static string 초기화완료 = "초기화 완료"; + public static string 자동재부팅을실행합니다 = "자동 재부팅을 실행 합니다"; + public static string 충전기작동확인이오버되어홈으로이동조치합니다 = "충전기 작동 확인이 30초 이내로 확인이 안되어 홈으로 이동 합니다"; + public static string 충전시작명령을전송합니다 = "충전 시작명령을 전송 합니다"; + public static string 충전기위치오류로작업을취소합니다 = "충전기 위치 오류로 인해 작업을 취소 합니다"; + public static string 프로그램이초기화되었습니다 = "프로그램이 초기화 되었습니다"; + public static string 홈으로이동합니다 = "홈 으로 이동 합니다"; + public static string 전방에물체가감지되었습니다 = "전방에 물체가 감지 되었습니다"; + public static string 비상정지신호가감지되었습니다 = "비상정지 신호가 감지 되었습니다"; + public static string 비상정지로인해작업을중단합니다 = "비상정지로 인해 작업을 중단 합니다"; + public static string 선로를이탈했습니다 = "선로를 이탈 했습니다"; + public static string 충전이필요합니다자동모드로전환하세요 = "충전이 필요 합니다. 자동모드로 전환 하세요"; + public static string 충전이필요합니다 = "충전이 필요 합니다"; + public static string 배터리통신에문제가있습니다 = "배터리 통신에 문제가 있습니다"; + public static string 자동운전상태가아닙니다 = "자동운전 상태가 아닙니다"; + public static string 위치로이동합니다 = "위치로 이동 합니다"; + public static string 대기상태로전환합니다 = "대기 상태로 전환 합니다"; + public static string 홈이동완료대기상태로전환합니다 = "홈 이동이 완료 되었습니다. 대기 상태로 전환 합니다"; + public static string 커버를내립니다 = "커버를 내립니다"; + public static string 커버를올립니다 = "커버를 올립니다"; + public static string 홈검색을시작합니다 = "홈 검색을 시작 합니다"; + public static string 홈위치로이동합니다 = "홈 위치로 이동 합니다"; + public static string 하차작업이완료되었습니다 = "하차 작업이 완료 되었습니다"; + public static string 상차작업이완료되었습니다 = "상차 작업이 완료 되었습니다"; + public static string 작업종료 = "작업 종료"; + public static string 자동전환 = "자동 전환"; + public static string 충전기위치오류 = "충전기 위치 오류"; + public static string 다음마크위치에서정지합니다 = "다음 마크위치에서 정지 합니다"; + public static string 충전이감지되어수동충전으로전환합니다 = "충전이 감지되어 수동충전으로 전환 합니다"; + public static string 커버업대기상태가아닙니다 = "커버 업 대기 상태가 아닙니다"; + public static string QC이동버튼은상하차에서만사용가능합니다 = "QC이동 버튼은 상,하차 에서만 사용 가능합니다"; + public static string QA이동버튼은상하차에서만사용가능합니다 = "QA이동 버튼은 상,하차 에서만 사용 가능합니다"; + public static string 하차상태에서만사용가능합니다 = "하차 상태에서만 사용가능 합니다"; + + public static string PLC연결실패 { get { return string.Format("PLC {0}", 연결실패); } } + public static string PLC통신실패 = "PLC 통신실패"; + public static string AGV연결실패 { get { return string.Format("AGV {0}",연결실패); } } + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/CtlAuto.Designer.cs b/Cs_HMI/Project/CtlAuto.Designer.cs new file mode 100644 index 0000000..2c3e4c5 --- /dev/null +++ b/Cs_HMI/Project/CtlAuto.Designer.cs @@ -0,0 +1,36 @@ +namespace Project +{ + partial class CtlAuto + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/Project/CtlAuto.cs b/Cs_HMI/Project/CtlAuto.cs new file mode 100644 index 0000000..19a215d --- /dev/null +++ b/Cs_HMI/Project/CtlAuto.cs @@ -0,0 +1,1096 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using COMM; +using System.Diagnostics; + +namespace Project +{ + /// + /// 2017-04-13 13:26:00 : 라벨이므로 커서 IN 시 Hand 에서 Default로 변경함 + /// + public partial class CtlAuto : Control + { + #region "Enum & Structure" + public enum eColorTheme : byte + { + DaeHyun = 0, + eGrayBlue, + eDarkBlue, + TopMenu, + GrayButton, + GrayTitleBar, + IOStatus, + IOStatusDepp, + BlackButton, + RedButton, + GrayOmokButton, + Stepbar, + RobotStatus, + NewGray_Group, + NewGray_BG, + NewGray_Button, + NewBlue_Button, + Custom, + } + #endregion + + public arDev.BMS dev_bms { private get; set; } = null; + public arDev.FakePLC dev_plc { private get; set; } = null; + public arDev.Narumi dev_agv { private get; set; } = null; + public Device.Xbee dev_xbe { private get; set; } = null; + + public event EventHandler ItemClick; + + private Font _font_bms_vlt = new Font("Consolas", 50, FontStyle.Bold); + private Font _font_bms_lev = new Font("Consolas", 150, FontStyle.Bold); + private Font _font_main_batlev = new Font("Consolas", 50, FontStyle.Bold); + public Font Font_MAIN_BMSLevel { get { return _font_main_batlev; } set { _font_main_batlev = value; Invalidate(); } } + public Font Font_BMS_Volt { get { return _font_bms_vlt; } set { _font_bms_vlt = value; Invalidate(); } } + public Font Font_BMS_Level { get { return _font_bms_lev; } set { _font_bms_lev = value; Invalidate(); } } + + public enum eScean + { + Normal = 0, + Progress, + } + public eScean Scean { get; set; } = eScean.Normal; + + //public new event EventHandler Click; + public string StatusMessage { get; set; } = string.Empty; + public CtlAuto() + { + + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + this.MouseDown += arButton_MouseDown; + this.MouseUp += arButton_MouseUp; + this.MouseEnter += arButton_MouseEnter; + this.MouseLeave += arButton_MouseLeave; + this.Resize += arLabel_Resize; + + base.BackColor = Color.FromArgb(32, 32, 32); + ForeColor = Color.White; + } + + ~CtlAuto() + { + this.MouseDown -= arButton_MouseDown; + this.MouseUp -= arButton_MouseUp; + this.MouseEnter -= arButton_MouseEnter; + this.MouseLeave -= arButton_MouseLeave; + this.Resize -= arLabel_Resize; + } + + public void PerformClick() + { + if (Enabled == false) return; //171126 + this.InvokeOnClick(this, new EventArgs()); + } + + void arLabel_Resize(object sender, EventArgs e) + { + if (this.MinimumSize.Width == 0 || this.MinimumSize.Height == 0) + this.MinimumSize = new Size(100, 30); + + //bRemakeRect = true; + Invalidate(); + } + + public new Padding Padding + { + get + { + return base.Padding; + } + set + { + base.Padding = value; + this.Invalidate(); + } + } + + public Color BorderColor { get; set; } + private int _itemgap = 0; + public int ItemGap { get { return _itemgap; } set { _itemgap = value; Invalidate(); } } + //Boolean bRemakeRect = true; + public item[] Items { get; set; } + + public StateMachine.ERunStep runStep = StateMachine.ERunStep.READY; + public Boolean OnUpdateMode = false; + + public Boolean Status_AutoRun + { + get + { + if (COMM.VAR.BOOL == null) return true; + else return COMM.VAR.BOOL[eVarBool.FLAG_AUTORUN]; + } + } + + + + public DateTime StopTime { get; set; } + private string stopmessage = ""; + public string StopMessage { get { return stopmessage; } set { this.stopmessage = value; this.Invalidate(); } } + + System.Diagnostics.Stopwatch wframe = new System.Diagnostics.Stopwatch(); + + Point centerpt; + protected override void OnPaint(PaintEventArgs e) + { + //Set Optimized Double Buffer to reduce flickering + e.Graphics.CompositingQuality = CompositingQuality.HighQuality; + e.Graphics.InterpolationMode = InterpolationMode.High; + e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; + + if (wframe.IsRunning == false) wframe.Restart(); + + if (this.Scean == eScean.Normal) + { + var chargeM = VAR.BOOL?.Get(eVarBool.FLAG_CHARGEONM) ?? false; + var chargeA = dev_agv?.system1.Battery_charging ?? false; + var charge = chargeM || chargeA; + + //if (DesignMode) charge = true; + if (charge) + { + Scean_Normal_Charge(e.Graphics, (chargeM ? "수동" : "자동")); + } + else + { + Scean_Normal(e.Graphics); + } + } + else if (this.Scean == eScean.Progress) + Scean_Progress(e.Graphics); + + //버젼표시 + var version = VAR.STR?.Get(eVarString.SWVersion) ?? string.Empty; + if (DesignMode) version = "1.1.1.1"; + using (var f = new Font("Consolas", 8)) + e.Graphics.DrawString(version, f, Brushes.Gray, DisplayRectangle, sfBottomRight); + + } + StringFormat sfEnd = new StringFormat + { + Alignment = StringAlignment.Far, + LineAlignment = StringAlignment.Center + }; + StringFormat sfStart = new StringFormat + { + Alignment = StringAlignment.Near, + LineAlignment = StringAlignment.Center + }; + StringFormat sfCenter = new StringFormat + { + Alignment = StringAlignment.Center, + LineAlignment = StringAlignment.Center + }; + StringFormat sfBottom = new StringFormat + { + Alignment = StringAlignment.Center, + LineAlignment = StringAlignment.Far + }; + StringFormat sfBottomRight = new StringFormat + { + Alignment = StringAlignment.Far, + LineAlignment = StringAlignment.Far + }; + StringFormat sfBottomLeft = new StringFormat + { + Alignment = StringAlignment.Near, + LineAlignment = StringAlignment.Far + }; + public float ProgressMax { get; set; } = 100; + public float ProgressVal { get; set; } = 0; + Matrix TranslationTransform = new Matrix(); + Matrix RotateTransform = new Matrix(); + void Scean_Progress(Graphics g) + { + var progheight = DisplayRectangle.Height * 0.1f; + var r = new RectangleF(DisplayRectangle.Left + 50, + DisplayRectangle.Bottom - progheight - (DisplayRectangle.Height * 0.2f), + DisplayRectangle.Width - 100, progheight); + + var rt = new RectangleF( + r.Left, + DisplayRectangle.Top, + r.Width, + r.Top - DisplayRectangle.Height * 0.05f); + + //g.DrawRectangle(Pens.Blue, rt.Left, rt.Top, rt.Width, rt.Height); + g.DrawString(this.StatusMessage, this.Font, Brushes.White, + rt, sfBottom); + + var progw = r.Width * (this.ProgressVal / this.ProgressMax); + var progr = new RectangleF(r.Left, r.Top, progw, r.Height); + + g.FillRectangle(new LinearGradientBrush(r, Color.LightSkyBlue, Color.DeepSkyBlue, LinearGradientMode.Vertical), progr); + g.DrawRectangle(Pens.DimGray, r.Left, r.Top, r.Width, r.Height); + + } + int textdir = -1; + void Scean_Normal_Charge(Graphics g, string mode) + { + var bmsready = dev_bms?.IsValid ?? false;// != null; + + if (DesignMode) bmsready = true; + if (bmsready == false) + { + var pts = new List(); + pts.Add(new Point(0, 0)); + pts.Add(new Point(80, 0)); + pts.Add(new Point(0, 80)); + + using (var f = new Font("Consolas", 110, FontStyle.Bold)) + g.DrawString("BMS NOT CONNECTED", f, Brushes.Gold, this.DisplayRectangle, this.sfCenter); + + g.FillPolygon(Brushes.Gold, pts.ToArray()); + + pts.Clear(); + pts.Add(new Point(0, 0)); + pts.Add(new Point(30, 0)); + pts.Add(new Point(0, 30)); + g.FillPolygon(Brushes.Orange, pts.ToArray()); + + } + else + { + //단순 수치값을 크게 표시히낟. + var Volt = dev_bms?.Current_Volt ?? 25.35f; + var Lev = dev_bms?.Current_Level ?? 80.1f; + + var textColor = Color.Lime; + if (Lev < 30) textColor = Color.Red; + else if (Lev < 40) textColor = Color.Tomato; + else if (Lev < 60) textColor = Color.Orange; + else if (Lev < 80) textColor = Color.Gold; + + + using (var textbrush = new SolidBrush(textColor)) + g.DrawString($"{Lev:N1}%", this.Font_BMS_Level, textbrush, DisplayRectangle, sfCenter); + + g.DrawString($"{Volt:N1}v", this.Font_BMS_Volt, Brushes.Gold, DisplayRectangle, sfBottomRight); + + var r = new RectangleF(DisplayRectangle.Left, DisplayRectangle.Top, + DisplayRectangle.Width, 25); + + //msg = wframe.ElapsedMilliseconds.ToString() + msg; + var msgc = mode.Equals("수동") ? Color.Gray : Color.Gray; + using (var f = new Font("맑은 고딕", 11, FontStyle.Regular)) + using (var sb = new SolidBrush(msgc)) + { + var msg = mode.Equals("수동") ? "수동 충전 중입니다 / 해제 하려면 케이블을 제거하고 [충전취소] 버튼을 누르세요" : + "자동 충전 중 입니다 / 최대 충전량에 도달 하거나 (CALL)이 발생하면 자동 해제 됩니다"; + + var textsize = g.MeasureString(msg, f); + //msg = textsize.Width.ToString() + "_" + TranslationTransform.OffsetX.ToString() + ":" + msg; + //var minx = DisplayRectangle.Width - textsize.Width + + //화면이 넘어갔다면 다시 오른쪽으로 간다 + if (textdir < 0 && TranslationTransform.OffsetX < (textsize.Width - DisplayRectangle.Width)) + textdir *= -1; + else if (textdir > 0 && TranslationTransform.OffsetX >= 0) + textdir *= -1; + + //g.FillRectangle(Brushes.BlanchedAlmond, r.Left, r.Top, r.Width, r.Height); + TranslationTransform.Translate(textdir * (wframe.ElapsedMilliseconds / 10f), 0); + wframe.Restart(); + + g.Transform = TranslationTransform; + + g.DrawString(msg, f, sb, r, sfEnd); + } + + + //TranslationTransform.Reset(); + + + + + } + } + void Scean_Normal(Graphics g) + { + + // if (Status_AutoRun) + // g.FillRectangle(new SolidBrush(Color.FromArgb(40, 40, 40)), this.DisplayRectangle); + //else + g.FillRectangle(new SolidBrush(Color.FromArgb(32, 32, 32)), this.DisplayRectangle); + + var wheelSize = new Size((int)(DisplayRectangle.Width * 0.35), + (int)(DisplayRectangle.Width * 0.35)); + + bool agv_run = true; + if (dev_agv != null) agv_run = dev_agv.system1.agv_run; + + Color wheelbackL = agv_run ? Color.DeepSkyBlue : Color.DimGray; + Color wheelBorder = Color.Gold; + if (dev_agv != null) + { + if (dev_agv.data.Speed == 'H') wheelBorder = Color.Red; + else if (dev_agv.data.Speed == 'M') wheelBorder = Color.Gold; + else if (dev_agv.data.Speed == 'L') wheelBorder = Color.Black; + else if (dev_agv.data.Speed == 'S') wheelBorder = Color.Magenta; + } + + var wheelspace = 0; + var wheelborder = 8; + + //충전중 아이콘 추가 + //var charge = VAR.BOOL?.Get(eVarBool.FLAG_CHARGEONA) ?? false; + ////charge = true; + //if (charge) + //{ + // var x = DisplayRectangle.Right - Properties.Resources.ChargeH.Width - 20; + // var y = -30; + // g.DrawImage(Properties.Resources.ChargeH, x, y); + //} + + //왼쪽오른쪽 분리해서 좌측에는 주행정보를 우측에는 배터리 정보를 표시한다 + + //left wheeel + centerpt = new Point( + (int)(DisplayRectangle.Width / 2.0), + (int)(DisplayRectangle.Height / 2.0)); + + var rectL = new Rectangle(DisplayRectangle.Left, DisplayRectangle.Top, + (int)(DisplayRectangle.Width / 2f), DisplayRectangle.Height); + var rectR = new Rectangle(rectL.Right, DisplayRectangle.Top, + (int)(DisplayRectangle.Width / 2f), DisplayRectangle.Height); + + wheelSize = new Size((int)(rectL.Width * 0.7f), (int)(rectL.Width * 0.7f)); + var rect_lwheel = new Rectangle( + (int)(rectL.Left + (rectL.Width - wheelSize.Width) / 2f), + (int)(rectL.Top + (rectL.Height - wheelSize.Height) / 2f), + wheelSize.Width, + wheelSize.Height); + + g.FillEllipse(new SolidBrush(Color.FromArgb(200, wheelbackL)), rect_lwheel); + g.DrawEllipse(new Pen(Color.Black, wheelborder), rect_lwheel.AddOffset(1, 1)); + g.DrawEllipse(new Pen(wheelBorder, wheelborder), rect_lwheel); + + + //g.DrawRectangle(Pens.Red, rectL); + //g.DrawRectangle(Pens.Blue, rectR); + + //wheel speed text + string speedchar = "마크\n멈춤"; + if (dev_bms != null) + { + //speedchar = dev_bms.Current_Level.ToString("N0"); + if (dev_agv.data.Speed == 'H') + speedchar = "고속"; + else if (dev_agv.data.Speed == 'L') + speedchar = "저속"; + else if (dev_agv.data.Speed == 'M') + speedchar = "중속"; + else if (dev_agv.data.Speed == 'S') + speedchar = "마크\n멈춤"; + else + speedchar = dev_agv.data.Speed.ToString(); + } + + //g.FillRectangle(Brushes.BlanchedAlmond, r.Left, r.Top, r.Width, r.Height); + var degree = 10;// wframe.ElapsedMilliseconds / 10f; + //var angle = (float)(degree * Math.PI / 180f); + + if (RotateTransform.OffsetX == 0) + { + RotateTransform.Translate(DisplayRectangle.Width / 2f, DisplayRectangle.Height / 2f); + } + g.Transform = RotateTransform; + //g.FillEllipse(Brushes.Magenta, new Rectangle(-5, -5, 10, 10)); + + RotateTransform.Reset(); + g.Transform = RotateTransform; + + //speedchar = "100"; + using (Font f = new Font("맑은 고딕", 70, FontStyle.Bold)) + g.DrawString(speedchar, f, Brushes.Black, rect_lwheel, sfCenter); + + + //배터리모양표시 + List batpts = new List(); + var batw = (int)(rectR.Width * 0.6f); + var bath = (int)(rectR.Height * 0.7f); + var ptLT = new PointF(rectR.Left + (rectR.Width - batw) / 2f, rectR.Top + ((rectR.Height - bath) / 2f) + (rectR.Height * 0.05f)); + batpts.Add(ptLT); + batpts.Add(new PointF(ptLT.X + batw, ptLT.Y)); + batpts.Add(new PointF(ptLT.X + batw, ptLT.Y + bath)); + batpts.Add(new PointF(ptLT.X, ptLT.Y + bath)); + //g.DrawPolygon(Pens.Gold, batpts.ToArray()); + + + var bmslevel = 28f; + if (dev_bms != null) bmslevel = dev_bms.Current_Level; + var CornerRadius = 10; + var XPosition = rectR.Left + (rectR.Width - batw) / 2f; + var YPosition = rectR.Top + (rectR.Height - bath) / 2f + (rectR.Height * 0.05f); + var batrect = new RectangleF(XPosition, YPosition, batw, bath); + var bathatsizeH = 30; + Color bmsback = Color.Lime; + if (bmslevel < 30) bmsback = Color.Red; + else if (bmslevel < 40) bmsback = Color.Tomato; + else if (bmslevel < 70) bmsback = Color.Gold; + + using (GraphicsPath Path = new GraphicsPath()) + { + Path.AddLine(XPosition + CornerRadius, YPosition, XPosition + batw / 2f - (batw * 0.1f), YPosition); + Path.AddLine(XPosition + batw / 2f - (batw * 0.1f), YPosition, XPosition + batw / 2f - (batw * 0.1f), YPosition - bathatsizeH + CornerRadius); + Path.AddLine(XPosition + batw / 2f - (batw * 0.1f) + CornerRadius, YPosition - bathatsizeH, XPosition + batw / 2f + (batw * 0.1f) - CornerRadius , YPosition - bathatsizeH); + Path.AddLine(XPosition + batw / 2f + (batw * 0.1f), YPosition - bathatsizeH + CornerRadius, XPosition + batw / 2f + (batw * 0.1f), YPosition ); + Path.AddLine(XPosition + batw / 2f - (batw * 0.1f), YPosition, XPosition + batw - (CornerRadius * 2), YPosition); + Path.AddArc(XPosition + batw - (CornerRadius * 2), YPosition, CornerRadius * 2, CornerRadius * 2, 270, 90); + Path.AddLine(XPosition + batw, YPosition + CornerRadius, XPosition + batw, YPosition + bath - (CornerRadius * 2)); + Path.AddArc(XPosition + batw - (CornerRadius * 2), YPosition + bath - (CornerRadius * 2), CornerRadius * 2, CornerRadius * 2, 0, 90); + Path.AddLine(XPosition + batw - (CornerRadius * 2), YPosition + bath, XPosition + CornerRadius, YPosition + bath); + Path.AddArc(XPosition, YPosition + bath - (CornerRadius * 2), CornerRadius * 2, CornerRadius * 2, 90, 90); + Path.AddLine(XPosition, YPosition + bath - (CornerRadius * 2), XPosition, YPosition + CornerRadius); + Path.AddArc(XPosition, YPosition, CornerRadius * 2, CornerRadius * 2, 180, 90); + Path.CloseFigure(); + var tRegion = new System.Drawing.Region(Path); + var bmsh = (int)(bath * (bmslevel / 100f)); + var gRegion = new Region(new RectangleF(XPosition, YPosition + bath - bmsh, batw, bmsh)); + gRegion.Intersect(tRegion); + g.DrawPath(new Pen(bmsback, 20), Path); + g.FillRegion(Brushes.WhiteSmoke, tRegion); + g.FillRegion(new SolidBrush(bmsback), gRegion); + g.DrawString($"{bmslevel:N0}", Font_MAIN_BMSLevel, Brushes.Black, batrect, sfCenter); + } + + this.DrawDirection(g, rect_lwheel, wheelborder); + + //경고메세지표시 + DrawWarning(g); + + //전체테두리 + g.DrawRectangle(new Pen(BorderColor), DisplayRectangle.Left, DisplayRectangle.Top, DisplayRectangle.Width - 1, DisplayRectangle.Height - 1); + + var nextstop = VAR.BOOL?.Get(eVarBool.NEXTSTOP_MARK) ?? false; + //if (VAR.BOOL != null) nextstop = VAR.BOOL[eVarBool.NEXTSTOP_MARK]; + //상태메세지표시 + string stmsg = string.Empty; + + if (COMM.VAR.STR != null && COMM.VAR.STR[eVarString.StatusMessage].isEmpty() == false) stmsg = VAR.STR[eVarString.StatusMessage]; + else stmsg = "STATUS MESSAGE DEMO"; + if (nextstop) stmsg += "|MARK-STOP"; + + var MsgColor = Color.Lime; + if (PUB.Result != null) MsgColor = PUB.Result.SMSG_ForeColor; + using (SolidBrush sb = new SolidBrush(MsgColor)) + using (Font f = new Font("맑은 고딕", 10, FontStyle.Bold)) + g.DrawString(stmsg, f, sb, DisplayRectangle, new StringFormat + { + Alignment = StringAlignment.Near, + LineAlignment = StringAlignment.Far, + }); + + } + + readonly Font StopFont = new Font("맑은 고딕", 30, FontStyle.Bold); + + public class UIButton + { + public RectangleF rect { get; set; } + public string title { get; set; } + public string cmd { get; set; } + public bool Visible { get; set; } + } + public List Buttons = new List(); + public delegate void ButtonClickHandler(UIButton idx); + public event ButtonClickHandler ButtonClick; + + void DrawWarning(Graphics g) + { + + string warnmsg = string.Empty; + string butcmd = string.Empty; + if (dev_agv != null) + { + if (dev_agv.error.Emergency) + warnmsg = "비상 정지"; + else if (dev_agv.error.line_out_error) + warnmsg = "LINE OUT"; + else if (dev_agv.error.Overcurrent) + warnmsg = "OVER CURRENT"; + else if (dev_agv.system1.agv_run && dev_agv.system1.stop_by_front_detect) + warnmsg = "전방 장애물"; + } + //if (DesignMode) + //{ + // warnmsg = "비.상.정.지"; + // butcmd = "EMG"; + //} + + if (warnmsg.isEmpty() && stopmessage.isEmpty() == false) + warnmsg = stopmessage; + + if (warnmsg != "") + { + var but = this.Buttons.Where(t => t.title.Equals(warnmsg)).FirstOrDefault(); + if (but == null) + { + but = new UIButton(); + but.title = warnmsg; + this.Buttons.Add(but); + } + but.cmd = butcmd; + var w = this.Width * 0.9f; + var h = this.Height * 0.4f; + but.rect = new RectangleF( + (float)((this.Width - w) / 2.0f), + (float)((this.Height - h) / 2.0f), + w, h); + var rectt = new RectangleF(but.rect.Left, but.rect.Top, but.rect.Width, 10); + var rectb = new RectangleF(but.rect.Left, but.rect.Bottom - 10, but.rect.Width, 10); + g.FillRectangle(new SolidBrush(Color.FromArgb(200, Color.White)), but.rect); + g.FillRectangle(new SolidBrush(Color.FromArgb(220, Color.Red)), rectt); + g.FillRectangle(new SolidBrush(Color.FromArgb(220, Color.Red)), rectb); + + //var sf = new StringFormat + //{ + // LineAlignment = StringAlignment.Center, + // Alignment = StringAlignment.Center + //}; + var sfsize = g.MeasureString(warnmsg, StopFont); + var scx = (float)((but.rect.Width - sfsize.Width) / 2.0); + var scy = (float)((but.rect.Height - sfsize.Height) / 2.0); + g.DrawString(warnmsg, StopFont, Brushes.Black, but.rect.Left + scx + 1, but.rect.Top + scy + 1); + g.DrawString(warnmsg, StopFont, Brushes.Red, but.rect.Left + scx, but.rect.Top + scy); + g.DrawRectangle(new Pen(Color.FromArgb(250, Color.Black), 2), but.rect.Left, but.rect.Top, but.rect.Width, but.rect.Height); + } + else + { + //버튼을 모두 숨긴다. + foreach (var but in Buttons) + but.Visible = false; + } + } + + + public int frame_direction = 1000 / 10; //초당 4프레임으로 표시한다 + public long frame_direction_ms = 0; + public int frame_direction_idx = 0; + + void DrawDirection(Graphics g, Rectangle rect, int wheelborder) + { + + //위쪽에 방향지시등을 그린다. + var dirterm = 15; + var ditHeight = 50; + var dirWidth = (int)(rect.Width / 5.5f); + var rect_dirup = new Rectangle( + (int)((rect.Left + rect.Width / 2.0) - (dirWidth / 2.0)), + rect.Top - ditHeight - dirterm, + dirWidth, + (ditHeight - wheelborder)); + + var ptsUp = new Point[] { + new Point( rect_dirup.Left, rect_dirup.Bottom), + new Point( rect_dirup.Right, rect_dirup.Bottom), + new Point( (int)(rect_dirup.Left+ rect_dirup.Width/2.0), rect_dirup.Top) + }; + + bool dirup = true; + if (dev_agv != null) dirup = dev_agv.data.Direction == 'B'; + + if (dirup == true) + { + g.FillPolygon(Brushes.Lime, ptsUp); + } + else g.FillPolygon(new SolidBrush(Color.FromArgb(28, 28, 28)), ptsUp); + g.DrawPolygon(Pens.Black, ptsUp); + + + + //아래쪾에 방향지시등을 그린다 + var rect_dirdn = new Rectangle( + (int)((rect.Left + rect.Width / 2.0) - (dirWidth / 2.0)), + rect.Bottom + wheelborder + 1 + dirterm, + dirWidth, + (ditHeight - wheelborder)); + + var ptDn = new Point[] { + new Point( rect_dirdn.Left, rect_dirdn.Top), + new Point( rect_dirdn.Right, rect_dirdn.Top), + new Point( (int)(rect_dirdn.Left+ rect_dirdn.Width/2.0), rect_dirdn.Bottom) + }; + + if (dirup == false) + { + g.FillPolygon(Brushes.Lime, ptDn); + } + else g.FillPolygon(new SolidBrush(Color.FromArgb(28, 28, 28)), ptDn); + g.DrawPolygon(Pens.Black, ptDn); + + + + ////오른쪾에 방향지시등을 그린다 + //var dirR = false; + //var rect_dirr = new Rectangle( + // (int)(rect.Right + dirterm), + // (int)(rect.Top + (rect.Height / 2f)), + // dirWidth, + // (ditHeight - wheelborder)); + + //var ptR = new Point[] { + // new Point( rect_dirr.Left, rect_dirr.Top), + // new Point( rect_dirr.Right, rect_dirr.Top), + // new Point( (int)(rect_dirr.Left+ rect_dirr.Width/2.0), rect_dirr.Bottom) + //}; + + //if (dirR == false) + //{ + // g.FillPolygon(Brushes.Lime, ptR); + //} + //else g.FillPolygon(new SolidBrush(Color.FromArgb(28, 28, 28)), ptR); + //g.DrawPolygon(Pens.Black, ptR); + + } + + public bool LimitLU + { + get + { + if (dev_plc == null) return true; + return dev_plc.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU); + } + + } + public bool LimitLD + { + get + { + if (dev_plc == null) return false; + return dev_plc.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LD); + } + } + public bool LimitRU + { + get + { + if (dev_plc == null) return false; + return dev_plc.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU); + } + } + public bool LimitRD + { + get + { + if (dev_plc == null) return true; + return dev_plc.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RD); + } + } + + void DrawMC(Graphics g) + { + var boxw = DisplayRectangle.Width * 0.5f; + var r = new RectangleF( + boxw - 80, + DisplayRectangle.Top + 50, + boxw, + DisplayRectangle.Height - 20); + //g.DrawRectangle(Pens.Red, r.Left, r.Top, r.Width, r.Height); + + var w = r.Width * 0.7f;// this.DisplayRectangle.Width * 0.45; + var h = r.Height * 0.5f;// this.DisplayRectangle.Height * 0.75; + var pt = new PointF(r.Left + r.Width / 2.0f, r.Top + r.Height / 2.0f); + var rect = new RectangleF((float)(pt.X - w / 2.0f), (float)((pt.Y - h / 2.0f) + 20), (float)w, (float)h); + + //3d모형으로 엣지를 넣는다 + // pt = new PointF(DisplayRectangle.Width / 2.1f, DisplayRectangle.Height / 1.5f); + var sizeX = 150; + // var sizeY = 100; + var sizeZ = 150; + + var PtsFront = new PointF[] { + new PointF(pt.X-sizeX,pt.Y-sizeZ / 2.0f), + new PointF(pt.X+sizeX,pt.Y-sizeZ / 2.0f), + new PointF(pt.X+sizeX,pt.Y+sizeZ / 2.0f), + new PointF(pt.X-sizeX,pt.Y+sizeZ / 2.0f) + }; + var PtsTop = new PointF[] { + new PointF(pt.X-sizeX,pt.Y-(sizeZ / 2.0f)), + new PointF(pt.X+sizeX,pt.Y-(sizeZ / 2.0f)), + new PointF(pt.X +sizeX + 75,pt.Y- sizeZ), + new PointF(pt.X - (sizeX / 2.0f) ,pt.Y-sizeZ) + }; + + + var PtsBottom = new PointF[] { + new PointF(pt.X-sizeX,sizeZ+pt.Y-(sizeZ / 2.0f)), + new PointF(pt.X+sizeX,sizeZ+pt.Y-(sizeZ / 2.0f)), + new PointF(pt.X +sizeX +75,sizeZ+pt.Y- sizeZ), + new PointF(pt.X - (sizeX / 2.0f) ,sizeZ+pt.Y-sizeZ) + }; + + var PtsBack = new PointF[] { + new PointF( (sizeX / 2.0f)+pt.X-sizeX,pt.Y-sizeZ ), + new PointF( (sizeX / 2.0f)+pt.X+sizeX,pt.Y-sizeZ ), + new PointF( (sizeX / 2.0f)+pt.X+sizeX,pt.Y), + new PointF( (sizeX / 2.0f)+pt.X-sizeX,pt.Y) + }; + + var PtsRight = new PointF[] { + new PointF( PtsFront[1].X, PtsFront[1].Y ), + new PointF( PtsBack[1].X, PtsBack[1].Y ), + new PointF( PtsBack[2].X, PtsBack[2].Y ), + new PointF( PtsFront[2].X, PtsFront[2].Y ) + }; + + + var PtsLeft = new PointF[] { + new PointF( PtsFront[0].X, PtsFront[0].Y ), + new PointF( PtsBack[0].X, PtsBack[0].Y ), + new PointF( PtsBack[3].X, PtsBack[3].Y ), + new PointF( PtsFront[3].X, PtsFront[3].Y ) + }; + + //foreach (var p in PtsBottom) + //{ + // var xx = p.X - 5; + // var yy = p.Y - 5; + // var ww = 10; + // var hh = 10; + // g.DrawEllipse(Pens.Red, xx, yy, ww, hh); + //} + + //바닥면 출력 + g.FillPolygon(new SolidBrush(Color.FromArgb(150, Color.White)), PtsBottom); + g.DrawPolygon(Pens.Black, PtsBottom); + + //윗면 출력 + g.FillPolygon(new SolidBrush(Color.FromArgb(50, Color.White)), PtsTop); + + ////뒷면먼저출력 + g.FillPolygon(new SolidBrush(Color.FromArgb(50, Color.White)), PtsBack); + + ////우측출력 + g.FillPolygon(new SolidBrush(Color.FromArgb(10, Color.White)), PtsRight); + + ////좌측출력 + g.FillPolygon(new SolidBrush(Color.FromArgb(10, Color.White)), PtsLeft); + + //안전커버 뒷 + var coverPadding = 10; + var coverYOffset = -30; + var coverLYOffset = 0; + var coverRYOffset = 0; + + if (LimitRD == true) coverRYOffset = 20; + else if (LimitRU == true) coverRYOffset = coverYOffset; + + if (LimitLD == true) coverLYOffset = 20; + else if (LimitLU == true) coverLYOffset = coverYOffset; + + var PtsCoverBack = new PointF[] { + new PointF( PtsBack[0].X+coverPadding, PtsBack[0].Y+coverLYOffset ), + new PointF( PtsBack[1].X-coverPadding, PtsBack[1].Y+coverLYOffset ), + new PointF( PtsBack[2].X-coverPadding, PtsBack[2].Y+coverLYOffset ), + new PointF( PtsBack[3].X+coverPadding, PtsBack[3].Y+coverLYOffset ) + }; + + var PtsCoverFront = new PointF[] { + new PointF( PtsFront[0].X+coverPadding, PtsFront[0].Y+coverRYOffset ), + new PointF( PtsFront[1].X-coverPadding, PtsFront[1].Y+coverRYOffset ), + new PointF( PtsFront[2].X-coverPadding, PtsFront[2].Y+coverRYOffset ), + new PointF( PtsFront[3].X+coverPadding, PtsFront[3].Y+coverRYOffset ) + }; + + if (LimitLU == true) + { + g.FillPolygon(new SolidBrush(Color.FromArgb(100, Color.Red)), PtsCoverBack); + g.DrawPolygon(new Pen(Color.DarkRed, 2), PtsCoverBack); + } + else if (LimitLD == true) + { + g.FillPolygon(new SolidBrush(Color.FromArgb(100, Color.Blue)), PtsCoverBack); + g.DrawPolygon(new Pen(Color.DarkBlue, 2), PtsCoverBack); + } + else + { + g.FillPolygon(new SolidBrush(Color.FromArgb(100, Color.Gray)), PtsCoverBack); + g.DrawPolygon(Pens.DimGray, PtsCoverBack); + } + + //g.DrawPolygon(Pens.Orange, PtsCoverBack); + + g.FillPolygon(new SolidBrush(Color.FromArgb(50, Color.White)), PtsFront); + // g.DrawPolygon(Pens.Black, PtsFront); + + if (LimitRU == true) + { + g.FillPolygon(new SolidBrush(Color.FromArgb(150, Color.Red)), PtsCoverFront); + g.DrawPolygon(new Pen(Color.DarkRed, 2), PtsCoverFront); + } + else if (LimitRD == true) + { + g.FillPolygon(new SolidBrush(Color.FromArgb(150, Color.Blue)), PtsCoverFront); + g.DrawPolygon(new Pen(Color.DarkBlue, 2), PtsCoverFront); + } + else + { + g.FillPolygon(new SolidBrush(Color.FromArgb(150, Color.Gray)), PtsCoverFront); + g.DrawPolygon(Pens.DimGray, PtsCoverFront); + } + + //중앙포인트 + g.FillEllipse(Brushes.White, pt.X - 2, pt.Y - 2, 4f, 4f); + + ////button - start + //var buttonSize = 15; + //var offset = 10; + //g.FillEllipse(Brushes.Red, offset * 2.7f + PtsTop[0].X - buttonSize / 2.0f, -offset + PtsTop[0].Y - buttonSize / 2.0f, buttonSize, buttonSize); + //g.DrawEllipse(Pens.Black, offset * 2.7f + PtsTop[0].X - buttonSize / 2.0f, -offset + PtsTop[0].Y - buttonSize / 2.0f, buttonSize, buttonSize); + + //g.FillEllipse(Brushes.Blue, offset * 4.2f + PtsTop[0].X - buttonSize / 2.0f, -offset*2.5f + PtsTop[0].Y - buttonSize / 2.0f, buttonSize, buttonSize); + //g.DrawEllipse(Pens.Black, offset * 4.2f + PtsTop[0].X - buttonSize / 2.0f, -offset * 2.5f + PtsTop[0].Y - buttonSize / 2.0f, buttonSize, buttonSize); + + //g.FillEllipse(Brushes.Green, offset * 5.5f + PtsTop[0].X - buttonSize / 2.0f, -offset * 4.0f + PtsTop[0].Y - buttonSize / 2.0f, buttonSize, buttonSize); + //g.DrawEllipse(Pens.Black, offset * 5.5f + PtsTop[0].X - buttonSize / 2.0f, -offset * 4.0f + PtsTop[0].Y - buttonSize / 2.0f, buttonSize, buttonSize); + + } + + //void DrawBattery(Graphics g) + //{ + // //우측 끝에 세로로 표시한다 + // int r = 10; + // int w = 25; + // int y = 10; + // Rectangle rect = new Rectangle(DisplayRectangle.Right - w - r, y, w, DisplayRectangle.Height - (y * 2)); + // var ph = (this.ChargeLevel / 100.0) * rect.Height; + // Rectangle rectp = new Rectangle(rect.Left, (int)(rect.Top + rect.Height - ph), rect.Width, (int)ph); + + // Color pColor = Color.Gold; + // if (ChargeLevel <= 40) pColor = Color.Tomato; + // else if (ChargeLevel >= 80) pColor = Color.Lime; + + + // if (rectp.Height > 1) + // { + // using (LinearGradientBrush b = new LinearGradientBrush(rectp, pColor, Color.FromArgb(150, 150, 150), LinearGradientMode.Vertical)) + // g.FillRectangle(b, rectp); + + // } + + + // //for (int i = 1; i < 10; i++) + // //{ + // // var ly = (int)( rect.Height * ((i*1.0) / 10.0) ); + // // g.DrawLine(Pens.Gray, rect.Left, rect.Top + ly, rect.Right, rect.Top + ly); + // // g.DrawString((10-i).ToString(), this.Font, Brushes.Gray, rect.Left+5, ly+5); + // //} + + + // //전체테두리 + // using (Pen p = new Pen(Color.FromArgb(100, Color.Black))) + // g.DrawRectangle(p, rect); + + + //} + + public class item + { + + public bool Enable_Direction { get; set; } + public Color BackColor1 { get; set; } + public Color BackColor2 { get; set; } + public Color ForeColor { get; set; } + public Color ShadowColor { get; set; } + public Color BorderColor { get; set; } + + public Color RightColor { get; set; } + public Color LeftColor { get; set; } + + [Browsable(false)] + public Rectangle fullrect { get; set; } + [Browsable(false)] + public Rectangle leftrect { get; set; } + [Browsable(false)] + public Rectangle rightrect { get; set; } + + public item() + { + BorderColor = Color.FromArgb(100, 100, 100); + fullrect = Rectangle.Empty; + leftrect = Rectangle.Empty; + rightrect = Rectangle.Empty; + BackColor1 = Color.White; + BackColor2 = Color.Transparent; + ForeColor = Color.DimGray; + ShadowColor = Color.Black; + Enable_Direction = true; + } + + + + public string Title { get; set; } + + public void Draw(Graphics g, Font font, StringFormat sf) + { + Pen pen_border = null; + LinearGradientBrush br_back = null; + SolidBrush br_text = null; + + //펜 + if (pen_border == null) pen_border = new Pen(this.BorderColor); + else pen_border.Color = this.BorderColor; + + //배경브러쉬 + if (br_back == null) br_back = new LinearGradientBrush(this.fullrect, this.BackColor1, this.BackColor2, LinearGradientMode.Vertical); + else + { + br_back.LinearColors[0] = this.BackColor1; + br_back.LinearColors[1] = this.BackColor2; + } + + //제목브러쉬 + if (br_text == null) br_text = new SolidBrush(this.ForeColor); + else br_text.Color = this.ForeColor; + + //배경표시 + g.FillRectangle(br_back, this.fullrect); + + //제목표시 + if (this.Title.isEmpty() == false) + { + if (this.ShadowColor != Color.Transparent && this.ShadowColor != this.ForeColor) + { + using (var brShadow = new SolidBrush(this.ShadowColor)) + g.DrawString( + this.Title, + font, brShadow, + new Rectangle( + this.fullrect.Left + 1, + this.fullrect.Top + 1, + this.fullrect.Width, + this.fullrect.Height), + sf); + } + + g.DrawString(this.Title, font, br_text, this.fullrect, sf); + g.DrawString(this.Title, font, br_text, this.fullrect, sf); + } + + //테두리표시 + g.DrawRectangle(pen_border, this.fullrect); + + if (Enable_Direction) + { + //좌측테두리 + if (this.leftrect.IsEmpty == false) + { + if (this.LeftColor != Color.Transparent) + { + using (SolidBrush sb = new SolidBrush(this.LeftColor)) + g.FillRectangle(sb, this.leftrect); + } + g.DrawRectangle(pen_border, this.leftrect); + } + //우측테두리 + if (this.rightrect.IsEmpty == false) + { + if (this.RightColor != Color.Transparent) + { + using (SolidBrush sb = new SolidBrush(this.RightColor)) + g.FillRectangle(sb, this.rightrect); + } + g.DrawRectangle(pen_border, this.rightrect); + } + + } + + if (pen_border != null) pen_border.Dispose(); + if (br_back != null) br_back.Dispose(); + if (br_text != null) br_text.Dispose(); + } + } + + public class ItemClickEventArgs : EventArgs + { + public item Item { get; set; } + public ItemClickEventArgs(item item) + { + this.Item = item; + } + } + + + + + + void arButton_MouseLeave(object sender, EventArgs e) + { + //isMouseOver = false; + this.Cursor = Cursors.Default; + Invalidate(); + } + + void arButton_MouseEnter(object sender, EventArgs e) + { + //isMouseOver = true; + //this.Cursor = Cursors.Hand; + Invalidate(); + } + + void arButton_MouseUp(object sender, MouseEventArgs e) + { + if (!Enabled) + { + return; + } + // isMouseDown = false; + Invalidate(); + } + + + void arButton_MouseDown(object sender, MouseEventArgs e) + { + if (Enabled == false || Enabled == false) return; + // isMouseDown = true; + + //item fullrect 에서 클릭위치를 찾아야함 + if (Items != null && Items.Length > 0) + { + //마우스위치가 아이템에 포함되어있다면 + var focusItem = Items.Where(t => t.fullrect.Contains(e.Location)).FirstOrDefault(); + if (focusItem != null) + { + ItemClick?.Invoke(this, new ItemClickEventArgs(focusItem)); + } + } + + if (Buttons.Any()) + { + //마우스위치가 아이템에 포함되어있다면 + var focusItem = Buttons.Where(t => t.rect.Contains(e.Location)).FirstOrDefault(); + if (focusItem != null) + { + //ItemClick?.Invoke(this, new ItemClickEventArgs(focusItem)); + ButtonClick?.Invoke(focusItem); + } + } + Invalidate(); + } + + + + } +} diff --git a/Cs_HMI/Project/CtlPos.Designer.cs b/Cs_HMI/Project/CtlPos.Designer.cs new file mode 100644 index 0000000..18e8332 --- /dev/null +++ b/Cs_HMI/Project/CtlPos.Designer.cs @@ -0,0 +1,36 @@ +namespace Project +{ + partial class CtlPos + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/Project/CtlPos.cs b/Cs_HMI/Project/CtlPos.cs new file mode 100644 index 0000000..a92cf2f --- /dev/null +++ b/Cs_HMI/Project/CtlPos.cs @@ -0,0 +1,586 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Project +{ + /// + /// 2017-04-13 13:26:00 : 라벨이므로 커서 IN 시 Hand 에서 Default로 변경함 + /// + public partial class CtlPos : Control + { + #region "Enum & Structure" + public enum eColorTheme : byte + { + DaeHyun = 0, + eGrayBlue, + eDarkBlue, + TopMenu, + GrayButton, + GrayTitleBar, + IOStatus, + IOStatusDepp, + BlackButton, + RedButton, + GrayOmokButton, + Stepbar, + RobotStatus, + NewGray_Group, + NewGray_BG, + NewGray_Button, + NewBlue_Button, + Custom, + } + #endregion + + public string[] msg { get; set; } + public event EventHandler ItemClick; + + + + + //public new event EventHandler Click; + public CtlPos() + { + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + this.MouseDown += arButton_MouseDown; + this.MouseUp += arButton_MouseUp; + this.MouseEnter += arButton_MouseEnter; + this.MouseLeave += arButton_MouseLeave; + this.Resize += arLabel_Resize; + + base.BackColor = Color.FromArgb(32, 32, 32); + ForeColor = Color.White; + } + + ~CtlPos() + { + this.MouseDown -= arButton_MouseDown; + this.MouseUp -= arButton_MouseUp; + this.MouseEnter -= arButton_MouseEnter; + this.MouseLeave -= arButton_MouseLeave; + this.Resize -= arLabel_Resize; + } + + public void ClearData() + { + foreach (var item in Items) + { + item.Direction = '0'; + item.Active = false; + item.Focus = false; + } + } + + public void PerformClick() + { + if (Enabled == false) return; //171126 + this.InvokeOnClick(this, new EventArgs()); + } + + void arLabel_Resize(object sender, EventArgs e) + { + if (this.MinimumSize.Width == 0 || this.MinimumSize.Height == 0) + this.MinimumSize = new Size(100, 30); + + bRemakeRect = true; + Invalidate(); + } + + public new Padding Padding + { + get + { + return base.Padding; + } + set + { + base.Padding = value; + this.Invalidate(); + } + } + + public Color BorderColor { get; set; } + private int _itemgap = 0; + public int ItemGap { get { return _itemgap; } set { _itemgap = value; Invalidate(); } } + Boolean bRemakeRect = true; + public item[] Items { get; set; } + protected override void OnPaint(PaintEventArgs e) + { + //Set Optimized Double Buffer to reduce flickering + e.Graphics.CompositingQuality = CompositingQuality.HighQuality; + e.Graphics.InterpolationMode = InterpolationMode.High; + e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; + + if (Items == null) e.Graphics.DrawString("No Item", this.Font, Brushes.Red, 10, 10); + else + { + //영역변경시새로한다 + if (bRemakeRect == true) makeRect(); + + //아이템그리기 + var sf = new StringFormat + { + Alignment = StringAlignment.Center, + LineAlignment = StringAlignment.Center + }; + foreach (var item in Items) + { + item.Draw(e.Graphics, this.Font, sf); + } + } + + + //전체테두리 + e.Graphics.DrawRectangle(new Pen(BorderColor), DisplayRectangle.Left, DisplayRectangle.Top, DisplayRectangle.Width - 1, DisplayRectangle.Height - 1); + } + void makeRect() + { + var indiheight = (int)(DisplayRectangle.Height * 0.15); + var fullrect = new Rectangle( + DisplayRectangle.Left + Padding.Left, + DisplayRectangle.Top + Padding.Top, + DisplayRectangle.Width - Padding.Left - Padding.Right, + DisplayRectangle.Height - Padding.Top - Padding.Bottom - 1 - indiheight); + + var itemCountS = this.Items.Where(t => t.ItemType != itemtype.Hidden && t.ItemType != itemtype.Item).Count(); + var itemCountI = this.Items.Where(t => t.ItemType == itemtype.Item).Count(); + + var GapWidth = ItemGap * ((itemCountI + itemCountS) - 1); + var itemWidthS = (ItemGap * 2); //spacer width + var itemWidthI = (fullrect.Width - GapWidth - (itemWidthS * itemCountS)) / itemCountI; + var itemHeight = fullrect.Height; + + var i = 0; + var x = fullrect.Left; + foreach (var item in Items) + { + if (item.ItemType == itemtype.Hidden) continue; + if (item.ItemType == itemtype.Spacer) + { + var y = fullrect.Top; + var w = (int)itemWidthS; + var h = DisplayRectangle.Height - Padding.Top - Padding.Bottom + 3; + var rectf = new Rectangle(x, y, w, h); + item.fullrect = rectf; + item.leftrect = Rectangle.Empty; + item.rightrect = Rectangle.Empty; + x += w + ItemGap; + } + else if (item.ItemType == itemtype.NLimit || item.ItemType == itemtype.PLimit) + { + var y = fullrect.Top; + var w = (int)itemWidthS; + var h = DisplayRectangle.Height - Padding.Top - Padding.Bottom + 3; + var rectf = new Rectangle(x, y, w, h); + item.fullrect = rectf; + item.leftrect = Rectangle.Empty; + item.rightrect = Rectangle.Empty; + x += w + ItemGap; + } + else if (item.Enable_Direction) + { + //var x = (int)(fullrect.Left + i * itemWidth) + (i * ItemGap); + var y = fullrect.Top; + var w = (int)itemWidthI; + var h = itemHeight; + var rectf = new Rectangle(x, y, w, h); + item.fullrect = rectf; + var indiWidth = (int)((rectf.Width - 4) / 2.0); + item.leftrect = new Rectangle(rectf.Left, rectf.Bottom + 4, indiWidth, indiheight); + item.rightrect = new Rectangle(rectf.Left + indiWidth + 4, rectf.Bottom + 4, indiWidth, indiheight); + x += itemWidthI + ItemGap; + } + else + { + //var x = (int)(fullrect.Left + i * itemWidth) + (i * ItemGap); + var y = fullrect.Top; + var w = (int)itemWidthI; + var h = DisplayRectangle.Height - Padding.Top - Padding.Bottom + 3; + var rectf = new Rectangle(x, y, w, h); + item.fullrect = rectf; + item.leftrect = Rectangle.Empty; + item.rightrect = Rectangle.Empty; + x += itemWidthI + ItemGap; + } + i += 1; + } + bRemakeRect = false; + } + + // private int LastPosition = -1; + //private string LastDir = ""; + //public void SetPositionOut(Boolean value) + //{ + // if (LastPosition < 0 || LastPosition >= Items.Length) return; + + // if (value == true) + // { + // this.Items[LastPosition].BackColor1 = Color.SkyBlue; + // this.Items[LastPosition].BackColor2 = Color.DeepSkyBlue; + // } + + // this.Invalidate(); + //} + + /// + /// 지정한 개체를 선택합니다. + /// + /// + public void SetPosition(ePosition idx) + { + + foreach (var item in Items) + item.Focus = false; + if (idx == ePosition.NONE) return; + var pos = Items.Where(t => t.Position == idx).First(); + pos.Focus = true; + } + public bool GetPositionActive(ePosition idx) + { + if (idx == ePosition.NONE) return false; + var pos = Items.Where(t => t.Position == idx).First(); + return pos.Active; + } + public void SetPositionActive(ePosition idx) + { + + foreach (var item in Items) + item.Active = false; + if (idx == ePosition.NONE) return; + var pos = Items.Where(t => t.Position == idx).First(); + pos.Active = true; + } + + /// + /// 활성화된 위치를 모두 초기화 한다 + /// + public void SetPositionDeActive() + { + foreach (var item in Items) + item.Active = false; + } + public void SetTargetPosition(ePosition idx) + { + + foreach (var item in Items) + item.Target = false; + if (idx == ePosition.NONE) return; + var pos = Items.Where(t => t.Position == idx).First(); + pos.Target = true; + } + /// + /// 지정한 개체의 left,right 값을 바꿉니다 .rfid값이 변경되었을때 처리합니다. dir=0이면 왼쪽이 켜집니다) + /// + /// + /// + public void SetDirection(string dir) + { + //모든 위치값이 초기화 된다. + foreach (var item in Items) + item.Direction = '0'; + + var selectitem = this.Items.Where(t => t.Focus).FirstOrDefault(); + if (selectitem != null) + { + if (dir.isEmpty()) selectitem.Direction = '0'; + else selectitem.Direction = (dir == "0" ? '1' : '2'); + } + } + + public enum itemtype + { + Hidden, + NLimit, + PLimit, + Spacer, + Item, + } + + public class item + { + public ePosition Position { get; set; } + public itemtype ItemType { get; set; } + // public bool Hidden { get; set; } + public bool Enable_Direction { get; set; } + + #region Colorlist + public Color BackColor2 + { + get + { + if (Active) + { + if (ItemType == itemtype.NLimit || ItemType == itemtype.PLimit) + return Color.Tomato; + else + return Color.Lime; + } + else if (Focus) + { + if (ItemType == itemtype.NLimit || ItemType == itemtype.PLimit) + return Color.Tomato; + else + return Color.Yellow; + } + else return Color.FromArgb(82, 82, 82); + } + } + public Color BackColor1 + { + get + { + if (Active) + { + if (ItemType == itemtype.NLimit || ItemType == itemtype.PLimit) + return Color.Red; + else + return Color.Green; + } + else if (Focus) + { + if (ItemType == itemtype.NLimit || ItemType == itemtype.PLimit) + return Color.Red; + else + return Color.Gold; + } + else return Color.FromArgb(64, 64, 64); + } + } + public Color ForeColor + { + get + { + if (this.Target) return Color.DarkMagenta; + else return Color.Black; + } + } + public Color ShadowColor { get { return Color.DimGray; } } + public Color BorderColor { get { return Color.Black; } } + public Color RightColor + { + get + { + if (Direction == '2') + { + if (Active) return Color.Lime; + else return Color.Gold; + } + else return Color.Transparent; + } + } + public Color LeftColor + { + get + { + if (Direction == '1') + { + if (Active) return Color.Lime; + else return Color.Gold; + } + else return Color.Transparent; + } + } + #endregion + + [Browsable(false)] + public Rectangle fullrect { get; set; } + [Browsable(false)] + public Rectangle leftrect { get; set; } + [Browsable(false)] + public Rectangle rightrect { get; set; } + + public bool Active { get; set; } + public bool Focus { get; set; } + public char Direction { get; set; } + public bool Target { get; set; } + + public string Title { get; set; } + + // public bool Spacer { get; set; } + + public item() + { + Position = ePosition.NONE; + ItemType = itemtype.Item; + // Spacer = false; + fullrect = Rectangle.Empty; + leftrect = Rectangle.Empty; + rightrect = Rectangle.Empty; + Enable_Direction = true; + Active = false; + Focus = false; + Target = false; + Direction = '0'; + // Hidden = false; + } + + public override string ToString() + { + if (this.ItemType == itemtype.Hidden) + return $"{Title}(숨김)"; + else if (this.ItemType == itemtype.Spacer) + return $"(SPACER)"; + else if (this.ItemType == itemtype.NLimit) + return $"N-LIMIT"; + else if (this.ItemType == itemtype.PLimit) + return $"P-LIMIT"; + else + return $"{Title}"; + } + + public void Draw(Graphics g, Font font, StringFormat sf) + { + Pen pen_border = null; + LinearGradientBrush br_back = null; + SolidBrush br_text = null; + + //배경색 + + //펜 + if (pen_border == null) pen_border = new Pen(this.BorderColor); + else pen_border.Color = this.BorderColor; + + //배경브러쉬 + if (br_back == null) br_back = new LinearGradientBrush(this.fullrect, this.BackColor1, this.BackColor2, LinearGradientMode.Vertical); + else + { + br_back.LinearColors[0] = this.BackColor1; + br_back.LinearColors[1] = this.BackColor2; + } + + //제목브러쉬 + if (br_text == null) br_text = new SolidBrush(this.ForeColor); + else br_text.Color = this.ForeColor; + + //배경표시 + g.FillRectangle(br_back, this.fullrect); + + //제목표시 + if (this.Title.isEmpty() == false && this.ItemType == itemtype.Item) + { + if (this.ShadowColor != Color.Transparent && this.ShadowColor != this.ForeColor) + { + using (var brShadow = new SolidBrush(this.ShadowColor)) + g.DrawString( + this.Title, + font, brShadow, + new Rectangle( + this.fullrect.Left + 1, + this.fullrect.Top + 1, + this.fullrect.Width, + this.fullrect.Height), + sf); + } + + g.DrawString(this.Title, font, br_text, this.fullrect, sf); + g.DrawString(this.Title, font, br_text, this.fullrect, sf); + } + + //테두리표시 + g.DrawRectangle(pen_border, this.fullrect); + + if (Enable_Direction) + { + + //좌측테두리 + if (this.leftrect.IsEmpty == false) + { + if (this.LeftColor != Color.Transparent) + { + using (SolidBrush sb = new SolidBrush(this.LeftColor)) + g.FillRectangle(sb, this.leftrect); + } + g.DrawRectangle(pen_border, this.leftrect); + } + //우측테두리 + if (this.rightrect.IsEmpty == false) + { + if (this.RightColor != Color.Transparent) + { + using (SolidBrush sb = new SolidBrush(this.RightColor)) + g.FillRectangle(sb, this.rightrect); + } + g.DrawRectangle(pen_border, this.rightrect); + } + + } + + if (pen_border != null) pen_border.Dispose(); + if (br_back != null) br_back.Dispose(); + if (br_text != null) br_text.Dispose(); + } + } + + public class ItemClickEventArgs : EventArgs + { + public item Item { get; set; } + public ItemClickEventArgs(item item) + { + this.Item = item; + } + } + + void arButton_MouseLeave(object sender, EventArgs e) + { + //isMouseOver = false; + this.Cursor = Cursors.Default; + Invalidate(); + } + + void arButton_MouseEnter(object sender, EventArgs e) + { + //isMouseOver = true; + this.Cursor = Cursors.Hand; + Invalidate(); + } + + void arButton_MouseUp(object sender, MouseEventArgs e) + { + if (!Enabled) + { + return; + } + //isMouseDown = false; + Invalidate(); + } + + + void arButton_MouseDown(object sender, MouseEventArgs e) + { + if (Enabled == false || Enabled == false) return; + // isMouseDown = true; + + //item fullrect 에서 클릭위치를 찾아야함 + if (Items != null && Items.Length > 0) + { + //마우스위치가 아이템에 포함되어있다면 + var focusItem = Items.Where(t => t.fullrect.Contains(e.Location)).FirstOrDefault(); + if (focusItem != null) + { + ItemClick?.Invoke(this, new ItemClickEventArgs(focusItem)); + } + } + Invalidate(); + } + + + + } +} diff --git a/Cs_HMI/Project/DataSet1.Designer.cs b/Cs_HMI/Project/DataSet1.Designer.cs new file mode 100644 index 0000000..2ea1bc8 --- /dev/null +++ b/Cs_HMI/Project/DataSet1.Designer.cs @@ -0,0 +1,1390 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace Project { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("DataSet1")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class DataSet1 : global::System.Data.DataSet { + + private ResultDataDataTable tableResultData; + + private languageDataTable tablelanguage; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public DataSet1() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected DataSet1(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + if ((ds.Tables["ResultData"] != null)) { + base.Tables.Add(new ResultDataDataTable(ds.Tables["ResultData"])); + } + if ((ds.Tables["language"] != null)) { + base.Tables.Add(new languageDataTable(ds.Tables["language"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ResultDataDataTable ResultData { + get { + return this.tableResultData; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public languageDataTable language { + get { + return this.tablelanguage; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public override global::System.Data.DataSet Clone() { + DataSet1 cln = ((DataSet1)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + if ((ds.Tables["ResultData"] != null)) { + base.Tables.Add(new ResultDataDataTable(ds.Tables["ResultData"])); + } + if ((ds.Tables["language"] != null)) { + base.Tables.Add(new languageDataTable(ds.Tables["language"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars(bool initTable) { + this.tableResultData = ((ResultDataDataTable)(base.Tables["ResultData"])); + if ((initTable == true)) { + if ((this.tableResultData != null)) { + this.tableResultData.InitVars(); + } + } + this.tablelanguage = ((languageDataTable)(base.Tables["language"])); + if ((initTable == true)) { + if ((this.tablelanguage != null)) { + this.tablelanguage.InitVars(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void InitClass() { + this.DataSetName = "DataSet1"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/DataSet1.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tableResultData = new ResultDataDataTable(); + base.Tables.Add(this.tableResultData); + this.tablelanguage = new languageDataTable(); + base.Tables.Add(this.tablelanguage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private bool ShouldSerializeResultData() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private bool ShouldSerializelanguage() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + DataSet1 ds = new DataSet1(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public delegate void ResultDataRowChangeEventHandler(object sender, ResultDataRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public delegate void languageRowChangeEventHandler(object sender, languageRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ResultDataDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnidx; + + private global::System.Data.DataColumn columninfo_job; + + private global::System.Data.DataColumn columninfo_start; + + private global::System.Data.DataColumn columninfo_end; + + private global::System.Data.DataColumn columninfo_result; + + private global::System.Data.DataColumn columninfo_iserror; + + private global::System.Data.DataColumn columninfo_resultcode; + + private global::System.Data.DataColumn columninfo_filename; + + private global::System.Data.DataColumn columntime_start; + + private global::System.Data.DataColumn columntime_end; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public ResultDataDataTable() { + this.TableName = "ResultData"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal ResultDataDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected ResultDataDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn idxColumn { + get { + return this.columnidx; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn info_jobColumn { + get { + return this.columninfo_job; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn info_startColumn { + get { + return this.columninfo_start; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn info_endColumn { + get { + return this.columninfo_end; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn info_resultColumn { + get { + return this.columninfo_result; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn info_iserrorColumn { + get { + return this.columninfo_iserror; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn info_resultcodeColumn { + get { + return this.columninfo_resultcode; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn info_filenameColumn { + get { + return this.columninfo_filename; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn time_startColumn { + get { + return this.columntime_start; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn time_endColumn { + get { + return this.columntime_end; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public ResultDataRow this[int index] { + get { + return ((ResultDataRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event ResultDataRowChangeEventHandler ResultDataRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event ResultDataRowChangeEventHandler ResultDataRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event ResultDataRowChangeEventHandler ResultDataRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event ResultDataRowChangeEventHandler ResultDataRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void AddResultDataRow(ResultDataRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public ResultDataRow AddResultDataRow(string info_job, string info_start, string info_end, string info_result, string info_iserror, string info_resultcode, string info_filename, System.DateTime time_start, System.DateTime time_end) { + ResultDataRow rowResultDataRow = ((ResultDataRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + info_job, + info_start, + info_end, + info_result, + info_iserror, + info_resultcode, + info_filename, + time_start, + time_end}; + rowResultDataRow.ItemArray = columnValuesArray; + this.Rows.Add(rowResultDataRow); + return rowResultDataRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public override global::System.Data.DataTable Clone() { + ResultDataDataTable cln = ((ResultDataDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ResultDataDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars() { + this.columnidx = base.Columns["idx"]; + this.columninfo_job = base.Columns["info_job"]; + this.columninfo_start = base.Columns["info_start"]; + this.columninfo_end = base.Columns["info_end"]; + this.columninfo_result = base.Columns["info_result"]; + this.columninfo_iserror = base.Columns["info_iserror"]; + this.columninfo_resultcode = base.Columns["info_resultcode"]; + this.columninfo_filename = base.Columns["info_filename"]; + this.columntime_start = base.Columns["time_start"]; + this.columntime_end = base.Columns["time_end"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void InitClass() { + this.columnidx = new global::System.Data.DataColumn("idx", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnidx); + this.columninfo_job = new global::System.Data.DataColumn("info_job", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columninfo_job); + this.columninfo_start = new global::System.Data.DataColumn("info_start", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columninfo_start); + this.columninfo_end = new global::System.Data.DataColumn("info_end", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columninfo_end); + this.columninfo_result = new global::System.Data.DataColumn("info_result", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columninfo_result); + this.columninfo_iserror = new global::System.Data.DataColumn("info_iserror", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columninfo_iserror); + this.columninfo_resultcode = new global::System.Data.DataColumn("info_resultcode", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columninfo_resultcode); + this.columninfo_filename = new global::System.Data.DataColumn("info_filename", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columninfo_filename); + this.columntime_start = new global::System.Data.DataColumn("time_start", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntime_start); + this.columntime_end = new global::System.Data.DataColumn("time_end", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntime_end); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint11", new global::System.Data.DataColumn[] { + this.columnidx}, false)); + this.columnidx.AutoIncrement = true; + this.columnidx.AutoIncrementSeed = 1; + this.columnidx.AllowDBNull = false; + this.columnidx.Unique = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public ResultDataRow NewResultDataRow() { + return ((ResultDataRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ResultDataRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ResultDataRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ResultDataRowChanged != null)) { + this.ResultDataRowChanged(this, new ResultDataRowChangeEvent(((ResultDataRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ResultDataRowChanging != null)) { + this.ResultDataRowChanging(this, new ResultDataRowChangeEvent(((ResultDataRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ResultDataRowDeleted != null)) { + this.ResultDataRowDeleted(this, new ResultDataRowChangeEvent(((ResultDataRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ResultDataRowDeleting != null)) { + this.ResultDataRowDeleting(this, new ResultDataRowChangeEvent(((ResultDataRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void RemoveResultDataRow(ResultDataRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DataSet1 ds = new DataSet1(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ResultDataDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class languageDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnSection; + + private global::System.Data.DataColumn columnKey; + + private global::System.Data.DataColumn columnValue; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public languageDataTable() { + this.TableName = "language"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal languageDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected languageDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn SectionColumn { + get { + return this.columnSection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn KeyColumn { + get { + return this.columnKey; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataColumn ValueColumn { + get { + return this.columnValue; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public languageRow this[int index] { + get { + return ((languageRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event languageRowChangeEventHandler languageRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event languageRowChangeEventHandler languageRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event languageRowChangeEventHandler languageRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public event languageRowChangeEventHandler languageRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void AddlanguageRow(languageRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public languageRow AddlanguageRow(string Section, string Key, string Value) { + languageRow rowlanguageRow = ((languageRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + Section, + Key, + Value}; + rowlanguageRow.ItemArray = columnValuesArray; + this.Rows.Add(rowlanguageRow); + return rowlanguageRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public languageRow FindByKeySection(string Key, string Section) { + return ((languageRow)(this.Rows.Find(new object[] { + Key, + Section}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public override global::System.Data.DataTable Clone() { + languageDataTable cln = ((languageDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new languageDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal void InitVars() { + this.columnSection = base.Columns["Section"]; + this.columnKey = base.Columns["Key"]; + this.columnValue = base.Columns["Value"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + private void InitClass() { + this.columnSection = new global::System.Data.DataColumn("Section", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSection); + this.columnKey = new global::System.Data.DataColumn("Key", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnKey); + this.columnValue = new global::System.Data.DataColumn("Value", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnValue); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnKey, + this.columnSection}, true)); + this.columnSection.AllowDBNull = false; + this.columnKey.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public languageRow NewlanguageRow() { + return ((languageRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new languageRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(languageRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.languageRowChanged != null)) { + this.languageRowChanged(this, new languageRowChangeEvent(((languageRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.languageRowChanging != null)) { + this.languageRowChanging(this, new languageRowChangeEvent(((languageRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.languageRowDeleted != null)) { + this.languageRowDeleted(this, new languageRowChangeEvent(((languageRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.languageRowDeleting != null)) { + this.languageRowDeleting(this, new languageRowChangeEvent(((languageRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void RemovelanguageRow(languageRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DataSet1 ds = new DataSet1(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "languageDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ResultDataRow : global::System.Data.DataRow { + + private ResultDataDataTable tableResultData; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal ResultDataRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableResultData = ((ResultDataDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public int idx { + get { + return ((int)(this[this.tableResultData.idxColumn])); + } + set { + this[this.tableResultData.idxColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string info_job { + get { + if (this.Isinfo_jobNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableResultData.info_jobColumn])); + } + } + set { + this[this.tableResultData.info_jobColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string info_start { + get { + if (this.Isinfo_startNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableResultData.info_startColumn])); + } + } + set { + this[this.tableResultData.info_startColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string info_end { + get { + if (this.Isinfo_endNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableResultData.info_endColumn])); + } + } + set { + this[this.tableResultData.info_endColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string info_result { + get { + if (this.Isinfo_resultNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableResultData.info_resultColumn])); + } + } + set { + this[this.tableResultData.info_resultColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string info_iserror { + get { + if (this.Isinfo_iserrorNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableResultData.info_iserrorColumn])); + } + } + set { + this[this.tableResultData.info_iserrorColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string info_resultcode { + get { + if (this.Isinfo_resultcodeNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableResultData.info_resultcodeColumn])); + } + } + set { + this[this.tableResultData.info_resultcodeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string info_filename { + get { + if (this.Isinfo_filenameNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableResultData.info_filenameColumn])); + } + } + set { + this[this.tableResultData.info_filenameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public System.DateTime time_start { + get { + try { + return ((global::System.DateTime)(this[this.tableResultData.time_startColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("\'ResultData\' 테이블의 \'time_start\' 열의 값이 DBNull입니다.", e); + } + } + set { + this[this.tableResultData.time_startColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public System.DateTime time_end { + get { + try { + return ((global::System.DateTime)(this[this.tableResultData.time_endColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("\'ResultData\' 테이블의 \'time_end\' 열의 값이 DBNull입니다.", e); + } + } + set { + this[this.tableResultData.time_endColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Isinfo_jobNull() { + return this.IsNull(this.tableResultData.info_jobColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Setinfo_jobNull() { + this[this.tableResultData.info_jobColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Isinfo_startNull() { + return this.IsNull(this.tableResultData.info_startColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Setinfo_startNull() { + this[this.tableResultData.info_startColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Isinfo_endNull() { + return this.IsNull(this.tableResultData.info_endColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Setinfo_endNull() { + this[this.tableResultData.info_endColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Isinfo_resultNull() { + return this.IsNull(this.tableResultData.info_resultColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Setinfo_resultNull() { + this[this.tableResultData.info_resultColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Isinfo_iserrorNull() { + return this.IsNull(this.tableResultData.info_iserrorColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Setinfo_iserrorNull() { + this[this.tableResultData.info_iserrorColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Isinfo_resultcodeNull() { + return this.IsNull(this.tableResultData.info_resultcodeColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Setinfo_resultcodeNull() { + this[this.tableResultData.info_resultcodeColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Isinfo_filenameNull() { + return this.IsNull(this.tableResultData.info_filenameColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Setinfo_filenameNull() { + this[this.tableResultData.info_filenameColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Istime_startNull() { + return this.IsNull(this.tableResultData.time_startColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Settime_startNull() { + this[this.tableResultData.time_startColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool Istime_endNull() { + return this.IsNull(this.tableResultData.time_endColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void Settime_endNull() { + this[this.tableResultData.time_endColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class languageRow : global::System.Data.DataRow { + + private languageDataTable tablelanguage; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + internal languageRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tablelanguage = ((languageDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Section { + get { + return ((string)(this[this.tablelanguage.SectionColumn])); + } + set { + this[this.tablelanguage.SectionColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Key { + get { + return ((string)(this[this.tablelanguage.KeyColumn])); + } + set { + this[this.tablelanguage.KeyColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public string Value { + get { + if (this.IsValueNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tablelanguage.ValueColumn])); + } + } + set { + this[this.tablelanguage.ValueColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public bool IsValueNull() { + return this.IsNull(this.tablelanguage.ValueColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public void SetValueNull() { + this[this.tablelanguage.ValueColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public class ResultDataRowChangeEvent : global::System.EventArgs { + + private ResultDataRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public ResultDataRowChangeEvent(ResultDataRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public ResultDataRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public class languageRowChangeEvent : global::System.EventArgs { + + private languageRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public languageRowChangeEvent(languageRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public languageRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/Cs_HMI/Project/DataSet1.cs b/Cs_HMI/Project/DataSet1.cs new file mode 100644 index 0000000..bdc2b60 --- /dev/null +++ b/Cs_HMI/Project/DataSet1.cs @@ -0,0 +1,11 @@ +namespace Project +{ + + + public partial class DataSet1 + { + partial class ModelDataTable + { + } + } +} diff --git a/Cs_HMI/Project/DataSet1.xsc b/Cs_HMI/Project/DataSet1.xsc new file mode 100644 index 0000000..551fc56 --- /dev/null +++ b/Cs_HMI/Project/DataSet1.xsc @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/Cs_HMI/Project/DataSet1.xsd b/Cs_HMI/Project/DataSet1.xsd new file mode 100644 index 0000000..f91e15f --- /dev/null +++ b/Cs_HMI/Project/DataSet1.xsd @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Cs_HMI/Project/DataSet1.xss b/Cs_HMI/Project/DataSet1.xss new file mode 100644 index 0000000..1827237 --- /dev/null +++ b/Cs_HMI/Project/DataSet1.xss @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/Cs_HMI/Project/Device/CFlag.cs b/Cs_HMI/Project/Device/CFlag.cs new file mode 100644 index 0000000..e9236c8 --- /dev/null +++ b/Cs_HMI/Project/Device/CFlag.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project.Device +{ + public class CFlag : COMM.Flag + { + public CFlag() : base(64) + { + + } + public bool get(EFlag flag) + { + return Get((int)flag); + } + public void set(EFlag flag, bool value) + { + var idx = (int)flag; + Set(idx, value); + } + public void Toggle(EFlag flag) + { + int idx = (int)flag; + var curValue = Get(idx); + Set(idx, !curValue); + } + + public void Toggle(int idx) + { + var curValue = Get(idx); + Set(idx, !curValue); + } + + } +} diff --git a/Cs_HMI/Project/Device/Socket.cs b/Cs_HMI/Project/Device/Socket.cs new file mode 100644 index 0000000..abd5d04 --- /dev/null +++ b/Cs_HMI/Project/Device/Socket.cs @@ -0,0 +1,427 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project.Device +{ + public class Socket + { + public enum eType + { + REQUEST, + REPLY, + } + public enum eSType + { + STATUS, + GEN, + SPL + } + + public struct Message + { + public Boolean isError; + public string ErrorMessage; + public string Asset; + public eType Type; + public eSType SType; + public string Body; + public string timeStamp; + } + + private Winsock_Orcas.Winsock wsListen; + private Winsock_Orcas.Winsock wsData; + private char sepMsg = (char)0x07; + private char sepBody = (char)0x09; + + public int ListenPort { get; set; } + public string errorMessage { get; set; } + public event EventHandler RecvMessage; + public event EventHandler SendMessage; + public event EventHandler GetMessage; + + private void RaiseMessage(string msg, Boolean isErr = false) + { + if (GetMessage != null) GetMessage(this, new MesasgeEventArgs(msg, isErr)); + } + private void RaiseSendMessage(Message msg, string raw) + { + if (SendMessage != null) + { + try + { + SendMessage(this, new SocketMessageEventArgs(msg, raw)); + } + catch (Exception ex) + { + this.errorMessage = ex.Message; + } + } + } + private void RaiseRecvMessage(Message msg, string raw) + { + if (RecvMessage != null) + { + try + { + RecvMessage(this, new SocketMessageEventArgs(msg, raw)); + } + catch (Exception ex) + { + this.errorMessage = ex.Message; + } + } + } + public Socket() + { + wsListen = new Winsock_Orcas.Winsock(); + wsData = new Winsock_Orcas.Winsock(); + wsListen.LegacySupport = true; + wsData.LegacySupport = true; + wsData.Connected += wsData_Connected; + wsData.Disconnected += wsData_Disconnected; + wsData.DataArrival += wsData_DataArrival; + wsData.ErrorReceived += wsData_ErrorReceived; + wsListen.ConnectionRequest += wsListen_ConnectionRequest; + wsListen.ErrorReceived += wsListen_ErrorReceived; + } + + void wsListen_ErrorReceived(object sender, Winsock_Orcas.WinsockErrorReceivedEventArgs e) + { + RaiseMessage("LTERR:" + e.Details, true); + } + + void wsData_ErrorReceived(object sender, Winsock_Orcas.WinsockErrorReceivedEventArgs e) + { + RaiseMessage("RXERR:"+e.Details, true); + } + + void wsData_Disconnected(object sender, EventArgs e) + { + RaiseMessage("Disconnected"); + } + + void wsData_Connected(object sender, Winsock_Orcas.WinsockConnectedEventArgs e) + { + RaiseMessage("Conncted"); + } + + void wsListen_ConnectionRequest(object sender, Winsock_Orcas.WinsockConnectionRequestEventArgs e) + { + if (wsData.State != Winsock_Orcas.WinsockStates.Closed) + { + wsData.Close(); + System.Threading.Thread.Sleep(500); + } + RaiseMessage("Connection Request " + e.ClientIP); + try + { + wsData.Accept(e.Client); + }catch (Exception ex) + { + RaiseMessage("Connection Request\n"+ex.Message, true); + } + + + } + + ~Socket() + { + if (wsData != null) + { + wsData.DataArrival -= wsData_DataArrival; + wsData.Connected += wsData_Connected; + wsData.Disconnected += wsData_Disconnected; + } + if (wsListen != null) + { + wsListen.ConnectionRequest += wsListen_ConnectionRequest; + } + + + + if (wsListen != null && wsListen.State != Winsock_Orcas.WinsockStates.Closed) + wsListen.Close(); + if (wsData != null && wsData.State != Winsock_Orcas.WinsockStates.Closed) + wsData.Close(); + wsData.Dispose(); + wsListen.Dispose(); + } + + public Boolean Listen(int port) + { + try + { + ListenPort = port; + wsListen.Listen(this.ListenPort); + this.errorMessage = string.Empty; + return true; + } + catch (Exception ex) + { + this.errorMessage = ex.Message; + return false; + } + } + public Boolean isListen + { + get + { + return wsListen.State == Winsock_Orcas.WinsockStates.Listening; + } + } + public Boolean isConn + { + get + { + return wsData.State == Winsock_Orcas.WinsockStates.Connected; + } + } + + public Message LastSendMessage = new Message(); + private Message makeMessage(string Asset, eType type, eSType subtype, string body) + { + Message retval = new Message(); + retval.Asset = Asset; + retval.Type = type; + retval.SType = subtype; + retval.Body = body; + retval.isError = true; + retval.ErrorMessage = string.Empty; + retval.timeStamp = DateTime.Now.ToString("yyyyMMddHHmmss"); + return retval; + } + + /// + /// Body문자열을 구분자를 기준으로 한 배열로 반환 함 + /// + /// + /// + public string[] getBodyArray(string bodyMessage) + { + return bodyMessage.Split(sepBody); + } + + /// + /// 패킷의 내용을 메세지로 분리한다. + /// + /// + /// + private Message ParseMessage(string PacketMessage) + { + Message retval = new Message(); + retval.isError = false; + retval.ErrorMessage = string.Empty; + + var buffer = PacketMessage.Split(sepMsg); + if (buffer.Length != 5) + { + retval.isError = true; + retval.ErrorMessage = "Packet Size Error : Expect 5 Array"; + return retval; + } + else + { + retval.Asset = buffer[0]; + if (!getType(buffer[1], out retval.Type)) + { + retval.isError = true; + retval.ErrorMessage = "지정된 Type 이 아닙니다(" + buffer[1] + ")"; + return retval; + } + if (!getSType(buffer[2], out retval.SType)) + { + retval.isError = true; + retval.ErrorMessage = "지정된 SubType 이 아닙니다(" + buffer[2] + ")"; + return retval; + } + retval.timeStamp = buffer[3]; + //DateTime timeStamp; + //if (!DateTime.TryParse(retval.timeStamp, out timeStamp)) + //{ + // retval.isError = true; + // retval.ErrorMessage = "timeStamp 해석 오류(" + retval.timeStamp + ")"; + // return retval; + //} + retval.Body = buffer[4]; + } + return retval; + } + + private Boolean getType(string strType, out eType type) + { + type = eType.REPLY; + var list = Enum.GetNames(typeof(eType)); + int value = -1; + for (int i = 0; i < list.Length; i++) + { + if (list[i].ToUpper() == strType.ToUpper()) + { + value = i; + break; + } + } + if (value == -1) return false; + type = (eType)value; + return true; + } + private Boolean getSType(string strSType, out eSType stype) + { + stype = eSType.GEN; + var list = Enum.GetNames(typeof(eSType)); + int value = -1; + for (int i = 0; i < list.Length; i++) + { + if (list[i].ToUpper() == strSType.ToUpper()) + { + value = i; + break; + } + } + if (value == -1) return false; + stype = (eSType)value; + return true; + } + + public string makePacket(Message msg) + { + //프레임구조 asset chr(7) + type + chr(7) + stype + char(7) + timeStamp + char(7) + body" + //timestamp = yyyymmddhhmmss + //sepChar = (char)0x07; + + System.Text.StringBuilder buffer = new StringBuilder(); + buffer.Append(msg.Asset); + buffer.Append(sepMsg); + buffer.Append(msg.Type.ToString()); + buffer.Append(sepMsg); + buffer.Append(msg.SType.ToString()); + buffer.Append(sepMsg); + buffer.Append(msg.timeStamp); + buffer.Append(sepMsg); + buffer.Append(msg.Body); + return buffer.ToString(); + } + + public string makeLotSplitPacket( string fcst, string tcst, string slot, string wafer) + { + System.Text.StringBuilder buffer = new StringBuilder(); + buffer.Append(fcst); + buffer.Append(sepBody); + buffer.Append(tcst); + buffer.Append(sepBody); + buffer.Append(slot); + buffer.Append(sepBody); + buffer.Append(wafer); + return buffer.ToString(); + } + public string makeLotGenPacket(string Lot, string cst, string slot, string wafer) + { + System.Text.StringBuilder buffer = new StringBuilder(); + buffer.Append(Lot); + buffer.Append(sepBody); + buffer.Append(cst); + buffer.Append(sepBody); + buffer.Append(slot); + buffer.Append(sepBody); + buffer.Append(wafer); + return buffer.ToString(); + } + public enum eStatus + { + RUN =0, + IDLE , + ALARM, + } + public string makeReplyStatus(eStatus Status) + { + System.Text.StringBuilder buffer = new StringBuilder(); + buffer.Append(((int)Status).ToString()); + return buffer.ToString(); + } + public Boolean Send(string Asset, eType type, eSType subtype, string body) + { + var msg = makeMessage(Asset, type, subtype, body); + var isStatus = subtype == eSType.STATUS; + return Send(msg, isStatus); + } + + public Boolean isReplyRecv = false; + public Boolean Send(Message msg,Boolean isStatus) + { + + var packet = makePacket(msg); + if (wsData.State != Winsock_Orcas.WinsockStates.Connected) + { + errorMessage = "Not Connected"; + return false; + } + try + { + if(isStatus==false) isReplyRecv = false; //190129 + wsData.Send(packet + "\r\n"); + errorMessage = string.Empty; + LastSendMessage = msg; + RaiseSendMessage(msg, packet); + return true; + } + catch (Exception ex) + { + errorMessage = ex.Message; + return false; + } + } + + public Message LastReplyMessage = new Message(); + public Message LastRecvMessage = new Message(); + void wsData_DataArrival(object sender, Winsock_Orcas.WinsockDataArrivalEventArgs e) + { + var sock = sender as Winsock_Orcas.Winsock; + var data = sock.Get(); + if(PUB.setting.LOg_SocketRecv) + { + if (data.IndexOf("REQUEST") != -1 && data.IndexOf("STATUS") != -1) + { + //핑 명령 + } + else PUB.log.AddE("Socket Recv : " + data); //190129 + } + + LastRecvMessage = ParseMessage(data); + if (LastRecvMessage.isError) PUB.log.AddE("Socket Message error" + LastRecvMessage.ErrorMessage); + else + { + //190129 - reply만 별도 처리함 + if (LastRecvMessage.Type == eType.REPLY) + { + LastReplyMessage = ParseMessage(data); + isReplyRecv = true; + } + } + RaiseRecvMessage(LastRecvMessage, data); + } + + + public class SocketMessageEventArgs : EventArgs + { + public string rawData { get; set; } + public Device.Socket.Message Message { get; set; } + public SocketMessageEventArgs(Device.Socket.Message msg, string raw) + { + this.Message = msg; + this.rawData = raw; + } + } + public class MesasgeEventArgs : EventArgs + { + public string Message { get; set; } + public Boolean isError { get; set; } + public MesasgeEventArgs(string msg, Boolean iserr) + { + this.Message = msg; + this.isError = iserr; + } + } + } + +} diff --git a/Cs_HMI/Project/Device/Xbee.cs b/Cs_HMI/Project/Device/Xbee.cs new file mode 100644 index 0000000..eaab4c6 --- /dev/null +++ b/Cs_HMI/Project/Device/Xbee.cs @@ -0,0 +1,400 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; +using System.Threading; +using COMM; +using System.Runtime.Remoting.Messaging; + +namespace Project.Device +{ + public class Xbee : arDev.arRS232 + { + public Xbee() + { + + } + + public string buffer = string.Empty; + public System.Text.StringBuilder newbuffer = new StringBuilder(); + protected override bool CustomParser(byte[] buf, out byte[] remainBuffer) + { + //일반 kit 명령은 0x02 kit번호, kit값 0x03 + //상태 명령은 0x04 메세지데이터 0x05 + + Console.WriteLine("custom parse len=" + buf.Length.ToString()); + + List sparebuffer = new List(); + Boolean bComplete = false; + for (int i = 0; i < buf.Length; i++) + { + var incomByte = buf[i]; + if (bComplete == true) sparebuffer.Add(incomByte); + else + { + if (findSTX == false) + { + if (incomByte != 0x02) + { + //버리는데이터 + } + else + { + findSTX = true; + tempBuffer.Clear(); + tempBuffer.Add(incomByte); + } + } + else + { + tempBuffer.Add(incomByte); + + if (incomByte == 0x03) + { + //데이터가 맞게 수신됨 + LastReceiveBuffer = tempBuffer.ToArray(); + bComplete = true; + findSTX = false; + } + else if (tempBuffer.Count > 30) + { + tempBuffer.Clear(); + findSTX = false; + } + } + } + } + remainBuffer = sparebuffer.ToArray(); + return bComplete; + } + + + public override bool ProcessRecvData(byte[] data) + { + var kitno = (char)(data[1]); + var kitval = (char)(data[2]); + NewMsgEvent(kitno, kitval); + return true; + } + + public void NewMsgEvent(char kitNo, char kitVal) + { + //대상위치 확인 + ePosition kitPos = ePosition.NONE; + if (kitNo == '9') kitPos = ePosition.QC; + else if (kitNo == '1') kitPos = ePosition.F1; + else if (kitNo == '2') kitPos = ePosition.F2; + else if (kitNo == '3') kitPos = ePosition.F3; + else if (kitNo == '4') kitPos = ePosition.F4; + else + { + if (kitNo == '0') return; + PUB.log.Add($"비허가 키트번호 무시 번호={kitNo},값={kitVal}"); + return; + } + + //if (kitNo= 'F') + //{ + // PUB.Speak("알 수 없는 키트번호 입니다"); + // PUB.logsys.Add($"키트번호별위치확인실패 값={kitNo}"); + // return; + //} + + //(ePosition)int.Parse(kitNo.ToString()); + PUB.logcal.Add(string.Format("Xbee:newMsgEvent:{0},{1}=>{2}", kitNo, kitVal, kitPos)); + if (PUB.CheckManualChargeMode() == false) + { + PUB.log.Add($"수동 충전 중이라 콜 기능을 취소 합니다"); + return; + } + + bool FixButton = kitPos == ePosition.NONE; + if (kitPos == ePosition.NONE) + { + if (kitVal == '1') kitPos = ePosition.QC; + else if (kitVal == '2') kitPos = ePosition.CHARGE; + else if (kitVal == '4') kitPos = ePosition.QC; + //else if (kitVal == '3') kitPos = ePosition.QA; + else + { + PUB.log.Add($"AGV버튼 이벤트 실행 값:{kitVal} 취소"); + return; + } + kitVal = '1'; //버튼은 무조건 ON상태로 한다 + } + + //자동상태가 아니라면 오류처리 + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false || PUB.sm.Step != StateMachine.eSMStep.RUN) + { + PUB.log.AddE("'자동실행' 상태가 아니므로 콜/취소 작업을 할 수 없습니다 콜:" + kitPos.ToString() + ",값=" + kitVal.ToString()); + PUB.Speak(Lang.자동운전상태가아닙니다); + return; + } + + //충전기를 제외하고 '1'의 값은 호출을 원하는값이다.('0'=취소) + if (kitVal == '1') + { + //qA혹은 Pack 에서 해당 버튼을 눌렀을때의 처리방법 + //if (PUB.Result.CurrentPos == ePosition.QA && kitPos == ePosition.QA) + //{ + // PUB.logsys.AddE("QA위치에서 QA버튼을 눌렀음 명령 취소함"); + // PUB.Speak("현재 위치는 QA 입니다."); + // return; + //} + + //상/하차 작업중이 아니라면 콜을 받는다 + if (PUB.sm.RunStep != StateMachine.ERunStep.GOUP && PUB.sm.RunStep != StateMachine.ERunStep.GODOWN) + { + //call을 받으려면 대상위 (2=QC,3,4,5,6,7) + //콜을 요청하는 곳 (2=QC,3=FVI-1,4,5,6,7==FVI-5) + //1번은 충전기 + + //콜버튼으로 대상위치를 다시 결정한다. + //대상번호는 콜번호에서 +2을 하면 된다. + //대상번호 PK=1,QA2=2,QA1=3,QC=4 + //QC의경우 콜Kit번호는 2이므로, 이동대상은 +2인 4가 되어야 함 + //콜번호와 RFID대상번호는 2의 오차가 발생함, 현재 설치된 RFID를 모두 변경할 수 없어서 이렇게 운용함 + + + RaiseMessage(MessageType.Normal, string.Format("CALL확정 Kit={0},대상위치={1}", kitNo, kitPos)); + + PUB.AGV.data.CallNo = int.Parse(kitNo.ToString()); + PUB.AGV.data.CallString = kitNo.ToString(); + + PUB.Result.CommandKit = kitNo; + PUB.Result.TargetPos = kitPos; + SendToKit(kitNo, '1', (PUB.IsCanCALL() ? '1' : '0')); //콜확정을 클라이언트에 알림 + + PUB.Speak(kitPos.ToString() + Lang.위치로이동합니다); + + //상태머신을 변경한다 (충전 OFF상태로 간다, 충전상태가 아니면 바로 이동하게됨) + //Pub.sm.ResetRunStep(); + //Pub.sm.setNewStep(StateMachine.eSMStep.RUN); + + //qa, pack 은 하차 전용이다 + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOUP); + PUB.sm.SetNewStep(StateMachine.eSMStep.RUN); + } + else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN && VAR.BOOL[eVarBool.WAIT_COVER_DOWN] == false && VAR.BOOL[eVarBool.WAIT_COVER_UP] == false) + { + //하차중에 받을 수 있게하자 (단 FVi1 이하일때에는 무시하자) 230710 - 김수곤 + if (PUB.Result.TargetPos == ePosition.QC && PUB.Result.CurrentPos < ePosition.F1) + { + PUB.log.Add($"하차중이지만 FVI #1 아래에 있으니 콜을 취소 합니다"); + SendToKit(kitNo, '0', '0'); + RaiseMessage(MessageType.Normal, $"QC 추가 콜이지만 위치가 #1번 이하이므로 취소 됩니다. Kit={kitNo},현재={PUB.Result.CurrentPos},대상={PUB.Result.TargetPos}"); + } + else + { + RaiseMessage(MessageType.Normal, string.Format("CALL확정(추가) Kit={0},대상위치={1}", kitNo, kitPos)); + + PUB.AGV.data.CallNo = int.Parse(kitNo.ToString()); + PUB.AGV.data.CallString = kitNo.ToString(); + + PUB.Result.CommandKit = kitNo; + PUB.Result.TargetPos = kitPos; + + SendToKit(kitNo, '1', (PUB.IsCanCALL() ? '1' : '0')); //콜확정을 클라이언트에 알림 + + PUB.Speak(kitPos.ToString() + Lang.위치로이동합니다); + + //상태머신을 변경한다 (충전 OFF상태로 간다, 충전상태가 아니면 바로 이동하게됨) + //Pub.sm.ResetRunStep(); + //Pub.sm.setNewStep(StateMachine.eSMStep.RUN); + + //qa, pack 은 하차 전용이다 + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOUP); + PUB.sm.SetNewStep(StateMachine.eSMStep.RUN); + } + + } + //else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN && PUB.Result.CurrentPos == ePosition.QA) + //{ + // RaiseMessage(MessageType.Normal, string.Format("CALL확정 Kit={0},대상위치={1}", kitNo, kitPos)); + + // PUB.Result.CommandKit = kitNo; + // PUB.Result.TargetPos = kitPos; + // SendToKit(kitNo, '1'); //콜확정을 클라이언트에 알림 + + // PUB.Speak(kitPos.ToString() + "위치로 이동 합니다"); + + // //상태머신을 변경한다 (충전 OFF상태로 간다, 충전상태가 아니면 바로 이동하게됨) + // // Pub.sm.ResetRunStep(); + // // Pub.sm.setNewStep(StateMachine.eSMStep.RUN); + + // //qa => pack 은 하차 전용이다 + // //QA에서 PACK이동시에는 바로 N극 멈춤 기능을 사용해도도된다.(자재가 있으며, 커버가 내려가 있으므로 느리게 동작해야함) + // PUB.sm.ClearRunStep(); + // PUB.sm.SetNewRunStep(StateMachine.ERunStep.GODOWN); + // PUB.sm.SetNewStep(StateMachine.ESMStep.RUN); + + // PUB.AGV.AGVMoveStop("xbee_newmsgevent", arDev.Narumi.eStopOpt.MarkStop);// (arDev.Narumi.eAgvCmd.MoveStop,.SetNextStop_Mark(true, "xbee godn,qa,pack"); + // PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up); + //} + else if (PUB.Result.TargetPos == kitPos) ////현재 지정된 클라이언트가 또 눌렀다 + { + PUB.Result.TargetPos = kitPos; + PUB.AGV.data.CallNo = int.Parse(kitNo.ToString()); + PUB.AGV.data.CallString = kitNo.ToString(); + + //상차 대기 중이라면 커버를 자동 올려준다 + //이것은 QC만 가능하다 + //QC가 QA혹은 PACK으로 보낼때 사용함 + if (kitPos == ePosition.QC && + VAR.BOOL[eVarBool.FLAG_LIMITLOW] == true) + { + RaiseMessage(MessageType.Normal, "QC위치에서 자동으로 커버를 올립니다"); + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up); + } + else + { + //커버대기상태라면 커버를 자동으로 처리해준다. + if (PUB.sm.Step == StateMachine.eSMStep.RUN && (PUB.sm.RunStep == StateMachine.ERunStep.GOUP || PUB.sm.RunStep == StateMachine.ERunStep.GODOWN)) + { + + if (VAR.BOOL[eVarBool.WAIT_COVER_DOWN] == true) + { + var ld = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LD); + var rd = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RD); + if (ld == false || rd == false) + { + PUB.log.Add("사용자 콜버튼 추가 동작 - Z내림"); + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down); + PUB.Speak(Lang.커버를내립니다); + } + } + else if (VAR.BOOL[eVarBool.WAIT_COVER_UP] == true) + { + var lu = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU); + var ru = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU); + + if (lu == false || ru == false) + { + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up); + PUB.log.Add("사용자 콜버튼 추가 동작 - Z올림"); + PUB.Speak(Lang.커버를올립니다); + } + } + else RaiseMessage(MessageType.Normal, string.Format("이미 CALL이 확정되었습니다 No={0},Pos={1}", kitNo, kitPos)); + } + else RaiseMessage(MessageType.Normal, string.Format("이미 CALL이 확정되었습니다 No={0},Pos={1}", kitNo, kitPos)); + } + SendToKit(kitNo, '1', (PUB.IsCanCALL() ? '1' : '0')); //콜확정을 클라이언트에 알림 + } + else + { + //다른대상이 이미 선택된 상태이므로 CANCEL 한다. + SendToKit(kitNo, '0', (PUB.IsCanCALL() ? '1' : '0')); + RaiseMessage(MessageType.Normal, string.Format("다른 CALL이 확정된 상태입니다. 요청KIT={2},확정KIT={0},위치={1}", PUB.Result.TargetPos - 2, PUB.Result.TargetPos, kitNo)); + } + } + else if (kitVal == '0') //캔슬버튼을 눌렀다 + { + //목표번호가 캔슬버튼을 눌렀다 + if (PUB.Result.TargetPos == kitPos) + { + //상차가 완료되면 TargetPos 가 변경되어 ,더이상 해당 버튼으로는 취소하지 못한다 + PUB.AGV.data.CallNo = 0; + PUB.AGV.data.CallString = "--"; + + SendToKit(kitNo, '0', (PUB.IsCanCALL() ? '1' : '0')); + RaiseMessage(MessageType.Normal, string.Format("콜 취소 Kit={0}", kitNo)); + if (PUB.sm.RunStep != StateMachine.ERunStep.GOHOME) + { + PUB.Result.CommandKit = kitNo; + PUB.Result.TargetPos = ePosition.QC; + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(StateMachine.ERunStep.GOHOME); + PUB.sm.SetNewStep(StateMachine.eSMStep.RUN); + RaiseMessage(MessageType.Normal, string.Format("콜 취소로 인해 홈으로 이동합니다 Kit={0}", kitNo)); + } + + } + else + { + //다른놈이 취소 버튼을 눌렀다. ㅋㅋ + //아무~ 의미 없다. + SendToKit(kitNo, '0', (PUB.IsCanCALL() ? '1' : '0')); + RaiseMessage(MessageType.Normal, string.Format("해당 콜취소는 유효하지 않습니다 요청KIT={0},확정KIT={1}", kitNo, PUB.Result.TargetPos - 2)); + } + } + else if (kitVal == '2') //BACKWORK시에만 이 값이 전송되게 한다 + { + //QA 이동 명령 + //발동조건 1. QC 위치에서 GOUP(대기 혹은 상차완료)상태일때 (일반적인경우) + //발동조건 2. QC 위치에서 IDLE 상태일때 (GOUP상태로 하지 않고 바로 싫어버린경우) + //발동조건 3. 충전중일때 + + //if (kitPos != ePosition.QC) + //{ + // RaiseMessage(MessageType.Error, $"back 버튼은 QC버튼만 사용 가능 합니다"); + // return; + //} + + //if (kitPos == ePosition.QC && PUB.Result.CurrentPos != ePosition.QC) + //{ + // RaiseMessage(MessageType.Error, string.Format("QC의 QA버튼은 홈위치에 있어야 사용이 가능 합니다")); + // return; + //} + + ////명령송신은 QC로 고정한다 + //PUB.Result.CommandKit = '2'; + //PUB.Result.TargetPos = ePosition.QA; + //PUB.sm.ClearRunStep(); + //PUB.sm.SetNewRunStep(StateMachine.ERunStep.GODOWN); + //PUB.sm.SetNewStep(StateMachine.ESMStep.RUN); + //RaiseMessage(MessageType.Normal, string.Format("후진하차 모드 대상위치={0}", ePosition.QA)); + //PUB.logsys.AddI("QC의 QA리모콘 버튼 작업 입니다"); + } + } + + + public void SendToKit(char kitNo, char Value, char enbcall) + { + List buffer = new List + { + 0x02, + (byte)kitNo, + (byte)Value, + (byte)enbcall, + 0x03 + }; + WriteData(buffer.ToArray()); + //RaiseMessage(MessageType.Normal, $"지그비전송 {kitNo}:{Value}:{enbcall}"); + } + + public string GetStatusString() + { + return DateTime.Now.ToString(); + } + + public void SendStatus(String StatusString) + { + + ////IO + + char kitno = '0'; + char kitval = '1'; + if (PUB.Result.TargetPos == ePosition.F1) kitno = '1'; + else if (PUB.Result.TargetPos == ePosition.F2) kitno = '2'; + else if (PUB.Result.TargetPos == ePosition.F3) kitno = '3'; + else if (PUB.Result.TargetPos == ePosition.F4) kitno = '4'; + else if (PUB.Result.TargetPos == ePosition.QC) kitno = '9'; + else + { + //충전기 충전하는 것으로한다 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == false && VAR.BOOL[eVarBool.FLAG_CHARGEONM] == false) + kitval = '0'; + } + + //콜가능여부도 전송한다 + var enbcall = PUB.IsCanCALL() ? '1' : '0'; + SendToKit(kitno, kitval, enbcall); + + + } + } +} diff --git a/Cs_HMI/Project/Dialog/DriveDetector.cs b/Cs_HMI/Project/Dialog/DriveDetector.cs new file mode 100644 index 0000000..91ab200 --- /dev/null +++ b/Cs_HMI/Project/Dialog/DriveDetector.cs @@ -0,0 +1,815 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; // required for Message +using System.Runtime.InteropServices; // required for Marshal +using System.IO; +using Microsoft.Win32.SafeHandles; +// DriveDetector - rev. 1, Oct. 31 2007 + +namespace usbdetect +{ + /// + /// Hidden Form which we use to receive Windows messages about flash drives + /// + internal class DetectorForm : Form + { + private Label label1; + private DriveDetector mDetector = null; + + /// + /// Set up the hidden form. + /// + /// DriveDetector object which will receive notification about USB drives, see WndProc + public DetectorForm(DriveDetector detector) + { + mDetector = detector; + this.MinimizeBox = false; + this.MaximizeBox = false; + this.ShowInTaskbar = false; + this.ShowIcon = false; + this.FormBorderStyle = FormBorderStyle.None; + this.Load += new System.EventHandler(this.Load_Form); + this.Activated += new EventHandler(this.Form_Activated); + } + + private void Load_Form(object sender, EventArgs e) + { + // We don't really need this, just to display the label in designer ... + InitializeComponent(); + + // Create really small form, invisible anyway. + this.Size = new System.Drawing.Size(5, 5); + } + + private void Form_Activated(object sender, EventArgs e) + { + this.Visible = false; + } + + /// + /// This function receives all the windows messages for this window (form). + /// We call the DriveDetector from here so that is can pick up the messages about + /// drives arrived and removed. + /// + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + + if (mDetector != null) + { + mDetector.WndProc(ref m); + } + } + + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 30); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(377, 12); + this.label1.TabIndex = 0; + this.label1.Text = "This is invisible form. To see DriveDetector code click View Code"; + // + // DetectorForm + // + this.ClientSize = new System.Drawing.Size(435, 80); + this.Controls.Add(this.label1); + this.Name = "DetectorForm"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + } // class DetectorForm + + + // Delegate for event handler to handle the device events + public delegate void DriveDetectorEventHandler(Object sender, DriveDetectorEventArgs e); + + /// + /// Our class for passing in custom arguments to our event handlers + /// + /// + public class DriveDetectorEventArgs : EventArgs + { + + + public DriveDetectorEventArgs() + { + Cancel = false; + Drive = ""; + HookQueryRemove = false; + } + + /// + /// Get/Set the value indicating that the event should be cancelled + /// Only in QueryRemove handler. + /// + public bool Cancel; + + /// + /// Drive letter for the device which caused this event + /// + public string Drive; + + /// + /// Set to true in your DeviceArrived event handler if you wish to receive the + /// QueryRemove event for this drive. + /// + public bool HookQueryRemove; + + } + + + /// + /// Detects insertion or removal of removable drives. + /// Use it in 1 or 2 steps: + /// 1) Create instance of this class in your project and add handlers for the + /// DeviceArrived, DeviceRemoved and QueryRemove events. + /// AND (if you do not want drive detector to creaate a hidden form)) + /// 2) Override WndProc in your form and call DriveDetector's WndProc from there. + /// If you do not want to do step 2, just use the DriveDetector constructor without arguments and + /// it will create its own invisible form to receive messages from Windows. + /// + class DriveDetector : IDisposable + { + /// + /// Events signalized to the client app. + /// Add handlers for these events in your form to be notified of removable device events + /// + public event DriveDetectorEventHandler DeviceArrived; + public event DriveDetectorEventHandler DeviceRemoved; + public event DriveDetectorEventHandler QueryRemove; + + /// + /// The easiest way to use DriveDetector. + /// It will create hidden form for processing Windows messages about USB drives + /// You do not need to override WndProc in your form. + /// + public DriveDetector() + { + DetectorForm frm = new DetectorForm(this); + frm.Show(); // will be hidden immediatelly + Init(frm, null); + } + + /// + /// Alternate constructor. + /// Pass in your Form and DriveDetector will not create hidden form. + /// + /// object which will receive Windows messages. + /// Pass "this" as this argument from your form class. + public DriveDetector(Control control) + { + Init(control, null); + } + + /// + /// Consructs DriveDetector object setting also path to file which should be opened + /// when registering for query remove. + /// + ///object which will receive Windows messages. + /// Pass "this" as this argument from your form class. + /// Optional. Name of a file on the removable drive which should be opened. + /// If null, root directory of the drive will be opened. Opening a file is needed for us + /// to be able to register for the query remove message. TIP: For files use relative path without drive letter. + /// e.g. "SomeFolder\file_on_flash.txt" + public DriveDetector(Control control, string FileToOpen) + { + Init(control, FileToOpen); + } + + /// + /// init the DriveDetector object + /// + /// + private void Init(Control control, string fileToOpen) + { + mFileToOpen = fileToOpen; + mFileOnFlash = null; + mDeviceNotifyHandle = IntPtr.Zero; + mRecipientHandle = control.Handle; + mDirHandle = IntPtr.Zero; // handle to the root directory of the flash drive which we open + mCurrentDrive = ""; + } + + /// + /// Gets the value indicating whether the query remove event will be fired. + /// + public bool IsQueryHooked + { + get + { + if (mDeviceNotifyHandle == IntPtr.Zero) + return false; + else + return true; + } + } + + /// + /// Gets letter of drive which is currently hooked. Empty string if none. + /// See also IsQueryHooked. + /// + public string HookedDrive + { + get + { + return mCurrentDrive; + } + } + + /// + /// Gets the file stream for file which this class opened on a drive to be notified + /// about it's removal. + /// This will be null unless you specified a file to open (DriveDetector opens root directory of the flash drive) + /// + public FileStream OpenedFile + { + get + { + return mFileOnFlash; + } + } + + /// + /// Hooks specified drive to receive a message when it is being removed. + /// This can be achieved also by setting e.HookQueryRemove to true in your + /// DeviceArrived event handler. + /// By default DriveDetector will open the root directory of the flash drive to obtain notification handle + /// from Windows (to learn when the drive is about to be removed). + /// + /// Drive letter or relative path to a file on the drive which should be + /// used to get a handle - required for registering to receive query remove messages. + /// If only drive letter is specified (e.g. "D:\\", root directory of the drive will be opened. + /// true if hooked ok, false otherwise + public bool EnableQueryRemove(string fileOnDrive) + { + if (fileOnDrive == null || fileOnDrive.Length == 0) + throw new ArgumentException("Drive path must be supplied to register for Query remove."); + + if ( fileOnDrive.Length == 2 && fileOnDrive[1] == ':' ) + fileOnDrive += '\\'; // append "\\" if only drive letter with ":" was passed in. + + if (mDeviceNotifyHandle != IntPtr.Zero) + { + // Unregister first... + RegisterForDeviceChange(false, null); + } + + if (Path.GetFileName(fileOnDrive).Length == 0 ||!File.Exists(fileOnDrive)) + mFileToOpen = null; // use root directory... + else + mFileToOpen = fileOnDrive; + + RegisterQuery(Path.GetPathRoot(fileOnDrive)); + if (mDeviceNotifyHandle == IntPtr.Zero) + return false; // failed to register + + return true; + } + + /// + /// Unhooks any currently hooked drive so that the query remove + /// message is not generated for it. + /// + public void DisableQueryRemove() + { + if (mDeviceNotifyHandle != IntPtr.Zero) + { + RegisterForDeviceChange(false, null); + } + } + + + /// + /// Unregister and close the file we may have opened on the removable drive. + /// Garbage collector will call this method. + /// + public void Dispose() + { + RegisterForDeviceChange(false, null); + } + + + #region WindowProc + /// + /// Message handler which must be called from client form. + /// Processes Windows messages and calls event handlers. + /// + /// + public void WndProc(ref Message m) + { + int devType; + char c; + + if (m.Msg == WM_DEVICECHANGE) + { + // WM_DEVICECHANGE can have several meanings depending on the WParam value... + switch (m.WParam.ToInt32()) + { + + // + // New device has just arrived + // + case DBT_DEVICEARRIVAL: + + devType = Marshal.ReadInt32(m.LParam, 4); + if (devType == DBT_DEVTYP_VOLUME) + { + DEV_BROADCAST_VOLUME vol; + vol = (DEV_BROADCAST_VOLUME) + Marshal.PtrToStructure(m.LParam, typeof(DEV_BROADCAST_VOLUME)); + + // Get the drive letter + c = DriveMaskToLetter(vol.dbcv_unitmask); + + + // + // Call the client event handler + // + // We should create copy of the event before testing it and + // calling the delegate - if any + DriveDetectorEventHandler tempDeviceArrived = DeviceArrived; + if ( tempDeviceArrived != null ) + { + DriveDetectorEventArgs e = new DriveDetectorEventArgs(); + e.Drive = c + ":\\"; + tempDeviceArrived(this, e); + + // Register for query remove if requested + if (e.HookQueryRemove) + { + // If something is already hooked, unhook it now + if (mDeviceNotifyHandle != IntPtr.Zero) + { + RegisterForDeviceChange(false, null); + } + + RegisterQuery(c + ":\\"); + } + } // if has event handler + + + } + break; + + + + // + // Device is about to be removed + // Any application can cancel the removal + // + case DBT_DEVICEQUERYREMOVE: + + devType = Marshal.ReadInt32(m.LParam, 4); + if (devType == DBT_DEVTYP_HANDLE) + { + // TODO: we could get the handle for which this message is sent + // from vol.dbch_handle and compare it against a list of handles for + // which we have registered the query remove message (?) + //DEV_BROADCAST_HANDLE vol; + //vol = (DEV_BROADCAST_HANDLE) + // Marshal.PtrToStructure(m.LParam, typeof(DEV_BROADCAST_HANDLE)); + // if ( vol.dbch_handle .... + + + // + // Call the event handler in client + // + DriveDetectorEventHandler tempQuery = QueryRemove; + if (tempQuery != null) + { + DriveDetectorEventArgs e = new DriveDetectorEventArgs(); + e.Drive = mCurrentDrive; // drive which is hooked + tempQuery(this, e); + + // If the client wants to cancel, let Windows know + if (e.Cancel) + { + m.Result = (IntPtr)BROADCAST_QUERY_DENY; + } + else + { + // Change 28.10.2007: Unregister the notification, this will + // close the handle to file or root directory also. + // We have to close it anyway to allow the removal so + // even if some other app cancels the removal we would not know about it... + RegisterForDeviceChange(false, null); // will also close the mFileOnFlash + } + + } + } + break; + + + // + // Device has been removed + // + case DBT_DEVICEREMOVECOMPLETE: + + devType = Marshal.ReadInt32(m.LParam, 4); + if (devType == DBT_DEVTYP_VOLUME) + { + devType = Marshal.ReadInt32(m.LParam, 4); + if (devType == DBT_DEVTYP_VOLUME) + { + DEV_BROADCAST_VOLUME vol; + vol = (DEV_BROADCAST_VOLUME) + Marshal.PtrToStructure(m.LParam, typeof(DEV_BROADCAST_VOLUME)); + c = DriveMaskToLetter(vol.dbcv_unitmask); + + // + // Call the client event handler + // + DriveDetectorEventHandler tempDeviceRemoved = DeviceRemoved; + if (tempDeviceRemoved != null) + { + DriveDetectorEventArgs e = new DriveDetectorEventArgs(); + e.Drive = c + ":\\"; + tempDeviceRemoved(this, e); + } + + // TODO: we could unregister the notify handle here if we knew it is the + // right drive which has been just removed + //RegisterForDeviceChange(false, null); + } + } + break; + } + + } + + } + #endregion + + + + #region Private Area + + /// + /// New: 28.10.2007 - handle to root directory of flash drive which is opened + /// for device notification + /// + private IntPtr mDirHandle = IntPtr.Zero; + + /// + /// Class which contains also handle to the file opened on the flash drive + /// + private FileStream mFileOnFlash = null; + + /// + /// Name of the file to try to open on the removable drive for query remove registration + /// + private string mFileToOpen; + + /// + /// Handle to file which we keep opened on the drive if query remove message is required by the client + /// + private IntPtr mDeviceNotifyHandle; + + /// + /// Handle of the window which receives messages from Windows. This will be a form. + /// + private IntPtr mRecipientHandle; + + /// + /// Drive which is currently hooked for query remove + /// + private string mCurrentDrive; + + + // Win32 constants + private const int DBT_DEVTYP_DEVICEINTERFACE = 5; + private const int DBT_DEVTYP_HANDLE = 6; + private const int BROADCAST_QUERY_DENY = 0x424D5144; + private const int WM_DEVICECHANGE = 0x0219; + private const int DBT_DEVICEARRIVAL = 0x8000; // system detected a new device + private const int DBT_DEVICEQUERYREMOVE = 0x8001; // Preparing to remove (any program can disable the removal) + private const int DBT_DEVICEREMOVECOMPLETE = 0x8004; // removed + private const int DBT_DEVTYP_VOLUME = 0x00000002; // drive type is logical volume + + /// + /// Registers for receiving the query remove message for a given drive. + /// We need to open a handle on that drive and register with this handle. + /// Client can specify this file in mFileToOpen or we will open root directory of the drive + /// + /// drive for which to register. + private void RegisterQuery(string drive) + { + bool register = true; + + if (mFileToOpen == null) + { + // Change 28.10.2007 - Open the root directory if no file specified - leave mFileToOpen null + // If client gave us no file, let's pick one on the drive... + //mFileToOpen = GetAnyFile(drive); + //if (mFileToOpen.Length == 0) + // return; // no file found on the flash drive + } + else + { + // Make sure the path in mFileToOpen contains valid drive + // If there is a drive letter in the path, it may be different from the actual + // letter assigned to the drive now. We will cut it off and merge the actual drive + // with the rest of the path. + if (mFileToOpen.Contains(":")) + { + string tmp = mFileToOpen.Substring(3); + string root = Path.GetPathRoot(drive); + mFileToOpen = Path.Combine(root, tmp); + } + else + mFileToOpen = Path.Combine(drive, mFileToOpen); + } + + + try + { + //mFileOnFlash = new FileStream(mFileToOpen, FileMode.Open); + // Change 28.10.2007 - Open the root directory + if (mFileToOpen == null) // open root directory + mFileOnFlash = null; + else + mFileOnFlash = new FileStream(mFileToOpen, FileMode.Open); + } + catch (Exception) + { + // just do not register if the file could not be opened + register = false; + } + + + if (register) + { + //RegisterForDeviceChange(true, mFileOnFlash.SafeFileHandle); + //mCurrentDrive = drive; + // Change 28.10.2007 - Open the root directory + if (mFileOnFlash == null) + RegisterForDeviceChange(drive); + else + // old version + RegisterForDeviceChange(true, mFileOnFlash.SafeFileHandle); + + mCurrentDrive = drive; + } + + + } + + + /// + /// New version which gets the handle automatically for specified directory + /// Only for registering! Unregister with the old version of this function... + /// + /// + /// e.g. C:\\dir + private void RegisterForDeviceChange(string dirPath) + { + IntPtr handle = Native.OpenDirectory(dirPath); + if (handle == IntPtr.Zero) + { + mDeviceNotifyHandle = IntPtr.Zero; + return; + } + else + mDirHandle = handle; // save handle for closing it when unregistering + + // Register for handle + DEV_BROADCAST_HANDLE data = new DEV_BROADCAST_HANDLE(); + data.dbch_devicetype = DBT_DEVTYP_HANDLE; + data.dbch_reserved = 0; + data.dbch_nameoffset = 0; + //data.dbch_data = null; + //data.dbch_eventguid = 0; + data.dbch_handle = handle; + data.dbch_hdevnotify = (IntPtr)0; + int size = Marshal.SizeOf(data); + data.dbch_size = size; + IntPtr buffer = Marshal.AllocHGlobal(size); + Marshal.StructureToPtr(data, buffer, true); + + mDeviceNotifyHandle = Native.RegisterDeviceNotification(mRecipientHandle, buffer, 0); + + } + + /// + /// Registers to be notified when the volume is about to be removed + /// This is requierd if you want to get the QUERY REMOVE messages + /// + /// true to register, false to unregister + /// handle of a file opened on the removable drive + private void RegisterForDeviceChange(bool register, SafeFileHandle fileHandle) + { + if (register) + { + // Register for handle + DEV_BROADCAST_HANDLE data = new DEV_BROADCAST_HANDLE(); + data.dbch_devicetype = DBT_DEVTYP_HANDLE; + data.dbch_reserved = 0; + data.dbch_nameoffset = 0; + //data.dbch_data = null; + //data.dbch_eventguid = 0; + data.dbch_handle = fileHandle.DangerousGetHandle(); //Marshal. fileHandle; + data.dbch_hdevnotify = (IntPtr)0; + int size = Marshal.SizeOf(data); + data.dbch_size = size; + IntPtr buffer = Marshal.AllocHGlobal(size); + Marshal.StructureToPtr(data, buffer, true); + + mDeviceNotifyHandle = Native.RegisterDeviceNotification(mRecipientHandle, buffer, 0); + } + else + { + // close the directory handle + if (mDirHandle != IntPtr.Zero) + { + Native.CloseDirectoryHandle(mDirHandle); + // string er = Marshal.GetLastWin32Error().ToString(); + } + + // unregister + if (mDeviceNotifyHandle != IntPtr.Zero) + { + Native.UnregisterDeviceNotification(mDeviceNotifyHandle); + } + + + mDeviceNotifyHandle = IntPtr.Zero; + mDirHandle = IntPtr.Zero; + + mCurrentDrive = ""; + if (mFileOnFlash != null) + { + mFileOnFlash.Close(); + mFileOnFlash = null; + } + } + + } + + /// + /// Gets drive letter from a bit mask where bit 0 = A, bit 1 = B etc. + /// There can actually be more than one drive in the mask but we + /// just use the last one in this case. + /// + /// + /// + private static char DriveMaskToLetter(int mask) + { + char letter; + string drives = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + // 1 = A + // 2 = B + // 4 = C... + int cnt = 0; + int pom = mask / 2; + while (pom != 0) + { + // while there is any bit set in the mask + // shift it to the righ... + pom = pom / 2; + cnt++; + } + + if (cnt < drives.Length) + letter = drives[cnt]; + else + letter = '?'; + + return letter; + } + + /* 28.10.2007 - no longer needed + /// + /// Searches for any file in a given path and returns its full path + /// + /// drive to search + /// path of the file or empty string + private string GetAnyFile(string drive) + { + string file = ""; + // First try files in the root + string[] files = Directory.GetFiles(drive); + if (files.Length == 0) + { + // if no file in the root, search whole drive + files = Directory.GetFiles(drive, "*.*", SearchOption.AllDirectories); + } + + if (files.Length > 0) + file = files[0]; // get the first file + + // return empty string if no file found + return file; + }*/ + #endregion + + + #region Native Win32 API + /// + /// WinAPI functions + /// + private class Native + { + // HDEVNOTIFY RegisterDeviceNotification(HANDLE hRecipient,LPVOID NotificationFilter,DWORD Flags); + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public static extern IntPtr RegisterDeviceNotification(IntPtr hRecipient, IntPtr NotificationFilter, uint Flags); + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public static extern uint UnregisterDeviceNotification(IntPtr hHandle); + + // + // CreateFile - MSDN + const uint GENERIC_READ = 0x80000000; + const uint OPEN_EXISTING = 3; + const uint FILE_SHARE_READ = 0x00000001; + const uint FILE_SHARE_WRITE = 0x00000002; + const uint FILE_ATTRIBUTE_NORMAL = 128; + const uint FILE_FLAG_BACKUP_SEMANTICS = 0x02000000; + static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); + + + // should be "static extern unsafe" + [DllImport("kernel32", SetLastError = true)] + static extern IntPtr CreateFile( + string FileName, // file name + uint DesiredAccess, // access mode + uint ShareMode, // share mode + uint SecurityAttributes, // Security Attributes + uint CreationDisposition, // how to create + uint FlagsAndAttributes, // file attributes + int hTemplateFile // handle to template file + ); + + + [DllImport("kernel32", SetLastError = true)] + static extern bool CloseHandle( + IntPtr hObject // handle to object + ); + + /// + /// Opens a directory, returns it's handle or zero. + /// + /// path to the directory, e.g. "C:\\dir" + /// handle to the directory. Close it with CloseHandle(). + static public IntPtr OpenDirectory(string dirPath) + { + // open the existing file for reading + IntPtr handle = CreateFile( + dirPath, + GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, + 0, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_ATTRIBUTE_NORMAL, + 0); + + if ( handle == INVALID_HANDLE_VALUE) + return IntPtr.Zero; + else + return handle; + } + + + public static bool CloseDirectoryHandle(IntPtr handle) + { + return CloseHandle(handle); + } + } + + + // Structure with information for RegisterDeviceNotification. + [StructLayout(LayoutKind.Sequential)] + public struct DEV_BROADCAST_HANDLE + { + public int dbch_size; + public int dbch_devicetype; + public int dbch_reserved; + public IntPtr dbch_handle; + public IntPtr dbch_hdevnotify; + public Guid dbch_eventguid; + public long dbch_nameoffset; + //public byte[] dbch_data[1]; // = new byte[1]; + public byte dbch_data; + public byte dbch_data1; + } + + // Struct for parameters of the WM_DEVICECHANGE message + [StructLayout(LayoutKind.Sequential)] + public struct DEV_BROADCAST_VOLUME + { + public int dbcv_size; + public int dbcv_devicetype; + public int dbcv_reserved; + public int dbcv_unitmask; + } + #endregion + + } +} diff --git a/Cs_HMI/Project/Dialog/fCounter.Designer.cs b/Cs_HMI/Project/Dialog/fCounter.Designer.cs new file mode 100644 index 0000000..d90b0ba --- /dev/null +++ b/Cs_HMI/Project/Dialog/fCounter.Designer.cs @@ -0,0 +1,687 @@ +namespace Project.Dialog +{ + partial class fCounter + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.lbcnt1 = new arCtl.arLabel(); + this.lbcnt2 = new arCtl.arLabel(); + this.lbcnt3 = new arCtl.arLabel(); + this.lbcnt4 = new arCtl.arLabel(); + this.lbcnt5 = new arCtl.arLabel(); + this.lbcnta = new arCtl.arLabel(); + this.lbcntm = new arCtl.arLabel(); + this.lbcnte = new arCtl.arLabel(); + this.lbcntqa = new arCtl.arLabel(); + this.lbcntqc = new arCtl.arLabel(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; + this.tableLayoutPanel1.ColumnCount = 5; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.label2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.label3, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.label4, 3, 0); + this.tableLayoutPanel1.Controls.Add(this.label5, 4, 0); + this.tableLayoutPanel1.Controls.Add(this.label6, 4, 2); + this.tableLayoutPanel1.Controls.Add(this.label7, 3, 2); + this.tableLayoutPanel1.Controls.Add(this.label8, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.label9, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.label10, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.lbcnt1, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.lbcnt2, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.lbcnt3, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.lbcnt4, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.lbcnt5, 4, 1); + this.tableLayoutPanel1.Controls.Add(this.lbcnta, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.lbcntm, 1, 3); + this.tableLayoutPanel1.Controls.Add(this.lbcnte, 2, 3); + this.tableLayoutPanel1.Controls.Add(this.lbcntqa, 3, 3); + this.tableLayoutPanel1.Controls.Add(this.lbcntqc, 4, 3); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(392, 135); + this.tableLayoutPanel1.TabIndex = 0; + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Location = new System.Drawing.Point(4, 1); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(71, 20); + this.label1.TabIndex = 0; + this.label1.Text = "FVI-1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label2 + // + this.label2.Dock = System.Windows.Forms.DockStyle.Fill; + this.label2.Location = new System.Drawing.Point(82, 1); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(71, 20); + this.label2.TabIndex = 0; + this.label2.Text = "FVI-2"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label3 + // + this.label3.Dock = System.Windows.Forms.DockStyle.Fill; + this.label3.Location = new System.Drawing.Point(160, 1); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(71, 20); + this.label3.TabIndex = 0; + this.label3.Text = "FVI-3"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label4 + // + this.label4.Dock = System.Windows.Forms.DockStyle.Fill; + this.label4.Location = new System.Drawing.Point(238, 1); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(71, 20); + this.label4.TabIndex = 0; + this.label4.Text = "FVI-4"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label5 + // + this.label5.Dock = System.Windows.Forms.DockStyle.Fill; + this.label5.Location = new System.Drawing.Point(316, 1); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(72, 20); + this.label5.TabIndex = 0; + this.label5.Text = "--"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label6 + // + this.label6.Dock = System.Windows.Forms.DockStyle.Fill; + this.label6.Location = new System.Drawing.Point(316, 68); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(72, 20); + this.label6.TabIndex = 0; + this.label6.Text = "QC"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label7 + // + this.label7.Dock = System.Windows.Forms.DockStyle.Fill; + this.label7.Location = new System.Drawing.Point(238, 68); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(71, 20); + this.label7.TabIndex = 0; + this.label7.Text = "QA"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label8 + // + this.label8.Dock = System.Windows.Forms.DockStyle.Fill; + this.label8.Location = new System.Drawing.Point(160, 68); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(71, 20); + this.label8.TabIndex = 0; + this.label8.Text = "충전실패"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label9 + // + this.label9.Dock = System.Windows.Forms.DockStyle.Fill; + this.label9.Location = new System.Drawing.Point(82, 68); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(71, 20); + this.label9.TabIndex = 0; + this.label9.Text = "충전(수동)"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label10 + // + this.label10.Dock = System.Windows.Forms.DockStyle.Fill; + this.label10.Location = new System.Drawing.Point(4, 68); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(71, 20); + this.label10.TabIndex = 0; + this.label10.Text = "충전(자동)"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbcnt1 + // + this.lbcnt1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcnt1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcnt1.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcnt1.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcnt1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcnt1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcnt1.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcnt1.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcnt1.ForeColor = System.Drawing.Color.White; + this.lbcnt1.GradientEnable = true; + this.lbcnt1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcnt1.GradientRepeatBG = false; + this.lbcnt1.isButton = false; + this.lbcnt1.Location = new System.Drawing.Point(1, 22); + this.lbcnt1.Margin = new System.Windows.Forms.Padding(0); + this.lbcnt1.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcnt1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcnt1.msg = null; + this.lbcnt1.Name = "lbcnt1"; + this.lbcnt1.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcnt1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcnt1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcnt1.ProgressEnable = false; + this.lbcnt1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcnt1.ProgressForeColor = System.Drawing.Color.Black; + this.lbcnt1.ProgressMax = 100F; + this.lbcnt1.ProgressMin = 0F; + this.lbcnt1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcnt1.ProgressValue = 0F; + this.lbcnt1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcnt1.Sign = ""; + this.lbcnt1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcnt1.SignColor = System.Drawing.Color.Yellow; + this.lbcnt1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcnt1.Size = new System.Drawing.Size(77, 45); + this.lbcnt1.TabIndex = 5; + this.lbcnt1.Text = "99"; + this.lbcnt1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcnt1.TextShadow = true; + this.lbcnt1.TextVisible = true; + // + // lbcnt2 + // + this.lbcnt2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcnt2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcnt2.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcnt2.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcnt2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcnt2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcnt2.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcnt2.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcnt2.ForeColor = System.Drawing.Color.White; + this.lbcnt2.GradientEnable = true; + this.lbcnt2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcnt2.GradientRepeatBG = false; + this.lbcnt2.isButton = false; + this.lbcnt2.Location = new System.Drawing.Point(79, 22); + this.lbcnt2.Margin = new System.Windows.Forms.Padding(0); + this.lbcnt2.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcnt2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcnt2.msg = null; + this.lbcnt2.Name = "lbcnt2"; + this.lbcnt2.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcnt2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcnt2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcnt2.ProgressEnable = false; + this.lbcnt2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcnt2.ProgressForeColor = System.Drawing.Color.Black; + this.lbcnt2.ProgressMax = 100F; + this.lbcnt2.ProgressMin = 0F; + this.lbcnt2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcnt2.ProgressValue = 0F; + this.lbcnt2.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcnt2.Sign = ""; + this.lbcnt2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcnt2.SignColor = System.Drawing.Color.Yellow; + this.lbcnt2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcnt2.Size = new System.Drawing.Size(77, 45); + this.lbcnt2.TabIndex = 5; + this.lbcnt2.Text = "99"; + this.lbcnt2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcnt2.TextShadow = true; + this.lbcnt2.TextVisible = true; + // + // lbcnt3 + // + this.lbcnt3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt3.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcnt3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcnt3.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcnt3.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcnt3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcnt3.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcnt3.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcnt3.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcnt3.ForeColor = System.Drawing.Color.White; + this.lbcnt3.GradientEnable = true; + this.lbcnt3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcnt3.GradientRepeatBG = false; + this.lbcnt3.isButton = false; + this.lbcnt3.Location = new System.Drawing.Point(157, 22); + this.lbcnt3.Margin = new System.Windows.Forms.Padding(0); + this.lbcnt3.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcnt3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcnt3.msg = null; + this.lbcnt3.Name = "lbcnt3"; + this.lbcnt3.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcnt3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcnt3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcnt3.ProgressEnable = false; + this.lbcnt3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcnt3.ProgressForeColor = System.Drawing.Color.Black; + this.lbcnt3.ProgressMax = 100F; + this.lbcnt3.ProgressMin = 0F; + this.lbcnt3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcnt3.ProgressValue = 0F; + this.lbcnt3.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcnt3.Sign = ""; + this.lbcnt3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcnt3.SignColor = System.Drawing.Color.Yellow; + this.lbcnt3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcnt3.Size = new System.Drawing.Size(77, 45); + this.lbcnt3.TabIndex = 5; + this.lbcnt3.Text = "99"; + this.lbcnt3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcnt3.TextShadow = true; + this.lbcnt3.TextVisible = true; + // + // lbcnt4 + // + this.lbcnt4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt4.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcnt4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcnt4.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcnt4.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcnt4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcnt4.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcnt4.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcnt4.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcnt4.ForeColor = System.Drawing.Color.White; + this.lbcnt4.GradientEnable = true; + this.lbcnt4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcnt4.GradientRepeatBG = false; + this.lbcnt4.isButton = false; + this.lbcnt4.Location = new System.Drawing.Point(235, 22); + this.lbcnt4.Margin = new System.Windows.Forms.Padding(0); + this.lbcnt4.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcnt4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcnt4.msg = null; + this.lbcnt4.Name = "lbcnt4"; + this.lbcnt4.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcnt4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcnt4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcnt4.ProgressEnable = false; + this.lbcnt4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcnt4.ProgressForeColor = System.Drawing.Color.Black; + this.lbcnt4.ProgressMax = 100F; + this.lbcnt4.ProgressMin = 0F; + this.lbcnt4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcnt4.ProgressValue = 0F; + this.lbcnt4.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcnt4.Sign = ""; + this.lbcnt4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcnt4.SignColor = System.Drawing.Color.Yellow; + this.lbcnt4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcnt4.Size = new System.Drawing.Size(77, 45); + this.lbcnt4.TabIndex = 5; + this.lbcnt4.Text = "99"; + this.lbcnt4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcnt4.TextShadow = true; + this.lbcnt4.TextVisible = true; + // + // lbcnt5 + // + this.lbcnt5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt5.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnt5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcnt5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcnt5.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcnt5.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcnt5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcnt5.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcnt5.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcnt5.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcnt5.ForeColor = System.Drawing.Color.White; + this.lbcnt5.GradientEnable = true; + this.lbcnt5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcnt5.GradientRepeatBG = false; + this.lbcnt5.isButton = false; + this.lbcnt5.Location = new System.Drawing.Point(313, 22); + this.lbcnt5.Margin = new System.Windows.Forms.Padding(0); + this.lbcnt5.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcnt5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcnt5.msg = null; + this.lbcnt5.Name = "lbcnt5"; + this.lbcnt5.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcnt5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcnt5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcnt5.ProgressEnable = false; + this.lbcnt5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcnt5.ProgressForeColor = System.Drawing.Color.Black; + this.lbcnt5.ProgressMax = 100F; + this.lbcnt5.ProgressMin = 0F; + this.lbcnt5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcnt5.ProgressValue = 0F; + this.lbcnt5.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcnt5.Sign = ""; + this.lbcnt5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcnt5.SignColor = System.Drawing.Color.Yellow; + this.lbcnt5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcnt5.Size = new System.Drawing.Size(78, 45); + this.lbcnt5.TabIndex = 5; + this.lbcnt5.Text = "--"; + this.lbcnt5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcnt5.TextShadow = true; + this.lbcnt5.TextVisible = true; + // + // lbcnta + // + this.lbcnta.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnta.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnta.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcnta.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcnta.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcnta.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcnta.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcnta.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcnta.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcnta.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcnta.ForeColor = System.Drawing.Color.White; + this.lbcnta.GradientEnable = true; + this.lbcnta.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcnta.GradientRepeatBG = false; + this.lbcnta.isButton = false; + this.lbcnta.Location = new System.Drawing.Point(1, 89); + this.lbcnta.Margin = new System.Windows.Forms.Padding(0); + this.lbcnta.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcnta.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcnta.msg = null; + this.lbcnta.Name = "lbcnta"; + this.lbcnta.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcnta.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcnta.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcnta.ProgressEnable = false; + this.lbcnta.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcnta.ProgressForeColor = System.Drawing.Color.Black; + this.lbcnta.ProgressMax = 100F; + this.lbcnta.ProgressMin = 0F; + this.lbcnta.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcnta.ProgressValue = 0F; + this.lbcnta.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcnta.Sign = ""; + this.lbcnta.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcnta.SignColor = System.Drawing.Color.Yellow; + this.lbcnta.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcnta.Size = new System.Drawing.Size(77, 45); + this.lbcnta.TabIndex = 5; + this.lbcnta.Text = "99"; + this.lbcnta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcnta.TextShadow = true; + this.lbcnta.TextVisible = true; + // + // lbcntm + // + this.lbcntm.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcntm.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcntm.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcntm.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcntm.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcntm.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcntm.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcntm.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcntm.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcntm.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcntm.ForeColor = System.Drawing.Color.White; + this.lbcntm.GradientEnable = true; + this.lbcntm.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcntm.GradientRepeatBG = false; + this.lbcntm.isButton = false; + this.lbcntm.Location = new System.Drawing.Point(79, 89); + this.lbcntm.Margin = new System.Windows.Forms.Padding(0); + this.lbcntm.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcntm.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcntm.msg = null; + this.lbcntm.Name = "lbcntm"; + this.lbcntm.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcntm.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcntm.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcntm.ProgressEnable = false; + this.lbcntm.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcntm.ProgressForeColor = System.Drawing.Color.Black; + this.lbcntm.ProgressMax = 100F; + this.lbcntm.ProgressMin = 0F; + this.lbcntm.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcntm.ProgressValue = 0F; + this.lbcntm.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcntm.Sign = ""; + this.lbcntm.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcntm.SignColor = System.Drawing.Color.Yellow; + this.lbcntm.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcntm.Size = new System.Drawing.Size(77, 45); + this.lbcntm.TabIndex = 5; + this.lbcntm.Text = "99"; + this.lbcntm.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcntm.TextShadow = true; + this.lbcntm.TextVisible = true; + // + // lbcnte + // + this.lbcnte.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnte.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcnte.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcnte.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcnte.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcnte.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcnte.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcnte.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcnte.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcnte.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcnte.ForeColor = System.Drawing.Color.White; + this.lbcnte.GradientEnable = true; + this.lbcnte.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcnte.GradientRepeatBG = false; + this.lbcnte.isButton = false; + this.lbcnte.Location = new System.Drawing.Point(157, 89); + this.lbcnte.Margin = new System.Windows.Forms.Padding(0); + this.lbcnte.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcnte.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcnte.msg = null; + this.lbcnte.Name = "lbcnte"; + this.lbcnte.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcnte.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcnte.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcnte.ProgressEnable = false; + this.lbcnte.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcnte.ProgressForeColor = System.Drawing.Color.Black; + this.lbcnte.ProgressMax = 100F; + this.lbcnte.ProgressMin = 0F; + this.lbcnte.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcnte.ProgressValue = 0F; + this.lbcnte.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcnte.Sign = ""; + this.lbcnte.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcnte.SignColor = System.Drawing.Color.Yellow; + this.lbcnte.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcnte.Size = new System.Drawing.Size(77, 45); + this.lbcnte.TabIndex = 5; + this.lbcnte.Text = "99"; + this.lbcnte.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcnte.TextShadow = true; + this.lbcnte.TextVisible = true; + // + // lbcntqa + // + this.lbcntqa.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcntqa.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcntqa.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcntqa.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcntqa.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcntqa.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcntqa.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcntqa.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcntqa.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcntqa.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcntqa.ForeColor = System.Drawing.Color.White; + this.lbcntqa.GradientEnable = true; + this.lbcntqa.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcntqa.GradientRepeatBG = false; + this.lbcntqa.isButton = false; + this.lbcntqa.Location = new System.Drawing.Point(235, 89); + this.lbcntqa.Margin = new System.Windows.Forms.Padding(0); + this.lbcntqa.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcntqa.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcntqa.msg = null; + this.lbcntqa.Name = "lbcntqa"; + this.lbcntqa.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcntqa.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcntqa.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcntqa.ProgressEnable = false; + this.lbcntqa.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcntqa.ProgressForeColor = System.Drawing.Color.Black; + this.lbcntqa.ProgressMax = 100F; + this.lbcntqa.ProgressMin = 0F; + this.lbcntqa.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcntqa.ProgressValue = 0F; + this.lbcntqa.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcntqa.Sign = ""; + this.lbcntqa.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcntqa.SignColor = System.Drawing.Color.Yellow; + this.lbcntqa.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcntqa.Size = new System.Drawing.Size(77, 45); + this.lbcntqa.TabIndex = 5; + this.lbcntqa.Text = "99"; + this.lbcntqa.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcntqa.TextShadow = true; + this.lbcntqa.TextVisible = true; + // + // lbcntqc + // + this.lbcntqc.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcntqc.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbcntqc.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbcntqc.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbcntqc.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbcntqc.BorderSize = new System.Windows.Forms.Padding(0); + this.lbcntqc.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbcntqc.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbcntqc.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbcntqc.Font = new System.Drawing.Font("Consolas", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcntqc.ForeColor = System.Drawing.Color.White; + this.lbcntqc.GradientEnable = true; + this.lbcntqc.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbcntqc.GradientRepeatBG = false; + this.lbcntqc.isButton = false; + this.lbcntqc.Location = new System.Drawing.Point(313, 89); + this.lbcntqc.Margin = new System.Windows.Forms.Padding(0); + this.lbcntqc.MouseDownColor = System.Drawing.Color.Yellow; + this.lbcntqc.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbcntqc.msg = null; + this.lbcntqc.Name = "lbcntqc"; + this.lbcntqc.ProgressBorderColor = System.Drawing.Color.Black; + this.lbcntqc.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbcntqc.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbcntqc.ProgressEnable = false; + this.lbcntqc.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbcntqc.ProgressForeColor = System.Drawing.Color.Black; + this.lbcntqc.ProgressMax = 100F; + this.lbcntqc.ProgressMin = 0F; + this.lbcntqc.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbcntqc.ProgressValue = 0F; + this.lbcntqc.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbcntqc.Sign = ""; + this.lbcntqc.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbcntqc.SignColor = System.Drawing.Color.Yellow; + this.lbcntqc.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbcntqc.Size = new System.Drawing.Size(78, 45); + this.lbcntqc.TabIndex = 5; + this.lbcntqc.Text = "99"; + this.lbcntqc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbcntqc.TextShadow = true; + this.lbcntqc.TextVisible = true; + this.lbcntqc.Click += new System.EventHandler(this.lbcntpk_Click); + // + // fCounter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(392, 135); + this.Controls.Add(this.tableLayoutPanel1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "fCounter"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "fCounter"; + this.Load += new System.EventHandler(this.fCounter_Load); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label10; + private arCtl.arLabel lbcnt1; + private arCtl.arLabel lbcnt2; + private arCtl.arLabel lbcnt3; + private arCtl.arLabel lbcnt4; + private arCtl.arLabel lbcnt5; + private arCtl.arLabel lbcnta; + private arCtl.arLabel lbcntm; + private arCtl.arLabel lbcnte; + private arCtl.arLabel lbcntqa; + private System.Windows.Forms.Label label6; + private arCtl.arLabel lbcntqc; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fCounter.cs b/Cs_HMI/Project/Dialog/fCounter.cs new file mode 100644 index 0000000..3c8e552 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fCounter.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fCounter : Form + { + public fCounter() + { + InitializeComponent(); + } + + private void fCounter_Load(object sender, EventArgs e) + { + lbcnt1.Text = PUB.counter.CountUp1.ToString(); + lbcnt2.Text = PUB.counter.CountUp2.ToString(); + lbcnt3.Text = PUB.counter.CountUp3.ToString(); + lbcnt4.Text = PUB.counter.CountUp4.ToString(); + //lbcnt5.Text = PUB.counter.CountUp5.ToString(); + lbcnta.Text = PUB.counter.CountChargeA.ToString(); + lbcntm.Text = PUB.counter.CountChargeM.ToString(); + lbcnte.Text = PUB.counter.CountChargeE.ToString(); + lbcntqa.Text = PUB.counter.CountQA.ToString(); + lbcntqc.Text = PUB.counter.CountQC.ToString(); + } + + private void lbcntpk_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/Cs_HMI/Project/Dialog/fCounter.resx b/Cs_HMI/Project/Dialog/fCounter.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/Project/Dialog/fCounter.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fErrorException.Designer.cs b/Cs_HMI/Project/Dialog/fErrorException.Designer.cs new file mode 100644 index 0000000..b29cbe4 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fErrorException.Designer.cs @@ -0,0 +1,127 @@ +namespace Project +{ + partial class fErrorException + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fErrorException)); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.button2 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(160, 23); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(80, 80); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // button2 + // + this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image"))); + this.button2.Location = new System.Drawing.Point(30, 491); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(355, 54); + this.button2.TabIndex = 2; + this.button2.Text = "종료"; + this.button2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.BackColor = System.Drawing.Color.Brown; + this.label1.Font = new System.Drawing.Font("맑은 고딕", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label1.ForeColor = System.Drawing.Color.White; + this.label1.Location = new System.Drawing.Point(30, 117); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(10); + this.label1.Size = new System.Drawing.Size(355, 50); + this.label1.TabIndex = 3; + this.label1.Text = "미처리 오류로 인한 프로그램 중단"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label2.ForeColor = System.Drawing.Color.Blue; + this.label2.Location = new System.Drawing.Point(30, 182); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(311, 45); + this.label2.TabIndex = 4; + this.label2.Text = "오류보고를 위한 정보가 수집되었습니다.\r\n수집된 정보는 아래와 같고 오류가 발생하기 전의 상황을\r\n적어서 메일을 전송하면 버그 수정에 도움이 됩니" + + "다."; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(30, 240); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.textBox1.Size = new System.Drawing.Size(355, 241); + this.textBox1.TabIndex = 5; + // + // fErrorException + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(418, 560); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.button2); + this.Controls.Add(this.pictureBox1); + this.Font = new System.Drawing.Font("맑은 고딕", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.KeyPreview = true; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "fErrorException"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Error Report"; + this.Load += new System.EventHandler(this.fErrorException_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fErrorException.cs b/Cs_HMI/Project/Dialog/fErrorException.cs new file mode 100644 index 0000000..19764f9 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fErrorException.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Project +{ + public partial class fErrorException : Form + { + public fErrorException(string err) + { + InitializeComponent(); + System.Text.StringBuilder sb = new StringBuilder(); + sb.AppendLine("To : ChiKyun.kim@amkor.co.kr"); + sb.AppendLine("Description : ?"); + sb.AppendLine(); + sb.AppendLine("========================="); + sb.AppendLine(" ERROR MESSAGE"); + sb.AppendLine("========================="); + sb.AppendLine(); + sb.AppendLine(err); + this.textBox1.Text = sb.ToString(); + } + + private void fErrorException_Load(object sender, EventArgs e) + { + + } + + private void button2_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/Cs_HMI/Project/Dialog/fErrorException.resx b/Cs_HMI/Project/Dialog/fErrorException.resx new file mode 100644 index 0000000..a1823b3 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fErrorException.resx @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAb + rwAAG68BXhqRHAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPnSURBVHhe7dzJ + TttQFAbgdNFKnZ6GFWKDfCNGsWRRddO+ATwBo5g2iNdopU7LqlXVFgUa2LDoE7TbQoEIFpVw72/5EOdw + INO919fx/aVfiuwTD58chcFyJSQkJJu4Urm3H0Uv95Wq7VWrx2jyOopeYF06FiLlcGbmkQZ7v6dULFav + w0w6HpINYGpKfQbUj/Hx+Pf8fHy2thafra8nr7EsQYyiT7Xh4Yfp20KQLF59cjI+XlqKL7e3W4plWBcQ + WXZHRp5qkF3AHE5NxScrKzfwqFiHmRRxF+9NN1POdINHDYhpesGjlh6xHzxqaRE53t/VVRGok5YO0SQe + tTSINvCoLYhKfR84RJt41IFFdIFHxbYHCtElHpUjfhkdfZIeTrGS4OkTcIlHLTxinnjUwiLiQPPGoxYO + 0Sc8amEQTePxSDOd1ntEG1cejzTTTb1FbMGbnjaCh/JIM93WO0RbeCiPNNNLs4g1pb7lhmgTD+WRZnpt + 7oi28VAeaaaf5oaIHWGHNvFQHmmm3yaI+hycIbrCQ3mkGRN1hugSD+WRZkzVOqJrPJRHmjFZa4h54KE8 + 0ozpGkfMCw/lkWZs1BhinngojzRjq30j5o2H8kgzNptF3Ffqa8eIPuChPNKM7XaN6AseyiPNuChHPBob + e5xytQZ3f2q81xg80L/inCwvixt0VR5pxlVhAZMEsVp9Jd4pq1c+xwBuZMwbD+WRZlwWJnSTZy2KnqVs + zegVyR8Hfs3NiRtwXR5pxnVhAyN8lFO2ZvSKc6w839gQ3+y6PNKM68IGRrpnKVszemEjAN5d3K99F2D4 + CLdpu49w+BK5o22/RMKPMbcXFm1/jEEOh4bu68vzLQbrExPx8eKiuEEX5ZFmXBQGsICJ7hsYpVxyfEHk + kWZst2s8ik9XYl7tGY9SZsQsHgy6xqOUEdEYHqVMiMbxKGVAtIZHcYq4sxP/q9fjq9PTpHiNZeKsgVrH + o/ycnX3gAhFgPAmiMNtv/ywsuMGjuEC8ajRStmawTJrtp87xKEDUv/a9s4XoAjA3PIpNRNsfYY6Hc0lP + y22sIdKXyMVF0gTP0JeIN3gUjogDlA7ch3qHRykCYhYPx+oNHsVnRO/xKD4iFgaPggOkpw/ljVg4PIoP + iIXFo+SJWHg8Ch7PpE/iI07kAI90cvCPKuwD+8I+se/CPyLK5ZWYvfKwz8JeeTwuEAcWj2ITceDxKDYQ + S4NHMYlYOjyKCcTS4lESRKU+9IKI2etHgpYRj9ILYsBj6QYx4N2S8BBaA5Eeg9zY3IwbW1vhMcidBoj0 + 7SxWr8NMOh4iBXd/Xj8KXqlLNHkdHgUfEnIjlcp/1rPAKpMPkMkAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL + iQAAC4kBN8nLrQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAALmSURBVFhH7ZjL + ahRREIbLW7yLGxcq4k7cCaJLFwoiKAqKt5dQI4JLFZ8h4gMY0RF30YgbgwsRRYiZ3IzBG9lF3RgXXsDx + q1AtlTPTPefMtDLCfFBk5tRff1e65vR0j3TpUsALkVXjIvsmRHqJvjGRWxr6mjjH670zIitN/m+oiSym + qZPEPeI7UWsS32h2gL8ntNZs/g6ckcMcaMIdPDXGafaQ2ZXHtMg6zO8GB/MxR0wSjy30ta410mpUXoms + Nfv24D/eimGjs/aauDQqsovRLTL5H3ScnPHdaK4Q01bjY4zaLSZvDWtuJjD+RJxhgywzWVPQ9+DVy9/P + 5pHFh5abtLGGZ+4po9lkkmSmRLbjEY5+lFhjkngoqjgTjQpNL7d0MnZJehR4ZtFvsjgYxylvwPuhlJGG + 6DTweOI9iS/+PaM+ZvJihkSWUvDGFc9ivtHSyeQ099zGrZ/nbG2KjbXEyvLB7LQr0jhrqWTymhsWWa95 + dvn5IHd8vrAIDB+6grdEj6WSaNacop9p1t67/H1LNUZNEf10BZctlURMcxnorjrNDyJ/RyM+6MQ1RrDD + UtGkNKeg3em1HPOApepBfNGJP9pyNKnNKfothMZfwC9Yqh6S153wpS1H0UpzGeiqWQ0efbZcD4L+TEgM + 2nJT2mlOQfvA1d2w5XpI3nTCqAbbbU5BH92gHzHHKKaM5hQ8RrJ6Nsk1W64HYfQmKau5pE3CAaMuM2U1 + p+ATf5nRAyMqvFCX2ZyCV/yFWkEw6AoWfNWV3Rx+C77q8B6wVD6IjmYFFvM3C2U3pzDO8GbhiKXy0WcJ + hP5OenZSZFvZzemdOR7+dquqG8bSxdDMfleo8TV431ZzIyKr8Rh2fr+IPZaOg4LbzsBHlXFvMFky70RW + 4HEn8My/OOehnzkKw4emOb0TNkky1G7G41ng2dpDk8KoO/exM8Oa7MwH9wwbd2f+9OHhjHTmj0ceu052 + 5s9vIR35A2aX/wuR3/n+YvqZGUimAAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fJobSelect.Designer.cs b/Cs_HMI/Project/Dialog/fJobSelect.Designer.cs new file mode 100644 index 0000000..942048f --- /dev/null +++ b/Cs_HMI/Project/Dialog/fJobSelect.Designer.cs @@ -0,0 +1,558 @@ +namespace Project.Dialog +{ + partial class fJobSelect + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tmBlink = new System.Windows.Forms.Timer(this.components); + this.arPanel1 = new arCtl.arPanel(); + this.panButton = new System.Windows.Forms.Panel(); + this.btYes = new arCtl.arLabel(); + this.btNo = new arCtl.arLabel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.lb5 = new arCtl.arLabel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.lb4 = new arCtl.arLabel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lb3 = new arCtl.arLabel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lb2 = new arCtl.arLabel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lb1 = new arCtl.arLabel(); + this.panel8 = new System.Windows.Forms.Panel(); + this.lbTitle = new arCtl.arLabel(); + this.arPanel1.SuspendLayout(); + this.panButton.SuspendLayout(); + this.SuspendLayout(); + // + // tmBlink + // + this.tmBlink.Enabled = true; + this.tmBlink.Interval = 300; + this.tmBlink.Tick += new System.EventHandler(this.tmBlink_Tick); + // + // arPanel1 + // + this.arPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arPanel1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arPanel1.BorderColor = System.Drawing.Color.DimGray; + this.arPanel1.BorderSize = new System.Windows.Forms.Padding(1); + this.arPanel1.Controls.Add(this.panButton); + this.arPanel1.Controls.Add(this.panel7); + this.arPanel1.Controls.Add(this.lb5); + this.arPanel1.Controls.Add(this.panel3); + this.arPanel1.Controls.Add(this.lb4); + this.arPanel1.Controls.Add(this.panel2); + this.arPanel1.Controls.Add(this.lb3); + this.arPanel1.Controls.Add(this.panel1); + this.arPanel1.Controls.Add(this.lb2); + this.arPanel1.Controls.Add(this.panel4); + this.arPanel1.Controls.Add(this.lb1); + this.arPanel1.Controls.Add(this.panel8); + this.arPanel1.Controls.Add(this.lbTitle); + this.arPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.arPanel1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Italic); + this.arPanel1.ForeColor = System.Drawing.Color.Khaki; + this.arPanel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arPanel1.GradientRepeatBG = false; + this.arPanel1.Location = new System.Drawing.Point(5, 5); + this.arPanel1.Name = "arPanel1"; + this.arPanel1.Padding = new System.Windows.Forms.Padding(6); + this.arPanel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arPanel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arPanel1.ProgressMax = 100F; + this.arPanel1.ProgressMin = 0F; + this.arPanel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arPanel1.ProgressValue = 0F; + this.arPanel1.ShadowColor = System.Drawing.Color.Black; + this.arPanel1.ShowBorder = true; + this.arPanel1.Size = new System.Drawing.Size(508, 405); + this.arPanel1.TabIndex = 0; + this.arPanel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.arPanel1.TextShadow = false; + this.arPanel1.UseProgressBar = false; + // + // panButton + // + this.panButton.Controls.Add(this.btYes); + this.panButton.Controls.Add(this.btNo); + this.panButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.panButton.Location = new System.Drawing.Point(6, 353); + this.panButton.Name = "panButton"; + this.panButton.Size = new System.Drawing.Size(496, 46); + this.panButton.TabIndex = 10; + // + // btYes + // + this.btYes.BackColor = System.Drawing.Color.SeaGreen; + this.btYes.BackColor2 = System.Drawing.Color.SeaGreen; + this.btYes.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btYes.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btYes.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btYes.BorderSize = new System.Windows.Forms.Padding(1); + this.btYes.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btYes.Cursor = System.Windows.Forms.Cursors.Hand; + this.btYes.Dock = System.Windows.Forms.DockStyle.Fill; + this.btYes.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btYes.ForeColor = System.Drawing.Color.Black; + this.btYes.GradientEnable = true; + this.btYes.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btYes.GradientRepeatBG = false; + this.btYes.isButton = true; + this.btYes.Location = new System.Drawing.Point(0, 0); + this.btYes.MouseDownColor = System.Drawing.Color.Yellow; + this.btYes.MouseOverColor = System.Drawing.Color.Yellow; + this.btYes.msg = null; + this.btYes.Name = "btYes"; + this.btYes.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btYes.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btYes.ProgressEnable = false; + this.btYes.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btYes.ProgressForeColor = System.Drawing.Color.Black; + this.btYes.ProgressMax = 100F; + this.btYes.ProgressMin = 0F; + this.btYes.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btYes.ProgressValue = 0F; + this.btYes.ShadowColor = System.Drawing.Color.Gray; + this.btYes.Sign = ""; + this.btYes.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btYes.SignColor = System.Drawing.Color.Yellow; + this.btYes.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btYes.Size = new System.Drawing.Size(267, 46); + this.btYes.TabIndex = 0; + this.btYes.Text = "예(F5)"; + this.btYes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btYes.TextShadow = true; + this.btYes.TextVisible = true; + this.btYes.Click += new System.EventHandler(this.btYes_Click); + // + // btNo + // + this.btNo.BackColor = System.Drawing.Color.Goldenrod; + this.btNo.BackColor2 = System.Drawing.Color.Goldenrod; + this.btNo.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btNo.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btNo.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btNo.BorderSize = new System.Windows.Forms.Padding(1); + this.btNo.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btNo.Cursor = System.Windows.Forms.Cursors.Hand; + this.btNo.Dock = System.Windows.Forms.DockStyle.Right; + this.btNo.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btNo.ForeColor = System.Drawing.Color.Black; + this.btNo.GradientEnable = true; + this.btNo.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btNo.GradientRepeatBG = false; + this.btNo.isButton = true; + this.btNo.Location = new System.Drawing.Point(267, 0); + this.btNo.MouseDownColor = System.Drawing.Color.Yellow; + this.btNo.MouseOverColor = System.Drawing.Color.Yellow; + this.btNo.msg = null; + this.btNo.Name = "btNo"; + this.btNo.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btNo.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btNo.ProgressEnable = false; + this.btNo.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btNo.ProgressForeColor = System.Drawing.Color.Black; + this.btNo.ProgressMax = 100F; + this.btNo.ProgressMin = 0F; + this.btNo.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btNo.ProgressValue = 0F; + this.btNo.ShadowColor = System.Drawing.Color.Gray; + this.btNo.Sign = ""; + this.btNo.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btNo.SignColor = System.Drawing.Color.Yellow; + this.btNo.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btNo.Size = new System.Drawing.Size(229, 46); + this.btNo.TabIndex = 1; + this.btNo.Text = "아니오(ESC)"; + this.btNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btNo.TextShadow = true; + this.btNo.TextVisible = true; + this.btNo.Click += new System.EventHandler(this.btNo_Click); + // + // panel7 + // + this.panel7.Dock = System.Windows.Forms.DockStyle.Top; + this.panel7.Location = new System.Drawing.Point(6, 348); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(496, 5); + this.panel7.TabIndex = 0; + // + // lb5 + // + this.lb5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb5.BackColor2 = System.Drawing.Color.Gray; + this.lb5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb5.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb5.BorderSize = new System.Windows.Forms.Padding(1); + this.lb5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb5.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb5.Dock = System.Windows.Forms.DockStyle.Top; + this.lb5.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb5.ForeColor = System.Drawing.Color.White; + this.lb5.GradientEnable = true; + this.lb5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb5.GradientRepeatBG = false; + this.lb5.isButton = false; + this.lb5.Location = new System.Drawing.Point(6, 298); + this.lb5.MouseDownColor = System.Drawing.Color.Yellow; + this.lb5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb5.msg = null; + this.lb5.Name = "lb5"; + this.lb5.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb5.ProgressEnable = false; + this.lb5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb5.ProgressForeColor = System.Drawing.Color.Black; + this.lb5.ProgressMax = 100F; + this.lb5.ProgressMin = 0F; + this.lb5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb5.ProgressValue = 0F; + this.lb5.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb5.Sign = ""; + this.lb5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb5.SignColor = System.Drawing.Color.Yellow; + this.lb5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb5.Size = new System.Drawing.Size(496, 50); + this.lb5.TabIndex = 7; + this.lb5.Text = "*"; + this.lb5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb5.TextShadow = true; + this.lb5.TextVisible = true; + // + // panel3 + // + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(6, 293); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(496, 5); + this.panel3.TabIndex = 13; + // + // lb4 + // + this.lb4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb4.BackColor2 = System.Drawing.Color.Gray; + this.lb4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb4.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb4.BorderSize = new System.Windows.Forms.Padding(1); + this.lb4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb4.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb4.Dock = System.Windows.Forms.DockStyle.Top; + this.lb4.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb4.ForeColor = System.Drawing.Color.White; + this.lb4.GradientEnable = true; + this.lb4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb4.GradientRepeatBG = false; + this.lb4.isButton = false; + this.lb4.Location = new System.Drawing.Point(6, 243); + this.lb4.MouseDownColor = System.Drawing.Color.Yellow; + this.lb4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb4.msg = null; + this.lb4.Name = "lb4"; + this.lb4.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb4.ProgressEnable = false; + this.lb4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb4.ProgressForeColor = System.Drawing.Color.Black; + this.lb4.ProgressMax = 100F; + this.lb4.ProgressMin = 0F; + this.lb4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb4.ProgressValue = 0F; + this.lb4.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb4.Sign = ""; + this.lb4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb4.SignColor = System.Drawing.Color.Yellow; + this.lb4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb4.Size = new System.Drawing.Size(496, 50); + this.lb4.TabIndex = 6; + this.lb4.Text = "*"; + this.lb4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb4.TextShadow = true; + this.lb4.TextVisible = true; + // + // panel2 + // + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(6, 238); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(496, 5); + this.panel2.TabIndex = 12; + // + // lb3 + // + this.lb3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb3.BackColor2 = System.Drawing.Color.Gray; + this.lb3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb3.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb3.BorderSize = new System.Windows.Forms.Padding(1); + this.lb3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb3.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb3.Dock = System.Windows.Forms.DockStyle.Top; + this.lb3.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb3.ForeColor = System.Drawing.Color.White; + this.lb3.GradientEnable = true; + this.lb3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb3.GradientRepeatBG = false; + this.lb3.isButton = false; + this.lb3.Location = new System.Drawing.Point(6, 188); + this.lb3.MouseDownColor = System.Drawing.Color.Yellow; + this.lb3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb3.msg = null; + this.lb3.Name = "lb3"; + this.lb3.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb3.ProgressEnable = false; + this.lb3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb3.ProgressForeColor = System.Drawing.Color.Black; + this.lb3.ProgressMax = 100F; + this.lb3.ProgressMin = 0F; + this.lb3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb3.ProgressValue = 0F; + this.lb3.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb3.Sign = ""; + this.lb3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb3.SignColor = System.Drawing.Color.Yellow; + this.lb3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb3.Size = new System.Drawing.Size(496, 50); + this.lb3.TabIndex = 5; + this.lb3.Text = "* 현재 위치 : "; + this.lb3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb3.TextShadow = true; + this.lb3.TextVisible = true; + // + // panel1 + // + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(6, 183); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(496, 5); + this.panel1.TabIndex = 11; + // + // lb2 + // + this.lb2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb2.BackColor2 = System.Drawing.Color.Gray; + this.lb2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb2.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb2.BorderSize = new System.Windows.Forms.Padding(1); + this.lb2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb2.Dock = System.Windows.Forms.DockStyle.Top; + this.lb2.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb2.ForeColor = System.Drawing.Color.White; + this.lb2.GradientEnable = true; + this.lb2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb2.GradientRepeatBG = false; + this.lb2.isButton = false; + this.lb2.Location = new System.Drawing.Point(6, 133); + this.lb2.MouseDownColor = System.Drawing.Color.Yellow; + this.lb2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb2.msg = null; + this.lb2.Name = "lb2"; + this.lb2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb2.ProgressEnable = false; + this.lb2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb2.ProgressForeColor = System.Drawing.Color.Black; + this.lb2.ProgressMax = 100F; + this.lb2.ProgressMin = 0F; + this.lb2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb2.ProgressValue = 0F; + this.lb2.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb2.Sign = ""; + this.lb2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb2.SignColor = System.Drawing.Color.Yellow; + this.lb2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb2.Size = new System.Drawing.Size(496, 50); + this.lb2.TabIndex = 4; + this.lb2.Text = "* 호출 위치 : F1"; + this.lb2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb2.TextShadow = true; + this.lb2.TextVisible = true; + // + // panel4 + // + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(6, 128); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(496, 5); + this.panel4.TabIndex = 14; + // + // lb1 + // + this.lb1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb1.BackColor2 = System.Drawing.Color.Gray; + this.lb1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb1.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb1.BorderSize = new System.Windows.Forms.Padding(1); + this.lb1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb1.Dock = System.Windows.Forms.DockStyle.Top; + this.lb1.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb1.ForeColor = System.Drawing.Color.White; + this.lb1.GradientEnable = true; + this.lb1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb1.GradientRepeatBG = false; + this.lb1.isButton = false; + this.lb1.Location = new System.Drawing.Point(6, 78); + this.lb1.MouseDownColor = System.Drawing.Color.Yellow; + this.lb1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb1.msg = null; + this.lb1.Name = "lb1"; + this.lb1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb1.ProgressEnable = false; + this.lb1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb1.ProgressForeColor = System.Drawing.Color.Black; + this.lb1.ProgressMax = 100F; + this.lb1.ProgressMin = 0F; + this.lb1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb1.ProgressValue = 0F; + this.lb1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb1.Sign = ""; + this.lb1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb1.SignColor = System.Drawing.Color.Yellow; + this.lb1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb1.Size = new System.Drawing.Size(496, 50); + this.lb1.TabIndex = 2; + this.lb1.Text = "* 작업 : 상차"; + this.lb1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb1.TextShadow = true; + this.lb1.TextVisible = true; + // + // panel8 + // + this.panel8.Dock = System.Windows.Forms.DockStyle.Top; + this.panel8.Location = new System.Drawing.Point(6, 73); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(496, 5); + this.panel8.TabIndex = 18; + // + // lbTitle + // + this.lbTitle.BackColor = System.Drawing.Color.Brown; + this.lbTitle.BackColor2 = System.Drawing.Color.Tomato; + this.lbTitle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lbTitle.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbTitle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderSize = new System.Windows.Forms.Padding(1); + this.lbTitle.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbTitle.Cursor = System.Windows.Forms.Cursors.Hand; + this.lbTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.lbTitle.Font = new System.Drawing.Font("맑은 고딕", 22F, System.Drawing.FontStyle.Bold); + this.lbTitle.ForeColor = System.Drawing.Color.WhiteSmoke; + this.lbTitle.GradientEnable = true; + this.lbTitle.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal; + this.lbTitle.GradientRepeatBG = false; + this.lbTitle.isButton = true; + this.lbTitle.Location = new System.Drawing.Point(6, 6); + this.lbTitle.MouseDownColor = System.Drawing.Color.Yellow; + this.lbTitle.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbTitle.msg = null; + this.lbTitle.Name = "lbTitle"; + this.lbTitle.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbTitle.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbTitle.ProgressEnable = false; + this.lbTitle.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbTitle.ProgressForeColor = System.Drawing.Color.Black; + this.lbTitle.ProgressMax = 100F; + this.lbTitle.ProgressMin = 0F; + this.lbTitle.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbTitle.ProgressValue = 0F; + this.lbTitle.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50))))); + this.lbTitle.Sign = ""; + this.lbTitle.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbTitle.SignColor = System.Drawing.Color.Yellow; + this.lbTitle.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbTitle.Size = new System.Drawing.Size(496, 67); + this.lbTitle.TabIndex = 3; + this.lbTitle.Text = "작업 설정"; + this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbTitle.TextShadow = true; + this.lbTitle.TextVisible = true; + this.lbTitle.Click += new System.EventHandler(this.lbTitle_Click); + // + // fJobSelect + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(518, 415); + this.Controls.Add(this.arPanel1); + this.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.MaximizeBox = false; + this.Name = "fJobSelect"; + this.Padding = new System.Windows.Forms.Padding(5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Message Window"; + this.TopMost = true; + this.Load += new System.EventHandler(this.fMsg_Load); + this.arPanel1.ResumeLayout(false); + this.panButton.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + public arCtl.arLabel lb1; + private arCtl.arPanel arPanel1; + public arCtl.arLabel lbTitle; + public arCtl.arLabel lb5; + public arCtl.arLabel lb4; + public arCtl.arLabel lb3; + public arCtl.arLabel lb2; + private System.Windows.Forms.Timer tmBlink; + public arCtl.arLabel btYes; + public arCtl.arLabel btNo; + private System.Windows.Forms.Panel panButton; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel8; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fJobSelect.cs b/Cs_HMI/Project/Dialog/fJobSelect.cs new file mode 100644 index 0000000..fa491e0 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fJobSelect.cs @@ -0,0 +1,169 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fJobSelect : Form + { + private Boolean fMove = false; + private Point MDownPos; + private string _msg = string.Empty; + + public fJobSelect() + { + InitializeComponent(); + } + + public fJobSelect(string msg) + { + InitializeComponent(); + this.FormClosing += fMsgWindow_FormClosing; + this.KeyDown += FJobSelect_KeyDown; + this._msg = msg; + setMessage(msg); + this.lbTitle.MouseMove += label1_MouseMove; + lbTitle.MouseUp += label1_MouseUp; + lbTitle.MouseDown += label1_MouseDown; + lbTitle.MouseDoubleClick += label1_MouseDoubleClick; + } + + void fMsgWindow_FormClosing(object sender, FormClosingEventArgs e) + { + + } + + private void fMsg_Load(object sender, EventArgs e) + { + + } + private void FJobSelect_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Escape) + { + e.Handled = true; + e.SuppressKeyPress = false; + DialogResult = DialogResult.Cancel; + this.Close(); + } + else if (e.KeyCode == Keys.F5) + btYes.PerformClick(); + } + + public void setMessage(string msg) + { + //msg를 분리해서 표시를 한다. + var lbs = new arCtl.arLabel[] { lbTitle, lb1, lb2, lb3, lb4, lb5 }; + var lineBuf = msg.Replace("\r", "").Split('\n'); + int maxLine = Math.Min(lbs.Length, lineBuf.Length); + + for (int i = 0; i < lbs.Length; i++) //최대줄을 넘어가는건 표시불가 + { + if (i >= lineBuf.Length) + { + lbs[i].Text = string.Empty; + } + else + { + if (i > 0) lbs[i].Text = string.Format("{0}. {1}", i, lineBuf[i]); + else lbs[i].Text = lineBuf[i]; + } + + } + } + + + + private void label1_MouseMove(object sender, MouseEventArgs e) + { + if (fMove) + { + Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y); + this.Left += offset.X; + this.Top += offset.Y; + offset = new Point(0, 0); + } + } + + private void label1_MouseUp(object sender, MouseEventArgs e) + { + fMove = false; + } + + private void label1_MouseDown(object sender, MouseEventArgs e) + { + MDownPos = new Point(e.X, e.Y); + fMove = true; + } + + private void label1_MouseDoubleClick(object sender, MouseEventArgs e) + { + + + } + public enum EWinColor + { + Attention = 0, + Error, + Information + } + + public void SetWindowColor(EWinColor wincolor) + { + switch (wincolor) + { + case EWinColor.Attention: + lbTitle.BackColor = Color.Gold; + lbTitle.BackColor2 = Color.Orange; + lbTitle.ShadowColor = Color.FromArgb(150, 150, 150); + lbTitle.ForeColor = Color.FromArgb(50, 50, 50); + break; + case EWinColor.Error: + lbTitle.BackColor = Color.Brown; + lbTitle.BackColor2 = Color.Tomato; + lbTitle.ShadowColor = Color.FromArgb(50, 50, 50); + lbTitle.ForeColor = Color.WhiteSmoke; + break; + default: + lbTitle.BackColor = Color.DarkTurquoise; + lbTitle.BackColor2 = Color.LightSkyBlue; + lbTitle.ShadowColor = Color.FromArgb(50, 50, 50); + lbTitle.ForeColor = Color.WhiteSmoke; + break; + } + } + + private void lbTitle_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void tmBlink_Tick(object sender, EventArgs e) + { + var bg1 = lbTitle.BackColor; + var bg2 = lbTitle.BackColor2; + lbTitle.BackColor = bg2; + lbTitle.BackColor2 = bg1; + } + + private void btYes_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Yes; + this.Close(); + } + + private void btNo_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + this.Close(); + + } + } +} diff --git a/Cs_HMI/Project/Dialog/fJobSelect.resx b/Cs_HMI/Project/Dialog/fJobSelect.resx new file mode 100644 index 0000000..fcee611 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fJobSelect.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fLog.Designer.cs b/Cs_HMI/Project/Dialog/fLog.Designer.cs new file mode 100644 index 0000000..189793f --- /dev/null +++ b/Cs_HMI/Project/Dialog/fLog.Designer.cs @@ -0,0 +1,211 @@ +namespace Project.Dialog +{ + partial class fLog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.rtsys = new arCtl.LogTextBox(); + this.rtTx = new arCtl.LogTextBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.rtAGV = new arCtl.LogTextBox(); + this.rtPLC = new arCtl.LogTextBox(); + this.rtBMS = new arCtl.LogTextBox(); + this.rtCAL = new arCtl.LogTextBox(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // rtsys + // + this.rtsys.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.rtsys.ColorList = new arCtl.sLogMessageColor[0]; + this.tableLayoutPanel1.SetColumnSpan(this.rtsys, 2); + this.rtsys.DateFormat = "mm:ss.fff"; + this.rtsys.DefaultColor = System.Drawing.Color.LightGray; + this.rtsys.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtsys.EnableDisplayTimer = false; + this.rtsys.EnableGubunColor = true; + this.rtsys.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtsys.ListFormat = "[{0}] {1}"; + this.rtsys.Location = new System.Drawing.Point(3, 3); + this.rtsys.MaxListCount = ((ushort)(1000)); + this.rtsys.MaxTextLength = ((uint)(400000u)); + this.rtsys.MessageInterval = 50; + this.rtsys.Name = "rtsys"; + this.rtsys.Size = new System.Drawing.Size(334, 340); + this.rtsys.TabIndex = 0; + this.rtsys.Text = ""; + // + // rtTx + // + this.rtTx.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.rtTx.ColorList = new arCtl.sLogMessageColor[0]; + this.tableLayoutPanel1.SetColumnSpan(this.rtTx, 2); + this.rtTx.DateFormat = "mm:ss.fff"; + this.rtTx.DefaultColor = System.Drawing.Color.LightGray; + this.rtTx.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtTx.EnableDisplayTimer = false; + this.rtTx.EnableGubunColor = true; + this.rtTx.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtTx.ListFormat = "[{0}] {1}"; + this.rtTx.Location = new System.Drawing.Point(343, 3); + this.rtTx.MaxListCount = ((ushort)(1000)); + this.rtTx.MaxTextLength = ((uint)(400000u)); + this.rtTx.MessageInterval = 50; + this.rtTx.Name = "rtTx"; + this.rtTx.Size = new System.Drawing.Size(335, 340); + this.rtTx.TabIndex = 1; + this.rtTx.Text = ""; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 4; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.Controls.Add(this.rtAGV, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.rtsys, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.rtTx, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.rtPLC, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.rtBMS, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.rtCAL, 3, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(681, 495); + this.tableLayoutPanel1.TabIndex = 2; + // + // rtAGV + // + this.rtAGV.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.rtAGV.ColorList = new arCtl.sLogMessageColor[0]; + this.rtAGV.DateFormat = "mm:ss.fff"; + this.rtAGV.DefaultColor = System.Drawing.Color.LightGray; + this.rtAGV.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtAGV.EnableDisplayTimer = false; + this.rtAGV.EnableGubunColor = true; + this.rtAGV.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtAGV.ListFormat = "[{0}] {1}"; + this.rtAGV.Location = new System.Drawing.Point(3, 349); + this.rtAGV.MaxListCount = ((ushort)(1000)); + this.rtAGV.MaxTextLength = ((uint)(400000u)); + this.rtAGV.MessageInterval = 50; + this.rtAGV.Name = "rtAGV"; + this.rtAGV.Size = new System.Drawing.Size(164, 143); + this.rtAGV.TabIndex = 2; + this.rtAGV.Text = ""; + // + // rtPLC + // + this.rtPLC.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.rtPLC.ColorList = new arCtl.sLogMessageColor[0]; + this.rtPLC.DateFormat = "mm:ss.fff"; + this.rtPLC.DefaultColor = System.Drawing.Color.LightGray; + this.rtPLC.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtPLC.EnableDisplayTimer = false; + this.rtPLC.EnableGubunColor = true; + this.rtPLC.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtPLC.ListFormat = "[{0}] {1}"; + this.rtPLC.Location = new System.Drawing.Point(173, 349); + this.rtPLC.MaxListCount = ((ushort)(1000)); + this.rtPLC.MaxTextLength = ((uint)(400000u)); + this.rtPLC.MessageInterval = 50; + this.rtPLC.Name = "rtPLC"; + this.rtPLC.Size = new System.Drawing.Size(164, 143); + this.rtPLC.TabIndex = 2; + this.rtPLC.Text = ""; + // + // rtBMS + // + this.rtBMS.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.rtBMS.ColorList = new arCtl.sLogMessageColor[0]; + this.rtBMS.DateFormat = "mm:ss.fff"; + this.rtBMS.DefaultColor = System.Drawing.Color.LightGray; + this.rtBMS.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtBMS.EnableDisplayTimer = false; + this.rtBMS.EnableGubunColor = true; + this.rtBMS.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtBMS.ListFormat = "[{0}] {1}"; + this.rtBMS.Location = new System.Drawing.Point(343, 349); + this.rtBMS.MaxListCount = ((ushort)(1000)); + this.rtBMS.MaxTextLength = ((uint)(400000u)); + this.rtBMS.MessageInterval = 50; + this.rtBMS.Name = "rtBMS"; + this.rtBMS.Size = new System.Drawing.Size(164, 143); + this.rtBMS.TabIndex = 2; + this.rtBMS.Text = ""; + // + // rtCAL + // + this.rtCAL.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.rtCAL.ColorList = new arCtl.sLogMessageColor[0]; + this.rtCAL.DateFormat = "mm:ss.fff"; + this.rtCAL.DefaultColor = System.Drawing.Color.LightGray; + this.rtCAL.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtCAL.EnableDisplayTimer = false; + this.rtCAL.EnableGubunColor = true; + this.rtCAL.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.rtCAL.ListFormat = "[{0}] {1}"; + this.rtCAL.Location = new System.Drawing.Point(513, 349); + this.rtCAL.MaxListCount = ((ushort)(1000)); + this.rtCAL.MaxTextLength = ((uint)(400000u)); + this.rtCAL.MessageInterval = 50; + this.rtCAL.Name = "rtCAL"; + this.rtCAL.Size = new System.Drawing.Size(165, 143); + this.rtCAL.TabIndex = 2; + this.rtCAL.Text = ""; + // + // fLog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(681, 495); + this.Controls.Add(this.tableLayoutPanel1); + this.Name = "fLog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "fLog"; + this.TopMost = true; + this.Load += new System.EventHandler(this.fLog_Load); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private arCtl.LogTextBox rtsys; + private arCtl.LogTextBox rtTx; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private arCtl.LogTextBox rtAGV; + private arCtl.LogTextBox rtPLC; + private arCtl.LogTextBox rtBMS; + private arCtl.LogTextBox rtCAL; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fLog.cs b/Cs_HMI/Project/Dialog/fLog.cs new file mode 100644 index 0000000..be655ad --- /dev/null +++ b/Cs_HMI/Project/Dialog/fLog.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fLog : Form + { + public fLog() + { + InitializeComponent(); + this.FormClosed += FLog_FormClosed; + } + + private void FLog_FormClosed(object sender, FormClosedEventArgs e) + { + PUB.log.RaiseMsg -= Log_RaiseMsg; + PUB.logagv.RaiseMsg -= Log_RaiseMsgagv; + PUB.logplc.RaiseMsg -= Log_RaiseMsgplc; + PUB.logbms.RaiseMsg -= Log_RaiseMsgbms; + PUB.logcal.RaiseMsg -= Log_RaiseMsgcal; + } + + private void fLog_Load(object sender, EventArgs e) + { + + var colorlist = new arCtl.sLogMessageColor[] + { + new arCtl.sLogMessageColor("NOR",Color.Black), + new arCtl.sLogMessageColor("NORM",Color.Black), + new arCtl.sLogMessageColor("NORMAL",Color.Black), + new arCtl.sLogMessageColor("ERR",Color.Red), + new arCtl.sLogMessageColor("FLAG",Color.Magenta), + new arCtl.sLogMessageColor("TX",Color.SkyBlue), + new arCtl.sLogMessageColor("SETUP",Color.Gold), + new arCtl.sLogMessageColor("MFLAG",Color.BlueViolet), + }; + this.rtsys.ColorList = colorlist; + this.rtTx.ColorList = colorlist; + this.rtAGV.ColorList = colorlist; + + PUB.log.RaiseMsg += Log_RaiseMsg; + PUB.logagv.RaiseMsg += Log_RaiseMsgagv; + PUB.logplc.RaiseMsg += Log_RaiseMsgplc; + PUB.logbms.RaiseMsg += Log_RaiseMsgbms; + PUB.logcal.RaiseMsg += Log_RaiseMsgcal; + } + + private void Log_RaiseMsg(DateTime LogTime, string TypeStr, string Message) + { + showlog(rtsys,LogTime, TypeStr, Message); + } + private void Log_RaiseMsgagv(DateTime LogTime, string TypeStr, string Message) + { + showlog(rtAGV, LogTime, TypeStr, Message); + } + private void Log_RaiseMsgplc(DateTime LogTime, string TypeStr, string Message) + { + showlog(rtPLC, LogTime, TypeStr, Message); + } + private void Log_RaiseMsgbms(DateTime LogTime, string TypeStr, string Message) + { + showlog(rtBMS, LogTime, TypeStr, Message); + } + private void Log_RaiseMsgcal(DateTime LogTime, string TypeStr, string Message) + { + showlog(rtCAL, LogTime, TypeStr, Message); + } + void showlog(arCtl.LogTextBox rtRx, DateTime LogTime, string TypeStr, string Message) + { + if (rtRx.Visible) + { + rtRx.AddMsg(LogTime, TypeStr, Message); + } + } + } +} diff --git a/Cs_HMI/Project/Dialog/fLog.resx b/Cs_HMI/Project/Dialog/fLog.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/Project/Dialog/fLog.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fPassword.Designer.cs b/Cs_HMI/Project/Dialog/fPassword.Designer.cs new file mode 100644 index 0000000..53ec8a5 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fPassword.Designer.cs @@ -0,0 +1,93 @@ +namespace Project.Dialog +{ + partial class fPassword + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fPassword)); + this.tbInput = new System.Windows.Forms.TextBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.touchKey1 = new arCtl.TouchKey(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // tbInput + // + this.tbInput.Font = new System.Drawing.Font("Calibri", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbInput.Location = new System.Drawing.Point(26, 140); + this.tbInput.Name = "tbInput"; + this.tbInput.PasswordChar = '●'; + this.tbInput.Size = new System.Drawing.Size(235, 40); + this.tbInput.TabIndex = 1; + this.tbInput.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pictureBox1 + // + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(91, 23); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(96, 96); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pictureBox1.TabIndex = 3; + this.pictureBox1.TabStop = false; + // + // touchKey1 + // + this.touchKey1.Location = new System.Drawing.Point(26, 194); + this.touchKey1.Margin = new System.Windows.Forms.Padding(6, 11, 6, 11); + this.touchKey1.Name = "touchKey1"; + this.touchKey1.Size = new System.Drawing.Size(235, 260); + this.touchKey1.TabIndex = 5; + this.touchKey1.keyClick += new arCtl.TouchKey.KeyClickHandler(this.touchKey1_keyClick); + // + // fPassword + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(284, 470); + this.Controls.Add(this.touchKey1); + this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.tbInput); + this.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.KeyPreview = true; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "fPassword"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Enter Password"; + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + public System.Windows.Forms.TextBox tbInput; + private arCtl.TouchKey touchKey1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fPassword.cs b/Cs_HMI/Project/Dialog/fPassword.cs new file mode 100644 index 0000000..8f26597 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fPassword.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fPassword : Form + { + public fPassword() + { + InitializeComponent(); + this.tbInput.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Enter) Confirm(); }; + this.KeyPreview = true; + this.KeyDown += (s1, e1) => { + if (e1.KeyCode == Keys.Escape) this.Close(); + }; + } + + private void Confirm() + { + string id = tbInput.Text.Trim(); + if (id.isEmpty()) + { + tbInput.Focus(); + return; + } + DialogResult = DialogResult.OK; + } + + private void touchKey1_keyClick(string key) + { + if (key == "BACK" || key == "◁") + { + if (!tbInput.Text.isEmpty()) + { + if (tbInput.Text.Length == 1) tbInput.Text = ""; + else tbInput.Text = tbInput.Text.Substring(0, tbInput.Text.Length - 1); + } + //if (tbInput.Text == "") tbInput.Text = "0"; + } + else if (key == "CLEAR" || key == "RESET" || key == "◀") + { + tbInput.Text = "0"; + } + else if (key == "ENTER" || key == "ENT") + { + Confirm(); + } + else + { + if (tbInput.SelectionLength > 0 && tbInput.Text.Length == tbInput.SelectionLength) + { + tbInput.Text = key; + } + else if (tbInput.SelectionLength > 0) + { + //선택된 영역을 대체해준다. + tbInput.SelectedText = key; + } + else tbInput.Text += key; + + } + + tbInput.SelectionLength = 0; + if (!tbInput.Text.isEmpty()) + tbInput.SelectionStart = tbInput.Text.Length; + } + } +} diff --git a/Cs_HMI/Project/Dialog/fPassword.resx b/Cs_HMI/Project/Dialog/fPassword.resx new file mode 100644 index 0000000..f165537 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fPassword.resx @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAb + rwAAG68BXhqRHAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAeoSURBVHhe7Z1r + bBRVFMfr+xHf8RUTHx/UoHwpLDMLLdHtzBSosWoijSZCq9GCRAN+I+oXwgfBqIgYXzF+gMT4KIoRgloM + RhOQLbRSQSyoLZYIhEcpnZ3u0u7u9Zzd0wDT41Z2753O7s4/+aWb3TvnnvPf2bkzd6YzFYECBQoUKFCg + QIECBQrkJ/VPn36tbYZrHFOfHzP1N4ANMUvfAX+7gAPwui8Dvsb3sp9tiJnh1x0rPM+2pkYwBoULNJaO + VldfCYbPdgx9FRjZCaQAUSAYYyd8KW/ZVvjRI5HIFdRdIJSIRC60Db0BTFoPJMg0lSQcS//cMbR67JvS + KD+JhokXw5r+DBiy12WQl3TB5u1pzIXSKn2JadMuixnhF6B43G5zpowHvbapLcTcKM3SFAySjVDsQVfx + PkL7B3OkdEtHcaPqdijw69EF+xPb1NcNztBupfSLW7D3sQiKGnQXWQQMwC9iDpVRfMLdPfg5r2EKKy6g + hqLbdbVnVN1IB0V8UUVHODoQCV1P5flbA6Z+NyTdM7qIoqf7ZG34LirTn4Kj2HszexJ8AaXAAduaeg+V + 6y/h2hEz9CNM0qXGwXhk6h1Utj8E28ib4IjyTybZksSx9D+wZip/fCXq7rwE9pu3cImWOD/5YgoDzH+f + Sa4scMzwO2TD+AgPVLjEygvtCbLDW+FABAn0j06ozLD0vrgVuo1s8U7wzbeyCZUn35It3sg2tceYJMoa + PNtG9qhVZo7H1HvdCXiB83i9OPXBKpFs2yrSfcdFemAgC7zG9/AzbMMt6wH7RX3ocrJJnRxDf5npXC0z + q8RQy8dCDA+LMQVtsC0uw8ZSiaEvJpvUiNb+Y6M6VojzkCGSne3k7v9Xcmd7ZlkupkIOKz2rRnP7XMdq + sMIi2bGdLD13JTvaMjHY2IqwzfBzZJdciSUV50MH3e4OVZJ4cxlZeVrpQwdFYuVyMdg0WziPmBnwNb6H + n7mVWPEKG1sVOE0hKirOI9vkKWZpFtehMmZNF+n+E2RjVqk9uzKGs+0B/Cy1Zze1zird3wfjQTXbXhV4 + QRjZJk8QeLW7I5Uklr5EFmaVjtmwh/Mg2/ZMsE3aidFSWSWWvsi2VchHZJsc0eAbc3WilOFNG8m+rIY+ + Wc224xj6dA0tldVw60a2nUJOSt0ldazww0wnSkn19pB9WcUXNrPtOOKLmmmprFJ/97DtVOLUhB8g+woX + XavJdqSK9OAg2ZeVU1/DtuPA3c8zlXYctp1SDH0F2Ve4INguthOFuMW1yYVbXBvF7CT7ChNeDQDB0q7g + ynGLa5MLt7g2ikmdnDntOrIxf8VMbRYTXCrx+Y0i2dIi0lujQrT/qpT0lmimr3jzXDYXuYRrycb8pfro + N77gKSF2dLJmKQX6jM9vYnOShW3oz5ON+QsG4He54LJIrfuKN8gDkl98yeYkCzgqfptszF8wAH/PBZeF + 2NbOmuMJ23awOUnD0r8jG/MXBNo9KrBEWGM8hMtJIp1kY/6CIPtdQaXCmeIlXE4S6SYb8xcEOe4KKhXO + FC/hcpLIUbIxf0GQU66gUuFM8RIuJ4kkyMb8BUGGXEGlwpkyFonWzaJrbpNo07QMXXMaRXxjK9t2LLic + JCLlC/DVJgjNbwuFxNYJE84C3zu16Qd2mVxwOUlEyibIV4Mwrvlu80fY2/Qku0wuuJwkImEQVjwRx5mS + i2jlJNZ8JDp5MrtMLricJFL4hJzyAzHGlFxEKytZ85HoJJ99ATIOxPBwmg0uCc6UXHTNmcuaj/hvE6St + JBvzF04o8cHlwJmSi8H13/zHIDzFd4OwbWkLyMb8hVOqXHBZcKaMxchuKI4HuNnZ29iUl/kIl5MsYOU1 + yMb8pfqEDGeKl3A5SULOCRkUBPvFFVwanClewuUkie1kX+HCE8xMB1LgTPESLidJvEr2FS6Vl6VwpngJ + l5MMpF6WIiKRSyHoCXcnMsCTIpwxnvDzdjYnCRyT/h+Utql/yHRUMHhakDXHA5Ita9mcCsW29PfINnmy + De0+rrNCic9rHL+T8oqujBgwtCqyTZ7w8nT4FfzFdVgomctS8JfQ1sGbJRPoA/tSZb6yy9NRjqE/y3Ua + cBrH0prJLvkSodBF0InS6ekipxs9IrvUSPXcUDGDWwiySZ3wn9BUjQVFzj68cQnZpFaqJ+iKklrNJHu8 + kWNqa9lEyhFD/4xs8U7BzTqI8bpZBwrnOyAJz/93wEekHGNKHdkxPopZ2mtMYuWBpS8nG8ZPwS3LfKDj + deGrICFlJ218SAc+bILK94ec2upbILFSvGGrm3123aQbqGx/KXvjVl89F0A2vb69ceuIYhHt5piptTPJ + FzeZe2H75F6hYwmfXARJ/ziqiOJlc58VuprKKw6JhoYLbEtfAsnLeBLSeJGEo9zFyub3vRBenASFHHYV + VgwcwmeYURnFreARJj4R3sgICvzNXbCP2G3XavdTuqWp4DFWPpEvHuRmhH8vuwe5cbJrtIk4sQWmePGM + sR7cO8M+qftAI8I1MXO2LftltAHJM4zLF4gRjsLavgxvPFj2a/u56ESk8hrcFTzrcbbZo+xuPBFCBmdO + imTey3521uNsMQaFCxQoUKBAgQIFChQoUCAfqKLiXwYEOVtR8EleAAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fSystem.Designer.cs b/Cs_HMI/Project/Dialog/fSystem.Designer.cs new file mode 100644 index 0000000..3713c64 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fSystem.Designer.cs @@ -0,0 +1,557 @@ +namespace Project.Dialog +{ + partial class fSystem + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbMsg = new arCtl.arLabel(); + this.arLabel4 = new arCtl.arLabel(); + this.arLabel9 = new arCtl.arLabel(); + this.arLabel10 = new arCtl.arLabel(); + this.arLabel1 = new arCtl.arLabel(); + this.arLabel6 = new arCtl.arLabel(); + this.arLabel2 = new arCtl.arLabel(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.arLabel3 = new arCtl.arLabel(); + this.arLabel5 = new arCtl.arLabel(); + this.arLabel7 = new arCtl.arLabel(); + this.SuspendLayout(); + // + // lbMsg + // + this.lbMsg.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.lbMsg.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.lbMsg.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbMsg.BorderColor = System.Drawing.Color.LightSkyBlue; + this.lbMsg.BorderColorOver = System.Drawing.Color.Red; + this.lbMsg.BorderSize = new System.Windows.Forms.Padding(1); + this.lbMsg.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbMsg.Cursor = System.Windows.Forms.Cursors.Hand; + this.lbMsg.Font = new System.Drawing.Font("Consolas", 12F); + this.lbMsg.ForeColor = System.Drawing.Color.White; + this.lbMsg.GradientEnable = true; + this.lbMsg.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lbMsg.GradientRepeatBG = true; + this.lbMsg.isButton = true; + this.lbMsg.Location = new System.Drawing.Point(9, 8); + this.lbMsg.Margin = new System.Windows.Forms.Padding(5); + this.lbMsg.MouseDownColor = System.Drawing.Color.Yellow; + this.lbMsg.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbMsg.msg = null; + this.lbMsg.Name = "lbMsg"; + this.lbMsg.ProgressBorderColor = System.Drawing.Color.Black; + this.lbMsg.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbMsg.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbMsg.ProgressEnable = false; + this.lbMsg.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbMsg.ProgressForeColor = System.Drawing.Color.Black; + this.lbMsg.ProgressMax = 100F; + this.lbMsg.ProgressMin = 0F; + this.lbMsg.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbMsg.ProgressValue = 0F; + this.lbMsg.ShadowColor = System.Drawing.Color.Black; + this.lbMsg.Sign = ""; + this.lbMsg.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbMsg.SignColor = System.Drawing.Color.Yellow; + this.lbMsg.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbMsg.Size = new System.Drawing.Size(165, 100); + this.lbMsg.TabIndex = 2; + this.lbMsg.Text = "폴더열기"; + this.lbMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbMsg.TextShadow = true; + this.lbMsg.TextVisible = true; + this.lbMsg.Click += new System.EventHandler(this.lbMsg_Click); + // + // arLabel4 + // + this.arLabel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel4.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.arLabel4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel4.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel4.BorderColorOver = System.Drawing.Color.Red; + this.arLabel4.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel4.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel4.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel4.ForeColor = System.Drawing.Color.White; + this.arLabel4.GradientEnable = true; + this.arLabel4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel4.GradientRepeatBG = true; + this.arLabel4.isButton = true; + this.arLabel4.Location = new System.Drawing.Point(9, 387); + this.arLabel4.Margin = new System.Windows.Forms.Padding(5); + this.arLabel4.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel4.msg = null; + this.arLabel4.Name = "arLabel4"; + this.arLabel4.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel4.ProgressEnable = false; + this.arLabel4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel4.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel4.ProgressMax = 100F; + this.arLabel4.ProgressMin = 0F; + this.arLabel4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel4.ProgressValue = 0F; + this.arLabel4.ShadowColor = System.Drawing.Color.Black; + this.arLabel4.Sign = ""; + this.arLabel4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel4.SignColor = System.Drawing.Color.Yellow; + this.arLabel4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel4.Size = new System.Drawing.Size(503, 51); + this.arLabel4.TabIndex = 2; + this.arLabel4.Text = "닫기"; + this.arLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel4.TextShadow = true; + this.arLabel4.TextVisible = true; + this.arLabel4.Click += new System.EventHandler(this.arLabel4_Click); + // + // arLabel9 + // + this.arLabel9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel9.BackColor2 = System.Drawing.Color.Red; + this.arLabel9.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel9.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel9.BorderColorOver = System.Drawing.Color.Red; + this.arLabel9.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel9.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel9.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel9.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel9.ForeColor = System.Drawing.Color.White; + this.arLabel9.GradientEnable = true; + this.arLabel9.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel9.GradientRepeatBG = true; + this.arLabel9.isButton = true; + this.arLabel9.Location = new System.Drawing.Point(9, 112); + this.arLabel9.Margin = new System.Windows.Forms.Padding(5); + this.arLabel9.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel9.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel9.msg = null; + this.arLabel9.Name = "arLabel9"; + this.arLabel9.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel9.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel9.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel9.ProgressEnable = false; + this.arLabel9.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel9.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel9.ProgressMax = 100F; + this.arLabel9.ProgressMin = 0F; + this.arLabel9.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel9.ProgressValue = 0F; + this.arLabel9.ShadowColor = System.Drawing.Color.Black; + this.arLabel9.Sign = ""; + this.arLabel9.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel9.SignColor = System.Drawing.Color.Yellow; + this.arLabel9.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel9.Size = new System.Drawing.Size(165, 100); + this.arLabel9.TabIndex = 2; + this.arLabel9.Text = "시스템 종료"; + this.arLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel9.TextShadow = true; + this.arLabel9.TextVisible = true; + this.arLabel9.Click += new System.EventHandler(this.arLabel9_Click); + // + // arLabel10 + // + this.arLabel10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel10.BackColor2 = System.Drawing.Color.DarkBlue; + this.arLabel10.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel10.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel10.BorderColorOver = System.Drawing.Color.Red; + this.arLabel10.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel10.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel10.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel10.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel10.ForeColor = System.Drawing.Color.White; + this.arLabel10.GradientEnable = true; + this.arLabel10.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel10.GradientRepeatBG = true; + this.arLabel10.isButton = true; + this.arLabel10.Location = new System.Drawing.Point(178, 112); + this.arLabel10.Margin = new System.Windows.Forms.Padding(5); + this.arLabel10.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel10.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel10.msg = null; + this.arLabel10.Name = "arLabel10"; + this.arLabel10.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel10.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel10.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel10.ProgressEnable = false; + this.arLabel10.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel10.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel10.ProgressMax = 100F; + this.arLabel10.ProgressMin = 0F; + this.arLabel10.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel10.ProgressValue = 0F; + this.arLabel10.ShadowColor = System.Drawing.Color.Black; + this.arLabel10.Sign = ""; + this.arLabel10.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel10.SignColor = System.Drawing.Color.Yellow; + this.arLabel10.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel10.Size = new System.Drawing.Size(165, 100); + this.arLabel10.TabIndex = 2; + this.arLabel10.Text = "시스템 재시작"; + this.arLabel10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel10.TextShadow = true; + this.arLabel10.TextVisible = true; + this.arLabel10.Click += new System.EventHandler(this.arLabel10_Click); + // + // arLabel1 + // + this.arLabel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.arLabel1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel1.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel1.BorderColorOver = System.Drawing.Color.Red; + this.arLabel1.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel1.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel1.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel1.ForeColor = System.Drawing.Color.White; + this.arLabel1.GradientEnable = true; + this.arLabel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel1.GradientRepeatBG = true; + this.arLabel1.isButton = true; + this.arLabel1.Location = new System.Drawing.Point(347, 8); + this.arLabel1.Margin = new System.Windows.Forms.Padding(5); + this.arLabel1.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel1.msg = null; + this.arLabel1.Name = "arLabel1"; + this.arLabel1.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel1.ProgressEnable = false; + this.arLabel1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel1.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel1.ProgressMax = 100F; + this.arLabel1.ProgressMin = 0F; + this.arLabel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel1.ProgressValue = 0F; + this.arLabel1.ShadowColor = System.Drawing.Color.Black; + this.arLabel1.Sign = ""; + this.arLabel1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel1.SignColor = System.Drawing.Color.Yellow; + this.arLabel1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel1.Size = new System.Drawing.Size(165, 100); + this.arLabel1.TabIndex = 2; + this.arLabel1.Text = "시작메뉴"; + this.arLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel1.TextShadow = true; + this.arLabel1.TextVisible = true; + this.arLabel1.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel6 + // + this.arLabel6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel6.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.arLabel6.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel6.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel6.BorderColorOver = System.Drawing.Color.Red; + this.arLabel6.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel6.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel6.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel6.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel6.ForeColor = System.Drawing.Color.White; + this.arLabel6.GradientEnable = true; + this.arLabel6.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel6.GradientRepeatBG = true; + this.arLabel6.isButton = true; + this.arLabel6.Location = new System.Drawing.Point(178, 8); + this.arLabel6.Margin = new System.Windows.Forms.Padding(5); + this.arLabel6.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel6.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel6.msg = null; + this.arLabel6.Name = "arLabel6"; + this.arLabel6.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel6.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel6.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel6.ProgressEnable = false; + this.arLabel6.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel6.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel6.ProgressMax = 100F; + this.arLabel6.ProgressMin = 0F; + this.arLabel6.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel6.ProgressValue = 0F; + this.arLabel6.ShadowColor = System.Drawing.Color.Black; + this.arLabel6.Sign = ""; + this.arLabel6.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel6.SignColor = System.Drawing.Color.Yellow; + this.arLabel6.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel6.Size = new System.Drawing.Size(165, 100); + this.arLabel6.TabIndex = 2; + this.arLabel6.Text = "작업관리자"; + this.arLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel6.TextShadow = true; + this.arLabel6.TextVisible = true; + this.arLabel6.Click += new System.EventHandler(this.arLabel6_Click); + // + // arLabel2 + // + this.arLabel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel2.BackColor2 = System.Drawing.Color.DarkBlue; + this.arLabel2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel2.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel2.BorderColorOver = System.Drawing.Color.Red; + this.arLabel2.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel2.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel2.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel2.ForeColor = System.Drawing.Color.White; + this.arLabel2.GradientEnable = true; + this.arLabel2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel2.GradientRepeatBG = true; + this.arLabel2.isButton = true; + this.arLabel2.Location = new System.Drawing.Point(347, 112); + this.arLabel2.Margin = new System.Windows.Forms.Padding(5); + this.arLabel2.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel2.msg = null; + this.arLabel2.Name = "arLabel2"; + this.arLabel2.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel2.ProgressEnable = false; + this.arLabel2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel2.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel2.ProgressMax = 100F; + this.arLabel2.ProgressMin = 0F; + this.arLabel2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel2.ProgressValue = 0F; + this.arLabel2.ShadowColor = System.Drawing.Color.Black; + this.arLabel2.Sign = ""; + this.arLabel2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel2.SignColor = System.Drawing.Color.Yellow; + this.arLabel2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel2.Size = new System.Drawing.Size(165, 100); + this.arLabel2.TabIndex = 2; + this.arLabel2.Text = "Process List"; + this.arLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel2.TextShadow = true; + this.arLabel2.TextVisible = true; + this.arLabel2.Click += new System.EventHandler(this.arLabel2_Click); + // + // label1 + // + this.label1.Font = new System.Drawing.Font("맑은 고딕", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label1.ForeColor = System.Drawing.Color.White; + this.label1.Location = new System.Drawing.Point(9, 327); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(515, 23); + this.label1.TabIndex = 3; + this.label1.Text = "label1"; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("맑은 고딕", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label2.ForeColor = System.Drawing.Color.White; + this.label2.Location = new System.Drawing.Point(9, 359); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(515, 23); + this.label2.TabIndex = 3; + this.label2.Text = "label1"; + // + // arLabel3 + // + this.arLabel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel3.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.arLabel3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel3.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel3.BorderColorOver = System.Drawing.Color.Red; + this.arLabel3.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel3.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel3.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel3.ForeColor = System.Drawing.Color.White; + this.arLabel3.GradientEnable = true; + this.arLabel3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel3.GradientRepeatBG = true; + this.arLabel3.isButton = true; + this.arLabel3.Location = new System.Drawing.Point(9, 216); + this.arLabel3.Margin = new System.Windows.Forms.Padding(5); + this.arLabel3.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel3.msg = null; + this.arLabel3.Name = "arLabel3"; + this.arLabel3.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel3.ProgressEnable = false; + this.arLabel3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel3.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel3.ProgressMax = 100F; + this.arLabel3.ProgressMin = 0F; + this.arLabel3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel3.ProgressValue = 0F; + this.arLabel3.ShadowColor = System.Drawing.Color.Black; + this.arLabel3.Sign = ""; + this.arLabel3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel3.SignColor = System.Drawing.Color.Yellow; + this.arLabel3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel3.Size = new System.Drawing.Size(165, 100); + this.arLabel3.TabIndex = 4; + this.arLabel3.Text = "Emulator"; + this.arLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel3.TextShadow = true; + this.arLabel3.TextVisible = true; + this.arLabel3.Click += new System.EventHandler(this.arLabel3_Click); + // + // arLabel5 + // + this.arLabel5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel5.BackColor2 = System.Drawing.Color.Pink; + this.arLabel5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel5.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel5.BorderColorOver = System.Drawing.Color.Red; + this.arLabel5.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel5.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel5.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel5.ForeColor = System.Drawing.Color.White; + this.arLabel5.GradientEnable = true; + this.arLabel5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel5.GradientRepeatBG = true; + this.arLabel5.isButton = true; + this.arLabel5.Location = new System.Drawing.Point(178, 216); + this.arLabel5.Margin = new System.Windows.Forms.Padding(5); + this.arLabel5.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel5.msg = null; + this.arLabel5.Name = "arLabel5"; + this.arLabel5.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel5.ProgressEnable = false; + this.arLabel5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel5.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel5.ProgressMax = 100F; + this.arLabel5.ProgressMin = 0F; + this.arLabel5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel5.ProgressValue = 0F; + this.arLabel5.ShadowColor = System.Drawing.Color.Black; + this.arLabel5.Sign = ""; + this.arLabel5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel5.SignColor = System.Drawing.Color.Yellow; + this.arLabel5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel5.Size = new System.Drawing.Size(165, 100); + this.arLabel5.TabIndex = 5; + this.arLabel5.Text = "패치파일 생성"; + this.arLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel5.TextShadow = true; + this.arLabel5.TextVisible = true; + this.arLabel5.Click += new System.EventHandler(this.arLabel5_Click); + // + // arLabel7 + // + this.arLabel7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(72)))), ((int)(((byte)(72)))), ((int)(((byte)(72))))); + this.arLabel7.BackColor2 = System.Drawing.Color.DarkBlue; + this.arLabel7.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel7.BorderColor = System.Drawing.Color.LightSkyBlue; + this.arLabel7.BorderColorOver = System.Drawing.Color.Red; + this.arLabel7.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel7.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel7.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel7.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel7.ForeColor = System.Drawing.Color.White; + this.arLabel7.GradientEnable = true; + this.arLabel7.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel7.GradientRepeatBG = true; + this.arLabel7.isButton = true; + this.arLabel7.Location = new System.Drawing.Point(347, 216); + this.arLabel7.Margin = new System.Windows.Forms.Padding(5); + this.arLabel7.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel7.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel7.msg = null; + this.arLabel7.Name = "arLabel7"; + this.arLabel7.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel7.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel7.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel7.ProgressEnable = false; + this.arLabel7.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel7.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel7.ProgressMax = 100F; + this.arLabel7.ProgressMin = 0F; + this.arLabel7.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel7.ProgressValue = 0F; + this.arLabel7.ShadowColor = System.Drawing.Color.Black; + this.arLabel7.Sign = ""; + this.arLabel7.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel7.SignColor = System.Drawing.Color.Yellow; + this.arLabel7.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel7.Size = new System.Drawing.Size(165, 100); + this.arLabel7.TabIndex = 6; + this.arLabel7.Text = "자동 재시작"; + this.arLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel7.TextShadow = true; + this.arLabel7.TextVisible = true; + this.arLabel7.Click += new System.EventHandler(this.arLabel7_Click); + // + // fSystem + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.ClientSize = new System.Drawing.Size(519, 451); + this.Controls.Add(this.arLabel7); + this.Controls.Add(this.arLabel5); + this.Controls.Add(this.arLabel3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.arLabel4); + this.Controls.Add(this.lbMsg); + this.Controls.Add(this.arLabel9); + this.Controls.Add(this.arLabel10); + this.Controls.Add(this.arLabel1); + this.Controls.Add(this.arLabel2); + this.Controls.Add(this.arLabel6); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "fSystem"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "fSystem"; + this.Load += new System.EventHandler(this.fSystem_Load); + this.ResumeLayout(false); + + } + + #endregion + private arCtl.arLabel lbMsg; + private arCtl.arLabel arLabel4; + private arCtl.arLabel arLabel6; + private arCtl.arLabel arLabel9; + private arCtl.arLabel arLabel10; + private arCtl.arLabel arLabel1; + private arCtl.arLabel arLabel2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private arCtl.arLabel arLabel3; + private arCtl.arLabel arLabel5; + private arCtl.arLabel arLabel7; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fSystem.cs b/Cs_HMI/Project/Dialog/fSystem.cs new file mode 100644 index 0000000..df01d81 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fSystem.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fSystem : Form + { + public bool shutdown = false; + public fSystem() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + Util.RunProcess(@"c:\windows\system32\shutdown.exe", "-r -t 5"); + } + + private void button2_Click(object sender, EventArgs e) + { + Util.RunProcess(@"c:\windows\system32\shutdown.exe", "-s -t 5"); + } + + private void button3_Click(object sender, EventArgs e) + { + + } + + private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e) + { + + } + + private void lbMsg_Click(object sender, EventArgs e) + { + string path = AppDomain.CurrentDomain.BaseDirectory; + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo("explorer") + { + Arguments = path + }; + prc.StartInfo = si; + prc.Start(); + } + + private void arLabel1_Click(object sender, EventArgs e) + { + SendKeys.Send("^{ESC}"); + } + + private void arLabel6_Click(object sender, EventArgs e) + { + SendKeys.Send("^+{ESC}"); + } + + private void arLabel9_Click(object sender, EventArgs e) + { + shutdown = true; + Util.SystemShutdown(10); + this.Close(); + + } + + private void arLabel10_Click(object sender, EventArgs e) + { + shutdown = true; + Util.SystemReboot(10); + this.Close(); + } + + private void arLabel4_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void arLabel2_Click(object sender, EventArgs e) + { + System.Text.StringBuilder sb = new StringBuilder(); + + sb.AppendLine("Current : " + System.Diagnostics.Process.GetCurrentProcess().ProcessName); + + foreach (var prc in System.Diagnostics.Process.GetProcesses()) + { + if (prc.ProcessName.StartsWith("svchost")) continue; + sb.Append(" " + prc.ProcessName); + } + Util.MsgI(sb.ToString(),true); + } + + private void fSystem_Load(object sender, EventArgs e) + { + this.label1.Text = "Patch Version " + PUB.PatchVersion; + this.label2.Text = "HMI Version " + Application.ProductVersion.ToString(); + } + + private void arLabel3_Click(object sender, EventArgs e) + { + var file = System.IO.Path.Combine( Util.CurrentPath, "Emulator.exe"); + if(System.IO.File.Exists(file)==false) + { + Util.MsgE("에물레이터 실행 파일이 없습니다", true); + return; + } + + Util.RunProcess(file); + } + + private void arLabel5_Click(object sender, EventArgs e) + { + //현재 폴더에서 dll 과, amkor.exe 파일을 압축한다 + var path = new System.IO.DirectoryInfo( AppDomain.CurrentDomain.BaseDirectory); + var files_dll = path.GetFiles("*.dll"); + var file_exe = System.IO.Path.Combine(path.FullName, "amkor.exe"); + if(System.IO.File.Exists(file_exe)==false) + { + Util.MsgE("실행파일 amkor.exe 가 없습니다."); + return; + } + var zipfile = new Ionic.Zip.ZipFile(); + zipfile.AddFile(file_exe,"/"); + foreach (var filedll in files_dll) + zipfile.AddFile(filedll.FullName,"/"); + + var veri = Application.ProductVersion.Split('.'); + var newfilename = "Patch_AGV_" + veri[0] + veri[1]+ veri[2] + "_" + + veri[3] + ".zip"; + zipfile.Save(newfilename); + + Util.MsgI("다음 패치 파일이 생성됨\n" + newfilename); + } + + private void arLabel7_Click(object sender, EventArgs e) + { + Util.SystemReboot(5,true); + } + } +} diff --git a/Cs_HMI/Project/Dialog/fSystem.resx b/Cs_HMI/Project/Dialog/fSystem.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/Project/Dialog/fSystem.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fTouchKey.Designer.cs b/Cs_HMI/Project/Dialog/fTouchKey.Designer.cs new file mode 100644 index 0000000..bc8a913 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchKey.Designer.cs @@ -0,0 +1,60 @@ +namespace Project.Dialog +{ + partial class fTouchKey + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.touchKeyCalc1 = new arCtl.TouchKeyCalc(); + this.SuspendLayout(); + // + // touchKeyCalc1 + // + this.touchKeyCalc1.Dock = System.Windows.Forms.DockStyle.Fill; + this.touchKeyCalc1.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.touchKeyCalc1.Location = new System.Drawing.Point(0, 0); + this.touchKeyCalc1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.touchKeyCalc1.Name = "touchKeyCalc1"; + this.touchKeyCalc1.Size = new System.Drawing.Size(374, 330); + this.touchKeyCalc1.TabIndex = 0; + // + // fTouchKey + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(374, 330); + this.Controls.Add(this.touchKeyCalc1); + this.Name = "fTouchKey"; + this.Text = "fTouchKey"; + this.ResumeLayout(false); + + } + + #endregion + + private arCtl.TouchKeyCalc touchKeyCalc1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fTouchKey.cs b/Cs_HMI/Project/Dialog/fTouchKey.cs new file mode 100644 index 0000000..050b630 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchKey.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fTouchKey : Form + { + public fTouchKey() + { + InitializeComponent(); + } + } +} diff --git a/Cs_HMI/Project/Dialog/fTouchKey.resx b/Cs_HMI/Project/Dialog/fTouchKey.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchKey.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fTouchKeyFull.Designer.cs b/Cs_HMI/Project/Dialog/fTouchKeyFull.Designer.cs new file mode 100644 index 0000000..d853398 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchKeyFull.Designer.cs @@ -0,0 +1,147 @@ +namespace Project.Dialog +{ + partial class fTouchKeyFull + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.touchKeyFull1 = new arCtl.TouchKeyFull(); + this.tbInput = new System.Windows.Forms.TextBox(); + this.lbTitle = new arCtl.arLabel(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // touchKeyFull1 + // + this.touchKeyFull1.Dock = System.Windows.Forms.DockStyle.Fill; + this.touchKeyFull1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.touchKeyFull1.Location = new System.Drawing.Point(6, 95); + this.touchKeyFull1.Name = "touchKeyFull1"; + this.touchKeyFull1.Size = new System.Drawing.Size(788, 230); + this.touchKeyFull1.TabIndex = 0; + this.touchKeyFull1.keyClick += new arCtl.TouchKeyFull.KeyClickHandler(this.touchKeyFull1_keyClick); + // + // tbInput + // + this.tbInput.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.tbInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbInput.Dock = System.Windows.Forms.DockStyle.Top; + this.tbInput.Font = new System.Drawing.Font("맑은 고딕", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.tbInput.ForeColor = System.Drawing.Color.White; + this.tbInput.Location = new System.Drawing.Point(6, 49); + this.tbInput.Name = "tbInput"; + this.tbInput.Size = new System.Drawing.Size(788, 46); + this.tbInput.TabIndex = 0; + this.tbInput.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // lbTitle + // + this.lbTitle.BackColor = System.Drawing.Color.Gray; + this.lbTitle.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lbTitle.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbTitle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderColorOver = System.Drawing.Color.DarkBlue; + this.lbTitle.BorderSize = new System.Windows.Forms.Padding(1); + this.lbTitle.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbTitle.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.lbTitle.Enabled = false; + this.lbTitle.Enabled = true; + this.lbTitle.Font = new System.Drawing.Font("Consolas", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbTitle.ForeColor = System.Drawing.Color.White; + this.lbTitle.GradientEnable = true; + this.lbTitle.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbTitle.GradientRepeatBG = false; + this.lbTitle.isButton = false; + this.lbTitle.Location = new System.Drawing.Point(6, 5); + this.lbTitle.MouseDownColor = System.Drawing.Color.Yellow; + this.lbTitle.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbTitle.msg = null; + this.lbTitle.Name = "lbTitle"; + this.lbTitle.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbTitle.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbTitle.ProgressEnable = false; + this.lbTitle.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbTitle.ProgressForeColor = System.Drawing.Color.Black; + this.lbTitle.ProgressMax = 100F; + this.lbTitle.ProgressMin = 0F; + this.lbTitle.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbTitle.ProgressValue = 0F; + this.lbTitle.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbTitle.Sign = ""; + this.lbTitle.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbTitle.SignColor = System.Drawing.Color.Yellow; + this.lbTitle.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbTitle.Size = new System.Drawing.Size(788, 44); + this.lbTitle.TabIndex = 2; + this.lbTitle.Text = "INPUT"; + this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbTitle.TextShadow = true; + this.lbTitle.TextVisible = true; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button1.Location = new System.Drawing.Point(728, 11); + this.button1.Margin = new System.Windows.Forms.Padding(0); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(60, 34); + this.button1.TabIndex = 3; + this.button1.Text = "CLOSE"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // fTouchKeyFull + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.ClientSize = new System.Drawing.Size(800, 330); + this.Controls.Add(this.button1); + this.Controls.Add(this.touchKeyFull1); + this.Controls.Add(this.tbInput); + this.Controls.Add(this.lbTitle); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "fTouchKeyFull"; + this.Padding = new System.Windows.Forms.Padding(6, 5, 6, 5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "fTouchKeyFull"; + this.Load += new System.EventHandler(this.fTouchKeyFull_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private arCtl.TouchKeyFull touchKeyFull1; + private arCtl.arLabel lbTitle; + public System.Windows.Forms.TextBox tbInput; + private System.Windows.Forms.Button button1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fTouchKeyFull.cs b/Cs_HMI/Project/Dialog/fTouchKeyFull.cs new file mode 100644 index 0000000..fa918b3 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchKeyFull.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fTouchKeyFull : Form + { + public fTouchKeyFull(string title,string value) + { + InitializeComponent(); + this.lbTitle.Text = title; + this.tbInput.Text = value; + this.KeyDown += (s1, e1) => + { + if (e1.KeyCode == Keys.Escape) + this.Close(); + }; + this.lbTitle.MouseMove += LbTitle_MouseMove; + this.lbTitle.MouseUp += LbTitle_MouseUp; + this.lbTitle.MouseDown += LbTitle_MouseDown; + } + + private void fTouchKeyFull_Load(object sender, EventArgs e) + { + this.Show(); + Application.DoEvents(); + this.tbInput.SelectAll(); + this.tbInput.Focus(); + } + #region "Mouse Form Move" + + private Boolean fMove = false; + private Point MDownPos; + private void LbTitle_MouseMove(object sender, MouseEventArgs e) + { + if (fMove) + { + Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y); + this.Left += offset.X; + this.Top += offset.Y; + offset = new Point(0, 0); + } + } + private void LbTitle_MouseUp(object sender, MouseEventArgs e) + { + fMove = false; + } + private void LbTitle_MouseDown(object sender, MouseEventArgs e) + { + MDownPos = new Point(e.X, e.Y); + fMove = true; + } + + #endregion + + private void touchKeyFull1_keyClick(string key) + { + var seltext = tbInput.SelectedText; + switch(key) + { + + case "CLR": + this.tbInput.Text = string.Empty; + break; + case "BACK": + if (this.tbInput.TextLength < 2) this.tbInput.Text = string.Empty; + else this.tbInput.Text = this.tbInput.Text.Substring(0,tbInput.TextLength-1); + this.tbInput.SelectionStart = this.tbInput.TextLength; + break; + case "ENTER": + this.DialogResult = DialogResult.OK; + break; + case "SPACE": + if (seltext.Length == tbInput.TextLength) tbInput.Text = ""; + this.tbInput.Text += " "; + this.tbInput.SelectionStart = this.tbInput.TextLength; + break; + default: + + if (seltext.Length == tbInput.TextLength) tbInput.Text = ""; + this.tbInput.Text += key; + this.tbInput.SelectionStart = this.tbInput.TextLength; + break; + } + } + + private void button1_Click(object sender, EventArgs e) + { + this.Close(); + } + + } +} diff --git a/Cs_HMI/Project/Dialog/fTouchKeyFull.resx b/Cs_HMI/Project/Dialog/fTouchKeyFull.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchKeyFull.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fTouchNumDot.Designer.cs b/Cs_HMI/Project/Dialog/fTouchNumDot.Designer.cs new file mode 100644 index 0000000..1b2131a --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchNumDot.Designer.cs @@ -0,0 +1,835 @@ +namespace Project.Dialog +{ + partial class fTouchNumDot + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.arLabel1 = new arCtl.arLabel(); + this.arLabel2 = new arCtl.arLabel(); + this.arLabel3 = new arCtl.arLabel(); + this.arLabel4 = new arCtl.arLabel(); + this.arLabel5 = new arCtl.arLabel(); + this.arLabel6 = new arCtl.arLabel(); + this.arLabel7 = new arCtl.arLabel(); + this.arLabel8 = new arCtl.arLabel(); + this.arLabel9 = new arCtl.arLabel(); + this.arLabel11 = new arCtl.arLabel(); + this.arLabel12 = new arCtl.arLabel(); + this.arLabel13 = new arCtl.arLabel(); + this.arLabel14 = new arCtl.arLabel(); + this.arLabel15 = new arCtl.arLabel(); + this.arLabel10 = new arCtl.arLabel(); + this.tbInput = new System.Windows.Forms.TextBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 4; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.Controls.Add(this.arLabel1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.arLabel2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.arLabel3, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.arLabel4, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.arLabel5, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.arLabel6, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.arLabel7, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.arLabel8, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.arLabel9, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.arLabel11, 1, 3); + this.tableLayoutPanel1.Controls.Add(this.arLabel12, 3, 0); + this.tableLayoutPanel1.Controls.Add(this.arLabel13, 2, 3); + this.tableLayoutPanel1.Controls.Add(this.arLabel14, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.arLabel15, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.arLabel10, 3, 2); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(5, 50); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(324, 265); + this.tableLayoutPanel1.TabIndex = 1; + // + // arLabel1 + // + this.arLabel1.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel1.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel1.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel1.BorderColorOver = System.Drawing.Color.Red; + this.arLabel1.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel1.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel1.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel1.ForeColor = System.Drawing.Color.White; + this.arLabel1.GradientEnable = false; + this.arLabel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel1.GradientRepeatBG = false; + this.arLabel1.isButton = true; + this.arLabel1.Location = new System.Drawing.Point(0, 0); + this.arLabel1.Margin = new System.Windows.Forms.Padding(0); + this.arLabel1.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel1.msg = null; + this.arLabel1.Name = "arLabel1"; + this.arLabel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel1.ProgressEnable = false; + this.arLabel1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel1.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel1.ProgressMax = 100F; + this.arLabel1.ProgressMin = 0F; + this.arLabel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel1.ProgressValue = 0F; + this.arLabel1.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel1.Sign = ""; + this.arLabel1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel1.SignColor = System.Drawing.Color.Yellow; + this.arLabel1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel1.Size = new System.Drawing.Size(81, 66); + this.arLabel1.TabIndex = 0; + this.arLabel1.Tag = "1"; + this.arLabel1.Text = "1"; + this.arLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel1.TextShadow = false; + this.arLabel1.TextVisible = true; + this.arLabel1.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel2 + // + this.arLabel2.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel2.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel2.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel2.BorderColorOver = System.Drawing.Color.Red; + this.arLabel2.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel2.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel2.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel2.ForeColor = System.Drawing.Color.White; + this.arLabel2.GradientEnable = false; + this.arLabel2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel2.GradientRepeatBG = false; + this.arLabel2.isButton = true; + this.arLabel2.Location = new System.Drawing.Point(81, 0); + this.arLabel2.Margin = new System.Windows.Forms.Padding(0); + this.arLabel2.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel2.msg = null; + this.arLabel2.Name = "arLabel2"; + this.arLabel2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel2.ProgressEnable = false; + this.arLabel2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel2.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel2.ProgressMax = 100F; + this.arLabel2.ProgressMin = 0F; + this.arLabel2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel2.ProgressValue = 0F; + this.arLabel2.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel2.Sign = ""; + this.arLabel2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel2.SignColor = System.Drawing.Color.Yellow; + this.arLabel2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel2.Size = new System.Drawing.Size(81, 66); + this.arLabel2.TabIndex = 0; + this.arLabel2.Tag = "2"; + this.arLabel2.Text = "2"; + this.arLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel2.TextShadow = false; + this.arLabel2.TextVisible = true; + this.arLabel2.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel3 + // + this.arLabel3.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel3.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel3.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel3.BorderColorOver = System.Drawing.Color.Red; + this.arLabel3.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel3.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel3.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel3.ForeColor = System.Drawing.Color.White; + this.arLabel3.GradientEnable = false; + this.arLabel3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel3.GradientRepeatBG = false; + this.arLabel3.isButton = true; + this.arLabel3.Location = new System.Drawing.Point(162, 0); + this.arLabel3.Margin = new System.Windows.Forms.Padding(0); + this.arLabel3.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel3.msg = null; + this.arLabel3.Name = "arLabel3"; + this.arLabel3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel3.ProgressEnable = false; + this.arLabel3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel3.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel3.ProgressMax = 100F; + this.arLabel3.ProgressMin = 0F; + this.arLabel3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel3.ProgressValue = 0F; + this.arLabel3.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel3.Sign = ""; + this.arLabel3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel3.SignColor = System.Drawing.Color.Yellow; + this.arLabel3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel3.Size = new System.Drawing.Size(81, 66); + this.arLabel3.TabIndex = 0; + this.arLabel3.Tag = "3"; + this.arLabel3.Text = "3"; + this.arLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel3.TextShadow = false; + this.arLabel3.TextVisible = true; + this.arLabel3.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel4 + // + this.arLabel4.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel4.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel4.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel4.BorderColorOver = System.Drawing.Color.Red; + this.arLabel4.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel4.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel4.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel4.ForeColor = System.Drawing.Color.White; + this.arLabel4.GradientEnable = false; + this.arLabel4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel4.GradientRepeatBG = false; + this.arLabel4.isButton = true; + this.arLabel4.Location = new System.Drawing.Point(162, 66); + this.arLabel4.Margin = new System.Windows.Forms.Padding(0); + this.arLabel4.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel4.msg = null; + this.arLabel4.Name = "arLabel4"; + this.arLabel4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel4.ProgressEnable = false; + this.arLabel4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel4.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel4.ProgressMax = 100F; + this.arLabel4.ProgressMin = 0F; + this.arLabel4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel4.ProgressValue = 0F; + this.arLabel4.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel4.Sign = ""; + this.arLabel4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel4.SignColor = System.Drawing.Color.Yellow; + this.arLabel4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel4.Size = new System.Drawing.Size(81, 66); + this.arLabel4.TabIndex = 0; + this.arLabel4.Tag = "6"; + this.arLabel4.Text = "6"; + this.arLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel4.TextShadow = false; + this.arLabel4.TextVisible = true; + this.arLabel4.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel5 + // + this.arLabel5.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel5.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel5.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel5.BorderColorOver = System.Drawing.Color.Red; + this.arLabel5.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel5.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel5.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel5.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel5.ForeColor = System.Drawing.Color.White; + this.arLabel5.GradientEnable = false; + this.arLabel5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel5.GradientRepeatBG = false; + this.arLabel5.isButton = true; + this.arLabel5.Location = new System.Drawing.Point(81, 66); + this.arLabel5.Margin = new System.Windows.Forms.Padding(0); + this.arLabel5.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel5.msg = null; + this.arLabel5.Name = "arLabel5"; + this.arLabel5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel5.ProgressEnable = false; + this.arLabel5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel5.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel5.ProgressMax = 100F; + this.arLabel5.ProgressMin = 0F; + this.arLabel5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel5.ProgressValue = 0F; + this.arLabel5.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel5.Sign = ""; + this.arLabel5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel5.SignColor = System.Drawing.Color.Yellow; + this.arLabel5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel5.Size = new System.Drawing.Size(81, 66); + this.arLabel5.TabIndex = 0; + this.arLabel5.Tag = "5"; + this.arLabel5.Text = "5"; + this.arLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel5.TextShadow = false; + this.arLabel5.TextVisible = true; + this.arLabel5.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel6 + // + this.arLabel6.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel6.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel6.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel6.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel6.BorderColorOver = System.Drawing.Color.Red; + this.arLabel6.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel6.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel6.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel6.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel6.ForeColor = System.Drawing.Color.White; + this.arLabel6.GradientEnable = false; + this.arLabel6.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel6.GradientRepeatBG = false; + this.arLabel6.isButton = true; + this.arLabel6.Location = new System.Drawing.Point(0, 66); + this.arLabel6.Margin = new System.Windows.Forms.Padding(0); + this.arLabel6.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel6.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel6.msg = null; + this.arLabel6.Name = "arLabel6"; + this.arLabel6.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel6.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel6.ProgressEnable = false; + this.arLabel6.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel6.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel6.ProgressMax = 100F; + this.arLabel6.ProgressMin = 0F; + this.arLabel6.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel6.ProgressValue = 0F; + this.arLabel6.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel6.Sign = ""; + this.arLabel6.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel6.SignColor = System.Drawing.Color.Yellow; + this.arLabel6.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel6.Size = new System.Drawing.Size(81, 66); + this.arLabel6.TabIndex = 0; + this.arLabel6.Tag = "4"; + this.arLabel6.Text = "4"; + this.arLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel6.TextShadow = false; + this.arLabel6.TextVisible = true; + this.arLabel6.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel7 + // + this.arLabel7.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel7.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel7.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel7.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel7.BorderColorOver = System.Drawing.Color.Red; + this.arLabel7.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel7.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel7.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel7.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel7.ForeColor = System.Drawing.Color.White; + this.arLabel7.GradientEnable = false; + this.arLabel7.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel7.GradientRepeatBG = false; + this.arLabel7.isButton = true; + this.arLabel7.Location = new System.Drawing.Point(0, 132); + this.arLabel7.Margin = new System.Windows.Forms.Padding(0); + this.arLabel7.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel7.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel7.msg = null; + this.arLabel7.Name = "arLabel7"; + this.arLabel7.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel7.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel7.ProgressEnable = false; + this.arLabel7.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel7.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel7.ProgressMax = 100F; + this.arLabel7.ProgressMin = 0F; + this.arLabel7.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel7.ProgressValue = 0F; + this.arLabel7.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel7.Sign = ""; + this.arLabel7.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel7.SignColor = System.Drawing.Color.Yellow; + this.arLabel7.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel7.Size = new System.Drawing.Size(81, 66); + this.arLabel7.TabIndex = 0; + this.arLabel7.Tag = "7"; + this.arLabel7.Text = "7"; + this.arLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel7.TextShadow = false; + this.arLabel7.TextVisible = true; + this.arLabel7.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel8 + // + this.arLabel8.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel8.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel8.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel8.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel8.BorderColorOver = System.Drawing.Color.Red; + this.arLabel8.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel8.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel8.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel8.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel8.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel8.ForeColor = System.Drawing.Color.White; + this.arLabel8.GradientEnable = false; + this.arLabel8.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel8.GradientRepeatBG = false; + this.arLabel8.isButton = true; + this.arLabel8.Location = new System.Drawing.Point(81, 132); + this.arLabel8.Margin = new System.Windows.Forms.Padding(0); + this.arLabel8.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel8.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel8.msg = null; + this.arLabel8.Name = "arLabel8"; + this.arLabel8.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel8.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel8.ProgressEnable = false; + this.arLabel8.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel8.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel8.ProgressMax = 100F; + this.arLabel8.ProgressMin = 0F; + this.arLabel8.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel8.ProgressValue = 0F; + this.arLabel8.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel8.Sign = ""; + this.arLabel8.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel8.SignColor = System.Drawing.Color.Yellow; + this.arLabel8.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel8.Size = new System.Drawing.Size(81, 66); + this.arLabel8.TabIndex = 0; + this.arLabel8.Tag = "8"; + this.arLabel8.Text = "8"; + this.arLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel8.TextShadow = false; + this.arLabel8.TextVisible = true; + this.arLabel8.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel9 + // + this.arLabel9.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel9.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel9.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel9.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel9.BorderColorOver = System.Drawing.Color.Red; + this.arLabel9.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel9.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel9.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel9.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel9.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel9.ForeColor = System.Drawing.Color.White; + this.arLabel9.GradientEnable = false; + this.arLabel9.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel9.GradientRepeatBG = false; + this.arLabel9.isButton = true; + this.arLabel9.Location = new System.Drawing.Point(162, 132); + this.arLabel9.Margin = new System.Windows.Forms.Padding(0); + this.arLabel9.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel9.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel9.msg = null; + this.arLabel9.Name = "arLabel9"; + this.arLabel9.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel9.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel9.ProgressEnable = false; + this.arLabel9.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel9.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel9.ProgressMax = 100F; + this.arLabel9.ProgressMin = 0F; + this.arLabel9.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel9.ProgressValue = 0F; + this.arLabel9.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel9.Sign = ""; + this.arLabel9.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel9.SignColor = System.Drawing.Color.Yellow; + this.arLabel9.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel9.Size = new System.Drawing.Size(81, 66); + this.arLabel9.TabIndex = 0; + this.arLabel9.Tag = "9"; + this.arLabel9.Text = "9"; + this.arLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel9.TextShadow = false; + this.arLabel9.TextVisible = true; + this.arLabel9.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel11 + // + this.arLabel11.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel11.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel11.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel11.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel11.BorderColorOver = System.Drawing.Color.Red; + this.arLabel11.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel11.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel11.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel11.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel11.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel11.ForeColor = System.Drawing.Color.White; + this.arLabel11.GradientEnable = false; + this.arLabel11.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel11.GradientRepeatBG = false; + this.arLabel11.isButton = true; + this.arLabel11.Location = new System.Drawing.Point(81, 198); + this.arLabel11.Margin = new System.Windows.Forms.Padding(0); + this.arLabel11.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel11.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel11.msg = null; + this.arLabel11.Name = "arLabel11"; + this.arLabel11.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel11.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel11.ProgressEnable = false; + this.arLabel11.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel11.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel11.ProgressMax = 100F; + this.arLabel11.ProgressMin = 0F; + this.arLabel11.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel11.ProgressValue = 0F; + this.arLabel11.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel11.Sign = ""; + this.arLabel11.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel11.SignColor = System.Drawing.Color.Yellow; + this.arLabel11.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel11.Size = new System.Drawing.Size(81, 67); + this.arLabel11.TabIndex = 0; + this.arLabel11.Tag = "0"; + this.arLabel11.Text = "0"; + this.arLabel11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel11.TextShadow = false; + this.arLabel11.TextVisible = true; + this.arLabel11.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel12 + // + this.arLabel12.BackColor = System.Drawing.Color.Gray; + this.arLabel12.BackColor2 = System.Drawing.Color.Gold; + this.arLabel12.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel12.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel12.BorderColorOver = System.Drawing.Color.Red; + this.arLabel12.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel12.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel12.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel12.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel12.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel12.ForeColor = System.Drawing.Color.White; + this.arLabel12.GradientEnable = true; + this.arLabel12.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel12.GradientRepeatBG = false; + this.arLabel12.isButton = true; + this.arLabel12.Location = new System.Drawing.Point(243, 0); + this.arLabel12.Margin = new System.Windows.Forms.Padding(0); + this.arLabel12.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel12.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel12.msg = null; + this.arLabel12.Name = "arLabel12"; + this.arLabel12.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel12.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel12.ProgressEnable = false; + this.arLabel12.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel12.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel12.ProgressMax = 100F; + this.arLabel12.ProgressMin = 0F; + this.arLabel12.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel12.ProgressValue = 0F; + this.arLabel12.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel12.Sign = ""; + this.arLabel12.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel12.SignColor = System.Drawing.Color.Yellow; + this.arLabel12.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel12.Size = new System.Drawing.Size(81, 66); + this.arLabel12.TabIndex = 0; + this.arLabel12.Tag = "B"; + this.arLabel12.Text = "BACK"; + this.arLabel12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel12.TextShadow = false; + this.arLabel12.TextVisible = true; + this.arLabel12.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel13 + // + this.arLabel13.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel13.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel13.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel13.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel13.BorderColorOver = System.Drawing.Color.Red; + this.arLabel13.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel13.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel13.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel13.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel13.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel13.ForeColor = System.Drawing.Color.White; + this.arLabel13.GradientEnable = false; + this.arLabel13.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel13.GradientRepeatBG = false; + this.arLabel13.isButton = true; + this.arLabel13.Location = new System.Drawing.Point(162, 198); + this.arLabel13.Margin = new System.Windows.Forms.Padding(0); + this.arLabel13.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel13.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel13.msg = null; + this.arLabel13.Name = "arLabel13"; + this.arLabel13.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel13.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel13.ProgressEnable = false; + this.arLabel13.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel13.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel13.ProgressMax = 100F; + this.arLabel13.ProgressMin = 0F; + this.arLabel13.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel13.ProgressValue = 0F; + this.arLabel13.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel13.Sign = ""; + this.arLabel13.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel13.SignColor = System.Drawing.Color.Yellow; + this.arLabel13.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel13.Size = new System.Drawing.Size(81, 67); + this.arLabel13.TabIndex = 0; + this.arLabel13.Tag = "."; + this.arLabel13.Text = "."; + this.arLabel13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel13.TextShadow = false; + this.arLabel13.TextVisible = true; + this.arLabel13.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel14 + // + this.arLabel14.BackColor = System.Drawing.Color.SkyBlue; + this.arLabel14.BackColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel14.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel14.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel14.BorderColorOver = System.Drawing.Color.Red; + this.arLabel14.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel14.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel14.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel14.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel14.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel14.ForeColor = System.Drawing.Color.White; + this.arLabel14.GradientEnable = false; + this.arLabel14.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel14.GradientRepeatBG = false; + this.arLabel14.isButton = true; + this.arLabel14.Location = new System.Drawing.Point(0, 198); + this.arLabel14.Margin = new System.Windows.Forms.Padding(0); + this.arLabel14.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel14.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel14.msg = null; + this.arLabel14.Name = "arLabel14"; + this.arLabel14.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel14.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel14.ProgressEnable = false; + this.arLabel14.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel14.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel14.ProgressMax = 100F; + this.arLabel14.ProgressMin = 0F; + this.arLabel14.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel14.ProgressValue = 0F; + this.arLabel14.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel14.Sign = ""; + this.arLabel14.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel14.SignColor = System.Drawing.Color.Yellow; + this.arLabel14.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel14.Size = new System.Drawing.Size(81, 67); + this.arLabel14.TabIndex = 0; + this.arLabel14.Tag = "-"; + this.arLabel14.Text = "-"; + this.arLabel14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel14.TextShadow = false; + this.arLabel14.TextVisible = true; + this.arLabel14.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel15 + // + this.arLabel15.BackColor = System.Drawing.Color.Gray; + this.arLabel15.BackColor2 = System.Drawing.Color.SteelBlue; + this.arLabel15.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel15.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel15.BorderColorOver = System.Drawing.Color.Red; + this.arLabel15.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel15.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel15.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel15.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel15.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel15.ForeColor = System.Drawing.Color.White; + this.arLabel15.GradientEnable = true; + this.arLabel15.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel15.GradientRepeatBG = false; + this.arLabel15.isButton = true; + this.arLabel15.Location = new System.Drawing.Point(243, 66); + this.arLabel15.Margin = new System.Windows.Forms.Padding(0); + this.arLabel15.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel15.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel15.msg = null; + this.arLabel15.Name = "arLabel15"; + this.arLabel15.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel15.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel15.ProgressEnable = false; + this.arLabel15.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel15.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel15.ProgressMax = 100F; + this.arLabel15.ProgressMin = 0F; + this.arLabel15.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel15.ProgressValue = 0F; + this.arLabel15.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel15.Sign = ""; + this.arLabel15.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel15.SignColor = System.Drawing.Color.Yellow; + this.arLabel15.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel15.Size = new System.Drawing.Size(81, 66); + this.arLabel15.TabIndex = 0; + this.arLabel15.Tag = "C"; + this.arLabel15.Text = "CLEAR"; + this.arLabel15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel15.TextShadow = false; + this.arLabel15.TextVisible = true; + this.arLabel15.Click += new System.EventHandler(this.arLabel1_Click); + // + // arLabel10 + // + this.arLabel10.BackColor = System.Drawing.Color.CadetBlue; + this.arLabel10.BackColor2 = System.Drawing.Color.Lime; + this.arLabel10.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel10.BorderColor = System.Drawing.Color.SteelBlue; + this.arLabel10.BorderColorOver = System.Drawing.Color.Red; + this.arLabel10.BorderSize = new System.Windows.Forms.Padding(2); + this.arLabel10.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel10.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel10.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel10.Font = new System.Drawing.Font("Consolas", 12F); + this.arLabel10.ForeColor = System.Drawing.Color.White; + this.arLabel10.GradientEnable = true; + this.arLabel10.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel10.GradientRepeatBG = false; + this.arLabel10.isButton = true; + this.arLabel10.Location = new System.Drawing.Point(243, 132); + this.arLabel10.Margin = new System.Windows.Forms.Padding(0); + this.arLabel10.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel10.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel10.msg = null; + this.arLabel10.Name = "arLabel10"; + this.arLabel10.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel10.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel10.ProgressEnable = false; + this.arLabel10.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel10.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel10.ProgressMax = 100F; + this.arLabel10.ProgressMin = 0F; + this.arLabel10.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel10.ProgressValue = 0F; + this.tableLayoutPanel1.SetRowSpan(this.arLabel10, 2); + this.arLabel10.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel10.Sign = ""; + this.arLabel10.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel10.SignColor = System.Drawing.Color.Yellow; + this.arLabel10.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel10.Size = new System.Drawing.Size(81, 133); + this.arLabel10.TabIndex = 0; + this.arLabel10.Tag = "E"; + this.arLabel10.Text = "ENTER"; + this.arLabel10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel10.TextShadow = false; + this.arLabel10.TextVisible = true; + this.arLabel10.Click += new System.EventHandler(this.arLabel1_Click); + // + // tbInput + // + this.tbInput.Dock = System.Windows.Forms.DockStyle.Top; + this.tbInput.Font = new System.Drawing.Font("Calibri", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbInput.Location = new System.Drawing.Point(5, 5); + this.tbInput.Name = "tbInput"; + this.tbInput.Size = new System.Drawing.Size(324, 40); + this.tbInput.TabIndex = 2; + this.tbInput.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // panel1 + // + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(5, 45); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(324, 5); + this.panel1.TabIndex = 3; + // + // fTouchNumDot + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.ClientSize = new System.Drawing.Size(334, 320); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.panel1); + this.Controls.Add(this.tbInput); + this.Name = "fTouchNumDot"; + this.Padding = new System.Windows.Forms.Padding(5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Input Value"; + this.Load += new System.EventHandler(this.fTouchNumDot_Load); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private arCtl.arLabel arLabel1; + private arCtl.arLabel arLabel2; + private arCtl.arLabel arLabel3; + private arCtl.arLabel arLabel4; + private arCtl.arLabel arLabel5; + private arCtl.arLabel arLabel6; + private arCtl.arLabel arLabel7; + private arCtl.arLabel arLabel8; + private arCtl.arLabel arLabel9; + private arCtl.arLabel arLabel10; + private arCtl.arLabel arLabel11; + private arCtl.arLabel arLabel12; + public System.Windows.Forms.TextBox tbInput; + private System.Windows.Forms.Panel panel1; + private arCtl.arLabel arLabel13; + private arCtl.arLabel arLabel14; + private arCtl.arLabel arLabel15; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fTouchNumDot.cs b/Cs_HMI/Project/Dialog/fTouchNumDot.cs new file mode 100644 index 0000000..4c85a42 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchNumDot.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fTouchNumDot : Form + { + public fTouchNumDot(string value) + { + InitializeComponent(); + this.tbInput.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Enter) Confirm(); }; + this.KeyPreview = true; + this.tbInput.Text = value; + this.KeyDown += (s1, e1) => + { + if (e1.KeyCode == Keys.Escape) this.Close(); + }; + } + + private void fTouchNumDot_Load(object sender, EventArgs e) + { + this.tbInput.SelectAll(); + this.tbInput.Focus(); + } + private void Confirm() + { + string id = tbInput.Text.Trim(); + if (id.isEmpty()) + { + tbInput.Focus(); + return; + } + DialogResult = DialogResult.OK; + } + + + public void ProcessKey(ref TextBox cmb_rfid, string key) + { + if (key == "B") + { + if (cmb_rfid.Text != "") + cmb_rfid.Text = cmb_rfid.Text.Substring(0, cmb_rfid.Text.Length - 1); + } + else if (key == "C") + { + cmb_rfid.Text = ""; + } + else if (key == "E") + { + Confirm(); + } + else + { + if (cmb_rfid.SelectionLength > 0 && cmb_rfid.TextLength == cmb_rfid.SelectionLength) + { + cmb_rfid.Text = key; + } + else if (cmb_rfid.SelectionLength > 0) + { + //선택된 영역을 대체해준다. + cmb_rfid.SelectedText = key; + } + else cmb_rfid.Text += key; + } + + cmb_rfid.SelectionLength = 0; + if (cmb_rfid.Text != "") + cmb_rfid.SelectionStart = cmb_rfid.Text.Length; + + } + + private void arLabel1_Click(object sender, EventArgs e) + { + var ctl = sender as arCtl.arLabel; + ProcessKey(ref tbInput, ctl.Tag.ToString()); + } + + } +} diff --git a/Cs_HMI/Project/Dialog/fTouchNumDot.resx b/Cs_HMI/Project/Dialog/fTouchNumDot.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/Project/Dialog/fTouchNumDot.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fUpdateForm.Designer.cs b/Cs_HMI/Project/Dialog/fUpdateForm.Designer.cs new file mode 100644 index 0000000..995dbaf --- /dev/null +++ b/Cs_HMI/Project/Dialog/fUpdateForm.Designer.cs @@ -0,0 +1,500 @@ +namespace Project.Dialog +{ + partial class fUpdateForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tmBlink = new System.Windows.Forms.Timer(this.components); + this.arPanel1 = new arCtl.arPanel(); + this.panButton = new System.Windows.Forms.Panel(); + this.btYes = new arCtl.arLabel(); + this.btNo = new arCtl.arLabel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.lb3 = new arCtl.arLabel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lb2 = new arCtl.arLabel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lb1 = new arCtl.arLabel(); + this.panel8 = new System.Windows.Forms.Panel(); + this.lbTitle = new arCtl.arLabel(); + this.arLabel1 = new arCtl.arLabel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.arPanel1.SuspendLayout(); + this.panButton.SuspendLayout(); + this.SuspendLayout(); + // + // tmBlink + // + this.tmBlink.Enabled = true; + this.tmBlink.Interval = 300; + this.tmBlink.Tick += new System.EventHandler(this.tmBlink_Tick); + // + // arPanel1 + // + this.arPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arPanel1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arPanel1.BorderColor = System.Drawing.Color.DimGray; + this.arPanel1.BorderSize = new System.Windows.Forms.Padding(1); + this.arPanel1.Controls.Add(this.panButton); + this.arPanel1.Controls.Add(this.panel7); + this.arPanel1.Controls.Add(this.lb3); + this.arPanel1.Controls.Add(this.panel2); + this.arPanel1.Controls.Add(this.arLabel1); + this.arPanel1.Controls.Add(this.panel1); + this.arPanel1.Controls.Add(this.lb2); + this.arPanel1.Controls.Add(this.panel4); + this.arPanel1.Controls.Add(this.lb1); + this.arPanel1.Controls.Add(this.panel8); + this.arPanel1.Controls.Add(this.lbTitle); + this.arPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.arPanel1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Italic); + this.arPanel1.ForeColor = System.Drawing.Color.Khaki; + this.arPanel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arPanel1.GradientRepeatBG = false; + this.arPanel1.Location = new System.Drawing.Point(5, 5); + this.arPanel1.Name = "arPanel1"; + this.arPanel1.Padding = new System.Windows.Forms.Padding(6); + this.arPanel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arPanel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arPanel1.ProgressMax = 100F; + this.arPanel1.ProgressMin = 0F; + this.arPanel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arPanel1.ProgressValue = 0F; + this.arPanel1.ShadowColor = System.Drawing.Color.Black; + this.arPanel1.ShowBorder = true; + this.arPanel1.Size = new System.Drawing.Size(508, 358); + this.arPanel1.TabIndex = 0; + this.arPanel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.arPanel1.TextShadow = false; + this.arPanel1.UseProgressBar = false; + // + // panButton + // + this.panButton.Controls.Add(this.btYes); + this.panButton.Controls.Add(this.btNo); + this.panButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.panButton.Location = new System.Drawing.Point(6, 298); + this.panButton.Name = "panButton"; + this.panButton.Size = new System.Drawing.Size(496, 54); + this.panButton.TabIndex = 10; + // + // btYes + // + this.btYes.BackColor = System.Drawing.Color.SeaGreen; + this.btYes.BackColor2 = System.Drawing.Color.SeaGreen; + this.btYes.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btYes.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btYes.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btYes.BorderSize = new System.Windows.Forms.Padding(1); + this.btYes.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btYes.Cursor = System.Windows.Forms.Cursors.Hand; + this.btYes.Dock = System.Windows.Forms.DockStyle.Fill; + this.btYes.Enabled = false; + this.btYes.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btYes.ForeColor = System.Drawing.Color.Black; + this.btYes.GradientEnable = true; + this.btYes.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btYes.GradientRepeatBG = false; + this.btYes.isButton = true; + this.btYes.Location = new System.Drawing.Point(0, 0); + this.btYes.MouseDownColor = System.Drawing.Color.Yellow; + this.btYes.MouseOverColor = System.Drawing.Color.Yellow; + this.btYes.msg = null; + this.btYes.Name = "btYes"; + this.btYes.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btYes.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btYes.ProgressEnable = false; + this.btYes.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btYes.ProgressForeColor = System.Drawing.Color.Black; + this.btYes.ProgressMax = 100F; + this.btYes.ProgressMin = 0F; + this.btYes.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btYes.ProgressValue = 0F; + this.btYes.ShadowColor = System.Drawing.Color.Gray; + this.btYes.Sign = ""; + this.btYes.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btYes.SignColor = System.Drawing.Color.Yellow; + this.btYes.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btYes.Size = new System.Drawing.Size(267, 54); + this.btYes.TabIndex = 0; + this.btYes.Text = "예(F5)"; + this.btYes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btYes.TextShadow = true; + this.btYes.TextVisible = true; + this.btYes.Click += new System.EventHandler(this.btYes_Click); + // + // btNo + // + this.btNo.BackColor = System.Drawing.Color.Goldenrod; + this.btNo.BackColor2 = System.Drawing.Color.Goldenrod; + this.btNo.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btNo.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btNo.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btNo.BorderSize = new System.Windows.Forms.Padding(1); + this.btNo.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btNo.Cursor = System.Windows.Forms.Cursors.Hand; + this.btNo.Dock = System.Windows.Forms.DockStyle.Right; + this.btNo.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btNo.ForeColor = System.Drawing.Color.Black; + this.btNo.GradientEnable = true; + this.btNo.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btNo.GradientRepeatBG = false; + this.btNo.isButton = true; + this.btNo.Location = new System.Drawing.Point(267, 0); + this.btNo.MouseDownColor = System.Drawing.Color.Yellow; + this.btNo.MouseOverColor = System.Drawing.Color.Yellow; + this.btNo.msg = null; + this.btNo.Name = "btNo"; + this.btNo.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btNo.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btNo.ProgressEnable = false; + this.btNo.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btNo.ProgressForeColor = System.Drawing.Color.Black; + this.btNo.ProgressMax = 100F; + this.btNo.ProgressMin = 0F; + this.btNo.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btNo.ProgressValue = 0F; + this.btNo.ShadowColor = System.Drawing.Color.Gray; + this.btNo.Sign = ""; + this.btNo.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btNo.SignColor = System.Drawing.Color.Yellow; + this.btNo.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btNo.Size = new System.Drawing.Size(229, 54); + this.btNo.TabIndex = 1; + this.btNo.Text = "아니오(ESC)"; + this.btNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btNo.TextShadow = true; + this.btNo.TextVisible = true; + this.btNo.Click += new System.EventHandler(this.btNo_Click); + // + // panel7 + // + this.panel7.Dock = System.Windows.Forms.DockStyle.Top; + this.panel7.Location = new System.Drawing.Point(6, 293); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(496, 5); + this.panel7.TabIndex = 0; + // + // lb3 + // + this.lb3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb3.BackColor2 = System.Drawing.Color.Gray; + this.lb3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb3.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb3.BorderSize = new System.Windows.Forms.Padding(1); + this.lb3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb3.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb3.Dock = System.Windows.Forms.DockStyle.Top; + this.lb3.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb3.ForeColor = System.Drawing.Color.White; + this.lb3.GradientEnable = true; + this.lb3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb3.GradientRepeatBG = false; + this.lb3.isButton = false; + this.lb3.Location = new System.Drawing.Point(6, 243); + this.lb3.MouseDownColor = System.Drawing.Color.Yellow; + this.lb3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb3.msg = null; + this.lb3.Name = "lb3"; + this.lb3.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb3.ProgressEnable = true; + this.lb3.ProgressFont = new System.Drawing.Font("Consolas", 20F); + this.lb3.ProgressForeColor = System.Drawing.Color.Black; + this.lb3.ProgressMax = 100F; + this.lb3.ProgressMin = 0F; + this.lb3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb3.ProgressValue = 50F; + this.lb3.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb3.Sign = ""; + this.lb3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb3.SignColor = System.Drawing.Color.Yellow; + this.lb3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb3.Size = new System.Drawing.Size(496, 50); + this.lb3.TabIndex = 5; + this.lb3.Text = "0%"; + this.lb3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lb3.TextShadow = true; + this.lb3.TextVisible = true; + // + // panel1 + // + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(6, 183); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(496, 5); + this.panel1.TabIndex = 11; + // + // lb2 + // + this.lb2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb2.BackColor2 = System.Drawing.Color.Gray; + this.lb2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb2.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb2.BorderSize = new System.Windows.Forms.Padding(1); + this.lb2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb2.Dock = System.Windows.Forms.DockStyle.Top; + this.lb2.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb2.ForeColor = System.Drawing.Color.White; + this.lb2.GradientEnable = true; + this.lb2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb2.GradientRepeatBG = false; + this.lb2.isButton = false; + this.lb2.Location = new System.Drawing.Point(6, 133); + this.lb2.MouseDownColor = System.Drawing.Color.Yellow; + this.lb2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb2.msg = null; + this.lb2.Name = "lb2"; + this.lb2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb2.ProgressEnable = false; + this.lb2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb2.ProgressForeColor = System.Drawing.Color.Black; + this.lb2.ProgressMax = 100F; + this.lb2.ProgressMin = 0F; + this.lb2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb2.ProgressValue = 0F; + this.lb2.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb2.Sign = ""; + this.lb2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb2.SignColor = System.Drawing.Color.Yellow; + this.lb2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb2.Size = new System.Drawing.Size(496, 50); + this.lb2.TabIndex = 4; + this.lb2.Text = "현재버젼 : {0}"; + this.lb2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb2.TextShadow = true; + this.lb2.TextVisible = true; + // + // panel4 + // + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(6, 128); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(496, 5); + this.panel4.TabIndex = 14; + // + // lb1 + // + this.lb1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb1.BackColor2 = System.Drawing.Color.Gray; + this.lb1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb1.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb1.BorderSize = new System.Windows.Forms.Padding(1); + this.lb1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb1.Dock = System.Windows.Forms.DockStyle.Top; + this.lb1.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.lb1.ForeColor = System.Drawing.Color.White; + this.lb1.GradientEnable = true; + this.lb1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb1.GradientRepeatBG = false; + this.lb1.isButton = false; + this.lb1.Location = new System.Drawing.Point(6, 78); + this.lb1.MouseDownColor = System.Drawing.Color.Yellow; + this.lb1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb1.msg = null; + this.lb1.Name = "lb1"; + this.lb1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb1.ProgressEnable = false; + this.lb1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb1.ProgressForeColor = System.Drawing.Color.Black; + this.lb1.ProgressMax = 100F; + this.lb1.ProgressMin = 0F; + this.lb1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb1.ProgressValue = 0F; + this.lb1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb1.Sign = ""; + this.lb1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb1.SignColor = System.Drawing.Color.Yellow; + this.lb1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb1.Size = new System.Drawing.Size(496, 50); + this.lb1.TabIndex = 2; + this.lb1.Text = "드라이브 : {0}"; + this.lb1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb1.TextShadow = true; + this.lb1.TextVisible = true; + // + // panel8 + // + this.panel8.Dock = System.Windows.Forms.DockStyle.Top; + this.panel8.Location = new System.Drawing.Point(6, 73); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(496, 5); + this.panel8.TabIndex = 18; + // + // lbTitle + // + this.lbTitle.BackColor = System.Drawing.Color.Brown; + this.lbTitle.BackColor2 = System.Drawing.Color.Tomato; + this.lbTitle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lbTitle.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbTitle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderSize = new System.Windows.Forms.Padding(1); + this.lbTitle.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbTitle.Cursor = System.Windows.Forms.Cursors.Hand; + this.lbTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.lbTitle.Font = new System.Drawing.Font("맑은 고딕", 22F, System.Drawing.FontStyle.Bold); + this.lbTitle.ForeColor = System.Drawing.Color.WhiteSmoke; + this.lbTitle.GradientEnable = true; + this.lbTitle.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal; + this.lbTitle.GradientRepeatBG = false; + this.lbTitle.isButton = true; + this.lbTitle.Location = new System.Drawing.Point(6, 6); + this.lbTitle.MouseDownColor = System.Drawing.Color.Yellow; + this.lbTitle.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbTitle.msg = null; + this.lbTitle.Name = "lbTitle"; + this.lbTitle.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbTitle.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbTitle.ProgressEnable = false; + this.lbTitle.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbTitle.ProgressForeColor = System.Drawing.Color.Black; + this.lbTitle.ProgressMax = 100F; + this.lbTitle.ProgressMin = 0F; + this.lbTitle.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbTitle.ProgressValue = 0F; + this.lbTitle.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50))))); + this.lbTitle.Sign = ""; + this.lbTitle.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbTitle.SignColor = System.Drawing.Color.Yellow; + this.lbTitle.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbTitle.Size = new System.Drawing.Size(496, 67); + this.lbTitle.TabIndex = 3; + this.lbTitle.Text = "프로그램 업데이트"; + this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbTitle.TextShadow = true; + this.lbTitle.TextVisible = true; + this.lbTitle.Click += new System.EventHandler(this.lbTitle_Click); + // + // arLabel1 + // + this.arLabel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arLabel1.BackColor2 = System.Drawing.Color.Gray; + this.arLabel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.arLabel1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.arLabel1.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.arLabel1.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.arLabel1.Dock = System.Windows.Forms.DockStyle.Top; + this.arLabel1.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold); + this.arLabel1.ForeColor = System.Drawing.Color.White; + this.arLabel1.GradientEnable = true; + this.arLabel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel1.GradientRepeatBG = false; + this.arLabel1.isButton = false; + this.arLabel1.Location = new System.Drawing.Point(6, 188); + this.arLabel1.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel1.msg = null; + this.arLabel1.Name = "arLabel1"; + this.arLabel1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.arLabel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel1.ProgressEnable = false; + this.arLabel1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel1.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel1.ProgressMax = 100F; + this.arLabel1.ProgressMin = 0F; + this.arLabel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel1.ProgressValue = 0F; + this.arLabel1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel1.Sign = ""; + this.arLabel1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel1.SignColor = System.Drawing.Color.Yellow; + this.arLabel1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel1.Size = new System.Drawing.Size(496, 50); + this.arLabel1.TabIndex = 19; + this.arLabel1.Text = "패치버젼 : {0}"; + this.arLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.arLabel1.TextShadow = true; + this.arLabel1.TextVisible = true; + // + // panel2 + // + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(6, 238); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(496, 5); + this.panel2.TabIndex = 20; + // + // fUpdateForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(518, 368); + this.Controls.Add(this.arPanel1); + this.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.MaximizeBox = false; + this.Name = "fUpdateForm"; + this.Padding = new System.Windows.Forms.Padding(5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Message Window"; + this.TopMost = true; + this.Load += new System.EventHandler(this.fMsg_Load); + this.arPanel1.ResumeLayout(false); + this.panButton.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + public arCtl.arLabel lb1; + private arCtl.arPanel arPanel1; + public arCtl.arLabel lbTitle; + public arCtl.arLabel lb3; + public arCtl.arLabel lb2; + private System.Windows.Forms.Timer tmBlink; + public arCtl.arLabel btYes; + public arCtl.arLabel btNo; + private System.Windows.Forms.Panel panButton; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Panel panel2; + public arCtl.arLabel arLabel1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fUpdateForm.cs b/Cs_HMI/Project/Dialog/fUpdateForm.cs new file mode 100644 index 0000000..7cec84d --- /dev/null +++ b/Cs_HMI/Project/Dialog/fUpdateForm.cs @@ -0,0 +1,256 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fUpdateForm : Form + { + private Boolean fMove = false; + private Point MDownPos; + private string _drive = string.Empty; + + public fUpdateForm() + { + InitializeComponent(); + } + + public fUpdateForm(string drvName) + { + InitializeComponent(); + _drive = drvName; + this.FormClosing += fMsgWindow_FormClosing; + this.KeyDown += FJobSelect_KeyDown; + this.lbTitle.MouseMove += label1_MouseMove; + lbTitle.MouseUp += label1_MouseUp; + lbTitle.MouseDown += label1_MouseDown; + lbTitle.MouseDoubleClick += label1_MouseDoubleClick; + + + } + + void fMsgWindow_FormClosing(object sender, FormClosingEventArgs e) + { + + } + + private void fMsg_Load(object sender, EventArgs e) + { + //해당드라이브에서 패치를 체크한다. + // AGV폴더 아래에 Patch_AGV_20200407.zip 식으로 파일을 처리한다 + + lb3.ProgressValue = 0; + lb3.Text = "--"; + lb1.Text = string.Format("드라이브 : {0}", _drive); + lb2.Text = "현재버젼 : " + PUB.PatchVersion; + var dir = System.IO.Path.Combine(this._drive, "AGV"); + if(System.IO.Directory.Exists(dir)) + { + //폴더는 있다 + var files = System.IO.Directory.GetFiles(dir, "Patch_AGV_*.zip"); + if(files == null || files.Length == 0) + { + arLabel1.Text = "패치파일이 없습니다"; + } + else + { + var LastFile = files.OrderByDescending(t => t).FirstOrDefault(); + var splbuf = LastFile.Split('_'); + + patchversion = splbuf[2] + splbuf[3].ToUpper().Replace(".ZIP", ""); + arLabel1.Text = "패치버젼 : " + patchversion; + arLabel1.Tag = LastFile; + btYes.Enabled = true; + } + } + else + { + arLabel1.Text = "패치폴더("+dir +")가 없습니다"; + + } + } + string patchversion = ""; + private void FJobSelect_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Escape) + { + e.Handled = true; + e.SuppressKeyPress = false; + DialogResult = DialogResult.Cancel; + this.Close(); + } + else if (e.KeyCode == Keys.F5) + btYes.PerformClick(); + } + + //public void setMessage(string msg) + //{ + // //msg를 분리해서 표시를 한다. + // var lbs = new arCtl.arLabel[] { lbTitle, lb1, lb2, lb3 }; + // var lineBuf = msg.Replace("\r", "").Split('\n'); + // int maxLine = Math.Min(lbs.Length, lineBuf.Length); + + // for (int i = 0; i < lbs.Length; i++) //최대줄을 넘어가는건 표시불가 + // { + // if (i >= lineBuf.Length) + // { + // lbs[i].Text = string.Empty; + // } + // else + // { + // if (i > 0) lbs[i].Text = string.Format("{0}. {1}", i, lineBuf[i]); + // else lbs[i].Text = lineBuf[i]; + // } + + // } + //} + + + + private void label1_MouseMove(object sender, MouseEventArgs e) + { + if (fMove) + { + Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y); + this.Left += offset.X; + this.Top += offset.Y; + offset = new Point(0, 0); + } + } + + private void label1_MouseUp(object sender, MouseEventArgs e) + { + fMove = false; + } + + private void label1_MouseDown(object sender, MouseEventArgs e) + { + MDownPos = new Point(e.X, e.Y); + fMove = true; + } + + private void label1_MouseDoubleClick(object sender, MouseEventArgs e) + { + + + } + public enum EWinColor + { + Attention = 0, + Error, + Information + } + + public void SetWindowColor(EWinColor wincolor) + { + switch (wincolor) + { + case EWinColor.Attention: + lbTitle.BackColor = Color.Gold; + lbTitle.BackColor2 = Color.Orange; + lbTitle.ShadowColor = Color.FromArgb(150, 150, 150); + lbTitle.ForeColor = Color.FromArgb(50, 50, 50); + break; + case EWinColor.Error: + lbTitle.BackColor = Color.Brown; + lbTitle.BackColor2 = Color.Tomato; + lbTitle.ShadowColor = Color.FromArgb(50, 50, 50); + lbTitle.ForeColor = Color.WhiteSmoke; + break; + default: + lbTitle.BackColor = Color.DarkTurquoise; + lbTitle.BackColor2 = Color.LightSkyBlue; + lbTitle.ShadowColor = Color.FromArgb(50, 50, 50); + lbTitle.ForeColor = Color.WhiteSmoke; + break; + } + } + + private void lbTitle_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void tmBlink_Tick(object sender, EventArgs e) + { + var bg1 = lbTitle.BackColor; + var bg2 = lbTitle.BackColor2; + lbTitle.BackColor = bg2; + lbTitle.BackColor2 = bg1; + } + + private void btYes_Click(object sender, EventArgs e) + { + //파일 + var file = arLabel1.Tag.ToString(); + if(System.IO.File.Exists(file)) + { + //이 파일을 _patch 폴더에 압축해제한다. + var dir_path = new System.IO.DirectoryInfo(System.IO.Path.Combine(Util.CurrentPath,"_patch")); + if (dir_path.Exists == true) + { + try + { + dir_path.Delete(true); + } catch (Exception ex) + { + Util.MsgE(ex.Message); + return; + } + } + else + { + dir_path.Create(); //폴더를 생성해준다. + } + + //해당폴더에 압축을 해제해준다. + var f = new Ionic.Zip.ZipFile(file); + f.ExtractProgress += F_ExtractProgress; + f.ExtractAll(dir_path.FullName); + f.ExtractProgress -= F_ExtractProgress; + + //패치정보파일 추가 + var infofile = System.IO.Path.Combine(dir_path.FullName, "version.txt"); + System.IO.File.WriteAllText(infofile, patchversion, System.Text.Encoding.UTF8); + + DialogResult = DialogResult.Yes; + this.Close(); + } + else + { + Util.MsgE("패치파일이 없습니다\n" + file); + return; + } + + } + + private void F_ExtractProgress(object sender, Ionic.Zip.ExtractProgressEventArgs e) + { + if(e.TotalBytesToTransfer < 1) + { + lb3.ProgressValue = 0; + } + else + { + var perc = (e.BytesTransferred / e.TotalBytesToTransfer) * 100.0; + this.lb3.ProgressValue = (float)perc; + } + + + } + + private void btNo_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + this.Close(); + + } + } +} diff --git a/Cs_HMI/Project/Dialog/fUpdateForm.resx b/Cs_HMI/Project/Dialog/fUpdateForm.resx new file mode 100644 index 0000000..fcee611 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fUpdateForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fVolume.Designer.cs b/Cs_HMI/Project/Dialog/fVolume.Designer.cs new file mode 100644 index 0000000..ac34e42 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fVolume.Designer.cs @@ -0,0 +1,168 @@ +namespace Project.Dialog +{ + partial class fVolume + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(10, 9); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(169, 103); + this.button1.TabIndex = 0; + this.button1.Text = "up"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(185, 9); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(169, 103); + this.button2.TabIndex = 1; + this.button2.Text = "down"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(360, 9); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(169, 103); + this.button3.TabIndex = 2; + this.button3.Text = "mute"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button4 + // + this.button4.Location = new System.Drawing.Point(185, 118); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(169, 103); + this.button4.TabIndex = 4; + this.button4.Text = "music down"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // button5 + // + this.button5.Location = new System.Drawing.Point(10, 118); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(169, 103); + this.button5.TabIndex = 3; + this.button5.Text = "music up"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // button6 + // + this.button6.Location = new System.Drawing.Point(359, 118); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(169, 46); + this.button6.TabIndex = 5; + this.button6.Text = "play"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // button7 + // + this.button7.Location = new System.Drawing.Point(359, 175); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(169, 46); + this.button7.TabIndex = 5; + this.button7.Text = "stop"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // button8 + // + this.button8.Location = new System.Drawing.Point(10, 227); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(169, 46); + this.button8.TabIndex = 6; + this.button8.Text = "Speak"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button8_Click); + // + // textBox1 + // + this.textBox1.Font = new System.Drawing.Font("굴림", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.textBox1.Location = new System.Drawing.Point(185, 234); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(343, 32); + this.textBox1.TabIndex = 7; + this.textBox1.Text = "음성 테스트 메세지 입니다"; + // + // fVolume + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(540, 282); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.button8); + this.Controls.Add(this.button7); + this.Controls.Add(this.button6); + this.Controls.Add(this.button4); + this.Controls.Add(this.button5); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "fVolume"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "fVolume"; + this.Load += new System.EventHandler(this.fVolume_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.TextBox textBox1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/Dialog/fVolume.cs b/Cs_HMI/Project/Dialog/fVolume.cs new file mode 100644 index 0000000..397cbb0 --- /dev/null +++ b/Cs_HMI/Project/Dialog/fVolume.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fVolume : Form + { + //AudioSwitcher.AudioApi.CoreAudio.CoreAudioController ac; + //AudioSwitcher.AudioApi.CoreAudio.CoreAudioDevice dev; + System.Media.SoundPlayer snd; + + private const int APPCOMMAND_VOLUME_MUTE = 0x80000; + private const int APPCOMMAND_VOLUME_UP = 0xA0000; + private const int APPCOMMAND_VOLUME_DOWN = 0x90000; + private const int WM_APPCOMMAND = 0x319; + + [DllImport("user32.dll")] + public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, + IntPtr wParam, IntPtr lParam); + + private void Mute() + { + SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, + (IntPtr)APPCOMMAND_VOLUME_MUTE); + } + + private void VolDown() + { + SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, + (IntPtr)APPCOMMAND_VOLUME_DOWN); + } + + private void VolUp() + { + SendMessageW(this.Handle, WM_APPCOMMAND, this.Handle, + (IntPtr)APPCOMMAND_VOLUME_UP); + } + + public fVolume() + { + InitializeComponent(); + } + + private void trackBar1_Scroll(object sender, EventArgs e) + { + //if(dev != null) + //{ + // dev.Volume = this.trackBar1.Value; + // System.Media.SystemSounds.Beep.Play(); + //} + } + + private void fVolume_Load(object sender, EventArgs e) + { + snd = new System.Media.SoundPlayer(); + //var dev = new AudioSwitcher.AudioApi.CoreAudio.CoreAudioController().GetPlaybackDevices(); + //if (dev == null) + //{ + // trackBar1.Enabled = false; + // Util.MsgE("사운드 장치가 없습니다", true); + //} + //else + //{ + // this.trackBar1.Value = (int)dev.Volume; + // System.Media.SystemSounds.Beep.Play(); + //} + } + + private void button1_Click(object sender, EventArgs e) + { + //up + VolUp(); + System.Media.SystemSounds.Beep.Play(); + } + + private void button2_Click(object sender, EventArgs e) + { + VolDown(); + System.Media.SystemSounds.Beep.Play(); + } + + private void button3_Click(object sender, EventArgs e) + { + Mute(); + } + + private void button5_Click(object sender, EventArgs e) + { + PUB.mplayer.Volume += 0.1; + PUB.setting.musicvol = (int)(PUB.mplayer.Volume * 100); + } + + private void button4_Click(object sender, EventArgs e) + { + PUB.mplayer.Volume -= 0.1; + PUB.setting.musicvol = (int)(PUB.mplayer.Volume * 100); + } + + private void button7_Click(object sender, EventArgs e) + { + PUB.mplayer.Stop(); + } + + private void button6_Click(object sender, EventArgs e) + { + PUB.mplayer.Play(); + } + + private void button8_Click(object sender, EventArgs e) + { + var s = "고수석님, 그 에러는 못고쳐요. 포기 하면 편해요"; + var s1 = $"현재시간은 {DateTime.Now.Hour}시 입니다"; + PUB.Speak( this.textBox1.Text); + } + } +} diff --git a/Cs_HMI/Project/Dialog/fVolume.resx b/Cs_HMI/Project/Dialog/fVolume.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/Project/Dialog/fVolume.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/Project/Manager/DataBaseManager.cs b/Cs_HMI/Project/Manager/DataBaseManager.cs new file mode 100644 index 0000000..c1753a3 --- /dev/null +++ b/Cs_HMI/Project/Manager/DataBaseManager.cs @@ -0,0 +1,417 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project.Manager +{ + public class DatabaseManager + { + /// + /// 파일검색방법 + /// + public enum eFileSearchMode + { + Normal, + Project, + Model, + MCCode, + Barcode, + All, + } + + public enum eStripSearchResult + { + None, + OK, + NG, + } + + /// + /// 버퍼갯수(지정 갯수가 차면 실제파일에 기록을 한다) + /// + private int MaxBufferCount = 1; + + /// + /// 최종파일 + /// + private String LastFileName; + + + private string[] dataPath = new string[] { }; + private DataSet1.ResultDataDataTable dt; + // private string _subDirName = string.Empty; + + /// + /// 파일디비초기화작업(클라이언트 갯수만큼 버퍼를 확보한다) + /// + public DatabaseManager(string[] dataPath_, int _MaxBufferCount = 100) + { + LastFileName = string.Empty; + dt = new DataSet1.ResultDataDataTable(); + + this.dataPath = dataPath_; + if (dataPath_.Length == 0) dataPath = new string[]{ System.IO.Path.Combine(Util.CurrentPath, "Data")}; + + //최대버퍼갯수(이 갯수를 넘어가면 실제 파일에 기록한다) + MaxBufferCount = _MaxBufferCount; + //_subDirName = subDirName; + } + + //해당 결과를 버퍼에 추가한다. + public void Add(DataSet1.ResultDataRow dataRow, Boolean autoFlush = false) + { + //입력된 자료를 복사해서 버퍼에 넣는다. + var newdr = this.dt.NewResultDataRow(); + foreach (string col in getDataColumnList()) + { + newdr[col] = dataRow[col]; + } + this.dt.AddResultDataRow(newdr); + + //만약자료가 일정데이터수를 넘었다면 flush 한다 + if (autoFlush || dt.Rows.Count >= MaxBufferCount) + { + Flush(); //파일에 실제저장한다. + } + } + + /// + /// 신규파일을 생성합니다. + /// + /// + void MakeFile(string filename) + { + //파일이없다면 헤더를 만들어준다. + arUtil.XMLHelper xml = new arUtil.XMLHelper(filename); + xml.CreateFile(); + } + + /// + /// 저장해야할 컬럼명을 반환한다.(idx는 제외한다) + /// + /// + public string[] getDataColumnList() + { + //저장하고자하는 순서를 미리 지정한다.(지정안된 자료는 알아서 저장된다) + string[] reserveCols = new string[] { }; + List cols = new List(); + cols.AddRange(reserveCols); + + for (int i = 0; i < this.dt.Columns.Count; i++) + { + string colname = dt.Columns[i].ColumnName; + if (reserveCols.Contains(colname)) continue; + cols.Add(colname); + } + return cols.ToArray(); + } + + public void Flush() + { + //데이터가없다면 처리하지 않음 + if (this.dt.Rows.Count < 1) return; + + //쓸데이터를 모두 버퍼에 밀어넣는다. + + foreach (DataSet1.ResultDataRow dr in dt.Rows) + { + if (dr.RowState == System.Data.DataRowState.Deleted || dr.RowState == System.Data.DataRowState.Detached) continue; + + //lot date check + if (dr.time_start.Year == 1982) dr.time_start = DateTime.Now; + if (dr.time_end.Year == 1982) dr.time_end = DateTime.Now; + + //작업이 종료된 시간을 기준으로 파일을 생성한다. + // if (dr.info_lot.isEmpty()) dr.info_lot = "NoLot"; + //if (dr.info_stripid.isEmpty()) dr.info_stripid = "S" + dr.time_pcbstart.ToString("yyyyMMddHHmmss"); + + //string curdatestr = string.Format("{0:0000}\\{1:00}\\{2:00}\\{3}\\{4}", + // dr.time_lotstart.Year, dr.time_lotstart.Month, dr.time_lotstart.Day, dr.info_lot,dr.info_stripid); + + //저장할 파일 체크 + System.IO.FileInfo fi =new System.IO.FileInfo( dr.info_filename+".xml"); + + //폴더새엇ㅇ + if (!fi.Directory.Exists) fi.Directory.Create(); + + //파일없는경우 헤더생성 + if (!fi.Exists) MakeFile(fi.FullName); + + //파일에기록 + try + { + //general info + var xml = new arUtil.XMLHelper(fi.FullName); + foreach(System.Data.DataColumn dc in this.dt.Columns) + { + if (dc.ColumnName.ToLower() == "idx") continue; + if (dc.ColumnName.ToLower() == "filename") continue; + var colname = dc.ColumnName.Split('_'); + var data = dr[dc.ColumnName]; + if(colname[0].ToLower()=="time") + { + string date_value = ""; + if (data != null && data != DBNull.Value) + date_value = ((DateTime)data).ToString("yyyy-MM-dd HH:mm:ss"); + xml.set_Data(colname[0], colname[1], date_value); + + } else + { + if(data != null && data != DBNull.Value) + xml.set_Data(colname[0], colname[1], data.ToString()); + else + xml.set_Data(colname[0], colname[1], ""); + } + } + string savemsg; + xml.Save(out savemsg); + } + catch (Exception ex) + { + PUB.log.AddE("DBMAN:FLUSH:" + ex.Message); + return; + } + + PUB.log.Add("DATABASE", string.Format("◆ Data Saved : {0}", fi.Name)); + } + + dt.Clear(); + dt.AcceptChanges(); + } + + /// + /// 지정된 파일의 모든 내용을 읽어서 DataTable 로 반환합니다. + /// + /// + /// + public DataSet1.ResultDataDataTable GetDatas(List files) + { + DataSet1.ResultDataDataTable retval = new DataSet1.ResultDataDataTable(); + //모든파일을 대상으로한다. + + foreach(var file in files) + { + var newdr = retval.NewResultDataRow(); + newdr.info_filename = file.FullName; + arUtil.XMLHelper xml = new arUtil.XMLHelper(file.FullName); + foreach (System.Data.DataColumn col in retval.Columns) + { + if (col.ColumnName.ToLower() == "idx") continue; + if (col.ColumnName.ToLower() == "filename") continue; + var colbuf = col.ColumnName.Split('_'); + + var readstr = xml.get_Data(colbuf[0], colbuf[1]); + if(col.DataType == typeof(DateTime)) + { + if(readstr != "") + { + DateTime dt; + if (DateTime.TryParse(readstr, out dt)) + newdr[col.ColumnName] = dt; + } + } + else + { + newdr[col.ColumnName] =readstr; + } + + + } + retval.AddResultDataRow(newdr); + } + + + retval.AcceptChanges(); + return retval; + } + + + public eStripSearchResult FindStrip(List pathlist, string strip) + { + //지정된 경로내에 스트립파일이 존재하는가? + foreach(var path in pathlist) + { + var filese = System.IO.Directory.GetFiles( path , strip + ".xml"); + if(filese .Length == 1) + { + var xml = new arUtil.XMLHelper(filese[0]); + var upload = xml.get_Data("info", "upload"); + if (upload == "O") return eStripSearchResult.OK; + } + } + return eStripSearchResult.None; + } + /// + /// 지정된 파일의 모든 내용을 읽어서 DataTable 로 반환합니다. + /// + /// + /// + public eStripSearchResult FindStrip(List files, string strip) + { + eStripSearchResult retval = eStripSearchResult.None; + System.Text.StringBuilder sbError = new StringBuilder(); + if (files.Count < 1) return eStripSearchResult.None; + + //가장최신의데이터를 찾아야한다. + DateTime MaxDate = DateTime.Parse("1982-11-23"); + string MaxResult = string.Empty; + + foreach (var fi in files.OrderByDescending(t => t.FullName)) + { + Boolean DataFind = false; + List cols = new List(); + System.IO.FileStream fs = new System.IO.FileStream(fi.FullName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.ReadWrite); + System.IO.StreamReader sr = new System.IO.StreamReader(fs, System.Text.Encoding.ASCII); + int LineCount = 0; + while (sr.Peek() > 0) + { + string buffer = sr.ReadLine(); + LineCount += 1; + if (buffer.isEmpty() || buffer.StartsWith(";")) continue; + var databuffer = buffer.Split(','); + if (cols.Count < 1) + { + //줄로처리한다. + foreach (string colname in databuffer) + cols.Add(colname); + } + else + { + //지정한 바코드 자료만 처리한다. + if (databuffer[2] != strip) continue; + + DateTime endtime; + if (DateTime.TryParse(databuffer[4], out endtime)) + { + MaxResult = databuffer[5]; + if (MaxResult.ToUpper() != "FAIL") + { + if (endtime > MaxDate) + { + MaxDate = endtime; + if (MaxResult == "OK") + retval = eStripSearchResult.OK; + else if (MaxResult == "NG") + retval = eStripSearchResult.NG; + } + DataFind = true; //다른파일은 작동하지 않게한다. + } + } + } + } + + sr.Close(); + sr.Dispose(); + fs.Close(); + fs.Dispose(); + if (DataFind) break; + } + return retval; + } + + public List GetPathListbyLot(DateTime sdate, DateTime edate, string lot) + { + List retfiles = new List(); + //날짜사이의 모든 파일을 대상으로해야함 + + string sd = sdate.ToShortDateString(); + string ed = edate.ToShortDateString(); + + int sy = sdate.Year; + int ey = edate.Year; + int sm = sdate.Month; + int em = edate.Month; + int sday = sdate.Day; + int eday = edate.Day; + + Boolean endtast = false; + for (int y = sy; y <= ey; y++) + { + for (int m = 1; m <= 12; m++) + { + for (int d = 1; d <= 31; d++) + { + string daystr = string.Format("{0:0000}-{1:00}-{2:00}", y, m, d); + if (ed == daystr) endtast = true; //마지막 날짜이다. + + if (y == sy && m < sm) continue; //시작년도 시작월 이전의 자료라면 넘어간다. + else if (y == sy && m == sm && d < sday) continue; //시작년도 시작월 시작일 이전의 자료라면 넘어간다. + + foreach (var data in this.dataPath) + { + var path = new System.IO.DirectoryInfo(System.IO.Path.Combine(data, daystr.Replace("-", "\\"), lot)); + if (path.Exists == false) continue; + else retfiles.Add(path.FullName); + } + + if (endtast) + break; // TODO: might not be correct. Was : Exit For + } + if (endtast) + break; // TODO: might not be correct. Was : Exit For + } + if (endtast) + break; // TODO: might not be correct. Was : Exit For + } + return retfiles; + } + + /// + /// 지정된 기간사이의 파일명을 반환합니다. + /// + /// 검색시작일(시간은 적용안함) + /// 검색종료일(시간은 적용안함) + /// 검색필터 + /// 장치번호 + /// 검색바코드 + /// + public List Getfiles(DateTime sdate, DateTime edate) + { + List retfiles = new List(); + //날짜사이의 모든 파일을 대상으로해야함 + + string sd = sdate.ToShortDateString(); + string ed = edate.ToShortDateString(); + + int sy = sdate.Year; + int ey = edate.Year; + int sm = sdate.Month; + int em = edate.Month; + int sday = sdate.Day; + int eday = edate.Day; + + Boolean endtast = false; + for (int y = sy; y <= ey; y++) + { + for (int m = 1; m <= 12; m++) + { + for (int d = 1; d <= 31; d++) + { + string daystr = string.Format("{0:0000}-{1:00}-{2:00}", y, m, d); + if (ed == daystr) endtast = true; //마지막 날짜이다. + + if (y == sy && m < sm) continue; //시작년도 시작월 이전의 자료라면 넘어간다. + else if (y == sy && m == sm && d < sday) continue; //시작년도 시작월 시작일 이전의 자료라면 넘어간다. + + foreach(var data in this.dataPath) + { + var path = new System.IO.DirectoryInfo(System.IO.Path.Combine(data, daystr.Replace("-", "\\"))); + if (path.Exists == false) continue; + var files = path.GetFiles("*.xml", System.IO.SearchOption.AllDirectories); + if (files != null && files.Length > 0) retfiles.AddRange(files); + } + + if (endtast) + break; // TODO: might not be correct. Was : Exit For + } + if (endtast) + break; // TODO: might not be correct. Was : Exit For + } + if (endtast) + break; // TODO: might not be correct. Was : Exit For + } + return retfiles; + } + } +} diff --git a/Cs_HMI/Project/MessageWindow/CMessageData.cs b/Cs_HMI/Project/MessageWindow/CMessageData.cs new file mode 100644 index 0000000..8f69860 --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/CMessageData.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class MessageWindow + { + public class CMessageData + { + public string Message { get; set; } + public eWindowType WindowType { get; set; } + public System.Drawing.Size WindowSize { get; set; } + public Boolean EnableClose { get; set; } + public System.Drawing.Font FontTitle { get; set; } + public System.Drawing.Font FontContent { get; set; } + public System.Windows.Forms.Form msgForm { get; set; } + public CMessageData() + { + WindowType = eWindowType.information; + WindowSize = new System.Drawing.Size(900, 500); + EnableClose = true; + FontContent = null; + FontTitle = null; + msgForm = null; + } + ~CMessageData() + { + if (msgForm != null) msgForm.Dispose(); + if (FontTitle != null) FontTitle.Dispose(); + if (FontContent != null) FontContent.Dispose(); + } + } + } + +} diff --git a/Cs_HMI/Project/MessageWindow/MessageWindow.cs b/Cs_HMI/Project/MessageWindow/MessageWindow.cs new file mode 100644 index 0000000..90e558c --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/MessageWindow.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Drawing; +using System.Windows.Forms; + +namespace Project +{ + public partial class MessageWindow + { + public enum eWindowPosition + { + center = 0, + top = 1, + bottom = 2 + } + + public enum eWindowType + { + information, + error, + attention, + } + + + public bool needClose = false; + public Boolean needShow = false; + private CMessageData msgBuffer = new CMessageData(); + + public void setMessage(CMessageData msgData) + { + //마지막데잍와 동일하고 버퍼에 데이터가 있다면 처리하지 않는다. + if (msgBuffer == msgData) return; + + //신규 메세지를 추가 + msgBuffer = msgData; + + //화면이 표시되어야하므로 플래그 설정 + needShow = true; + } + + public void setMessage(string msg, + eWindowType winType = eWindowType.error, + int width = 900, int height = 500, + Boolean enbClose = true, + Font fontTitle = null, + Font fontBody = null) + { + setMessage(new CMessageData() + { + EnableClose = enbClose, + FontContent = fontBody, + FontTitle = fontTitle, + Message = msg, + WindowSize = new Size(width, height), + WindowType = winType + }); + + } + + + fMessageWindow msgwin;// = new fMsgWindow(""); + + /// + /// 메세지 버퍼의 내용을 폼으로 표시합니다. + /// UI 쓰레드를 사용하므로 invoke 를 이용해 호출 하거나 + /// UI 쓰레드내에서 실행 하시기 바랍니다. + /// + public void showMessage() + { + //등록된 메세지 버퍼의 내용을 화면에 표시한다. + if (msgwin == null) msgwin = new fMessageWindow(""); + msgwin.TopMost = true; + // msgwin.Disposed += (s1, e1) => { CloseMsg(item.Key); }; + //msgwin.Width = this.msgBuffer.WindowSize.Width; + //msgwin.Height = msgBuffer.WindowSize.Height; + //msgwin.BackColor = Color.FromArgb(200, 200, 200); + msgwin.StartPosition = FormStartPosition.CenterScreen; + msgwin.btNo.Visible = false; + msgwin.btYes.Visible = false; + msgwin.Height = 474; + msgwin.setMessage(msgBuffer.Message); + //set font + if (msgBuffer.FontTitle != null) msgwin.lbTitle.Font = msgBuffer.FontTitle; + if (msgBuffer.FontContent != null) + { + msgwin.lb1.Font = msgBuffer.FontContent; + msgwin.lb2.Font = msgBuffer.FontContent; + msgwin.lb3.Font = msgBuffer.FontContent; + msgwin.lb4.Font = msgBuffer.FontContent; + msgwin.lb5.Font = msgBuffer.FontContent; + msgwin.lb6.Font = msgBuffer.FontContent; + msgwin.lb7.Font = msgBuffer.FontContent; + } + + switch (msgBuffer.WindowType) + { + case eWindowType.attention: + msgwin.SetWindowColor(fMessageWindow.EWinColor.Attention); + break; + case eWindowType.error: + msgwin.SetWindowColor(fMessageWindow.EWinColor.Error); + break; + default: + msgwin.SetWindowColor(fMessageWindow.EWinColor.Information); + break; + } + + if (!msgBuffer.EnableClose) msgwin.EnableUserClose = false; + if (msgwin.Visible == false) msgwin.Show(); + else + { + msgwin.Visible = true; + msgwin.Activate(); + } + + needShow = false; + } + + + public Boolean Visible + { + get + { + if (msgwin == null) return false; + return msgwin.Visible; + } + set + { + if(value == true) + { + if (msgwin.Visible == false) + { + msgwin.Show(); + msgwin.Activate(); + } + else + { + msgwin.Activate(); + } + needShow = false; + } + else + { + if (msgwin != null) + msgwin.Visible = false; + needClose = false; + } + + } + } + + } +} diff --git a/Cs_HMI/Project/MessageWindow/fMessageWindow.Designer.cs b/Cs_HMI/Project/MessageWindow/fMessageWindow.Designer.cs new file mode 100644 index 0000000..4fce6d4 --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/fMessageWindow.Designer.cs @@ -0,0 +1,676 @@ +namespace Project +{ + partial class fMessageWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tmBlink = new System.Windows.Forms.Timer(this.components); + this.arPanel1 = new arCtl.arPanel(); + this.panButton = new System.Windows.Forms.Panel(); + this.btYes = new arCtl.arLabel(); + this.btNo = new arCtl.arLabel(); + this.panel7 = new System.Windows.Forms.Panel(); + this.lb7 = new arCtl.arLabel(); + this.panel6 = new System.Windows.Forms.Panel(); + this.lb6 = new arCtl.arLabel(); + this.panel5 = new System.Windows.Forms.Panel(); + this.lb5 = new arCtl.arLabel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.lb4 = new arCtl.arLabel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lb3 = new arCtl.arLabel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lb2 = new arCtl.arLabel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lb1 = new arCtl.arLabel(); + this.panel8 = new System.Windows.Forms.Panel(); + this.lbTitle = new arCtl.arLabel(); + this.arPanel1.SuspendLayout(); + this.panButton.SuspendLayout(); + this.SuspendLayout(); + // + // tmBlink + // + this.tmBlink.Enabled = true; + this.tmBlink.Interval = 300; + this.tmBlink.Tick += new System.EventHandler(this.tmBlink_Tick); + // + // arPanel1 + // + this.arPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arPanel1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arPanel1.BorderColor = System.Drawing.Color.DimGray; + this.arPanel1.BorderSize = new System.Windows.Forms.Padding(1); + this.arPanel1.Controls.Add(this.panButton); + this.arPanel1.Controls.Add(this.panel7); + this.arPanel1.Controls.Add(this.lb7); + this.arPanel1.Controls.Add(this.panel6); + this.arPanel1.Controls.Add(this.lb6); + this.arPanel1.Controls.Add(this.panel5); + this.arPanel1.Controls.Add(this.lb5); + this.arPanel1.Controls.Add(this.panel3); + this.arPanel1.Controls.Add(this.lb4); + this.arPanel1.Controls.Add(this.panel2); + this.arPanel1.Controls.Add(this.lb3); + this.arPanel1.Controls.Add(this.panel1); + this.arPanel1.Controls.Add(this.lb2); + this.arPanel1.Controls.Add(this.panel4); + this.arPanel1.Controls.Add(this.lb1); + this.arPanel1.Controls.Add(this.panel8); + this.arPanel1.Controls.Add(this.lbTitle); + this.arPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.arPanel1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Italic); + this.arPanel1.ForeColor = System.Drawing.Color.Khaki; + this.arPanel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arPanel1.GradientRepeatBG = false; + this.arPanel1.Location = new System.Drawing.Point(5, 5); + this.arPanel1.Name = "arPanel1"; + this.arPanel1.Padding = new System.Windows.Forms.Padding(6); + this.arPanel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arPanel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arPanel1.ProgressMax = 100F; + this.arPanel1.ProgressMin = 0F; + this.arPanel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arPanel1.ProgressValue = 0F; + this.arPanel1.ShadowColor = System.Drawing.Color.Black; + this.arPanel1.ShowBorder = true; + this.arPanel1.Size = new System.Drawing.Size(719, 530); + this.arPanel1.TabIndex = 4; + this.arPanel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.arPanel1.TextShadow = false; + this.arPanel1.UseProgressBar = false; + // + // panButton + // + this.panButton.Controls.Add(this.btYes); + this.panButton.Controls.Add(this.btNo); + this.panButton.Dock = System.Windows.Forms.DockStyle.Fill; + this.panButton.Location = new System.Drawing.Point(6, 463); + this.panButton.Name = "panButton"; + this.panButton.Size = new System.Drawing.Size(707, 61); + this.panButton.TabIndex = 10; + // + // btYes + // + this.btYes.BackColor = System.Drawing.Color.SeaGreen; + this.btYes.BackColor2 = System.Drawing.Color.SeaGreen; + this.btYes.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btYes.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btYes.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btYes.BorderSize = new System.Windows.Forms.Padding(1); + this.btYes.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btYes.Cursor = System.Windows.Forms.Cursors.Hand; + this.btYes.Dock = System.Windows.Forms.DockStyle.Fill; + this.btYes.Font = new System.Drawing.Font("맑은 고딕", 25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btYes.ForeColor = System.Drawing.Color.Black; + this.btYes.GradientEnable = true; + this.btYes.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btYes.GradientRepeatBG = false; + this.btYes.isButton = true; + this.btYes.Location = new System.Drawing.Point(0, 0); + this.btYes.MouseDownColor = System.Drawing.Color.Yellow; + this.btYes.MouseOverColor = System.Drawing.Color.Yellow; + this.btYes.msg = null; + this.btYes.Name = "btYes"; + this.btYes.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btYes.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btYes.ProgressEnable = false; + this.btYes.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btYes.ProgressForeColor = System.Drawing.Color.Black; + this.btYes.ProgressMax = 100F; + this.btYes.ProgressMin = 0F; + this.btYes.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btYes.ProgressValue = 0F; + this.btYes.ShadowColor = System.Drawing.Color.Gray; + this.btYes.Sign = ""; + this.btYes.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btYes.SignColor = System.Drawing.Color.Yellow; + this.btYes.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btYes.Size = new System.Drawing.Size(478, 61); + this.btYes.TabIndex = 0; + this.btYes.Text = "예"; + this.btYes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btYes.TextShadow = true; + this.btYes.TextVisible = true; + this.btYes.Click += new System.EventHandler(this.btYes_Click); + // + // btNo + // + this.btNo.BackColor = System.Drawing.Color.Goldenrod; + this.btNo.BackColor2 = System.Drawing.Color.Goldenrod; + this.btNo.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btNo.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btNo.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btNo.BorderSize = new System.Windows.Forms.Padding(1); + this.btNo.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btNo.Cursor = System.Windows.Forms.Cursors.Hand; + this.btNo.Dock = System.Windows.Forms.DockStyle.Right; + this.btNo.Font = new System.Drawing.Font("맑은 고딕", 25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btNo.ForeColor = System.Drawing.Color.Black; + this.btNo.GradientEnable = true; + this.btNo.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btNo.GradientRepeatBG = false; + this.btNo.isButton = true; + this.btNo.Location = new System.Drawing.Point(478, 0); + this.btNo.MouseDownColor = System.Drawing.Color.Yellow; + this.btNo.MouseOverColor = System.Drawing.Color.Yellow; + this.btNo.msg = null; + this.btNo.Name = "btNo"; + this.btNo.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btNo.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btNo.ProgressEnable = false; + this.btNo.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btNo.ProgressForeColor = System.Drawing.Color.Black; + this.btNo.ProgressMax = 100F; + this.btNo.ProgressMin = 0F; + this.btNo.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btNo.ProgressValue = 0F; + this.btNo.ShadowColor = System.Drawing.Color.Gray; + this.btNo.Sign = ""; + this.btNo.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btNo.SignColor = System.Drawing.Color.Yellow; + this.btNo.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btNo.Size = new System.Drawing.Size(229, 61); + this.btNo.TabIndex = 0; + this.btNo.Text = "아니오"; + this.btNo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btNo.TextShadow = true; + this.btNo.TextVisible = true; + this.btNo.Click += new System.EventHandler(this.btNo_Click); + // + // panel7 + // + this.panel7.Dock = System.Windows.Forms.DockStyle.Top; + this.panel7.Location = new System.Drawing.Point(6, 458); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(707, 5); + this.panel7.TabIndex = 17; + // + // lb7 + // + this.lb7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb7.BackColor2 = System.Drawing.Color.Gray; + this.lb7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb7.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb7.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb7.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb7.BorderSize = new System.Windows.Forms.Padding(1); + this.lb7.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb7.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb7.Dock = System.Windows.Forms.DockStyle.Top; + this.lb7.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.lb7.ForeColor = System.Drawing.Color.White; + this.lb7.GradientEnable = true; + this.lb7.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb7.GradientRepeatBG = false; + this.lb7.isButton = false; + this.lb7.Location = new System.Drawing.Point(6, 408); + this.lb7.MouseDownColor = System.Drawing.Color.Yellow; + this.lb7.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb7.msg = null; + this.lb7.Name = "lb7"; + this.lb7.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb7.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb7.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb7.ProgressEnable = false; + this.lb7.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb7.ProgressForeColor = System.Drawing.Color.Black; + this.lb7.ProgressMax = 100F; + this.lb7.ProgressMin = 0F; + this.lb7.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb7.ProgressValue = 0F; + this.lb7.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb7.Sign = ""; + this.lb7.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb7.SignColor = System.Drawing.Color.Yellow; + this.lb7.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb7.Size = new System.Drawing.Size(707, 50); + this.lb7.TabIndex = 9; + this.lb7.Text = "*"; + this.lb7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb7.TextShadow = true; + this.lb7.TextVisible = true; + // + // panel6 + // + this.panel6.Dock = System.Windows.Forms.DockStyle.Top; + this.panel6.Location = new System.Drawing.Point(6, 403); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(707, 5); + this.panel6.TabIndex = 16; + // + // lb6 + // + this.lb6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb6.BackColor2 = System.Drawing.Color.Gray; + this.lb6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb6.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb6.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb6.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb6.BorderSize = new System.Windows.Forms.Padding(1); + this.lb6.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb6.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb6.Dock = System.Windows.Forms.DockStyle.Top; + this.lb6.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.lb6.ForeColor = System.Drawing.Color.White; + this.lb6.GradientEnable = true; + this.lb6.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb6.GradientRepeatBG = false; + this.lb6.isButton = false; + this.lb6.Location = new System.Drawing.Point(6, 353); + this.lb6.MouseDownColor = System.Drawing.Color.Yellow; + this.lb6.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb6.msg = null; + this.lb6.Name = "lb6"; + this.lb6.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb6.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb6.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb6.ProgressEnable = false; + this.lb6.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb6.ProgressForeColor = System.Drawing.Color.Black; + this.lb6.ProgressMax = 100F; + this.lb6.ProgressMin = 0F; + this.lb6.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb6.ProgressValue = 0F; + this.lb6.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb6.Sign = ""; + this.lb6.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb6.SignColor = System.Drawing.Color.Yellow; + this.lb6.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb6.Size = new System.Drawing.Size(707, 50); + this.lb6.TabIndex = 8; + this.lb6.Text = "*"; + this.lb6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb6.TextShadow = true; + this.lb6.TextVisible = true; + // + // panel5 + // + this.panel5.Dock = System.Windows.Forms.DockStyle.Top; + this.panel5.Location = new System.Drawing.Point(6, 348); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(707, 5); + this.panel5.TabIndex = 15; + // + // lb5 + // + this.lb5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb5.BackColor2 = System.Drawing.Color.Gray; + this.lb5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb5.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb5.BorderSize = new System.Windows.Forms.Padding(1); + this.lb5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb5.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb5.Dock = System.Windows.Forms.DockStyle.Top; + this.lb5.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.lb5.ForeColor = System.Drawing.Color.White; + this.lb5.GradientEnable = true; + this.lb5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb5.GradientRepeatBG = false; + this.lb5.isButton = false; + this.lb5.Location = new System.Drawing.Point(6, 298); + this.lb5.MouseDownColor = System.Drawing.Color.Yellow; + this.lb5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb5.msg = null; + this.lb5.Name = "lb5"; + this.lb5.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb5.ProgressEnable = false; + this.lb5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb5.ProgressForeColor = System.Drawing.Color.Black; + this.lb5.ProgressMax = 100F; + this.lb5.ProgressMin = 0F; + this.lb5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb5.ProgressValue = 0F; + this.lb5.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb5.Sign = ""; + this.lb5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb5.SignColor = System.Drawing.Color.Yellow; + this.lb5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb5.Size = new System.Drawing.Size(707, 50); + this.lb5.TabIndex = 7; + this.lb5.Text = "*"; + this.lb5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb5.TextShadow = true; + this.lb5.TextVisible = true; + // + // panel3 + // + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(6, 293); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(707, 5); + this.panel3.TabIndex = 13; + // + // lb4 + // + this.lb4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb4.BackColor2 = System.Drawing.Color.Gray; + this.lb4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb4.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb4.BorderSize = new System.Windows.Forms.Padding(1); + this.lb4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb4.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb4.Dock = System.Windows.Forms.DockStyle.Top; + this.lb4.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.lb4.ForeColor = System.Drawing.Color.White; + this.lb4.GradientEnable = true; + this.lb4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb4.GradientRepeatBG = false; + this.lb4.isButton = false; + this.lb4.Location = new System.Drawing.Point(6, 243); + this.lb4.MouseDownColor = System.Drawing.Color.Yellow; + this.lb4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb4.msg = null; + this.lb4.Name = "lb4"; + this.lb4.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb4.ProgressEnable = false; + this.lb4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb4.ProgressForeColor = System.Drawing.Color.Black; + this.lb4.ProgressMax = 100F; + this.lb4.ProgressMin = 0F; + this.lb4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb4.ProgressValue = 0F; + this.lb4.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb4.Sign = ""; + this.lb4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb4.SignColor = System.Drawing.Color.Yellow; + this.lb4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb4.Size = new System.Drawing.Size(707, 50); + this.lb4.TabIndex = 6; + this.lb4.Text = "*"; + this.lb4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb4.TextShadow = true; + this.lb4.TextVisible = true; + // + // panel2 + // + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(6, 238); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(707, 5); + this.panel2.TabIndex = 12; + // + // lb3 + // + this.lb3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb3.BackColor2 = System.Drawing.Color.Gray; + this.lb3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb3.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb3.BorderSize = new System.Windows.Forms.Padding(1); + this.lb3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb3.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb3.Dock = System.Windows.Forms.DockStyle.Top; + this.lb3.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.lb3.ForeColor = System.Drawing.Color.White; + this.lb3.GradientEnable = true; + this.lb3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb3.GradientRepeatBG = false; + this.lb3.isButton = false; + this.lb3.Location = new System.Drawing.Point(6, 188); + this.lb3.MouseDownColor = System.Drawing.Color.Yellow; + this.lb3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb3.msg = null; + this.lb3.Name = "lb3"; + this.lb3.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb3.ProgressEnable = false; + this.lb3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb3.ProgressForeColor = System.Drawing.Color.Black; + this.lb3.ProgressMax = 100F; + this.lb3.ProgressMin = 0F; + this.lb3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb3.ProgressValue = 0F; + this.lb3.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb3.Sign = ""; + this.lb3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb3.SignColor = System.Drawing.Color.Yellow; + this.lb3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb3.Size = new System.Drawing.Size(707, 50); + this.lb3.TabIndex = 5; + this.lb3.Text = "*"; + this.lb3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb3.TextShadow = true; + this.lb3.TextVisible = true; + // + // panel1 + // + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(6, 183); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(707, 5); + this.panel1.TabIndex = 11; + // + // lb2 + // + this.lb2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb2.BackColor2 = System.Drawing.Color.Gray; + this.lb2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb2.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb2.BorderSize = new System.Windows.Forms.Padding(1); + this.lb2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb2.Dock = System.Windows.Forms.DockStyle.Top; + this.lb2.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.lb2.ForeColor = System.Drawing.Color.White; + this.lb2.GradientEnable = true; + this.lb2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb2.GradientRepeatBG = false; + this.lb2.isButton = false; + this.lb2.Location = new System.Drawing.Point(6, 133); + this.lb2.MouseDownColor = System.Drawing.Color.Yellow; + this.lb2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb2.msg = null; + this.lb2.Name = "lb2"; + this.lb2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb2.ProgressEnable = false; + this.lb2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb2.ProgressForeColor = System.Drawing.Color.Black; + this.lb2.ProgressMax = 100F; + this.lb2.ProgressMin = 0F; + this.lb2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb2.ProgressValue = 0F; + this.lb2.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb2.Sign = ""; + this.lb2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb2.SignColor = System.Drawing.Color.Yellow; + this.lb2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb2.Size = new System.Drawing.Size(707, 50); + this.lb2.TabIndex = 4; + this.lb2.Text = "*"; + this.lb2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb2.TextShadow = true; + this.lb2.TextVisible = true; + // + // panel4 + // + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(6, 128); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(707, 5); + this.panel4.TabIndex = 14; + // + // lb1 + // + this.lb1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb1.BackColor2 = System.Drawing.Color.Gray; + this.lb1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb1.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lb1.BorderSize = new System.Windows.Forms.Padding(1); + this.lb1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb1.Dock = System.Windows.Forms.DockStyle.Top; + this.lb1.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.lb1.ForeColor = System.Drawing.Color.White; + this.lb1.GradientEnable = true; + this.lb1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lb1.GradientRepeatBG = false; + this.lb1.isButton = false; + this.lb1.Location = new System.Drawing.Point(6, 78); + this.lb1.MouseDownColor = System.Drawing.Color.Yellow; + this.lb1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb1.msg = null; + this.lb1.Name = "lb1"; + this.lb1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb1.ProgressEnable = false; + this.lb1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb1.ProgressForeColor = System.Drawing.Color.Black; + this.lb1.ProgressMax = 100F; + this.lb1.ProgressMin = 0F; + this.lb1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb1.ProgressValue = 0F; + this.lb1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lb1.Sign = ""; + this.lb1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb1.SignColor = System.Drawing.Color.Yellow; + this.lb1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb1.Size = new System.Drawing.Size(707, 50); + this.lb1.TabIndex = 2; + this.lb1.Text = "*"; + this.lb1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb1.TextShadow = true; + this.lb1.TextVisible = true; + // + // panel8 + // + this.panel8.Dock = System.Windows.Forms.DockStyle.Top; + this.panel8.Location = new System.Drawing.Point(6, 73); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(707, 5); + this.panel8.TabIndex = 18; + // + // lbTitle + // + this.lbTitle.BackColor = System.Drawing.Color.Brown; + this.lbTitle.BackColor2 = System.Drawing.Color.Tomato; + this.lbTitle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lbTitle.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbTitle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderSize = new System.Windows.Forms.Padding(1); + this.lbTitle.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbTitle.Cursor = System.Windows.Forms.Cursors.Hand; + this.lbTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.lbTitle.Font = new System.Drawing.Font("맑은 고딕", 28F, System.Drawing.FontStyle.Bold); + this.lbTitle.ForeColor = System.Drawing.Color.WhiteSmoke; + this.lbTitle.GradientEnable = true; + this.lbTitle.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal; + this.lbTitle.GradientRepeatBG = false; + this.lbTitle.isButton = true; + this.lbTitle.Location = new System.Drawing.Point(6, 6); + this.lbTitle.MouseDownColor = System.Drawing.Color.Yellow; + this.lbTitle.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbTitle.msg = null; + this.lbTitle.Name = "lbTitle"; + this.lbTitle.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbTitle.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbTitle.ProgressEnable = false; + this.lbTitle.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbTitle.ProgressForeColor = System.Drawing.Color.Black; + this.lbTitle.ProgressMax = 100F; + this.lbTitle.ProgressMin = 0F; + this.lbTitle.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbTitle.ProgressValue = 0F; + this.lbTitle.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50))))); + this.lbTitle.Sign = ""; + this.lbTitle.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbTitle.SignColor = System.Drawing.Color.Yellow; + this.lbTitle.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbTitle.Size = new System.Drawing.Size(707, 67); + this.lbTitle.TabIndex = 3; + this.lbTitle.Text = "TITLE"; + this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbTitle.TextShadow = true; + this.lbTitle.TextVisible = true; + this.lbTitle.Click += new System.EventHandler(this.lbTitle_Click); + // + // fMessageWindow + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(729, 540); + this.Controls.Add(this.arPanel1); + this.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.MaximizeBox = false; + this.Name = "fMessageWindow"; + this.Padding = new System.Windows.Forms.Padding(5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Message Window"; + this.TopMost = true; + this.Load += new System.EventHandler(this.fMsg_Load); + this.arPanel1.ResumeLayout(false); + this.panButton.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + public arCtl.arLabel lb1; + private arCtl.arPanel arPanel1; + public arCtl.arLabel lbTitle; + public arCtl.arLabel lb7; + public arCtl.arLabel lb6; + public arCtl.arLabel lb5; + public arCtl.arLabel lb4; + public arCtl.arLabel lb3; + public arCtl.arLabel lb2; + private System.Windows.Forms.Timer tmBlink; + public arCtl.arLabel btYes; + public arCtl.arLabel btNo; + private System.Windows.Forms.Panel panButton; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel8; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/MessageWindow/fMessageWindow.cs b/Cs_HMI/Project/MessageWindow/fMessageWindow.cs new file mode 100644 index 0000000..7befd3b --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/fMessageWindow.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project +{ + public partial class fMessageWindow : Form + { + private Boolean fMove = false; + private Point MDownPos; + private string _msg = string.Empty; + public Boolean DialogMode = false; + + /// + /// 사용자가 이 창을 닫을수 있는가? + /// + public Boolean EnableUserClose + { + get { return _enableuserclose; } + set + { + _enableuserclose = value; + // if (!EnableUserClose) btClose.Visible = false; + } + } + private Boolean _enableuserclose = true; + + public void setMessage(string msg) + { + //msg를 분리해서 표시를 한다. + var lbs = new arCtl.arLabel[] { lbTitle, lb1, lb2, lb3, lb4, lb5, lb6, lb7 }; + var lineBuf = msg.Replace("\r", "").Split('\n'); + int maxLine = Math.Min(lbs.Length, lineBuf.Length); + + for (int i = 0; i < lbs.Length; i++) //최대줄을 넘어가는건 표시불가 + { + if (i >= lineBuf.Length) + { + lbs[i].Text = string.Empty; + } + else + { + if (i > 0) lbs[i].Text = string.Format("{0}. {1}", i, lineBuf[i]); + else lbs[i].Text = lineBuf[i]; + } + + } + } + public fMessageWindow(string msg, string filename = "") + { + EnableUserClose = true; + InitializeComponent(); + this.FormClosing += fMsgWindow_FormClosing; + this.KeyDown += (s1, e1) => { if (EnableUserClose && e1.KeyCode == Keys.Escape) this.Close(); }; + this._msg = msg; + + + if (filename != "") + { + string fullname = AppDomain.CurrentDomain.BaseDirectory + "Image\\" + filename; + if (System.IO.File.Exists(fullname)) + { + var img = this.lb1.BackgroundImage; + this.lb1.BackgroundImage = Image.FromFile(fullname); + if (img != null) img.Dispose(); + } + else + { + msg += "\nNo Image File\n" + filename; + } + } + else + { + var img = this.lb1.BackgroundImage; + this.lb1.BackgroundImage = null; + if (img != null) img.Dispose(); + } + setMessage(msg); + this.lbTitle.MouseMove += label1_MouseMove; + lbTitle.MouseUp += label1_MouseUp; + lbTitle.MouseDown += label1_MouseDown; + lbTitle.MouseDoubleClick += label1_MouseDoubleClick; + //btClose.Click += arLabel1_Click; + } + + void fMsgWindow_FormClosing(object sender, FormClosingEventArgs e) + { + if (DialogMode==false) + { + e.Cancel = true; + return; + } + } + + private void fMsg_Load(object sender, EventArgs e) + { + + } + + private void label1_MouseMove(object sender, MouseEventArgs e) + { + if (fMove) + { + Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y); + this.Left += offset.X; + this.Top += offset.Y; + offset = new Point(0, 0); + } + } + + private void label1_MouseUp(object sender, MouseEventArgs e) + { + fMove = false; + } + + private void label1_MouseDown(object sender, MouseEventArgs e) + { + MDownPos = new Point(e.X, e.Y); + fMove = true; + } + + private void label1_MouseDoubleClick(object sender, MouseEventArgs e) + { + if (EnableUserClose) + { + if (DialogMode == false) this.Visible = false; + else this.Close(); + } + + } + public enum EWinColor + { + Attention=0, + Error, + Information + } + + public void SetWindowColor(EWinColor wincolor) + { + switch (wincolor) + { + case EWinColor.Attention: + lbTitle.BackColor = Color.Gold; + lbTitle.BackColor2 = Color.Orange; + lbTitle.ShadowColor = Color.FromArgb(150, 150, 150); + lbTitle.ForeColor = Color.FromArgb(50, 50, 50); + break; + case EWinColor.Error: + lbTitle.BackColor = Color.Brown; + lbTitle.BackColor2 = Color.Tomato; + lbTitle.ShadowColor = Color.FromArgb(50, 50, 50); + lbTitle.ForeColor = Color.WhiteSmoke; + break; + default: + lbTitle.BackColor = Color.DarkTurquoise; + lbTitle.BackColor2 = Color.LightSkyBlue; + lbTitle.ShadowColor = Color.FromArgb(50, 50, 50); + lbTitle.ForeColor = Color.WhiteSmoke; + break; + } + } + + private void lbTitle_Click(object sender, EventArgs e) + { + if (EnableUserClose) + { + if (DialogMode == false) this.Visible = false; + else this.Close(); + } + } + + private void tmBlink_Tick(object sender, EventArgs e) + { + var bg1 = lbTitle.BackColor; + var bg2 = lbTitle.BackColor2; + lbTitle.BackColor = bg2; + lbTitle.BackColor2 = bg1; + } + + private void btYes_Click(object sender, EventArgs e) + { + if (DialogMode == false) this.Visible = false; + else this.DialogResult = System.Windows.Forms.DialogResult.Yes; + } + + private void btNo_Click(object sender, EventArgs e) + { + if (DialogMode == false) this.Visible = false; + else this.Close(); + + } + } +} diff --git a/Cs_HMI/Project/MessageWindow/fMessageWindow.resx b/Cs_HMI/Project/MessageWindow/fMessageWindow.resx new file mode 100644 index 0000000..fcee611 --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/fMessageWindow.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/MessageWindow/fMsgWindow.Designer.cs b/Cs_HMI/Project/MessageWindow/fMsgWindow.Designer.cs new file mode 100644 index 0000000..10ee66d --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/fMsgWindow.Designer.cs @@ -0,0 +1,472 @@ +namespace Project +{ + partial class fMsgWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.lb1 = new arCtl.arLabel(); + this.arPanel1 = new arCtl.arPanel(); + this.lb7 = new arCtl.arLabel(); + this.lb6 = new arCtl.arLabel(); + this.lb5 = new arCtl.arLabel(); + this.lb4 = new arCtl.arLabel(); + this.lb3 = new arCtl.arLabel(); + this.lb2 = new arCtl.arLabel(); + this.lbTitle = new arCtl.arLabel(); + this.tmBlink = new System.Windows.Forms.Timer(this.components); + this.arPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // lb1 + // + this.lb1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb1.BackColor2 = System.Drawing.Color.Gray; + this.lb1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb1.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb1.BorderSize = new System.Windows.Forms.Padding(1); + this.lb1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.lb1.ForeColor = System.Drawing.Color.White; + this.lb1.GradientEnable = true; + this.lb1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lb1.GradientRepeatBG = false; + this.lb1.isButton = false; + this.lb1.Location = new System.Drawing.Point(8, 80); + this.lb1.MouseDownColor = System.Drawing.Color.Yellow; + this.lb1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb1.msg = null; + this.lb1.Name = "lb1"; + this.lb1.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb1.ProgressEnable = false; + this.lb1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb1.ProgressForeColor = System.Drawing.Color.Black; + this.lb1.ProgressMax = 100F; + this.lb1.ProgressMin = 0F; + this.lb1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb1.ProgressValue = 0F; + this.lb1.ShadowColor = System.Drawing.Color.Black; + this.lb1.Sign = ""; + this.lb1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb1.SignColor = System.Drawing.Color.Yellow; + this.lb1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb1.Size = new System.Drawing.Size(874, 50); + this.lb1.TabIndex = 2; + this.lb1.Text = "*"; + this.lb1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb1.TextShadow = true; + this.lb1.TextVisible = true; + // + // arPanel1 + // + this.arPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arPanel1.BackColor2 = System.Drawing.Color.Gray; + this.arPanel1.BorderColor = System.Drawing.Color.DimGray; + this.arPanel1.BorderSize = new System.Windows.Forms.Padding(1); + this.arPanel1.Controls.Add(this.lb7); + this.arPanel1.Controls.Add(this.lb6); + this.arPanel1.Controls.Add(this.lb5); + this.arPanel1.Controls.Add(this.lb4); + this.arPanel1.Controls.Add(this.lb3); + this.arPanel1.Controls.Add(this.lb2); + this.arPanel1.Controls.Add(this.lbTitle); + this.arPanel1.Controls.Add(this.lb1); + this.arPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.arPanel1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Italic); + this.arPanel1.ForeColor = System.Drawing.Color.Khaki; + this.arPanel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arPanel1.GradientRepeatBG = false; + this.arPanel1.Location = new System.Drawing.Point(5, 5); + this.arPanel1.Name = "arPanel1"; + this.arPanel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arPanel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arPanel1.ProgressMax = 100F; + this.arPanel1.ProgressMin = 0F; + this.arPanel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arPanel1.ProgressValue = 0F; + this.arPanel1.ShadowColor = System.Drawing.Color.Black; + this.arPanel1.ShowBorder = true; + this.arPanel1.Size = new System.Drawing.Size(890, 480); + this.arPanel1.TabIndex = 4; + this.arPanel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.arPanel1.TextShadow = false; + this.arPanel1.UseProgressBar = false; + // + // lb7 + // + this.lb7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb7.BackColor2 = System.Drawing.Color.Gray; + this.lb7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb7.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb7.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb7.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb7.BorderSize = new System.Windows.Forms.Padding(1); + this.lb7.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb7.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb7.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.lb7.ForeColor = System.Drawing.Color.White; + this.lb7.GradientEnable = true; + this.lb7.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lb7.GradientRepeatBG = false; + this.lb7.isButton = false; + this.lb7.Location = new System.Drawing.Point(8, 422); + this.lb7.MouseDownColor = System.Drawing.Color.Yellow; + this.lb7.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb7.msg = null; + this.lb7.Name = "lb7"; + this.lb7.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb7.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb7.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb7.ProgressEnable = false; + this.lb7.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb7.ProgressForeColor = System.Drawing.Color.Black; + this.lb7.ProgressMax = 100F; + this.lb7.ProgressMin = 0F; + this.lb7.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb7.ProgressValue = 0F; + this.lb7.ShadowColor = System.Drawing.Color.Black; + this.lb7.Sign = ""; + this.lb7.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb7.SignColor = System.Drawing.Color.Yellow; + this.lb7.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb7.Size = new System.Drawing.Size(874, 50); + this.lb7.TabIndex = 9; + this.lb7.Text = "*"; + this.lb7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb7.TextShadow = true; + this.lb7.TextVisible = true; + // + // lb6 + // + this.lb6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb6.BackColor2 = System.Drawing.Color.Gray; + this.lb6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb6.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb6.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb6.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb6.BorderSize = new System.Windows.Forms.Padding(1); + this.lb6.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb6.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb6.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.lb6.ForeColor = System.Drawing.Color.White; + this.lb6.GradientEnable = true; + this.lb6.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lb6.GradientRepeatBG = false; + this.lb6.isButton = false; + this.lb6.Location = new System.Drawing.Point(8, 365); + this.lb6.MouseDownColor = System.Drawing.Color.Yellow; + this.lb6.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb6.msg = null; + this.lb6.Name = "lb6"; + this.lb6.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb6.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb6.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb6.ProgressEnable = false; + this.lb6.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb6.ProgressForeColor = System.Drawing.Color.Black; + this.lb6.ProgressMax = 100F; + this.lb6.ProgressMin = 0F; + this.lb6.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb6.ProgressValue = 0F; + this.lb6.ShadowColor = System.Drawing.Color.Black; + this.lb6.Sign = ""; + this.lb6.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb6.SignColor = System.Drawing.Color.Yellow; + this.lb6.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb6.Size = new System.Drawing.Size(874, 50); + this.lb6.TabIndex = 8; + this.lb6.Text = "*"; + this.lb6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb6.TextShadow = true; + this.lb6.TextVisible = true; + // + // lb5 + // + this.lb5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb5.BackColor2 = System.Drawing.Color.Gray; + this.lb5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb5.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb5.BorderSize = new System.Windows.Forms.Padding(1); + this.lb5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb5.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb5.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.lb5.ForeColor = System.Drawing.Color.White; + this.lb5.GradientEnable = true; + this.lb5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lb5.GradientRepeatBG = false; + this.lb5.isButton = false; + this.lb5.Location = new System.Drawing.Point(8, 308); + this.lb5.MouseDownColor = System.Drawing.Color.Yellow; + this.lb5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb5.msg = null; + this.lb5.Name = "lb5"; + this.lb5.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb5.ProgressEnable = false; + this.lb5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb5.ProgressForeColor = System.Drawing.Color.Black; + this.lb5.ProgressMax = 100F; + this.lb5.ProgressMin = 0F; + this.lb5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb5.ProgressValue = 0F; + this.lb5.ShadowColor = System.Drawing.Color.Black; + this.lb5.Sign = ""; + this.lb5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb5.SignColor = System.Drawing.Color.Yellow; + this.lb5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb5.Size = new System.Drawing.Size(874, 50); + this.lb5.TabIndex = 7; + this.lb5.Text = "*"; + this.lb5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb5.TextShadow = true; + this.lb5.TextVisible = true; + // + // lb4 + // + this.lb4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb4.BackColor2 = System.Drawing.Color.Gray; + this.lb4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb4.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb4.BorderSize = new System.Windows.Forms.Padding(1); + this.lb4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb4.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb4.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.lb4.ForeColor = System.Drawing.Color.White; + this.lb4.GradientEnable = true; + this.lb4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lb4.GradientRepeatBG = false; + this.lb4.isButton = false; + this.lb4.Location = new System.Drawing.Point(8, 251); + this.lb4.MouseDownColor = System.Drawing.Color.Yellow; + this.lb4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb4.msg = null; + this.lb4.Name = "lb4"; + this.lb4.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb4.ProgressEnable = false; + this.lb4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb4.ProgressForeColor = System.Drawing.Color.Black; + this.lb4.ProgressMax = 100F; + this.lb4.ProgressMin = 0F; + this.lb4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb4.ProgressValue = 0F; + this.lb4.ShadowColor = System.Drawing.Color.Black; + this.lb4.Sign = ""; + this.lb4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb4.SignColor = System.Drawing.Color.Yellow; + this.lb4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb4.Size = new System.Drawing.Size(874, 50); + this.lb4.TabIndex = 6; + this.lb4.Text = "*"; + this.lb4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb4.TextShadow = true; + this.lb4.TextVisible = true; + // + // lb3 + // + this.lb3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb3.BackColor2 = System.Drawing.Color.Gray; + this.lb3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb3.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb3.BorderSize = new System.Windows.Forms.Padding(1); + this.lb3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb3.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb3.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.lb3.ForeColor = System.Drawing.Color.White; + this.lb3.GradientEnable = true; + this.lb3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lb3.GradientRepeatBG = false; + this.lb3.isButton = false; + this.lb3.Location = new System.Drawing.Point(8, 194); + this.lb3.MouseDownColor = System.Drawing.Color.Yellow; + this.lb3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb3.msg = null; + this.lb3.Name = "lb3"; + this.lb3.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb3.ProgressEnable = false; + this.lb3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb3.ProgressForeColor = System.Drawing.Color.Black; + this.lb3.ProgressMax = 100F; + this.lb3.ProgressMin = 0F; + this.lb3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb3.ProgressValue = 0F; + this.lb3.ShadowColor = System.Drawing.Color.Black; + this.lb3.Sign = ""; + this.lb3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb3.SignColor = System.Drawing.Color.Yellow; + this.lb3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb3.Size = new System.Drawing.Size(874, 50); + this.lb3.TabIndex = 5; + this.lb3.Text = "*"; + this.lb3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb3.TextShadow = true; + this.lb3.TextVisible = true; + // + // lb2 + // + this.lb2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.lb2.BackColor2 = System.Drawing.Color.Gray; + this.lb2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lb2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lb2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb2.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lb2.BorderSize = new System.Windows.Forms.Padding(1); + this.lb2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lb2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lb2.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.lb2.ForeColor = System.Drawing.Color.White; + this.lb2.GradientEnable = true; + this.lb2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lb2.GradientRepeatBG = false; + this.lb2.isButton = false; + this.lb2.Location = new System.Drawing.Point(8, 137); + this.lb2.MouseDownColor = System.Drawing.Color.Yellow; + this.lb2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lb2.msg = null; + this.lb2.Name = "lb2"; + this.lb2.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.lb2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lb2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lb2.ProgressEnable = false; + this.lb2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lb2.ProgressForeColor = System.Drawing.Color.Black; + this.lb2.ProgressMax = 100F; + this.lb2.ProgressMin = 0F; + this.lb2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lb2.ProgressValue = 0F; + this.lb2.ShadowColor = System.Drawing.Color.Black; + this.lb2.Sign = ""; + this.lb2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lb2.SignColor = System.Drawing.Color.Yellow; + this.lb2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lb2.Size = new System.Drawing.Size(874, 50); + this.lb2.TabIndex = 4; + this.lb2.Text = "*"; + this.lb2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lb2.TextShadow = true; + this.lb2.TextVisible = true; + // + // lbTitle + // + this.lbTitle.BackColor = System.Drawing.Color.Tomato; + this.lbTitle.BackColor2 = System.Drawing.Color.Red; + this.lbTitle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.lbTitle.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbTitle.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbTitle.BorderColorOver = System.Drawing.Color.Gray; + this.lbTitle.BorderSize = new System.Windows.Forms.Padding(1); + this.lbTitle.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbTitle.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbTitle.Font = new System.Drawing.Font("맑은 고딕", 30F, System.Drawing.FontStyle.Bold); + this.lbTitle.ForeColor = System.Drawing.Color.WhiteSmoke; + this.lbTitle.GradientEnable = true; + this.lbTitle.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbTitle.GradientRepeatBG = false; + this.lbTitle.isButton = false; + this.lbTitle.Location = new System.Drawing.Point(8, 9); + this.lbTitle.MouseDownColor = System.Drawing.Color.Yellow; + this.lbTitle.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbTitle.msg = null; + this.lbTitle.Name = "lbTitle"; + this.lbTitle.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbTitle.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbTitle.ProgressEnable = false; + this.lbTitle.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbTitle.ProgressForeColor = System.Drawing.Color.Black; + this.lbTitle.ProgressMax = 100F; + this.lbTitle.ProgressMin = 0F; + this.lbTitle.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbTitle.ProgressValue = 0F; + this.lbTitle.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50))))); + this.lbTitle.Sign = ""; + this.lbTitle.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbTitle.SignColor = System.Drawing.Color.Yellow; + this.lbTitle.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbTitle.Size = new System.Drawing.Size(874, 67); + this.lbTitle.TabIndex = 3; + this.lbTitle.Text = "TITLE"; + this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbTitle.TextShadow = true; + this.lbTitle.TextVisible = true; + this.lbTitle.Click += new System.EventHandler(this.lbTitle_Click); + // + // tmBlink + // + this.tmBlink.Enabled = true; + this.tmBlink.Interval = 300; + this.tmBlink.Tick += new System.EventHandler(this.tmBlink_Tick); + // + // fMsgWindow + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.ClientSize = new System.Drawing.Size(900, 490); + this.Controls.Add(this.arPanel1); + this.Font = new System.Drawing.Font("Consolas", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.MaximizeBox = false; + this.Name = "fMsgWindow"; + this.Padding = new System.Windows.Forms.Padding(5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Message Window"; + this.TopMost = true; + this.Load += new System.EventHandler(this.fMsg_Load); + this.arPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + public arCtl.arLabel lb1; + private arCtl.arPanel arPanel1; + public arCtl.arLabel lbTitle; + public arCtl.arLabel lb7; + public arCtl.arLabel lb6; + public arCtl.arLabel lb5; + public arCtl.arLabel lb4; + public arCtl.arLabel lb3; + public arCtl.arLabel lb2; + private System.Windows.Forms.Timer tmBlink; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/MessageWindow/fMsgWindow.cs b/Cs_HMI/Project/MessageWindow/fMsgWindow.cs new file mode 100644 index 0000000..80ccd20 --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/fMsgWindow.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project +{ + public partial class fMsgWindow : Form + { + private Boolean fMove = false; + private Point MDownPos; + private string _msg = string.Empty; + public Boolean DialogMode = false; + + /// + /// 사용자가 이 창을 닫을수 있는가? + /// + public Boolean EnableUserClose + { + get { return _enableuserclose; } + set + { + _enableuserclose = value; + // if (!EnableUserClose) btClose.Visible = false; + } + } + private Boolean _enableuserclose = true; + + public void setMessage(string msg) + { + //msg를 분리해서 표시를 한다. + var lbs = new arCtl.arLabel[] { lbTitle, lb1, lb2, lb3, lb4, lb5, lb6, lb7 }; + var lineBuf = msg.Replace("\r", "").Split('\n'); + int maxLine = Math.Min(lbs.Length, lineBuf.Length); + + for (int i = 0; i < lbs.Length; i++) //최대줄을 넘어가는건 표시불가 + { + if (i >= lineBuf.Length) + { + lbs[i].Text = string.Empty; + } + else + { + if (i > 0) lbs[i].Text = string.Format("{0}. {1}", i, lineBuf[i]); + else lbs[i].Text = lineBuf[i]; + } + + } + } + public fMsgWindow(string msg, string filename = "") + { + EnableUserClose = true; + InitializeComponent(); + this.FormClosing += fMsgWindow_FormClosing; + this.KeyDown += (s1, e1) => { if (EnableUserClose && e1.KeyCode == Keys.Escape) this.Close(); }; + this._msg = msg; + + + if (filename != "") + { + string fullname = AppDomain.CurrentDomain.BaseDirectory + "Image\\" + filename; + if (System.IO.File.Exists(fullname)) + { + var img = this.lb1.BackgroundImage; + this.lb1.BackgroundImage = Image.FromFile(fullname); + if (img != null) img.Dispose(); + } + else + { + msg += "\nNo Image File\n" + filename; + } + } + else + { + var img = this.lb1.BackgroundImage; + this.lb1.BackgroundImage = null; + if (img != null) img.Dispose(); + } + setMessage(msg); + this.lbTitle.MouseMove += label1_MouseMove; + lbTitle.MouseUp += label1_MouseUp; + lbTitle.MouseDown += label1_MouseDown; + lbTitle.MouseDoubleClick += label1_MouseDoubleClick; + //btClose.Click += arLabel1_Click; + } + + void fMsgWindow_FormClosing(object sender, FormClosingEventArgs e) + { + if (DialogMode==false) + { + e.Cancel = true; + return; + } + } + + private void fMsg_Load(object sender, EventArgs e) + { + + } + + private void label1_MouseMove(object sender, MouseEventArgs e) + { + if (fMove) + { + Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y); + this.Left += offset.X; + this.Top += offset.Y; + offset = new Point(0, 0); + } + } + + private void label1_MouseUp(object sender, MouseEventArgs e) + { + fMove = false; + } + + private void label1_MouseDown(object sender, MouseEventArgs e) + { + MDownPos = new Point(e.X, e.Y); + fMove = true; + } + + private void label1_MouseDoubleClick(object sender, MouseEventArgs e) + { + if (EnableUserClose) + { + if (DialogMode == false) this.Visible = false; + else this.Close(); + } + + } + + + private void lbTitle_Click(object sender, EventArgs e) + { + if (EnableUserClose) + { + if (DialogMode == false) this.Visible = false; + else this.Close(); + } + } + + private void tmBlink_Tick(object sender, EventArgs e) + { + var bg1 = lbTitle.BackColor; + var bg2 = lbTitle.BackColor2; + lbTitle.BackColor = bg2; + lbTitle.BackColor2 = bg1; + } + } +} diff --git a/Cs_HMI/Project/MessageWindow/fMsgWindow.resx b/Cs_HMI/Project/MessageWindow/fMsgWindow.resx new file mode 100644 index 0000000..fcee611 --- /dev/null +++ b/Cs_HMI/Project/MessageWindow/fMsgWindow.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/MethodExtentions.cs b/Cs_HMI/Project/MethodExtentions.cs new file mode 100644 index 0000000..91746c1 --- /dev/null +++ b/Cs_HMI/Project/MethodExtentions.cs @@ -0,0 +1,224 @@ + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Project +{ + /// + /// generic method Extension + /// + public static class MethodExtensions + { + public static Rectangle AddOffset(this System.Drawing.Rectangle rect,System.Drawing.Point offset) + { + return new Rectangle(rect.Left + offset.X, rect.Top + offset.Y, rect.Width, rect.Height); + } + public static Rectangle AddOffset(this System.Drawing.Rectangle rect, int x, int y) + { + return new Rectangle(rect.Left + x, rect.Top + y, rect.Width, rect.Height); + } + public static string ToString(this System.Drawing.Rectangle rect) + { + return string.Format("X={0},Y={1},W={2},H={3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string ToString(this System.Drawing.RectangleF rect) + { + return string.Format("X={0},Y={1},W={2},H={3}", rect.X, rect.Y, rect.Width, rect.Height); + } + + //public static void SetBGColor(this System.Windows.Forms.Label ctl,System.Drawing.Color color1) + //{ + // ctl.BackColor = System.Drawing.Color.Red; + //} + + /// + /// 0101이 반복되는 문자열 형태로 전환합니다. + /// + /// + /// + public static string BitString(this System.Collections.BitArray arr) + { + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + for (int i = arr.Length; i > 0; i--) + sb.Append(arr[i - 1] ? "1" : "0"); + return sb.ToString(); + } + + /// + /// int 값으로 변환합니다. + /// + /// + /// + public static int ValueI(this System.Collections.BitArray arr) + { + byte[] buf = new byte[4]; + arr.CopyTo(buf, 0); + return BitConverter.ToInt32(buf, 0); + } + + /// + /// 숫자인지 검사합니다. + /// + /// + /// + public static bool IsNumeric(this string input) + { + double data; + return double.TryParse(input, out data); + //return Regex.IsMatch(input, @"^\d+$"); + } + + /// + /// isnullorempty 를 수행합니다. + /// + /// + /// + public static Boolean isEmpty(this string input) + { + return string.IsNullOrEmpty(input); + } + + /// + /// default 인코딩을 사용하여 문자열로 반환합니다. + /// + /// + /// + public static string GetString(this Byte[] input) + { + return System.Text.Encoding.Default.GetString(input); + } + + /// + /// 16진수 문자열 형태로 반환합니다. + /// + /// + /// + public static string GetHexString(this Byte[] input) + { + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + foreach (byte b in input) + sb.Append(" " + b.ToString("X2")); + return sb.ToString(); + } + + public static string Base64Encode(this string src) + { + string base64enc = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(src)); + return base64enc; + } + public static string Base64Decode(this string src) + { + var base64dec = Convert.FromBase64String(src); + return System.Text.Encoding.UTF8.GetString(base64dec); + } + public static string UrlPathEncode(this string src) + { + string data = System.Web.HttpUtility.UrlPathEncode(src); + return data; + } + public static string UrlEncode(this string src) + { + string data = System.Web.HttpUtility.UrlEncode(src, System.Text.Encoding.UTF8); + return data; + } + public static string UrlDecode(this string src) + { + string data = System.Web.HttpUtility.UrlDecode(src, System.Text.Encoding.UTF8); + return data; + } + public static string toSizeStr(this Size rect) + { + return string.Format("{0};{1}", rect.Width, rect.Height); + } + public static string toPointStr(this PointF rect) + { + return string.Format("{0};{1}", rect.X, rect.Y); + } + public static string toPointStr(this Point rect) + { + return string.Format("{0};{1}", rect.X, rect.Y); + } + public static string toRectStr(this Rectangle rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Top, rect.Width, rect.Height); + } + public static string toRectStr(this RectangleF rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Top, rect.Width, rect.Height); + } + public static RectangleF toRectF(this string str) + { + var buffer = str.Split(';'); + if (buffer.Length != 4) return RectangleF.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new RectangleF(float.Parse(buffer[0]), float.Parse(buffer[1]), float.Parse(buffer[2]), float.Parse(buffer[3])); + } + public static Rectangle toRect(this string str) + { + var buffer = str.Split(';'); + if (buffer.Length != 4) return Rectangle.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new Rectangle(int.Parse(buffer[0]), int.Parse(buffer[1]), int.Parse(buffer[2]), int.Parse(buffer[3])); + } + public static Point toPoint(this string str) + { + str = str.Replace(",", ";").Replace("*", ";").Replace("x", ";").Replace(":", ";"); + + var buffer = str.Split(';'); + if (buffer.Length != 2) return Point.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new Point(int.Parse(buffer[0]), int.Parse(buffer[1])); + } + public static Size toSize(this string str) + { + str = str.Replace(",", ";").Replace("*", ";").Replace("x", ";").Replace(":", ";"); + + var buffer = str.Split(';'); + if (buffer.Length != 2) return Size.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new Size(int.Parse(buffer[0]), int.Parse(buffer[1])); + } + public static PointF toPointF(this string str) + { + str = str.Replace(",", ";").Replace("*", ";").Replace("x", ";").Replace(":", ";"); + + var buffer = str.Split(';'); + if (buffer.Length != 2) return PointF.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new PointF(float.Parse(buffer[0]), float.Parse(buffer[1])); + } + public static Rectangle Fix(this Rectangle rect, Size imgsize) + { + //영역보정 + if (rect.Left < 1) rect.X = 1; + if (rect.Top < 1) rect.Y = 1; + if (rect.Right > imgsize.Width) rect.Width = imgsize.Width - rect.Left - 1; + if (rect.Bottom > imgsize.Height) rect.Height = imgsize.Height - rect.Top - 1; + if (rect.Width < 2 || rect.Height < 2) rect = Rectangle.Empty; + return rect; + } + public static RectangleF FixRoi(this RectangleF rect, Size imgsize) + { + //영역보정 + if (rect.Left < 1) rect.X = 1; + if (rect.Top < 1) rect.Y = 1; + if (rect.Right > imgsize.Width) rect.Width = imgsize.Width - rect.Left - 1; + if (rect.Bottom > imgsize.Height) rect.Height = imgsize.Height - rect.Top - 1; + if (rect.Width < 2 || rect.Height < 2) rect = Rectangle.Empty; + return rect; + } + + } +} + diff --git a/Cs_HMI/Project/PUB.cs b/Cs_HMI/Project/PUB.cs new file mode 100644 index 0000000..eec8d39 --- /dev/null +++ b/Cs_HMI/Project/PUB.cs @@ -0,0 +1,439 @@ +using Microsoft.Speech.Synthesis; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Media; +using COMM; +using System.Threading.Tasks; +using System.Net.NetworkInformation; +using System.Net; +using System.Management; +using System.Data.SqlClient; +using System.Data; + +namespace Project +{ + public static class PUB + { + //public static Device.CFlag flag; + public static bool bShutdown = false; + public static bool Automodeonreboot = false; + public static bool AutRebootAlreay = false; + public static bool DriveSpeed = false; + + #region "Hardware" + + /// + /// 읽기/쓰기용이며 구동모터 와 비상정지가 연결됨(USB-ATMEGA 2560) + /// + public static arDev.FakePLC PLC; + + ///// + ///// 읽기전용이며 Z축 모터와 외부 버튼이 연결됨(USB-ATMEGA 2560) + ///// + //public static Device.PLC2 plcS; + + /// + /// XBEE 통신(USB-TTL) + /// + public static Device.Xbee XBE; + + /// + /// 배터리 잔량 확인(COM2 : RS232C - TTL) + /// + // public static arDevice.BMS bms; + + /// + /// RFID READER (COM1 : RS232C) + /// + public static arDev.Narumi AGV; + + public static arDev.BMS BMS; + + #endregion + + /// + /// 디버그모니터용 소켓(데이터를 전송만 한다) + /// + public static Device.Socket sock_debug; + + private static SpeechSynthesizer voice; + public static MediaPlayer mplayer; + + + public static bool CheckPassword() + { + var f = new Dialog.fPassword(); + if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) return false; + var pass = f.tbInput.Text.Trim(); + var passok = DateTime.Now.ToString("ddMM"); + if (pass.Equals(passok)) return true; + else return false; + } + + public static void Speak(string m, Boolean force = false, bool addlog = true) + { + if (force == false && PUB.setting.Enable_Speak == false) return; + if (force) + voice.SpeakAsyncCancelAll(); + if (voice.State == SynthesizerState.Ready) + voice.SpeakAsync(m); + if (addlog) PUB.log.Add("SPEAK",m); + } + + /// + /// 콜을 받을 수 있는 상황인가? + /// + /// + public static bool IsCanCALL() + { + //콜가능여부도 전송한다 + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] && + VAR.BOOL[eVarBool.FLAG_CHARGEONM] == false && + PUB.BMS.Current_Level > PUB.setting.ChargeEmergencyLevel && + PUB.sm.RunStep != StateMachine.ERunStep.GOUP && + VAR.BOOL[eVarBool.WAIT_COVER_DOWN] == false && + VAR.BOOL[eVarBool.WAIT_COVER_UP] == false) + { + return true; + } + else return false; + } + + public static CounterSetting counter; + + /// + /// popup message window + /// + public static MessageWindow popup; + + /// + /// database manager + /// + public static Manager.DatabaseManager dbm; + + /// + /// 설정정보 + /// + public static CSetting setting; + + /// + /// 시스템로그 + /// + public static arUtil.Log log, logagv, logplc, logbms, logcal; + + public static Boolean bPlayMusic = false; + + /// + /// 사용자 인풋 감지 시간 + /// + public static DateTime LastInputTime = DateTime.Now; + + public static CResult Result; + + public static string PatchVersion { get; set; } + + /// + /// 상태머신 + /// + public static StateMachine sm; //상태머신분리 190529 + + public static System.IO.DirectoryInfo path; + + + public static void initCore() + { + //setting + setting = new CSetting(); + setting.Load(); + + //counter setting + counter = new CounterSetting(); + counter.Load(); + + //log + log = new arUtil.Log(); + logagv = new arUtil.Log(); + logplc = new arUtil.Log(); + logbms = new arUtil.Log(); + logcal = new arUtil.Log(); + + logagv.FileNameFormat = "{yyyyMMdd}_agv"; + logplc.FileNameFormat = "{yyyyMMdd}_plc"; + logbms.FileNameFormat = "{yyyyMMdd}_bms"; + logcal.FileNameFormat = "{yyyyMMdd}_cal"; + + //popupmessage + popup = new MessageWindow(); + + Result = new CResult(); + Result.Clear(); + } + + public static void init() + { + Result = new CResult(); + + //state machine + sm = new StateMachine(); + + path = new System.IO.DirectoryInfo(Util.CurrentPath); + + + + mplayer = new MediaPlayer + { + Volume = PUB.setting.musicvol / 100.0 + }; + if (PUB.setting.musicfile.isEmpty() == false) + if (System.IO.File.Exists(PUB.setting.musicfile)) + PUB.mplayer.Open(new Uri(PUB.setting.musicfile)); + + voice = new SpeechSynthesizer(); + voice.SelectVoice("Microsoft Server Speech Text to Speech Voice (ko-KR, Heami)"); + voice.SetOutputToDefaultAudioDevice(); + + var file_version = System.IO.Path.Combine(Util.CurrentPath, "version.txt"); + if (System.IO.File.Exists(file_version)) + { + PUB.PatchVersion = System.IO.File.ReadAllText(file_version, System.Text.Encoding.UTF8); + } + else PUB.PatchVersion = string.Empty; + } + + public static Boolean CheckManualChargeMode(bool Prompt = true ) + { + if (VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true) + { + string msg = "수동 충전 상태이므로 진행 할 수 없습니다"; + PUB.Speak(msg); + if(Prompt) + Util.MsgE(msg); + return false; + } + else return true; + } + + public static double GetFreeSpace(string driveletter) + { + try + { + var di = new System.IO.DriveInfo(driveletter); + var freespace = di.TotalFreeSpace; + var totalspace = di.TotalSize; + var freeSpaceRate = (freespace * 1.0 / totalspace) * 100.0; + return freeSpaceRate; + } + catch + { + return 100.0; + } + } + + public static double GetFreeSpace() + { + double retval = 100.0; + string savePath1 = path.FullName; + if (savePath1 != "" && System.IO.Directory.Exists(savePath1)) + { + //이폴더를 사용 + if (savePath1.StartsWith("\\") == false) + { + //남은잔량을 체크한다. + retval = GetFreeSpace(savePath1.Substring(0, 1)); + //if (freespace1 >= Pub.setting.AutoDeleteThreshold) return savePath1; + } + } + return retval; + } + + /// + /// 장치에 오류가 있는지? + /// + /// + public static Boolean HasHWError() + { + if (PUB.PLC.IsValid == false) return true; + if (PUB.AGV.IsOpen == false) return true; + if (PUB.XBE.IsOpen == false) return true; + return false; + } + + //public static void AddStatusSQL(StateMachine.eSMStep status, string remark, DateTime wdate) + //{ + // VAR.TIME[eVarTime.StatusReporttime] = DateTime.Now; + // try + // { + // var state = 0; + // if (status == StateMachine.eSMStep.RUN) state = 1; + // else if (status == StateMachine.eSMStep.ERROR || status == StateMachine.eSMStep.EMERGENCY) state = 2; + // if (string.IsNullOrEmpty(remark)) remark = status.ToString(); + // var mcid = PUB.setting.MCID; + // var path = System.IO.Path.Combine(Util.CurrentPath, "Status"); + // var file = System.IO.Path.Combine(path, $"{DateTime.Now.ToString("HHmmssfff")}_{status}.sql"); + // var sql = "insert into MCMonitor_Rawdata(Model,status,remark,ip,mac,time) values('{0}','{1}','{2}','{3}','{4}','{5}')"; + // sql = string.Format(sql, mcid, state, remark, IP, MAC, wdate.ToString("yyyy-MM-dd HH:mm:ss")); + // System.IO.File.WriteAllText(file, sql, System.Text.Encoding.Default); + + // //만들어진지 3분이 지난 파일은 삭제한다. + // //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(); + // //if (fi != null) fi.Delete(); + // } + // catch (Exception ex) + // { + // PUB.log.AddE(ex.Message); + // } + //} + + public static void AddEEDB(string remark) + { + var step = PUB.sm.Step.ToString(); + var rtep = PUB.sm.RunStep.ToString(); + var mcid = PUB.setting.MCID; + var path = System.IO.Path.Combine(Util.CurrentPath, "Status"); + var file = System.IO.Path.Combine(path, $"{DateTime.Now.ToString("HHmmssfff")}_{step}_{rtep}.sql"); + var wdate = DateTime.Now; + try + { + var sql = "insert into AGV_History(mcid,step,runstep,remark,ip,wdate) values('{0}','{1}','{2}','{3}','{4}','{5}')"; + sql = string.Format(sql, mcid, step, rtep, remark,IP,wdate.ToString("yyyy-MM-dd HH:mm:ss")); + System.IO.File.WriteAllText(file, sql, System.Text.Encoding.Default); + + //만들어진지 3분이 지난 파일은 삭제한다. + //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(); + //if (fi != null) fi.Delete(); + } + catch (Exception ex) + { + PUB.log.AddE(ex.Message); + } + } + + + public static string IP { get; set; } + public static string MAC { get; set; } + + /// + /// 프로그램 사용기록 추가 + /// + /// + /// + /// + public static void CheckNRegister3(string prgmName, string develop, string prgmVersion) + { + if (prgmName.Length > 50) prgmName = prgmName.Substring(0, 50); //길이제한 + var task = Task.Factory.StartNew(() => + { + try + { + string ip = ""; + string mac = ""; + // string prgmName = Application.ProductName; + + var nif = NetworkInterface.GetAllNetworkInterfaces(); + var host = Dns.GetHostEntry(Dns.GetHostName()); + string fullname = System.Net.Dns.GetHostEntry("").HostName; + foreach (IPAddress r in host.AddressList) + { + string str = r.ToString(); + + if (str != "" && str.Substring(0, 3) == "10.") + { + ip = str; + break; + } + } + + string rtn = string.Empty; + ObjectQuery oq = new System.Management.ObjectQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled='TRUE'"); + ManagementObjectSearcher query1 = new ManagementObjectSearcher(oq); + foreach (ManagementObject mo in query1.Get()) + { + string[] address = (string[])mo["IPAddress"]; + if (address[0] == ip && mo["MACAddress"] != null) + { + mac = mo["MACAddress"].ToString(); + break; + } + } + + if (ip == "" || mac == "") + { + return; + } + + + SqlConnection conn = new SqlConnection("Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!"); + conn.Open(); + string ProcName = "AddPrgmUser3"; + SqlCommand cmd = new SqlCommand(ProcName, conn) + { + CommandType = CommandType.StoredProcedure + }; + + SqlParameter param = cmd.Parameters.Add("@mac", SqlDbType.NVarChar, 50); + param.Value = mac; + + param = cmd.Parameters.Add("@ip", SqlDbType.NVarChar, 50); + param.Value = ip; + + param = cmd.Parameters.Add("@pgrm", SqlDbType.NVarChar, 50); + param.Value = prgmName; + + param = cmd.Parameters.Add("@develop", SqlDbType.NVarChar, 50); + param.Value = develop; + + param = cmd.Parameters.Add("@pgver", SqlDbType.NVarChar, 50); + param.Value = prgmVersion; + + param = cmd.Parameters.Add("@prgmLogin", SqlDbType.VarChar, 20); + param.Value = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + param = cmd.Parameters.Add("@account", SqlDbType.NVarChar, 50); + param.Value = System.Environment.UserName; + + param = cmd.Parameters.Add("@hostname", SqlDbType.NVarChar, 100); + param.Value = fullname; + + cmd.ExecuteNonQuery(); + conn.Close(); + + IP = ip; + MAC = mac; + } + catch (Exception ex) + { + PUB.log.AddE(ex.Message); + } + }); + } + + + public static void ChangeUIPopup(System.Windows.Forms.NumericUpDown valueCtl) + { + var value = valueCtl.Value.ToString(); + var f = AR.UTIL.InputBox("input", value);// new Dialog.fInput(value); + if (f.Item1) + { + var val = decimal.Parse(f.Item2); + if (val < valueCtl.Minimum) + { + Util.MsgE(string.Format("최소 입력값은 {0} 입니다.", valueCtl.Minimum)); + val = valueCtl.Minimum; + } + if (val > valueCtl.Maximum) + { + Util.MsgE(string.Format("최대 입력값은 {0} 입니다.", valueCtl.Maximum)); + val = valueCtl.Maximum; + } + valueCtl.Value = val; + } + + } + + } +} diff --git a/Cs_HMI/Project/Program.cs b/Cs_HMI/Project/Program.cs new file mode 100644 index 0000000..4258887 --- /dev/null +++ b/Cs_HMI/Project/Program.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Resources; +using System.Threading; + +namespace Project +{ + static class Program + { + /// + /// 해당 응용 프로그램의 주 진입점입니다. + /// + [STAThread] + static void Main() + { + //중복실행방지 + var guidAttr = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(GuidAttribute), true); + if (guidAttr != null) + { + var guida = (GuidAttribute)guidAttr[0]; + var guidstr = guida.Value; + Mutex mtx = new Mutex(true, guidstr); + var success = mtx.WaitOne(new TimeSpan(0, 0, 1)); + if (success == false) + { + MessageBox.Show("중복실행 불가\n\n프로그램이 실행 중 입니다"); + return; + } + } + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + //Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); + //AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + Application.Run(new fMain()); + } + + static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + string emsg = "Fatal Error(UHE)\n\n" + e.ExceptionObject.ToString(); + PUB.log.AddE(emsg); + PUB.log.Flush(); + Util.SaveBugReport(emsg); + var f = new fErrorException(emsg); + f.ShowDialog(); + Application.ExitThread(); + } + + static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) + { + string emsg = "Fatal Error(ATE)\n\n" + e.Exception.ToString(); + PUB.log.AddE(emsg); + PUB.log.Flush(); + Util.SaveBugReport(emsg); + var f = new fErrorException(emsg); + f.ShowDialog(); + Application.ExitThread(); + } + } +} diff --git a/Cs_HMI/Project/Properties/AssemblyInfo.cs b/Cs_HMI/Project/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a085014 --- /dev/null +++ b/Cs_HMI/Project/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("(OTP) 2D Reading System")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Amkor K4")] +[assembly: AssemblyProduct("(OTP) 2D Reading System")] +[assembly: AssemblyCopyright("Copyright ©Amkor-EET 2020")] +[assembly: AssemblyTrademark("EET")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("65f3e762-800c-772e-862f-b444642ec59f")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 +// 지정되도록 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("24.12.06.1300")] +[assembly: AssemblyFileVersion("24.12.06.1300")] diff --git a/Cs_HMI/Project/Properties/Resources.Designer.cs b/Cs_HMI/Project/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0e97cab --- /dev/null +++ b/Cs_HMI/Project/Properties/Resources.Designer.cs @@ -0,0 +1,173 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Project.Properties { + using System; + + + /// + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. + /// + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Project.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 + /// 재정의합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap Charge { + get { + object obj = ResourceManager.GetObject("Charge", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap ChargeH { + get { + object obj = ResourceManager.GetObject("ChargeH", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_charged_battery_80 { + get { + object obj = ResourceManager.GetObject("icons8_charged_battery_80", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_checked_radio_button_48 { + get { + object obj = ResourceManager.GetObject("icons8-checked-radio-button-48", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_exercise_40 { + get { + object obj = ResourceManager.GetObject("icons8-exercise-40", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_new_40 { + get { + object obj = ResourceManager.GetObject("icons8-new-40", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_no_running_40 { + get { + object obj = ResourceManager.GetObject("icons8-no-running-40", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_running_40 { + get { + object obj = ResourceManager.GetObject("icons8-running-40", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_save_40 { + get { + object obj = ResourceManager.GetObject("icons8-save-40", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap icons8_unavailable_40 { + get { + object obj = ResourceManager.GetObject("icons8-unavailable-40", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다. + /// + internal static System.Drawing.Bitmap setup_40 { + get { + object obj = ResourceManager.GetObject("setup_40", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Cs_HMI/Project/Properties/Resources.resx b/Cs_HMI/Project/Properties/Resources.resx new file mode 100644 index 0000000..32a9015 --- /dev/null +++ b/Cs_HMI/Project/Properties/Resources.resx @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\icons8-no-running-40.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-save-40.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-unavailable-40.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-new-40.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-exercise-40.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-running-40.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-checked-radio-button-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-charged-battery-80.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-automatic-gearbox-warning-80.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8-charge-empty-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ChargeH.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Cs_HMI/Project/Properties/Settings.Designer.cs b/Cs_HMI/Project/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b54975d --- /dev/null +++ b/Cs_HMI/Project/Properties/Settings.Designer.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Project.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("asdfasdfasdf\r\nasdfasdfasdf\r\nasdf")] + public string css { + get { + return ((string)(this["css"])); + } + set { + this["css"] = value; + } + } + } +} diff --git a/Cs_HMI/Project/Properties/Settings.settings b/Cs_HMI/Project/Properties/Settings.settings new file mode 100644 index 0000000..f8293bd --- /dev/null +++ b/Cs_HMI/Project/Properties/Settings.settings @@ -0,0 +1,11 @@ + + + + + + asdfasdfasdf +asdfasdfasdf +asdf + + + \ No newline at end of file diff --git a/Cs_HMI/Project/ReadMe.txt b/Cs_HMI/Project/ReadMe.txt new file mode 100644 index 0000000..81495c3 --- /dev/null +++ b/Cs_HMI/Project/ReadMe.txt @@ -0,0 +1,20 @@ +==================================== +HostName : EET1PAGV2 +IP Address : 192.168.1.78 +==================================== +XB24C / 802.15.4 TH +call button setting : ch-17 / id-45A4 / DH:0 / DL:FFFF +충전기 No : 30 : ch-C / ID-3332 + + +GO-QA,GO-QC 라벨 출력 후 장비에 붙이기 +무선 안테나 1개 파손 , 정면 우측 +바닥 회색 테이프 마감 필요 + +08:00~09:00 +18:00~19:00 + + +230425 chi countQA추가 및 메인 디스플레이 방식 변경 + 충전중 수동전환하면 충전 해제 함 +230424 chi QA루트 추가 및 관련 테스트 작업, RFID 입력 diff --git a/Cs_HMI/Project/Resources/ChargeH.png b/Cs_HMI/Project/Resources/ChargeH.png new file mode 100644 index 0000000..3a1db55 Binary files /dev/null and b/Cs_HMI/Project/Resources/ChargeH.png differ diff --git a/Cs_HMI/Project/Resources/icons8-automatic-gearbox-warning-80.png b/Cs_HMI/Project/Resources/icons8-automatic-gearbox-warning-80.png new file mode 100644 index 0000000..2bd7235 Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-automatic-gearbox-warning-80.png differ diff --git a/Cs_HMI/Project/Resources/icons8-charge-empty-battery-96.png b/Cs_HMI/Project/Resources/icons8-charge-empty-battery-96.png new file mode 100644 index 0000000..101374f Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-charge-empty-battery-96.png differ diff --git a/Cs_HMI/Project/Resources/icons8-charged-battery-80.png b/Cs_HMI/Project/Resources/icons8-charged-battery-80.png new file mode 100644 index 0000000..faeeb34 Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-charged-battery-80.png differ diff --git a/Cs_HMI/Project/Resources/icons8-checked-radio-button-48.png b/Cs_HMI/Project/Resources/icons8-checked-radio-button-48.png new file mode 100644 index 0000000..7130e2f Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-checked-radio-button-48.png differ diff --git a/Cs_HMI/Project/Resources/icons8-exercise-40.png b/Cs_HMI/Project/Resources/icons8-exercise-40.png new file mode 100644 index 0000000..ee72597 Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-exercise-40.png differ diff --git a/Cs_HMI/Project/Resources/icons8-new-40.png b/Cs_HMI/Project/Resources/icons8-new-40.png new file mode 100644 index 0000000..85f3a28 Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-new-40.png differ diff --git a/Cs_HMI/Project/Resources/icons8-no-running-40.png b/Cs_HMI/Project/Resources/icons8-no-running-40.png new file mode 100644 index 0000000..be7c877 Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-no-running-40.png differ diff --git a/Cs_HMI/Project/Resources/icons8-running-40.png b/Cs_HMI/Project/Resources/icons8-running-40.png new file mode 100644 index 0000000..6329e3a Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-running-40.png differ diff --git a/Cs_HMI/Project/Resources/icons8-save-40.png b/Cs_HMI/Project/Resources/icons8-save-40.png new file mode 100644 index 0000000..a096fb1 Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-save-40.png differ diff --git a/Cs_HMI/Project/Resources/icons8-unavailable-40.png b/Cs_HMI/Project/Resources/icons8-unavailable-40.png new file mode 100644 index 0000000..ecf2604 Binary files /dev/null and b/Cs_HMI/Project/Resources/icons8-unavailable-40.png differ diff --git a/Cs_HMI/Project/StateMachine/Display/GetErrorMessage.cs b/Cs_HMI/Project/StateMachine/Display/GetErrorMessage.cs new file mode 100644 index 0000000..c70b4aa --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Display/GetErrorMessage.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.NetworkInformation; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; +using System.Windows.Forms; +using System.Management; +using COMM; + +namespace Project +{ + public static partial class UTIL + { + public static string GetResultCodeMessage(eResult err) + { + return err.ToString().ToUpper(); + } + + + public static string GetErrorMessage(eECode err, params object[] values) + { + switch (err) + { + case eECode.NOTALLOWUP: + return "상차 허용 위치가 아닙니다"; + case eECode.AGVCONN: + return Lang.AGV연결실패; + case eECode.PLCCONN: + return Lang.PLC통신실패; + + default: + return err.ToString(); + } + } + + } +} diff --git a/Cs_HMI/Project/StateMachine/DisplayTextHandler.cs b/Cs_HMI/Project/StateMachine/DisplayTextHandler.cs new file mode 100644 index 0000000..13bd24a --- /dev/null +++ b/Cs_HMI/Project/StateMachine/DisplayTextHandler.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Windows.Forms; + +namespace Project +{ + public partial class fMain + { + + delegate void UpdateControlTextHandler(Control ctl, string value); + void UpdateControlText(Control ctl, string value) + { + if (ctl.InvokeRequired) + { + ctl.BeginInvoke(new UpdateControlTextHandler(UpdateControlText), new object[] { ctl, value }); + } + else + { + ctl.Text = value; + } + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN.cs new file mode 100644 index 0000000..c3f07e0 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN.cs @@ -0,0 +1,550 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + DateTime LastSpeakTime = DateTime.Now; + DateTime CoverControlTime = DateTime.Now; + DateTime LastCommandTime = DateTime.Now; + DateTime LastCommandTimeNextStop = DateTime.Now; + bool runStepisFirst = false; + private void _SM_RUN(Boolean isFirst, TimeSpan stepTime) + { + //중단기능이 동작이라면 처리하지 않는다. + if (PUB.sm.bPause) + { + System.Threading.Thread.Sleep(200); + return; + } + + //사용자 스텝처리가 아닌경우에만 검사 + //if (Pub.flag.get(eFlag.UserStepCheck) == false) + { + + //가동불가 조건 확인 + if (CheckStopCondition() == false) + { + PUB.sm.SetNewStep(eSMStep.PAUSE); + return; + } + } + + //이머전시상태라면 stop 처리한다. + if (PUB.AGV.error.Emergency && PUB.AGV.system1.agv_stop == true && + PUB.AGV.system1.stop_by_front_detect == false) + { + PUB.Speak(Lang.비상정지로인해작업을중단합니다); + PUB.sm.SetNewStep(eSMStep.IDLE); + } + + //실행스텝보정 + //if (Pub.sm.runStep == eRunStep.NOTSET && Pub.sm.runStepNew == eRunStep.NOTSET) + //{ + // Pub.sm.setNewRunStep(eRunStep.IDLE); + // Pub.log.Add("RUnStep Initialize"); + //} + + //스텝이 변경되었다면? + if (PUB.sm.RunStep != PUB.sm.RunStepNew) + { + runStepisFirst = true; + PUB.sm.ApplyRunStep(); + } + else runStepisFirst = false; + + if (isFirst) + { + if (PUB.sm.RunStep == ERunStep.READY) + VAR.TIME.Set(eVarTime.ReadyStart); + else + VAR.TIME.Set(eVarTime.RunStart); + } + + switch (PUB.sm.RunStep) + { + case ERunStep.READY: + _SM_RUN_READY(runStepisFirst, PUB.sm.GetRunSteptime); + break; + + case ERunStep.GOCHARGE: //충전위치로 이동 + if (runStepisFirst) + { + VAR.TIME[eVarTime.ChargeTry] = DateTime.Now; + PUB.sm.ResetRunStepSeq(); + PUB.log.Add("충전 명령 시작"); + } + else if (_SM_RUN_GOCHARGE(runStepisFirst, PUB.sm.GetRunSteptime)) + { + //230601 + //if (PUB.Result != null && PUB.sm != null) + // EEMStatus.AddEEDBSQL(PUB.sm.Step, PUB.sm.RunStep.ToString(), PUB.Result.TargetPos.ToString()); + + PUB.Speak(Lang.충전을시작합니다) ; + PUB.sm.SetNewRunStep(ERunStep.CHARGECHECK); + return; + } + break; + + case ERunStep.CHARGECHECK: //충전중 + if (runStepisFirst) + { + VAR.TIME.Set(eVarTime.ChargeStart); + LastCommandTime = DateTime.Now; + } + else if (_SM_RUN_GOCHARGECHECK(runStepisFirst, PUB.sm.GetRunSteptime)) + { + //충전상태가 활성화되었으므로 대기상태로 전환한다 + PUB.sm.SetNewRunStep(ERunStep.READY); + PUB.log.AddAT("충전상태 확인 완료로 인해 대기 합니다"); + } + break; + + case ERunStep.CHARGEOFF: + if (runStepisFirst) + { + VAR.TIME.Set(eVarTime.ChargeEnd); + LastCommandTime = DateTime.Now; + } + else + { + //충전 상태가 OFF되어야 동작하게한다 + if (_SM_RUN_CHGOFF(isFirst, stepTime) == true) + { + //충전상태가 활성화되었으므로 대기상태로 전환한다 + PUB.sm.ClearRunStep(); + + //충전기위치에서 OFF를 한 경우이다 + if (PUB.Result.CurrentPos != ePosition.CHARGE || PUB.Result.TargetPos != ePosition.CHARGE) + { + PUB.Result.CurrentPos = ePosition.NONE; + } + else + { + PUB.Result.TargetPos = ePosition.QC; + } + PUB.Result.CurrentPosCW = "1"; + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + PUB.log.AddAT("충전 해제로 홈으로 이동"); + } + } + break; + case ERunStep.GOUP: //상차이동 + if (_SM_RUN_GOUP(runStepisFirst, PUB.sm.GetRunSteptime)) + { + PUB.Speak(Lang.상차작업이완료되었습니다); + + //230601 + // if (PUB.Result != null && PUB.sm != null) + // EEMStatus.AddEEDBSQL(PUB.sm.Step, PUB.sm.RunStep.ToString(), PUB.Result.TargetPos.ToString()); + + //QA를 제외한 경우에는 기본 QC로 이동한다 + if (PUB.Result.NextPos == ePosition.QA) + PUB.Result.TargetPos = ePosition.QA; + else + PUB.Result.TargetPos = ePosition.QC; + + + PUB.sm.SetNewRunStep(ERunStep.GODOWN); //하차작업으로 전환 + return; + } + break; + + case ERunStep.GODOWN: //하차이동 + if (_SM_RUN_GODOWN(runStepisFirst, PUB.sm.GetRunSteptime)) + { + PUB.Speak(Lang.하차작업이완료되었습니다); + VAR.TIME.Set(eVarTime.ChargeTry); + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);// (Device.PLC.ZMotDirection.Down); //하차작업이 완료되면 커버를 내려서 바로 작업할 수 있게 한다. + + //230601 + //if (PUB.Result != null && PUB.sm != null) + // EEMStatus.AddEEDBSQL(PUB.sm.Step, PUB.sm.RunStep.ToString(), PUB.Result.TargetPos.ToString()); + + //하차가 완료되면 충전대기시간을 30초 남겨두고 없데이트한다 + //충전이 필요할 경우 바로 될수있도록 220118 + VAR.TIME[eVarTime.ChargeTry] = DateTime.Now.AddSeconds(-1 * PUB.setting.ChargeRetryTerm + 30); + + if (PUB.Result.CurrentPos == ePosition.QC) + { + PUB.Speak(Lang.대기상태로전환합니다); + PUB.sm.SetNewRunStep(ERunStep.READY); + } + else + { + //홈 이동 명령처리 + PUB.sm.ClearRunStep(); + PUB.Result.TargetPos = ePosition.QC; + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + PUB.Speak( Lang.홈위치로이동합니다); + } + return; + } + break; + + case ERunStep.GOHOME: + if (runStepisFirst) + { + PUB.Speak(Lang.홈검색을시작합니다); + } + else if (_SM_RUN_GOHOME(runStepisFirst, PUB.sm.GetRunSteptime)) + { + //230601 + // if (PUB.Result != null && PUB.sm != null) + // EEMStatus.AddEEDBSQL(PUB.sm.Step, PUB.sm.RunStep.ToString(), PUB.Result.TargetPos.ToString()); + + PUB.Speak(Lang.홈이동완료대기상태로전환합니다); + VAR.TIME.Set(eVarTime.ChargeTry); + PUB.sm.SetNewRunStep(ERunStep.READY); //대기상태로 전환한다 + return; + } + break; + } + } + + bool CheckStopCondition() + { + return true; + } + + void CheckAGVMoveTo(eGoDir dir) + { + //계속내려간다 + if (dir == eGoDir.Down) + { + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalMilliseconds >= 1999) + { + //현재 동작중인상태에서 방향이 맞지 않다면 일단 움직임을 멈춘다 + if (PUB.AGV.system1.agv_run) + { + if (PUB.AGV.data.Direction == 'B') + { + PUB.log.Add($"방향이 맞지 않아 정지 합니다({dir})"); + PUB.AGV.AGVMoveStop("CheckAGVMoveTo"); + } + else if (PUB.AGV.data.Speed == 'S') + { + PUB.log.Add($"마크정지를 해제하기 위해 장비를 멈춥니다"); + } + //이동해야하는데 마크 스탑이 되어있다면 일단 멈춘다 + + } + else + { + //움직이지 않으므로 전진하도록 한다 + PUB.log.Add($"AGV 기동 방향(DOWN):{dir}"); + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward);//PUB.PLC.Move(Device.PLC.Rundirection.Backward, "UpdateMotionPosition(" + sender + ")"); + + } + LastCommandTime = DateTime.Now; + } + } + else + { + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalMilliseconds >= 1999) + { + if (PUB.AGV.system1.agv_run) + { + if (PUB.AGV.data.Direction == 'F') + { + PUB.log.Add($"방향이 맞지 않아 정지 합니다({dir})"); + PUB.AGV.AGVMoveStop("CheckAGVMoveTo"); + } + else if (PUB.AGV.data.Speed == 'S') + { + PUB.log.Add($"마크정지를 해제하기 위해 장비를 멈춥니다"); + } + } + else + { + PUB.log.Add($"AGV 기동 방향(UP):{dir}"); + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward);//PUB.PLC.Move(Device.PLC.Rundirection.Backward, "UpdateMotionPosition(" + sender + ")"); + + } + LastCommandTime = DateTime.Now; + } + } + } + + void CheckAGVStopbyMARK(string sender) + { + //계속내려간다 + var tsCmd = DateTime.Now - LastCommandTime; + if (VAR.BOOL[eVarBool.NEXTSTOP_MARK] == false || tsCmd.TotalMilliseconds >= 1500) + { + PUB.AGV.AGVMoveStop("CheckAGVStopbyMARK", arDev.Narumi.eStopOpt.MarkStop); + LastCommandTime = DateTime.Now; + PUB.log.Add($"[{sender}] MARK신호에 멈춤 설정"); + } + } + + Boolean UpdateMotionPositionForMark(string sender) + { + //이머전시상태에서는 처리하지 않는다. + if (VAR.BOOL[eVarBool.EMERGENCY]) return false; + + //DOWN 작업 + // if (goDIR == eGoDir.Down) + { + //1. 현재위치 > 대상위치 + if (PUB.Result.CurrentPos > PUB.Result.TargetPos) + { + //계속내려간다 + if (PUB.setting.AGV_Direction_FVI_Backward) + CheckAGVMoveTo(eGoDir.Down); + else + CheckAGVMoveTo(eGoDir.Up); + } + //2. 현재위치 < 대상위치 + else if (PUB.Result.CurrentPos < PUB.Result.TargetPos) + { + //올라가야한다 + if (PUB.setting.AGV_Direction_FVI_Backward) + CheckAGVMoveTo(eGoDir.Up); + else + CheckAGVMoveTo(eGoDir.Down); + } + //3. 현재위치 = 대상위치 + else + { + //현재위치가 확정되었는가? + var actpos = ctlPos1.GetPositionActive(PUB.Result.CurrentPos); + if (actpos == false && PUB.AGV.system1.agv_stop == true) + { + //위치확정이되지 않았다면 AGV멈춤시에 기동하게 한다. + var lastcom = DateTime.Now - LastCommandTime; + if (lastcom.TotalSeconds > 3) + { + if (PUB.Result.CurrentPosCW == "1") + { + if (PUB.setting.AGV_Direction_FVI_Backward) + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward); + else + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward); + } + + else + { + if (PUB.setting.AGV_Direction_FVI_Backward) + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward); + else + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward); + } + + + LastCommandTime = DateTime.Now; + PUB.logagv.Add($"AGV가 멈춰있다 동작을 재개 합니다"); + } + } + else + { + //마크센서가 들어와잇고, 위치가 act 되어있다면 해당 위치에 있는 것이다 + if (PUB.AGV.error.Emergency == false && + PUB.AGV.system1.agv_stop && + PUB.AGV.signal.mark_sensor && actpos && + PUB.Result.CurrentPos == PUB.Result.TargetPos) + { + //PUB.AGV.AGVMoveStop(); + return true; + } + + if (PUB.AGV.system1.agv_stop == true && PUB.AGV.system1.agv_run == false) + { + PUB.log.Add($"멈춰있으므로 이동을 시작 합니다"); + if (PUB.Result.CurrentPosCW == "1") + { + if (PUB.setting.AGV_Direction_FVI_Backward) + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward); + else + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward); + } + else + { + if (PUB.setting.AGV_Direction_FVI_Backward) + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward); + else + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward); + } + + } + + //AGV는 아래로 FVI방향으로 내려가고 있다 + if (VAR.BOOL[eVarBool.AGVDIR_UP] == false) + { + if (PUB.Result.CurrentPosCW == "0") + { + //장비가 마크센서에의해 멈췃다면 완료이다 + if (PUB.AGV.error.Emergency == false && PUB.AGV.signal.mark_sensor) + { + PUB.AGV.AGVMoveStop("UPdateMotionPositionForMark"); + return true; + } + else CheckAGVStopbyMARK(sender); + } + else if (PUB.Result.CurrentPosCW == "1") + { + //내려가는 작업이고 AGV는 올라가고 있는데 RFID는 위졲이 감지되었다면 아래로 내려가야한다 + CheckAGVMoveTo(eGoDir.Up); + } + else + { + PUB.Result.CurrentPosCW = "1"; + CheckAGVMoveTo(eGoDir.Up); + } + } + //AGV는 Qc방향으로 올라가고 있다 + else + { + if (PUB.Result.CurrentPosCW == "1") + { + //네려가는 방향에서 내려가는 위치가 인식되었다면 마크에서 멈춰야 한다 + if (PUB.AGV.error.Emergency == false && PUB.AGV.signal.mark_sensor) + { + PUB.AGV.AGVMoveStop("UPdateMotionPositionForMark"); + return true; + } + else CheckAGVStopbyMARK(sender); + } + else if (PUB.Result.CurrentPosCW == "0") + { + //내려가는 작업이고 AGV는 올라가고 있는데 RFID는 위졲이 감지되었다면 아래로 내려가야한다 + CheckAGVMoveTo(eGoDir.Down); + } + else + { + PUB.Result.CurrentPosCW = "0"; + CheckAGVMoveTo(eGoDir.Down); + } + } + } + + + } + } + //UP 작업 + //else + //{ + // //1. 현재위치 > 대상위치 + // if (PUB.Result.CurrentPos > PUB.Result.TargetPos) + // { + // //계속내려간다 + // CheckAGVMoveTo(eGoDir.Down); + // } + // //2. 현재위치 < 대상위치 + // else if (PUB.Result.CurrentPos < PUB.Result.TargetPos) + // { + // //올라가야한다 + // CheckAGVMoveTo(eGoDir.Up); + // } + // //3. 현재위치 = 대상위치 + // else + // { + // //AGV는 위로가고 있다 + // if (VAR.BOOL[eVarBool.AGVDIR_UP] == true) + // { + // if (PUB.Result.CurrentPosCW == "0") + // { + // //장비가 마크센서에의해 멈췃다면 완료이다 + // if (PUB.AGV.system1.agv_stop && PUB.AGV.system1.stop_by_front_detect == false && PUB.AGV.error.Emergency == false && PUB.AGV.signal.mark_sensor) + // { + // return true; + // } + // else CheckAGVStopbyMARK(); + // } + // else if (PUB.Result.CurrentPosCW == "1") + // { + // //내려가는 작업이고 AGV는 올라가고 있는데 RFID는 위졲이 감지되었다면 아래로 내려가야한다 + // CheckAGVMoveTo(eGoDir.Down); + // } + // } + // //AGV는 내려가고 있다 + // else if (VAR.BOOL[eVarBool.AGVDIR_UP] == false) + // { + // if (PUB.Result.CurrentPosCW == "1") + // { + // //네려가는 방향에서 내려가는 위치가 인식되었다면 마크에서 멈춰야 한다 + // if (PUB.AGV.system1.agv_stop && PUB.AGV.system1.stop_by_front_detect == false && PUB.AGV.error.Emergency == false && PUB.AGV.signal.mark_sensor) + // { + // return true; + // } + // else CheckAGVStopbyMARK(); + // } + // else if (PUB.Result.CurrentPosCW == "0") + // { + // //내려가는 작업이고 AGV는 올라가고 있는데 RFID는 위졲이 감지되었다면 아래로 내려가야한다 + // CheckAGVMoveTo(eGoDir.Up); + // } + // } + // } + //} + + + + + + + return false; + } + Boolean UpdateMotionPositionForCharger(string sender) + { + if (VAR.BOOL[eVarBool.AGVDIR_UP] == false)// PUB.flag.get(EFlag.FLAG_DIR_BW) == true) + { + //충전기 검색은 항상 뒤로 검색한다 + var tsCmd = DateTime.Now - tm_gocharge_command; + if (tsCmd.TotalMilliseconds >= 1999 && + PUB.AGV.error.Emergency == false && + PUB.AGV.system1.agv_run == false) + { + //PUB.PLC.Move(Device.PLC.Rundirection.Backward, "UpdateMotionPosition(" + sender + ")"); + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward);// + tm_gocharge_command = DateTime.Now; + } + } + else + { + //CCW (역방향 ) + //if (Pub.Result.RFIDPos < ePosition.CHARGE || Pub.Result.RFIDPos > ePosition.QC) + //{ + // //정상적이라면 RFID값은 QC + 혹은 QC - 에 있어야 하므로 항상 차저보다 높이 있다 + // //그렇지 않다면 초기화해서 QC검색부터 다시 실행하게 한다 + // //여기는 비정상 위치 값이다. + // Pub.sm.SetStepSeq(1); + //} + //else + //{ + //현재위치가 충전위치이고, 움직이지 않았다면 완료된 경우라 할수 있따 + if (PUB.Result.CurrentPos == ePosition.CHARGE && + PUB.AGV.signal.mark_sensor == true) + { + PUB.log.AddI("충전위치 검색 완료"); + return true; + } + else + { + //이동중이지 않다면 항상 이동을 해줘야한다 + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalMilliseconds >= 1999 && + PUB.AGV.error.Emergency == false && + PUB.AGV.system1.agv_run == false) + { + //PUB.PLC.Move(Device.PLC.Rundirection.Backward, "UpdateMotionPosition #1(" + sender + ")"); + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward);// + LastCommandTime = DateTime.Now; + } + } + //} + } + + return false; + } + + }//cvass +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_CHGOFF.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_CHGOFF.cs new file mode 100644 index 0000000..7e7806b --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_CHGOFF.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + + public Boolean _SM_RUN_CHGOFF(bool isFirst, TimeSpan stepTime) + { + // + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true || PUB.AGV.system1.Battery_charging == true) + { + if (isFirst) + { + VAR.TIME.Set(eVarTime.ChargeEnd); + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA]) + { + PUB.Speak(Lang.충전을해제합니다); + } + } + + //AGV는 충전을 해제한 상태이다 + if (PUB.AGV.system1.Battery_charging == false) + { + //너무빨리 처리되지 않도록 5초후에 완료 처리를 한다 + var ts1 = VAR.TIME.RUN(eVarTime.ChargeEnd); + var ts2 = VAR.TIME.RUN(eVarTime.SendChargeOff); + if (ts1.TotalSeconds >= 5 && ts2.TotalSeconds > 5) VAR.BOOL[eVarBool.FLAG_CHARGEONA] = false; + } + else + { + //OFF전송이 처음이라면 시간 섲렁 + if (VAR.TIME.IsSet(eVarTime.SendChargeOff)==false) + VAR.TIME[eVarTime.SendChargeOff] = DateTime.Now.AddSeconds(-10); + + var tsChgOff = VAR.TIME.RUN(eVarTime.SendChargeOff); + if (tsChgOff.TotalSeconds >= 3) + { + PUB.log.Add("충전 해제 전송"); + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + VAR.TIME.Set(eVarTime.SendChargeOff); + } + + } + return false; + } + else + { + //PUB.logsys.Add($"충전OFF확인완료"); + return true; + } + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOCHARGE.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOCHARGE.cs new file mode 100644 index 0000000..ad79f2a --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOCHARGE.cs @@ -0,0 +1,264 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + DateTime tm_gocharge_command = DateTime.Now; + public Boolean _SM_RUN_GOCHARGE(bool isFirst, TimeSpan stepTime) + { + if (runStepisFirst) + { + //홈을 찾도록 항상 위치를 지워버리자 + PUB.Result.CurrentPos = ePosition.NONE; + PUB.Result.CurrentPos = ePosition.NONE; + } + + //HW 연결오류 + if (PUB.AGV.IsOpen == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR); + return false; + } + else if (PUB.PLC.IsValid == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR); + return false; + } + + //충전 상태가 OFF되어야 동작하게한다 + if (_SM_RUN_CHGOFF(isFirst, stepTime) == false) + return false; + + + //라이더멈춤이 설정되어있다면 음성으로 알려준다 200409 + if (PUB.AGV.system1.stop_by_front_detect == true) + { + var tsSpeak = DateTime.Now - LastSpeakTime; + if (tsSpeak.TotalSeconds >= PUB.setting.doorSoundTerm) + { + PUB.Speak(Lang.전방에물체가감지되었습니다); + LastSpeakTime = DateTime.Now; + } + return false; + } + + //현재 위치가 결정되어있는지 체크한다 + if (_SM_RUN_POSCHK(isFirst, stepTime) == false) + { + PUB.Result.result_message = "충전기 검색 전 현재 위치 검색"; + PUB.Result.result_progressmax = 0; + return false; + } + + //충전작업진행상태 //220629 + //if (PUB.flag.get(EFlag.FLAG_GO_CHAGER_TEMP) == false) + //{ + // PUB.flag.set(EFlag.FLAG_GO_CHAGER_TEMP, true); + //} + + var idx = 1; + if (PUB.sm.RunStepSeq == idx++) + { + PUB.Speak(Lang.충전을위해홈위치로이동합니다); + PUB.Result.TargetPos = ePosition.QC; + VAR.TIME.Set(eVarTime.ChargeSearch); + PUB.sm.UpdateRunStepSeq(); + PUB.log.Add($"충전:대상위치 QC 시작"); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //모션 전후진 제어 + if (UpdateMotionPositionForMark("GOCHARGE #1") == true) + { + PUB.log.Add($"충전:충전기 검색 전 QC위치 확인 완료"); + PUB.sm.UpdateRunStepSeq(); + } + else + { + //아직 충진기 위치를 찾지 못했다 + var ts = VAR.TIME.RUN(eVarTime.ChargeSearch); + if (ts.TotalSeconds > PUB.setting.ChargeSearchTime) + { + PUB.log.Add($"충전:충전검색시간초과({ts.TotalSeconds}/{PUB.setting.ChargeSearchTime})"); + PUB.Speak(Lang.충전기검색실패); + VAR.BOOL[eVarBool.WAIT_CHARGEACK] = false; + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.counter.CountChargeE += 1; + PUB.counter.Save(); + } + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + if (PUB.setting.chargerpos == 0) //down search + { + PUB.log.Add($"충전:충전기 검색을 위한 전진시작"); + PUB.Speak(Lang.충전기를검색합니다); + PUB.AGV.AGVMoveSet(new arDev.Narumi.BunkiData + { + Speed = arDev.Narumi.eMoveSpd.Low, + Bunki = arDev.Narumi.eBunki.Strate, + Direction = arDev.Narumi.eMoveDir.Forward, + PBSSensor = 1, + }); + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward); + //PUB.Result.TargetPos = ePosition.CHARGE; + VAR.TIME.Set(eVarTime.ChargeSearch); + } + else if (PUB.setting.chargerpos == 2) //up search + { + PUB.log.Add($"충전:충전기 검색을 위한 전진시작"); + PUB.Speak(Lang.충전기를검색합니다); + PUB.AGV.AGVMoveSet(new arDev.Narumi.BunkiData + { + Speed = arDev.Narumi.eMoveSpd.Low, + Bunki = arDev.Narumi.eBunki.Strate, + Direction = arDev.Narumi.eMoveDir.Backward, + PBSSensor = 1, + }); + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward); + //PUB.Result.TargetPos = ePosition.CHARGE; + VAR.TIME.Set(eVarTime.ChargeSearch); + } + else + { + PUB.log.Add($"충전기위치가 QC위치로 설정되어 있습니다"); + } + + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + if (PUB.setting.chargerpos != 1) + { + if (PUB.AGV.system1.agv_run) + { + PUB.log.Add($"충전:AGV기동확인으로 마크정지신호설정"); + PUB.Speak(Lang.다음마크위치에서정지합니다); + PUB.AGV.AGVMoveStop("SM_RUN_GOCHARGE", arDev.Narumi.eStopOpt.MarkStop); + VAR.TIME.Set(eVarTime.ChargeSearch); + PUB.sm.UpdateRunStepSeq(); + } + else + { + if (VAR.TIME.RUN(eVarTime.ChargeSearch).TotalSeconds > 5) + { + //5초이상 이곳에서 대기한다면 다시 돌려준다 + PUB.sm.UpdateRunStepSeq(-1); + PUB.log.Add($"충전:AGV기동확인 안됨, 롤백 다시 이동할 수 있게 함"); + } + } + } + else + { + VAR.TIME.Set(eVarTime.ChargeSearch); + PUB.sm.UpdateRunStepSeq(); + } + + + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + if (PUB.AGV.system1.agv_stop) + { + PUB.log.Add($"충전:충전기멈춤확인 다음진행"); + PUB.logagv.Add("충전 위치에 멈췄습니다"); + PUB.sm.UpdateRunStepSeq(); + } + else + { + if (VAR.TIME.RUN(eVarTime.ChargeSearch).TotalSeconds > 60) + { + PUB.log.Add($"충전:멈춤 확인 60초 초과로 전체 취소함"); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.counter.CountChargeE += 1; + PUB.counter.Save(); + VAR.BOOL[eVarBool.WAIT_CHARGEACK] = false; + PUB.AddEEDB("충전실패로 인한 취소"); + } + } + return false; + } + //충전기위치까지 왔다 + else if (PUB.sm.RunStepSeq == idx++) + { + //센서가 안정화되기 위한 5초간 기다려준다 + if (stepTime.TotalSeconds <= 3) return false; + PUB.log.Add($"충전:충전기위치정지완료"); + PUB.Result.CurrentPos = ePosition.CHARGE; //현재위치를 충전기로 한다 + PUB.Result.TargetPos = ePosition.CHARGE; + PUB.Result.CurrentPosCW = "1"; + ctlPos1.SetPosition(ePosition.CHARGE); + ctlPos1.SetPositionActive(ePosition.CHARGE); + ctlPos1.Invalidate(); + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //충전시작 명령을 전송한다 + PUB.log.Add($"충전:충전명령전송"); + PUB.Speak(Lang.충전시작명령을전송합니다); + PUB.AGV.AGVCharge(PUB.setting.ChargerID, true); + VAR.BOOL[eVarBool.WAIT_CHARGEACK] = true; + LastCommandTime = DateTime.Now; + VAR.BYTE[eVarByte.CHARGE_CMDCNT] = 0; + PUB.sm.UpdateRunStepSeq(); + return false; + } + //충전시작명령의 ACK를 체크합니다 + else if (PUB.sm.RunStepSeq == idx++) + { + //충전시작 명령을 전송한다 + if (PUB.AGV.ACKData.Equals("CBT")) + { + PUB.log.Add($"충전명령 회신 확인"); + PUB.sm.UpdateRunStepSeq(); + } + else + { + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalSeconds > 3) + { + if (VAR.BYTE[eVarByte.CHARGE_CMDCNT] > 5) + { + PUB.logagv.Add($"충전명령 재전송 5회초과로 전체 취소함"); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.counter.CountChargeE += 1; + PUB.counter.Save(); + VAR.BOOL[eVarBool.WAIT_CHARGEACK] = false; + PUB.AddEEDB("충전실패로 인한 취소"); + } + else + { + PUB.logagv.Add($"충전시작명령 재전송"); + VAR.BYTE.Add(eVarByte.CHARGE_CMDCNT, 1); + PUB.AGV.AGVCharge(PUB.setting.ChargerID, true); + LastCommandTime = DateTime.Now; + } + } + } + return false; + } + + return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOCHARGECHECK.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOCHARGECHECK.cs new file mode 100644 index 0000000..d0a7124 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOCHARGECHECK.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + + public Boolean _SM_RUN_GOCHARGECHECK(bool isFirst, TimeSpan stepTime) + { + //충전상태체크를 확인합니다 + //10초안에 충전 플래그가 활성화되지 않으면 QC상태로 이동한다 + if (PUB.AGV.system1.Battery_charging == false || VAR.BOOL[eVarBool.FLAG_CHARGEONA] == false) + { + if (PUB.AGV.error.Charger_pos_error) + { + PUB.Speak(Lang.충전기위치오류로작업을취소합니다, true); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + } + else if (PUB.AGV.error.Charger_run_error) + { + PUB.Speak(Lang.충전기위치오류로작업을취소합니다, true); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + } + else + { + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalSeconds >= 30) + { + PUB.log.AddE( Lang.충전기작동확인이오버되어홈으로이동조치합니다); + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + } + else + { + PUB.Result.result_message = string.Format("충전기 활성화 수신 확인 중({0:N1}/{1})", tsCmd.TotalSeconds, 30); + PUB.Result.result_progressmax = 15; + PUB.Result.result_progressvalue = tsCmd.TotalSeconds; + } + } + + return false; + } + else return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GODOWN.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GODOWN.cs new file mode 100644 index 0000000..06f6121 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GODOWN.cs @@ -0,0 +1,226 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + public Boolean _SM_RUN_GODOWN(bool isFirst, TimeSpan stepTime) + { + if (runStepisFirst) + { + //PUB.flag.set(EFlag.FLAG_NEXTSTOP_ALIGN, false); + VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] = false;// + //VAR.BOOL[eVarBool.FLAG_NEXTSTOP_MARK] = false;//); + } + + //HW 연결오류 + if (PUB.AGV.IsOpen == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR); + return false; + } + else if (PUB.PLC.IsValid == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR); + return false; + } + + //충전 상태가 OFF되어야 동작하게한다 + if (_SM_RUN_CHGOFF(isFirst, stepTime) == false) + return false; + + //라이더멈춤이 설정되어있다면 음성으로 알려준다 200409 + if (PUB.AGV.system1.stop_by_front_detect == true) + { + var tsSpeak = DateTime.Now - LastSpeakTime; + if (tsSpeak.TotalSeconds >= PUB.setting.doorSoundTerm) + { + PUB.Speak(Lang.전방에물체가감지되었습니다); + LastSpeakTime = DateTime.Now; + } + return false; + } + + + //현재 위치가 결정되어있는지 체크한다 + if (_SM_RUN_POSCHK(isFirst, stepTime) == false) + return false; + + if (PUB.sm.RunStepSeq == 1) + { + //하차는 무조건 대상이 QC가 된다 + if (PUB.Result.TargetPos == ePosition.NONE) + PUB.Result.TargetPos = ePosition.QC; + + //if (PUB.Result.TargetPos == ePosition.QA && + // PUB.Result.CurrentPos == ePosition.QC && + // (PUB.PLC.IsLimitDn())) + //{ + // PUB.Speak("안전 커버를 올리고 다시 시도하세요", true); + // PUB.sm.ClearRunStep(); + // PUB.sm.SetNewRunStep(ERunStep.READY); + //} + PUB.AddEEDB($"하차작업시작({PUB.Result.TargetPos})"); + PUB.Speak(Lang.하차작업을시작합니다); + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == 2) + { + //모션 전후진 제어 + if (UpdateMotionPositionForMark("GODOWN")) + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == 3) + { + //위치 확정이 완료될때까지 대기 + if (PUB.Result.CurrentPos == PUB.Result.TargetPos) + { + //PUB.PLC.Move(Device.PLC.Rundirection.Stop, "GODOWN:위치확정"); + PUB.AGV.AGVMoveStop("sm_run_godown"); + PUB.sm.UpdateRunStepSeq(); + } + else if (PUB.AGV.system1.agv_run == false) + { + //움직이지않으면 방향을 다시 조정한다 + PUB.sm.SetStepSeq(2); + } + + return false; + } + else if (PUB.sm.RunStepSeq == 4) + { + //대상까지 모두 완료되었다.(완전히 정차할때까지 기다린다) + if (PUB.AGV.system1.agv_run == false) + { + PUB.log.Add("이동 정지 확인"); + PUB.sm.UpdateRunStepSeq(); + } + + return false; + } + else if (PUB.sm.RunStepSeq == 5) + { + //하차수량증가 + if (PUB.Result.TargetPos == ePosition.QA) + PUB.counter.CountQA += 1; + else + PUB.counter.CountQC += 1; + PUB.counter.Save(); + + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == 6) + { + //커버를 자동으로 내려준다 + CoverControlTime = DateTime.Now; + UpdateProgressStatus(stepTime.TotalSeconds, 5, Lang.안전커버를내립니다); + VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = true; + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down);// + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == 7) + { + //커버 내림이 완료될때까지 기다린다 + if (PUB.PLC.IsLimitDn() == true) + { + VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = false; + PUB.sm.UpdateRunStepSeq(); + } + else + { + //경과시간이 10초가 지나면 5초마다 음성을 출력한다 + var tsCover = DateTime.Now - CoverControlTime; + if (tsCover.TotalSeconds >= 7) + { + PUB.Speak(Lang.안전커버를내려주세요); + CoverControlTime = DateTime.Now; + } + } + + return false; + } + else if (PUB.sm.RunStepSeq == 8) + { + //IO업데이트 간격 전송 + UpdateProgressStatus(stepTime.TotalSeconds, 5, Lang.안전커버를올려주세요); + PUB.Speak(Lang.안전커버를올리면하차가완료됩니다); + VAR.BOOL[eVarBool.WAIT_COVER_UP] = true; + CoverControlTime = DateTime.Now; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == 9) + { + //커버 올림이 완료될때까지 기다린다 + if (VAR.BOOL[eVarBool.FLAG_LIMITHIGH] == true) + { + VAR.BOOL[eVarBool.WAIT_COVER_UP] = false; + VAR.BOOL[eVarBool.ITEMON] = false; + PUB.sm.UpdateRunStepSeq(); + } + else + { + //경과시간이 10초가 지나면 5초마다 음성을 출력한다 + var tsCover = DateTime.Now - CoverControlTime; + if (tsCover.TotalSeconds >= PUB.setting.doorSoundTerm) + { + PUB.Speak(Lang.안전커버를올려주세요); + CoverControlTime = DateTime.Now; + + //한쪽이 올라가 있는 상태에.. + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == true) + { + //모터는 올리는 방향일때에... + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LDIR) == true) + { + //모터가 멈춰있을때에.. + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LRUN) == false) + { + //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음) + + //왼쪽이 올라가 있지 않은 경우 + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false) + PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up); + } + } + } + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == true) + { + //모터는 올리는 방향일때에... + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RDIR) == true) + { + //모터가 멈춰있을때에.. + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RRUN) == false) + { + //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음) + + //왼쪽이 올라가 있지 않은 경우 + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false) + PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up); + } + } + } + + + } + } + + return false; + } + + PUB.AddEEDB($"하차작업완료({PUB.Result.TargetPos})"); + EEMStatus.AddStatusCount(1, PUB.Result.TargetPos.ToString()); //230620 + return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOHOME.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOHOME.cs new file mode 100644 index 0000000..bc925c8 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOHOME.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + public Boolean _SM_RUN_GOHOME(bool isFirst, TimeSpan stepTime) + { + if (runStepisFirst) + { + // PUB.flag.set(EFlag.FLAG_NEXTSTOP_ALIGN, false); + + //VAR.BOOL[eVarBool.FLAG_NEXTSTOP_MARK] = false;//); + VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] = false;//); + } + + //220629 + // if(PUB.flag.get(EFlag.FLAG_GO_CHAGER_TEMP)) + //{ + // PUB.flag.set(EFlag.FLAG_GO_CHAGER_TEMP, false); + //} + + //HW 연결오류 + if (PUB.AGV.IsOpen == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR); + return false; + } + else if (PUB.PLC.IsValid == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR); + return false; + } + + //충전 상태가 OFF되어야 동작하게한다 + if (_SM_RUN_CHGOFF(isFirst, stepTime) == false) + return false; + + //라이더멈춤이 설정되어있다면 음성으로 알려준다 200409 + if (PUB.AGV.system1.stop_by_front_detect == true) + { + var tsSpeak = DateTime.Now - LastSpeakTime; + if (tsSpeak.TotalSeconds >= PUB.setting.doorSoundTerm) + { + PUB.Speak(Lang.전방에물체가감지되었습니다); + LastSpeakTime = DateTime.Now; + } + return false; + } + + //현재 위치가 결정되어있는지 체크한다 + if (_SM_RUN_POSCHK(isFirst, stepTime) == false) + return false; + + var idx = 1; + if (PUB.sm.RunStepSeq == idx++) + { + PUB.Speak(Lang.홈으로이동합니다); + + //홈은 무조건 QC위치로 간다 + PUB.AddEEDB($"홈검색시작({PUB.Result.TargetPos})"); + PUB.Result.TargetPos = ePosition.QC; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //모션 전후진 제어 + if (UpdateMotionPositionForMark("GOHOME")) + { + PUB.AGV.AGVMoveStop("SM_RUN_GOHOME"); + PUB.sm.UpdateRunStepSeq(); + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //QC까지 모두 완료되었다.(완전히 정차할때까지 기다린다) + PUB.Speak(Lang.홈검색완료, true); + PUB.AddEEDB($"홈검색완료({PUB.Result.TargetPos})"); + PUB.sm.UpdateRunStepSeq(); + return false; + } + + return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOUP.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOUP.cs new file mode 100644 index 0000000..97669af --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_GOUP.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + + public Boolean _SM_RUN_GOUP(bool isFirst, TimeSpan stepTime) + { + if (runStepisFirst) + { + // VAR.BOOL[eVarBool.FLAG_NEXTSTOP_MARK] = false;//); + VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] = false; + } + + //HW 연결오류 + if (PUB.AGV.IsOpen == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.AGVCONN, eNextStep.ERROR); + return false; + } + else if (PUB.PLC.IsValid == false) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.PLCCONN, eNextStep.ERROR); + return false; + } + + + //충전 상태가 OFF되어야 동작하게한다 + if (_SM_RUN_CHGOFF(isFirst, stepTime) == false) + return false; + + //라이더멈춤이 설정되어있다면 음성으로 알려준다 200409 + if (PUB.AGV.system1.stop_by_front_detect == true) + { + var tsSpeak = DateTime.Now - LastSpeakTime; + if (tsSpeak.TotalSeconds >= PUB.setting.doorSoundTerm) + { + PUB.Speak(Lang.전방에물체가감지되었습니다); + LastSpeakTime = DateTime.Now; + } + return false; + } + + //현재 위치가 결정되어있는지 체크한다 + if (_SM_RUN_POSCHK(isFirst, stepTime) == false) + return false; + + var idx = 1; + if (PUB.sm.RunStepSeq == idx++) + { + //상차 가능 조건 확인 + if (PUB.Result.TargetPos == ePosition.NONE) + { + PUB.Result.SetResultMessage(eResult.Hardware, eECode.NOTALLOWUP, eNextStep.ERROR); + } + else + { + PUB.AddEEDB($"상차작업시작({PUB.Result.TargetPos})"); + PUB.Speak(Lang.상차작업을시작합니다); + PUB.sm.UpdateRunStepSeq(); + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //모션 전후진 제어 + if (UpdateMotionPositionForMark("GOUP")) + PUB.sm.UpdateRunStepSeq(); + + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //장비멈춤확인 + if (PUB.AGV.system1.agv_run == true) + { + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalMilliseconds > 2000) + { + PUB.AGV.AGVMoveStop("SM_RUN_GOUP");// PUB.PLC.Move(Device.PLC.Rundirection.Stop, "GOUP:위치확정"); + LastCommandTime = DateTime.Now; + } + } + else + { + //움직이지 않고 있다면 다시 이동을 시켜준다. + PUB.log.Add("이동 정지 확인"); + PUB.sm.UpdateRunStepSeq(); + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + if (PUB.AGV.system1.agv_run == true) + { + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalMilliseconds > 2000) + { + PUB.AGV.AGVMoveStop("SM_RUN_GOUP");// PUB.PLC.Move(Device.PLC.Rundirection.Stop, "GOUP:위치확정"); + LastCommandTime = DateTime.Now; + } + } + + //커버를 자동으로 내려준다 + CoverControlTime = DateTime.Now; + UpdateProgressStatus(stepTime.TotalSeconds, 5, Lang.안전커버를내립니다); + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down); + VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = true; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + if (PUB.AGV.system1.agv_run == true) + { + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalMilliseconds > 2000) + { + PUB.AGV.AGVMoveStop("SM_RUN_GOUP");// PUB.PLC.Move(Device.PLC.Rundirection.Stop, "GOUP:위치확정"); + LastCommandTime = DateTime.Now; + } + } + + + //커버 내림이 완료될때까지 기다린다 + if (PUB.PLC.IsLimitDn() == true) + { + VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = false; + PUB.Result.NextPos = ePosition.NONE; + PUB.sm.UpdateRunStepSeq(); + } + else + { + //경과시간이 10초가 지나면 5초마다 음성을 출력한다 + var tsCover = DateTime.Now - CoverControlTime; + if (tsCover.TotalSeconds >= 7) + { + PUB.Speak(Lang.안전커버를내려주세요); + CoverControlTime = DateTime.Now; + } + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + if (PUB.AGV.system1.agv_run == true) + { + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalMilliseconds > 2000) + { + PUB.AGV.AGVMoveStop("SM_RUN_GOUP");// PUB.PLC.Move(Device.PLC.Rundirection.Stop, "GOUP:위치확정"); + LastCommandTime = DateTime.Now; + } + return false; + } + + + //상차는 여기서 수량확인한다 + if (PUB.Result.TargetPos == ePosition.F1) + PUB.counter.CountUp1 += 1; + else if (PUB.Result.TargetPos == ePosition.F2) + PUB.counter.CountUp2 += 1; + else if (PUB.Result.TargetPos == ePosition.F3) + PUB.counter.CountUp3 += 1; + else if (PUB.Result.TargetPos == ePosition.F4) + PUB.counter.CountUp4 += 1; + //else if (PUB.Result.TargetPos == ePosition.QA) + // PUB.counter.CountQA += 1; + PUB.counter.Save(); + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + + //IO업데이트 간격 전송 + UpdateProgressStatus(stepTime.TotalSeconds, 5, Lang.안전커버를올려주세요); + PUB.Speak(Lang.안전커버를올리면상차가완료됩니다); + PUB.sm.UpdateRunStepSeq(); + VAR.BOOL[eVarBool.WAIT_COVER_UP] = true; + PUB.Result.NextPos = ePosition.NONE; + CoverControlTime = DateTime.Now; + return false; + } + + else if (PUB.sm.RunStepSeq == idx++) + { + if (PUB.AGV.system1.agv_run == true) + { + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalMilliseconds > 2000) + { + PUB.AGV.AGVMoveStop("SM_RUN_GOUP");// PUB.PLC.Move(Device.PLC.Rundirection.Stop, "GOUP:위치확정"); + LastCommandTime = DateTime.Now; + } + } + + + //커버 올림이 완료될때까지 기다린다 + if (VAR.BOOL[eVarBool.FLAG_LIMITHIGH] == true) + { + VAR.BOOL[eVarBool.WAIT_COVER_UP] = false; + VAR.BOOL[eVarBool.ITEMON] = true; + PUB.sm.UpdateRunStepSeq(); + } + else + { + //경과시간이 10초가 지나면 5초마다 음성을 출력한다 + var tsCover = DateTime.Now - CoverControlTime; + if (tsCover.TotalSeconds >= PUB.setting.doorSoundTerm) + { + PUB.Speak(Lang.안전커버를올려주세요); + CoverControlTime = DateTime.Now; + + //한쪽이 올라가 있는 상태에.. + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == true) + { + //모터는 올리는 방향일때에... + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LDIR) == true) + { + //모터가 멈춰있을때에.. + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_LRUN) == false) + { + //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음) + + //왼쪽이 올라가 있지 않은 경우 + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false) + PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up); + + //오른쪽이 올라가 있지 않은 경우 + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false) + PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up); + } + } + } + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == true) + { + //모터는 올리는 방향일때에... + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RDIR) == true) + { + //모터가 멈춰있을때에.. + if (PUB.PLC.GetValueO(arDev.FakePLC.DOName.PINO_GUIDEMOTOR_RRUN) == false) + { + //자동으로 올려준다 (센서가 간혹 인식이 안되어서 .대기하는 경우가 잇음) + + //왼쪽이 올라가 있지 않은 경우 + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) == false) + PUB.PLC.ZMot_Left(arDev.FakePLC.ZMotDirection.Up); + + //오른쪽이 올라가 있지 않은 경우 + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU) == false) + PUB.PLC.ZMot_Right(arDev.FakePLC.ZMotDirection.Up); + } + } + } + } + } + return false; + } + + PUB.AddEEDB($"상차작업완료({PUB.Result.TargetPos})"); + return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_INIT.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_INIT.cs new file mode 100644 index 0000000..ac69c2d --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_INIT.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Media; + +namespace Project +{ + public partial class fMain + { + /// + /// 웨이퍼를 집기 위해 지정된 위치로 이동을 합니다. + /// + /// + private bool _SM_RUN_INIT(Boolean firstRun, TimeSpan RunTime) + { + //result message + int progress = 0; + var ProgressMax = 13; + + //setting socket + UpdateProgressStatus(++progress, ProgressMax, "소켓 초기화"); System.Threading.Thread.Sleep(5); + if (PUB.sock_debug.Listen(PUB.setting.listenPort)) + PUB.log.AddI("Socket Listen : " + PUB.setting.listenPort); + else + PUB.log.AddE("Socket Listen : " + PUB.sock_debug.errorMessage); + + + //UpdateProgressStatus(++progress, ProgressMax, "PLC 확인"); System.Threading.Thread.Sleep(5); + //if (PUB.setting.Port_PLC != "") + //{ + // if (PUB.PLC.Init(PUB.setting.Port_PLC, PUB.setting.Baud_PLC)) + // { + // //VAR.BOOL[eVarBool.FLAG_SETUP] = true; + // PUB.log.Add("Entering Setup Mode (Main)"); + // } + // else PUB.log.AddE("PLC Init error : " + PUB.PLC.GetErrorMessage()); + //} + + //UpdateProgressStatus("PLC #2 확인", ++progress, ProgressMax); System.Threading.Thread.Sleep(5); + //if (Pub.setting.Port_PLC2 != "") + //{ + // if (Pub.plcS.Init(Pub.setting.Port_PLC2, Pub.setting.Baud_plc2)) + // { + // Pub.plcS.SetFlag(Device.PLC2.PLCFlag.FLAG_SETUP, true); + // Pub.log.Add("Entering Setup Mode (Sub)"); + // } + // else Pub.log.AddE("DIO #S Init error : " + Pub.plcS.GetErrorMessage()); + //} + + //setting Port_Xbee + //UpdateProgressStatus(++progress, ProgressMax, "Port_Xbee 확인"); System.Threading.Thread.Sleep(5); + //if (PUB.setting.Port_XBE.isEmpty() == false) + //{ + // PUB.XBE.PortName = PUB.setting.Port_XBE; + // if (PUB.XBE.Open() == false) + // PUB.log.AddE(string.Format("Barcode Port({0}) Open Error: {1}", PUB.setting.Port_XBE, PUB.XBE.errorMessage)); + //} + //else + //{ + // PUB.log.AddAT("NOT-SET Port_Xbee PORTNAME"); + // PUB.XBE.errorMessage = "NOT-SET Port_Xbee PORTNAME"; + //} + + ////setting Port_Xbee + //UpdateProgressStatus(++progress, ProgressMax, "Port_AGV 확인"); System.Threading.Thread.Sleep(5); + //if (PUB.setting.Port_AGV.isEmpty() == false) + //{ + // PUB.AGV.PortName = PUB.setting.Port_AGV; + // PUB.AGV.BaudRate = PUB.setting.Baud_AGV; + // if (PUB.AGV.Open() == false) + // PUB.log.AddE(string.Format("RFID Host:{0} Open Error: {1}", PUB.setting.Port_AGV, PUB.AGV.errorMessage)); + //} + //else + //{ + // PUB.log.AddAT("NOT-SET Port_AGV PORTNAME"); + // PUB.AGV.errorMessage = "NOT-SET Port_AGV PORTNAME"; + //} + + + ////setting Port_Xbee + //UpdateProgressStatus(++progress, ProgressMax, "Port_BMS 확인"); System.Threading.Thread.Sleep(5); + //if (!PUB.setting.Port_BAT.isEmpty()) + //{ + // PUB.BAT.PortName = PUB.setting.Port_BAT;//.Port_BMS; + // PUB.BAT.BaudRate = PUB.setting.Baud_BAT;// + // PUB.BAT.ScanInterval = 1000;// Pub.setting.interval_bms; + // var binit_bms = PUB.BAT.Open(); + // if (binit_bms == false) PUB.log.AddE(string.Format("binit_bms Port({0}) Open Error: {1}", PUB.setting.Port_BAT, PUB.BAT.errorMessage)); + //} + //else + //{ + // PUB.log.AddAT("NOT-SET binit_bms PORTNAME"); + //} + + //남은 공간 + UpdateProgressStatus(++progress, ProgressMax, "공간 확인"); System.Threading.Thread.Sleep(5); + CheckFreeSpace(); //181225 + + //시스템 오류가 있다면 경고 메시지를 표싷ㄴ다. + UpdateProgressStatus(++progress, ProgressMax, "오류 수집"); System.Threading.Thread.Sleep(5); + //var AlertMessage = new System.Text.StringBuilder(); + //if (Pub.Xbee.IsInit == false) AlertMessage.AppendLine(string.Format("BARCODE : {0}", Pub.Xbee.errorMessage)); + if (freeSpaceRate < PUB.setting.AutoDeleteThreshold) + { + PUB.Speak(string.Format("디스크 용량이 {0:N0}% 남았습니다", freeSpaceRate)); + } + + //if (AlertMessage.Length > 1) + //{ + // AlertMessage.Insert(0, "SYSTEM ALERT\n"); + // Pub.popup.setMessage(AlertMessage.ToString()); + //} + + UpdateProgressStatus(++progress, ProgressMax, "--"); System.Threading.Thread.Sleep(5); + PUB.log.Add("초기화 완료"); + return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_POSCHK.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_POSCHK.cs new file mode 100644 index 0000000..f1b66e8 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_POSCHK.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class fMain + { + public Boolean _SM_RUN_POSCHK(bool isFirst, TimeSpan stepTime) + { + //현재 위치가 찾아지지 않았다면. 먼저 위치를 찾는다. 위로 이동시켜서 찾는다. + if (PUB.Result.CurrentPos == ePosition.NONE) + { + if (isFirst) + { + PUB.Speak( Lang.현재위치를검색합니다); + } + + if (PUB.AGV.system1.agv_run) + { + //방향을 체크한다 + var basedir = PUB.setting.AGV_Direction_FVI_Backward ? 'F' : 'B'; + if (PUB.AGV.data.Direction == basedir) + { + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalMilliseconds >= 1999) + { + PUB.AGV.AGVMoveStop("SM_RUN_POSCHK",arDev.Narumi.eStopOpt.Stop); + LastCommandTime = DateTime.Now; + } + } + } + else if (PUB.AGV.system1.agv_run == false) + { + //전진이동한다 + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalMilliseconds >= 1999) + { + if (PUB.setting.AGV_Direction_FVI_Backward) + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Backward);// + else + PUB.AGV.AGVMoveRun(arDev.Narumi.eRunOpt.Forward);// + LastCommandTime = DateTime.Now; + } + } + + return false; + } + else return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_READY.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_READY.cs new file mode 100644 index 0000000..71833d7 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_READY.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using COMM; +using static Project.StateMachine; + +namespace Project +{ + public partial class fMain + { + public Boolean _SM_RUN_READY(bool isFirst, TimeSpan stepTime) + { + //이동 불가 조건이 걸려있다면 충전을 하지 못하게 한다. + Boolean bAutoChageOn = true; + if (PUB.AGV.system1.stop_by_front_detect) bAutoChageOn = false; + else if (PUB.AGV.error.Emergency) bAutoChageOn = false; + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONA]) bAutoChageOn = false; + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]) bAutoChageOn = false; + + + //자동 충전 중이라면 최대 충전시간과 레벨을 체크한다 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true) + { + if (VAR.TIME.IsSet(eVarTime.ChargeStart) == false) + VAR.TIME.Set(eVarTime.ChargeStart); + + //충전중이라면 최대 충전 시간을 체크한다. + var tsChargeRunTime = VAR.TIME.RUN(eVarTime.ChargeStart); + if (PUB.BMS.Current_Level >= PUB.setting.ChargeMaxLevel) + { + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.log.Add($"최대충전레벨 OVER로 인한 자동 해제(레벨:{PUB.setting.ChargeMaxLevel})"); + PUB.AddEEDB($"최대충전레벨 OVER로 인한 자동 해제(레벨:{PUB.setting.ChargeMaxLevel})"); + PUB.Speak(Lang.충전완료로해제합니다); + } + else if (PUB.setting.ChargeMaxTime > 1 && tsChargeRunTime.TotalSeconds >= PUB.setting.ChargeMaxTime) + { + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.CHARGEOFF); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.log.Add($"최대충전시간 OVER로 인한 자동 해제(시간:{PUB.setting.ChargeMaxTime})"); + PUB.AddEEDB($"최대충전시간 OVER로 인한 자동 해제(시간:{PUB.setting.ChargeMaxTime})"); + PUB.Speak(Lang.충전완료로해제합니다); + } + VAR.STR[eVarString.ChargeCheckMsg] = "자동 충전 중"; + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true) + { + if (VAR.TIME.IsSet(eVarTime.ChargeStart) == false) + VAR.TIME.Set(eVarTime.ChargeStart); + VAR.STR[eVarString.ChargeCheckMsg] = "수동 충전"; + } + + //현재위치를 모르는 상태라면 이동하여 현재 위치를 찾는다 + else if (PUB.Result.CurrentPos == ePosition.NONE) + { + if (PUB.AGV.system1.agv_run == false && + PUB.AGV.error.Emergency == false && + PUB.AGV.error.runerror_by_no_magent_line == false) + { + //현재위치를 검색해야함 + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.AddEEDB($"READY상태에서 현재위치를 몰라 홈으로 이동"); + } + VAR.STR[eVarString.ChargeCheckMsg] = "현재 위치 모름"; + } + else if (PUB.setting.Enable_AutoCharge == true ) + { + if(bAutoChageOn) + { + VAR.BOOL[eVarBool.CHARGE_READY] = true; + if (PUB.BMS.Current_Level < PUB.setting.ChargeStartLevel) + { + //레벨에 의한 자동 충전간격은 + var ts = VAR.TIME.RUN(eVarTime.ChargeTry); + if (ts.TotalSeconds >= PUB.setting.ChargeRetryTerm) + { + VAR.I32[eVarInt32.ChargeWaitSec] = 0; + VAR.BOOL[eVarBool.CHARGE_WAIT] = false; + PUB.log.Add($"자동충전레벨시작 {PUB.BMS.Current_Level}/{PUB.setting.ChargeStartLevel}"); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.GOCHARGE); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.AddEEDB($"자동충전레벨시작 {PUB.BMS.Current_Level}/{PUB.setting.ChargeStartLevel}"); + } + else + { + VAR.I32[eVarInt32.ChargeWaitSec] = (int)(PUB.setting.ChargeRetryTerm - ts.TotalSeconds); + VAR.BOOL[eVarBool.CHARGE_WAIT] = true; + } + VAR.STR[eVarString.ChargeCheckMsg] = "배터리 충전 레벨 필요"; + } + else + { + //아직 레벨이 높다 + VAR.BOOL[eVarBool.CHARGE_READY] = false; + VAR.I32[eVarInt32.ChargeWaitSec] = 0; + VAR.BOOL[eVarBool.CHARGE_WAIT] = false; + VAR.STR[eVarString.ChargeCheckMsg] = "배터리 레벨상 충전 불필요"; + } + } + else + { + VAR.BOOL[eVarBool.CHARGE_READY] = false; + VAR.I32[eVarInt32.ChargeWaitSec] = 0; + VAR.BOOL[eVarBool.CHARGE_WAIT] = false; + VAR.STR[eVarString.ChargeCheckMsg] = "충전 불가 조건"; + //충전조건이 맞지 않는다 + } + } + else + { + VAR.BOOL[eVarBool.CHARGE_READY] = false; + VAR.I32[eVarInt32.ChargeWaitSec] = 0; + VAR.BOOL[eVarBool.CHARGE_WAIT] = false; + //자동충전이 해제된 상태이므로 처리하지 않는다 + VAR.STR[eVarString.ChargeCheckMsg] = "자동 충전 해제 됨"; + } + + //대기모드에서는 움직이지 않게 한다 + if(PUB.AGV.system1.agv_run) + { + var ts = VAR.TIME.RUN(eVarTime.IdleStopTime); + if(ts.TotalSeconds > 1) + { + PUB.log.Add($"대기상태에서는 정차"); + PUB.AGV.AGVMoveStop("대기상태에서는 정차"); + VAR.TIME.Set(eVarTime.IdleStopTime); + } + } + + return false; + + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_RESET.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_RESET.cs new file mode 100644 index 0000000..fed8f2d --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_RESET.cs @@ -0,0 +1,163 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + public Boolean _SM_RUN_RESET(bool isFirst, TimeSpan stepTime) + { + if (runStepisFirst) + { + PUB.Speak(Lang.장비상태초기화); + + //충전기검색시퀀스 OFF + //PUB.flag.set(EFlag.FLAG_GO_CHAGER_TEMP, false); + } + + var idx = 1; + if (PUB.sm.RunStepSeq == idx++) + { + //충전중이라면 충전off코드를 넣는다 + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false,PUB.setting.ChargetWaitSec); + LastCommandTime = DateTime.Now; + PUB.AddEEDB($"초기화"); + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + UpdateProgressStatus(stepTime.TotalSeconds, 5, "SYNC : 수동 모드 확인 중"); + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false) + PUB.sm.UpdateRunStepSeq(); + else + { + //일정시간동안 명령을 재전송한다 + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalMilliseconds >= 1999) + { + VAR.BOOL[eVarBool.FLAG_AUTORUN] = false; + LastCommandTime = DateTime.Now; + } + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //모션을 멈춥니다 + //PUB.PLC.Move(Device.PLC.Rundirection.Stop,"RESET"); + PUB.AGV.AGVMoveStop("_sm_run_reset"); + LastCommandTime = DateTime.Now; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //모션이 멈출때까지 기다린다 + if (PUB.AGV.system1.agv_stop == false) + { + PUB.sm.UpdateRunStepSeq(); + } + else + { + //모션이 멈추지 않는다면 멈춤코드를 계속 넣는다 + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalMilliseconds >= 1999) + { + //PUB.PLC.Move(Device.PLC.Rundirection.Stop,"RESET(Re)"); + PUB.AGV.AGVMoveStop("_sm_run_reset"); + LastCommandTime = DateTime.Now; + } + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //대상위치 초기화 + PUB.Result.TargetPos = ePosition.NONE; + PUB.Result.CurrentPos = ePosition.NONE; + PUB.Result.CurrentPosCW = "0"; + ctlPos1.SetPositionDeActive(); + ctlPos1.SetPosition(ePosition.NONE); + ctlPos1.SetDirection("0"); + ctlPos1.Invalidate(); + + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //자동 스탑 플래그 해제 + //VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] = false;//"reset #6"); + VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] = false; + + LastCommandTime = DateTime.Now; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + UpdateProgressStatus(stepTime.TotalSeconds, 5, "자동멈춤해제(ALIGN)"); + if (VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] == false) + PUB.sm.UpdateRunStepSeq(); + else + { + //일정시간동안 명령을 재전송한다 + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalMilliseconds >= 1999) + { + VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] = false;// "reset #7"); + //VAR.BOOL[eVarBool.FLAG_NEXTSTOP_ALIGN] = false;// + LastCommandTime = DateTime.Now; + } + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //자동 스탑 플래그 해제 + //VAR.BOOL[eVarBool.FLAG_NEXTSTOP_MARK] = false;// "reset #8"); + + LastCommandTime = DateTime.Now; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //설정모드가 되어있다면 해제 해준다 + VAR.BOOL[eVarBool.FLAG_SETUP] = false; + VAR.BOOL[eVarBool.ITEMON] = false; + VAR.BOOL[eVarBool.WAIT_COVER_DOWN] = false; + VAR.BOOL[eVarBool.WAIT_COVER_UP] = false; + + LastCommandTime = DateTime.Now; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + UpdateProgressStatus(stepTime.TotalSeconds, 5, "설정모드해제(MARK)"); + + if (VAR.BOOL[eVarBool.FLAG_SETUP] == false) + PUB.sm.UpdateRunStepSeq(); + else + { + //일정시간동안 명령을 재전송한다 + var tsCmd = DateTime.Now - LastCommandTime; + if (tsCmd.TotalMilliseconds >= 1999) + { + VAR.BOOL[eVarBool.FLAG_SETUP] = false; + LastCommandTime = DateTime.Now; + } + } + return false; + } + return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_SM_RUN_SYNC.cs b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_SYNC.cs new file mode 100644 index 0000000..baedea2 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_SM_RUN_SYNC.cs @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; +using COMM; +using System.Diagnostics; + +namespace Project +{ + public partial class fMain + { + Dictionary synlist; + int synidx; + public Boolean _SM_RUN_SYNC(bool isFirst, TimeSpan stepTime) + { + var idx = 1; + if (PUB.sm.RunStepSeq == idx++) + { + // return true; + UpdateProgressStatus(stepTime.TotalSeconds, 5, "SYNC : 장치 연결(MAIN) 확인 중"); + if (PUB.AGV.IsOpen == false) + { + //agv connect + ConnectSerialPort(PUB.AGV, PUB.setting.Port_AGV, PUB.setting.Baud_AGV, + eVarTime.LastConn_AGV, eVarTime.LastConnTry_AGV, eVarTime.LastRecv_AGV); + } + else if (PUB.AGV.IsValid == true) + { + //설정모드 진입 + VAR.BOOL[eVarBool.FLAG_SETUP] = true; + LastCommandTime = DateTime.Now; + + PUB.sm.UpdateRunStepSeq(); + } + else + { + UpdateProgressStatus(stepTime.TotalMilliseconds, 10000.0, "wait"); + if (stepTime.TotalSeconds >= 10) + { + PUB.log.AddE("시간초과로 인해 Sync 작업이 실패되었습니다"); + PUB.sm.SetNewStep(eSMStep.IDLE); + } + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //동기화 명령 생성 + synlist = new Dictionary(); + synlist.Add("SSH", PUB.setting.SPD_H.ToString("0000")); // PUB.AGV.AGVCommand(item.Key, item.Value); + synlist.Add("SSM", PUB.setting.SPD_M.ToString("0000")); + synlist.Add("SSL", PUB.setting.SPD_L.ToString("0000")); + + synlist.Add("SSS", PUB.setting.SPD_S.ToString("0000")); + synlist.Add("SRS", PUB.setting.SPD_R.ToString("0000")); + + synlist.Add("SPK", PUB.setting.PID_PH.ToString("0000")); + synlist.Add("SPM", PUB.setting.PID_PM.ToString("0000")); + synlist.Add("SPL", PUB.setting.PID_PL.ToString("0000")); + + synlist.Add("SIK", PUB.setting.PID_IH.ToString("0000")); + synlist.Add("SIM", PUB.setting.PID_IM.ToString("0000")); + synlist.Add("SIL", PUB.setting.PID_IL.ToString("0000")); + + synlist.Add("SDK", PUB.setting.PID_DH.ToString("0000")); + synlist.Add("SDM", PUB.setting.PID_DM.ToString("0000")); + synlist.Add("SDL", PUB.setting.PID_DL.ToString("0000")); + + synlist.Add("SPS", PUB.setting.PID_PS.ToString("0000")); + synlist.Add("SIS", PUB.setting.PID_IS.ToString("0000")); + synlist.Add("SDS", PUB.setting.PID_DS.ToString("0000")); + + //추가 230110 + synlist.Add("SCK", PUB.setting.SCK.ToString("0000")); + synlist.Add("SSK", PUB.setting.SSK.ToString("0000")); + synlist.Add("STT", PUB.setting.STT.ToString("0000")); + //synlist.Add("SBN", PUB.setting.ChargerID.ToString("0000")); + + PUB.AddEEDB($"SYNC시작({PUB.Result.TargetPos})"); + + synidx = 0; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //잠시 대기 + var ts = DateTime.Now - LastCommandTime; + if (ts.TotalSeconds > 0.15) + { + PUB.sm.UpdateRunStepSeq(); + } + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + //통신 확인되었으므로 스피드를 전송한다. + if (synidx < synlist.Count) + { + var item = synlist.ElementAt(synidx); + UpdateProgressStatus(stepTime.TotalSeconds, 5, $"SYNC :{item.Key}"); + PUB.AGV.AGVCommand(item.Key, item.Value); + } + LastCommandTime = DateTime.Now; + PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + if (synidx < synlist.Count) + { + var ts = DateTime.Now - LastCommandTime; + var item = synlist.ElementAt(synidx); + UpdateProgressStatus(stepTime.TotalSeconds, 5, $"SYNC 변경 확인 중 :{item.Key}"); + if (PUB.AGV.ACKData.Equals(item.Key)) + { + synidx += 1; + if(ts.TotalSeconds < 0.15) PUB.sm.UpdateRunStepSeq(-2); //싱크중에 추가 지연시간 확보 + else PUB.sm.UpdateRunStepSeq(-1); + LastCommandTime = DateTime.Now; + } + else + { + if (ts.TotalSeconds > 1) + { + PUB.AGV.AGVCommand(item.Key, item.Value); + LastCommandTime = DateTime.Now; + Console.WriteLine($"RE.send Sync : {item.Key}:{item.Value}"); + } + } + } + else PUB.sm.UpdateRunStepSeq(); + return false; + } + else if (PUB.sm.RunStepSeq == idx++) + { + PUB.AddEEDB($"SYNC완료({PUB.Result.TargetPos})"); + UpdateProgressStatus(stepTime.TotalSeconds, 5, "SYNC : 완료"); + LastCommandTime = DateTime.Now; + PUB.sm.UpdateRunStepSeq(); + return false; + } + return true; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/Step/_STEP_CLOSE.cs b/Cs_HMI/Project/StateMachine/Step/_STEP_CLOSE.cs new file mode 100644 index 0000000..d9d4247 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/Step/_STEP_CLOSE.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; + +namespace Project +{ + public partial class fMain + { + /// + /// 프로그램을 닫을때 1회 실행되는 함수 + /// + private void _STEP_CLOSING_START(eSMStep step) + { + PUB.bShutdown = true; + if (PUB.PLC != null) PUB.PLC.Dispose(); + + PUB.AddEEDB("프로그램 종료"); + PUB.log.Add("Program Close"); + PUB.log.Flush(); + PUB.logagv.Flush(); + PUB.logplc.Flush(); + PUB.logbms.Flush(); + PUB.logcal.Flush(); + // PUB.sm.Stop(); + + } + public StepResult _STEP_CLOSING(eSMStep step, TimeSpan stepTime, TimeSpan seqTime) + { + + //############################ + //#### 사용자 전용 코드 + //############################ + + + //############################ + //#### 개발자 권장코드 + //############################ + PUB.sm.SetNewStep(eSMStep.CLOSED); + return StepResult.Complete; + } + + public void _STEP_CLOSED_START(eSMStep step) + { + try + { + this.BeginInvoke(new Action(() => + { + //화면을 닫는다 + PUB.sm.Stop(); + this.Close(); + })); + } + catch { } + } + public StepResult _STEP_CLOSED(eSMStep step, TimeSpan stepTime, TimeSpan seqTime) + { + return StepResult.Wait; + } + } +} diff --git a/Cs_HMI/Project/StateMachine/_AGV.cs b/Cs_HMI/Project/StateMachine/_AGV.cs new file mode 100644 index 0000000..6649c3e --- /dev/null +++ b/Cs_HMI/Project/StateMachine/_AGV.cs @@ -0,0 +1,258 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using arCtl; +using static Project.StateMachine; +using COMM; +namespace Project +{ + + public partial class fMain + { + private void AGV_Message(object sender, arDev.Narumi.MessageEventArgs e) + { + if (e.MsgType == arDev.arRS232.MessageType.Normal) + + PUB.logagv.AddE(e.Message); + else if (e.MsgType == arDev.arRS232.MessageType.Normal) + + PUB.logagv.Add(e.Message); + else if (e.MsgType == arDev.arRS232.MessageType.Recv) + { + if (e.Message.Substring(1).StartsWith("STS") == false) + PUB.logagv.Add("AGV-RX", e.Message); + } + else if (e.MsgType == arDev.arRS232.MessageType.Send) + PUB.logagv.Add("AGV-TX", e.Message); + else + { + + PUB.logagv.Add(e.MsgType.ToString(), e.Message); + } + } + + ePosition ParsePosition(int tag, out string dirBW) + { + var tagstr = tag.ToString(); + var tagno = tagstr.Substring(0, tagstr.Length - 1); + + if (tag == PUB.setting.TAGNOT) { dirBW = "0"; return ePosition.NOT; } + + else if (tag == PUB.setting.TAG_QA_QC) { dirBW = "0"; return ePosition.QA_QC; } + else if (tag == PUB.setting.TAG_QC_F1) { dirBW = "0"; return ePosition.QC_F1; } + else if (tag == PUB.setting.TAG_F1_F2) { dirBW = "0"; return ePosition.F1_F2; } + else if (tag == PUB.setting.TAG_F2_F3) { dirBW = "0"; return ePosition.F2_F3; } + else if (tag == PUB.setting.TAG_F3_F4) { dirBW = "0"; return ePosition.F3_F4; } + else if (tag == PUB.setting.TAG_F4_F5) { dirBW = "0"; return ePosition.F4_F5; } + + else if (tag == PUB.setting.TAGQAB) { dirBW = "0"; return ePosition.QA; } + else if (tag == PUB.setting.TAGQCB) { dirBW = "0"; return ePosition.QC; } + else if (tag == PUB.setting.TAGF1B) { dirBW = "0"; return ePosition.F1; } + else if (tag == PUB.setting.TAGF2B) { dirBW = "0"; return ePosition.F2; } + else if (tag == PUB.setting.TAGF3B) { dirBW = "0"; return ePosition.F3; } + else if (tag == PUB.setting.TAGF4B) { dirBW = "0"; return ePosition.F4; } + else if (tag == PUB.setting.TAGF5B) { dirBW = "0"; return ePosition.F5; } + //else if (tag == PUB.setting.TAGQAA) { dirBW = "1"; return ePosition.QA; } + //else if (tag == PUB.setting.TAGCHA) { dirBW = "1"; return ePosition.CHARGE; } + else if (tag == PUB.setting.TAGQAA) { dirBW = "1"; return ePosition.QA; } + else if (tag == PUB.setting.TAGQCA) { dirBW = "1"; return ePosition.QC; } + else if (tag == PUB.setting.TAGF1A) { dirBW = "1"; return ePosition.F1; } + else if (tag == PUB.setting.TAGF2A) { dirBW = "1"; return ePosition.F2; } + else if (tag == PUB.setting.TAGF3A) { dirBW = "1"; return ePosition.F3; } + else if (tag == PUB.setting.TAGF4A) { dirBW = "1"; return ePosition.F4; } + else if (tag == PUB.setting.TAGF5A) { dirBW = "1"; return ePosition.F5; } + else if (tag == PUB.setting.TAGPOT) { dirBW = "0"; return ePosition.POT; } + else + { + if (tag > 9350 && tag < 9400) + { + dirBW = "0"; return ePosition.QC_F1; + } + else if (tag > 9250 && tag < 9300) + { + dirBW = "0"; return ePosition.QA_QC; + } + else if (tag > 9000 && tag < 9100) + { + dirBW = "0"; return ePosition.NOT; + } + else + { + dirBW = "0"; return ePosition.NONE; + } + + } + } + + + bool _charging = false; + private void AGV_DataReceive(object sender, arDev.Narumi.DataEventArgs e) + { + switch (e.DataType) + { + case arDev.Narumi.DataType.STS: + { + //마크센서 확인 + var chg_mark1 = PUB.AGV.signal.GetChanged(arDev.Narumi.Signal.eflag.mark_sensor_1); + var chg_mark2 = PUB.AGV.signal.GetChanged(arDev.Narumi.Signal.eflag.mark_sensor_1); + var chg_run = PUB.AGV.system1.GetChanged(arDev.Narumi.SystemFlag1.eflag.agv_run); + var chg_stop = PUB.AGV.system1.GetChanged(arDev.Narumi.SystemFlag1.eflag.agv_stop); + //if (chg_run && PUB.AGV.system1.agv_run) PUB.Speak("이동을 시작 합니다"); + VAR.BOOL[eVarBool.AGVDIR_UP] = PUB.AGV.data.Direction == 'B'; + // PUB.AGV.signal.mark_sensor = PUB.AGV.signal.mark_sensor; + VAR.BOOL[eVarBool.AGV_ERROR] = PUB.AGV.error.Value > 0; + VAR.BOOL[eVarBool.EMERGENCY] = PUB.AGV.error.Emergency; + + if (PUB.AGV.signal.mark_sensor == false) + { + if (VAR.BOOL[eVarBool.MARK_SENSOROFF] == false) + { + VAR.BOOL[eVarBool.MARK_SENSOROFF] = true; + VAR.TIME[eVarTime.MarkSensorOff] = DateTime.Now; + PUB.log.Add($"마크센서off를 설정"); + } + } + else + { + if (VAR.BOOL[eVarBool.MARK_SENSOROFF] == true) + { + VAR.BOOL[eVarBool.MARK_SENSOROFF] = false; + VAR.TIME[eVarTime.MarkSensorOff] = DateTime.Now; + PUB.log.Add($"마크센서off를 해제"); + } + } + + + //차징상태변경 + if (_charging != PUB.AGV.system1.Battery_charging) + { + if (PUB.AGV.system1.Battery_charging) + { + VAR.TIME[eVarTime.ChargeStart] = DateTime.Now; + PUB.logagv.Add($"충전시작:{VAR.TIME[eVarTime.ChargeStart]}"); + } + _charging = PUB.AGV.system1.Battery_charging; + } + + //배터리충전상태 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] != PUB.AGV.system1.Battery_charging) + { + PUB.log.Add($"충전상태전환 {PUB.AGV.system1.Battery_charging}"); + VAR.BOOL[eVarBool.FLAG_CHARGEONA] = PUB.AGV.system1.Battery_charging; + } + //자동충전해제시 곧바로 수동 충전되는 경우가 있어 자동 상태를 BMS에 넣는다 230118 + PUB.BMS.AutoCharge = PUB.AGV.system1.Battery_charging; + + if (PUB.AGV.error.Charger_pos_error != VAR.BOOL[eVarBool.CHG_POSERR]) + { + if (PUB.AGV.error.Charger_pos_error) + { + PUB.Speak(Lang.충전기위치오류); + } + VAR.BOOL[eVarBool.CHG_POSERR] = PUB.AGV.error.Charger_pos_error; + } + + if (VAR.BOOL[eVarBool.MARK_SENSOROFF] == true && PUB.AGV.signal.mark_sensor == false) + { + //현재 활성화된 위치를 꺼준다 + if (this.ctlPos1.GetPositionActive(PUB.Result.CurrentPos)) + { + var ts = VAR.TIME.RUN(eVarTime.MarkSensorOff); + if (ts.TotalSeconds >= 2) + { + ctlPos1.SetPositionDeActive(); + PUB.log.Add($"현재 활성위치를 해제 함"); + } + } + + } + + //나르미가 멈췄다면 다음 마크 이동 기능이 OFF 된다 + if (PUB.AGV.system1.agv_stop) + VAR.BOOL[eVarBool.NEXTSTOP_MARK] = false; + + if (VAR.BOOL[eVarBool.MARK_SENSOR] != PUB.AGV.signal.mark_sensor) + { + if (PUB.AGV.signal.mark_sensor) + { + //현재위치를 확정한다 + var curact = ctlPos1.GetPositionActive(PUB.Result.CurrentPos); + if (curact == false) + { + PUB.log.Add($"마크센서로인해 현재위치 설정완료:{PUB.Result.CurrentPos}"); + ctlPos1.SetPositionActive(PUB.Result.CurrentPos); + ctlPos1.SetDirection(""); + ctlPos1.Invalidate(); + } + } + VAR.BOOL[eVarBool.MARK_SENSOR] = PUB.AGV.signal.mark_sensor; + } + } + break; + 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); + if (curpos != PUB.Result.CurrentPos) + { + PUB.log.Add($"현재위치변경 {PUB.Result.CurrentPos} -> {curpos}"); + PUB.Result.CurrentPos = curpos; + } + + PUB.Result.CurrentPosCW = dirForward; + ctlPos1.SetPositionDeActive(); + ctlPos1.SetPosition(PUB.Result.CurrentPos); + ctlPos1.SetDirection(dirForward); + ctlPos1.Invalidate(); + + //pot not를 보면 일단 바로 멈추게한다 + if (PUB.Result.CurrentPos == ePosition.POT || PUB.Result.CurrentPos == ePosition.NOT) + { + PUB.AGV.AGVMoveStop("TAG:pot/not 발견으로 즉시 멈춤"); + } + + //자동, 상하차 모드일때 RFID 가 타겟위치에 올때는 - 멈춤을 설정해준다 + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true && + PUB.Result.CurrentPos == PUB.Result.TargetPos && + PUB.Result.TargetPos != ePosition.NONE && + (PUB.sm.RunStep == ERunStep.GODOWN || + PUB.sm.RunStep == ERunStep.GOUP || + PUB.sm.RunStep == ERunStep.GOHOME || + PUB.sm.RunStep == ERunStep.GOCHARGE)) + { + if (PUB.AGV.data.Sts == 'F' && dirForward == "0") //아래로 내려오고있음 + { + PUB.AGV.AGVMoveStop("AGV_DataReceive", arDev.Narumi.eStopOpt.MarkStop); + PUB.Speak( Lang.다음마크위치에서정지합니다); + } + else if (PUB.AGV.data.Sts == 'B' && dirForward == "1") + { + //VAR.BOOL[eVarBool.FLAG_NEXTSTOP_MARK] = true; + PUB.AGV.AGVMoveStop("AGV_DataReceive", arDev.Narumi.eStopOpt.MarkStop); + PUB.Speak(Lang.다음마크위치에서정지합니다); + } + } + + } + break; + case arDev.Narumi.DataType.ACK: + PUB.logagv.Add($"AGV_[ACK]Receive : {PUB.AGV.ACKData}"); + break; + default: + PUB.logagv.Add($"AGV_DataReceive : {e.DataType}"); + break; + + } + + } + + } +} diff --git a/Cs_HMI/Project/StateMachine/_BMS.cs b/Cs_HMI/Project/StateMachine/_BMS.cs new file mode 100644 index 0000000..01189fd --- /dev/null +++ b/Cs_HMI/Project/StateMachine/_BMS.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using arCtl; +using static Project.StateMachine; +using COMM; + +namespace Project +{ + public partial class fMain + { + string lastbms03 = ""; + string lastbms04 = ""; + string lastbmsA03 = ""; + string lastbmsA04 = ""; + string lastbms = ""; + DateTime lastbmstime03 = DateTime.Now; + DateTime lastbmstime04 = DateTime.Now; + DateTime lastbmstimeA03 = DateTime.Now; + DateTime lastbmstimeA04 = DateTime.Now; + DateTime lastbmstime = DateTime.Now; + private void Bms_Message(object sender, arDev.BMS.MessageEventArgs e) + { + if (e.MsgType == arDev.arRS232.MessageType.Error) PUB.logbms.AddE( e.Message); + else + { + var hexstr = e.Data.GetHexString().Trim(); + bool addlog = false; + var logtimesec = 30; + if (hexstr.StartsWith("DD 04")) + { + if (lastbms04.Equals(hexstr.Substring(0,5)) == false) + { + addlog = true; + lastbms04 = "DD 04"; + lastbmstime04 = DateTime.Now; + } + else + { + var ts = DateTime.Now - lastbmstime04; + if (ts.TotalSeconds > logtimesec) + { + addlog = true; + lastbms04 = "DD 04"; + lastbmstime04 = DateTime.Now; + } + } + + } + else if (hexstr.StartsWith("DD 03")) + { + if (lastbms03.Equals(hexstr.Substring(0, 5)) == false) + { + addlog = true; + lastbms03 = "DD 03"; + lastbmstime03 = DateTime.Now; + } + else + { + var ts = DateTime.Now - lastbmstime03; + if (ts.TotalSeconds > logtimesec) + { + addlog = true; + lastbms03 = "DD 03"; + lastbmstime03 = DateTime.Now; + } + } + } + + else if (hexstr.StartsWith("DD A5 04")) + { + if (lastbmsA04.Equals(hexstr.Substring(0, 8)) == false) + { + addlog = true; + lastbmsA04 = "DD A5 04"; + lastbmstimeA04 = DateTime.Now; + } + else + { + var ts = DateTime.Now - lastbmstimeA04; + if (ts.TotalSeconds > logtimesec) + { + addlog = true; + lastbmsA04 = "DD A5 04"; + lastbmstimeA04 = DateTime.Now; + } + } + } + + else if (hexstr.StartsWith("DD A5 03")) + { + if (lastbmsA03.Equals(hexstr.Substring(0, 8)) == false) + { + addlog = true; + lastbmsA03 = "DD A5 03"; + lastbmstimeA03 = DateTime.Now; + } + else + { + var ts = DateTime.Now - lastbmstimeA03; + if (ts.TotalSeconds > logtimesec) + { + addlog = true; + lastbmsA03 = "DD A5 03"; + lastbmstimeA03 = DateTime.Now; + } + } + } + + + + else if (hexstr.isEmpty() == false) + { + if (lastbms.Equals(hexstr) == false) + { + lastbms = hexstr; + lastbmstime = DateTime.Now; + addlog = true; + } + else + { + var ts = DateTime.Now - lastbmstime; + if (ts.TotalSeconds > logtimesec) + { + addlog = true; + lastbms = hexstr; + lastbmstime = DateTime.Now; + } + } + } + + if(addlog) + PUB.logbms.Add("BMS:" + hexstr); + + } + } + private void BMS_ChargeDetect(object sender, arDev.ChargetDetectArgs e) + { + //자동충전중이아니고 멈춰있다면 수동 충전으로 전환한다 + if (PUB.AGV.system1.Battery_charging == false && PUB.AGV.system1.agv_stop == true && VAR.BOOL[eVarBool.FLAG_CHARGEONM] == false) + { + if (PUB.setting.DetectManualCharge) + { + VAR.BOOL[eVarBool.FLAG_CHARGEONM] = true; + PUB.Speak(Lang.충전이감지되어수동충전으로전환합니다); + } + else + { + PUB.log.Add($"충전이 감지되었지만 메뉴얼 전환 비활성화됨"); + } + + } + } + + private void Bms_BMSDataReceive(object sender, EventArgs e) + { + + if (PUB.BMS.Current_Level <= PUB.setting.ChargeStartLevel) + { + //배터리 레벨이 기준보다 낮다면 경고를 활성화 한다 + if (VAR.BOOL[eVarBool.BATTERY_LOW] == false) + { + VAR.BOOL[eVarBool.BATTERY_LOW] = true; + PUB.log.AddAT("배터리 부족 경고 활성화"); + } + } + else + { + //배터리 경고를 해제한다 + if (VAR.BOOL[eVarBool.BATTERY_LOW] == true) + { + VAR.BOOL[eVarBool.BATTERY_LOW] = false; + PUB.log.AddAT("배터리 부족 경고 비활성화"); + } + } + } + } +} diff --git a/Cs_HMI/Project/StateMachine/_DIO.cs b/Cs_HMI/Project/StateMachine/_DIO.cs new file mode 100644 index 0000000..d0e4947 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/_DIO.cs @@ -0,0 +1,297 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using arDev; +using COMM; + +namespace Project +{ + public partial class fMain + { + + private void PLC_DioChanged(object sender, arDev.FakePLC.IOValueEventArgs e) + { + if (e.Direction == arDev.Arduino.IODirection.Input) + { + var diName = (arDev.FakePLC.DIName)e.ArrIDX; + Console.WriteLine(string.Format("[DI:{1}]{0}=>{2}", diName, e.ArrIDX, e.NewValue)); + + if (diName == arDev.FakePLC.DIName.PINI_BTN_1) //reset + { + if (e.NewValue == true) + { + PUB.log.Add($"버튼({diName}) 눌림(AGV_RESET)"); + PUB.AGV.AGVErrorReset(); + + //241203 + if(PUB.AGV.system1.agv_run || PUB.AGV.system1.agv_run_manual) + { + PUB.AGV.AGVMoveStop("button1"); + } + //PUB.XBE.NewMsgEvent('0', '1'); + } + } + else if (diName == arDev.FakePLC.DIName.PINI_BTN_2) //auto -> QC //230424 + { + if (e.NewValue == true) + { + PUB.log.Add($"버튼({diName}) 눌림"); + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true) + { + if (PUB.sm.RunStep == StateMachine.ERunStep.GOUP) + { + //zup을 자동으로 해준다 + if (VAR.BOOL[eVarBool.WAIT_COVER_UP]) + { + PUB.log.Add($"버튼({diName}) 눌림"); + PUB.PLC.ZMot(FakePLC.ZMotDirection.Up); + PUB.Result.NextPos = ePosition.QC; + } + else PUB.Speak(Lang.커버업대기상태가아닙니다); + } + else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN) + { + //이미 하차진행중에 누른 경우이다 + PUB.Result.NextPos = ePosition.QC; + PUB.Result.TargetPos = ePosition.QC; + } + else + { + PUB.log.Add(Lang.QC이동버튼은상하차에서만사용가능합니다); + PUB.Speak(Lang.하차상태에서만사용가능합니다); + } + } + else PUB.Speak(Lang.자동운전상태가아닙니다); + + //if (VAR.BOOL[eVarBool.FLAG_AUTORUN]==false) + //{ + // PUB.sm.ClearRunStep(); + // PUB.sm.SetNewRunStep(StateMachine.ERunStep.READY); + // PUB.sm.SetNewStep(StateMachine.eSMStep.RUN); + // PUB.Speak("자동 상태로 전환 합니다"); + //} + //else + //{ + // PUB.Speak("현재 자동 상태 입니다"); + //} + } + } + else if (diName == arDev.FakePLC.DIName.PINI_BTN_3) //z-down -> QA //230424 + { + if (e.NewValue == true) + { + //Z-dn기능으로 업데이트 230119 + PUB.log.Add($"버튼({diName}) 눌림"); + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true) + { + if (PUB.sm.RunStep == StateMachine.ERunStep.GOUP) + { + //zup.을 자동으로 해준다 + if (VAR.BOOL[eVarBool.WAIT_COVER_UP]) + { + PUB.log.Add($"버튼({diName}) 눌림"); + PUB.PLC.ZMot(FakePLC.ZMotDirection.Up); + PUB.Result.NextPos = ePosition.QA; + } + else PUB.Speak(Lang.커버업대기상태가아닙니다); + } + else if (PUB.sm.RunStep == StateMachine.ERunStep.GODOWN) + { + //이미 하차진행중에 누른 경우이다 + PUB.Result.NextPos = ePosition.QA; + PUB.Result.TargetPos = ePosition.QA; + } + else + { + PUB.log.Add($"QA이동 버튼은 상/하차에서만 사용 가능합니다"); + PUB.Speak(Lang.하차상태에서만사용가능합니다); + } + } + else PUB.Speak(Lang.자동운전상태가아닙니다); + + //PUB.PLC.ZMot(FakePLC.ZMotDirection.Down); + } + } + else if (diName == arDev.FakePLC.DIName.PINI_BTN_4) //z-up + { + if (e.NewValue == true) + { + //Z-up기능으로 업데이트 230119 + PUB.log.Add($"버튼({diName}) 눌림"); + PUB.PLC.ZMot(FakePLC.ZMotDirection.Up); + } + } + else if (diName == arDev.FakePLC.DIName.PINI_EMG) + { + if (e.NewValue == true) + { + PUB.log.Add($"버튼({diName}) 눌림"); + PUB.Speak(Lang.비상정지); + } + //else Pub.Speak("비상 정지 해제"); + } + else if (diName == arDev.FakePLC.DIName.PINI_OVERLOADL) + { + if (e.NewValue == true) + { + PUB.log.Add($"버튼({diName}) 눌림"); + PUB.Speak(Lang.오버로드감지); + } + VAR.BOOL[eVarBool.OVERLOADL] = e.NewValue; + } + else if (diName == arDev.FakePLC.DIName.PINI_OVERLOADR) + { + if (e.NewValue == true) + { + PUB.log.Add($"버튼({diName}) 눌림"); + PUB.Speak(Lang.오버로드감지); + } + VAR.BOOL[eVarBool.OVERLOADR] = e.NewValue; + } + //else if (diName == FakePLC.DIName.PINI_LIMIT_LU) + //{ + // PUB.flag.set(EFlag.FLAG_LIMITHIGHL, e.NewValue); + //} + //else if (diName == FakePLC.DIName.PINI_LIMIT_RU) + //{ + // PUB.flag.set(EFlag.FLAG_LIMITHIGHR, e.NewValue); + //} + //else if (diName == FakePLC.DIName.PINI_LIMIT_LD) + //{ + // PUB.flag.set(EFlag.FLAG_LIMITLOWL, e.NewValue); + //} + //else if (diName == FakePLC.DIName.PINI_LIMIT_RD) + //{ + // PUB.flag.set(EFlag.FLAG_LIMITLOWR, e.NewValue); + //} + //else + //{ + // //처리하지 않음 + //} + //PUB.flag.set(EFlag.FLAG_LIMITHIGH, (PUB.flag.get(EFlag.FLAG_LIMITHIGHL) && PUB.flag.get(EFlag.FLAG_LIMITHIGHR))); + //PUB.flag.set(EFlag.FLAG_LIMITLOW, (PUB.flag.get(EFlag.FLAG_LIMITLOWL) && PUB.flag.get(EFlag.FLAG_LIMITLOWR))); + VAR.BOOL[eVarBool.FLAG_LIMITHIGH] = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LU) || PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RU); + VAR.BOOL[eVarBool.FLAG_LIMITLOW] = PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_LD) || PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_LIMIT_RD); + VAR.BOOL[eVarBool.OVERLOAD] = (VAR.BOOL[eVarBool.OVERLOADL] || VAR.BOOL[eVarBool.OVERLOADR]); + } + else + { + //출력포트값 변경 + var doName = (arDev.FakePLC.DOName)e.ArrIDX; + PUB.logplc.Add($"출력({doName}) {(e.NewValue ? "O" : "X")}"); + } + } + + //string oldflagmessage = string.Empty; + string lastplclogmessage = ""; + DateTime lastplclogtime = DateTime.Now; + string logmessage = ""; + bool logerror = false; + void PLC_Message(object sender, FakePLC.MessageEventArgs e) + { + if (e.MsgType == arRS232.MessageType.Error) + { + PUB.logplc.Add("ERROR-MAIN", e.Message); + } + else if (e.MsgType == arRS232.MessageType.Normal) + { + //내부클래스에서 발생한 메세지(이 프로그램) + if (e.Message.StartsWith("@STP:") && e.Message.Length > 5) + { + PUB.Result.StopMessageSWR = e.Message.Substring(5); + PUB.Result.StopMessageTimeSWR = DateTime.Now; + } + PUB.logplc.Add("MOT", "[Inner Msg]" + e.Message); + } + else + { + //PLC에서 수신된 메세지 + if (e.Message.StartsWith("@STP|") && e.Message.Length > 5) + { + PUB.Result.StopMessagePLC = e.Message.Substring(5); + PUB.Result.StopMessageTimePLC = DateTime.Now; + PUB.logplc.Add("PLC", "[" + e.MsgType.ToString() + "]" + e.Message); + } + else if (e.Message.StartsWith("@FLAG|") && e.Message.Length > 6) + { + var flagData = e.Message.Split('|')[1].Split(','); + var flag = (COMM.eVarBool)(byte.Parse(flagData[0])); + + var flagmsg = "[" + flag.ToString() + "] = " + flagData[1]; + + + //플래그값이 바뀌면 로깅한다 + var fValueTrue = flagData[1] == "1"; + if (PUB.PLC.GetFlag(flag) != fValueTrue) + { + PUB.logplc.Add("MFLAG", flagmsg); + } + } + else if (e.Message.StartsWith("@SET|") && e.Message.Length > 5) + { + //셋팅관련 정보이다 + var flagData = e.Message.Split('|')[1]; + var splBuf = flagData.Split(':'); + if (splBuf[0] == "SAVE") PUB.PLC.SaveTime = DateTime.Now; + PUB.logplc.Add("SETUP", "[SETTING] " + flagData); + + } + else + { + + if (e.Message.StartsWith("ERR")) + { + logmessage = e.Message; + logerror = true; + } + else if (e.Message.StartsWith("@@") & e.Data.Length == 16) + { + //표시하지 말자 + logerror = false; + var hexstr = e.Data.GetHexString(); + logmessage = "[" + e.MsgType.ToString() + "]" + hexstr; + } + else + { + logmessage = "[" + e.MsgType.ToString() + "]" + e.Message; + logerror = false; + } + + bool addlog = false; + if (lastplclogmessage.StartsWith("[Recv] 40 40")) + { + if (lastplclogmessage.Length > 40) + { + var st = lastplclogmessage.Substring(0, 40); + var cr = logmessage.Substring(0, 40); + addlog = st.Equals(cr) == false; + if (addlog == false) + { + var ts = DateTime.Now - lastplclogtime; + if (ts.TotalSeconds > 5) addlog = true; + } + } + else addlog = true; + } + else if (logmessage.Equals(lastplclogmessage) == false) addlog = true; + else + { + var ts = DateTime.Now - lastplclogtime; + if (ts.TotalSeconds > 30) addlog = true; + } + if (addlog) + { + if (logerror) PUB.logplc.AddE(logmessage); + else PUB.logplc.Add("PLC", logmessage); + lastplclogmessage = logmessage; + lastplclogtime = DateTime.Now; + } + } + } + + } + } +} + diff --git a/Cs_HMI/Project/StateMachine/_Flag.cs b/Cs_HMI/Project/StateMachine/_Flag.cs new file mode 100644 index 0000000..25aadd8 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/_Flag.cs @@ -0,0 +1,107 @@ +using COMM; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class fMain + { + void gridView2_ItemClick(object sender, arFrame.Control.GridView.ItemClickEventArgs e) + { + //메인화면 하단의 플래그 상태창에서 클릭된 경우 + //var gv = sender as arFrame.Control.GridView; + //var flagIndex = gv.getNameItem(e.idx); + //if(flagIndex != "") + //{ + // var fidx = int.Parse(flagIndex); + // var flag = (eFlag)fidx; + // var curValue = Pub.flag.get(flag); + // Pub.flag.set(flag, !curValue); + //} + } + + private void BOOL_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + var buf = e.PropertyName.Split('|'); + var flag = (COMM.eVarBool)int.Parse(buf[0]); + var NewValue = buf[1].ToUpper() == "TRUE"; + if (flag == COMM.eVarBool.FLAG_AUTORUN) + { + //자동운전이 해제되면 현재위치값을 삭제한다 + if (NewValue == false && PUB.setting.AutoModeOffAndClearPosition == true) + { + if (PUB.Result.CurrentPos != ePosition.NONE) + { + PUB.log.AddAT($"자동운전이 해제되어 현재 위치를 제거합니다"); + PUB.Result.CurrentPos = ePosition.NONE; + PUB.Result.CurrentPosCW = "1"; + } + } + // Pub.mplayer.Stop(); + //if (NewValue == true) + //{ + // btAutoRun.BackColor = Color.Lime; + // btAutoRun.BackColor2 = Color.Green; + // btAutoRun.Text = "자동 실행 상태"; + + // //if (Pub.sm.Step >= StateMachine.eSMStep.IDLE) Pub.Speak("자동 실행 모드"); + //} + //else + //{ + // btAutoRun.BackColor2 = Color.DimGray; + // btAutoRun.BackColor = Color.FromArgb(100, 100, 100); + // btAutoRun.Text = "수동 조작 상태"; + // //if (Pub.sm.Step >= StateMachine.eSMStep.IDLE) Pub.Speak("수동 조작 모드"); + //} + } + else if (flag == COMM.eVarBool.FLAG_CHARGEONA) + { + if (NewValue) + { + VAR.TIME.Set(eVarTime.ChargeStart); + PUB.counter.CountChargeA += 1; + PUB.counter.Save(); + PUB.Speak(Lang.충전을시작합니다); + } + else + { + PUB.Speak(Lang.충전을해제합니다); + } + } + else if (flag == COMM.eVarBool.FLAG_CHARGEONM) + { + if (NewValue) + { + VAR.TIME.Set(eVarTime.ChargeStart); + PUB.counter.CountChargeM += 1; + PUB.counter.Save(); + PUB.Speak(Lang.수동충전을시작합니다); + } + else + { + PUB.Speak(Lang.수동충전을해제합니다); + } + } + else if (flag == COMM.eVarBool.NEXTSTOP_MARK) + { + if (NewValue) + { + //PUB.Speak("다음 위치에서 멈춥니다"); + PUB.log.Add($"마크인식시 멈춤 신호 변경 : {NewValue}"); + } + } + + } + + void PLC_FlagChanged(object sender, arDev.Arduino.DIO.FlagValueEventArgs e) + { + //플래그 상태표시는 메인의 타이머를 이용한다 + // var flag = (arDev.FakePLC.PLCFlag)e.ArrIDX; + PUB.log.Add($"PLC Flag Changed {e.ArrIDX} : {e.NewValue}"); + } + } +} diff --git a/Cs_HMI/Project/StateMachine/_Loop.cs b/Cs_HMI/Project/StateMachine/_Loop.cs new file mode 100644 index 0000000..6f28d88 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/_Loop.cs @@ -0,0 +1,405 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using arCtl; +using static Project.StateMachine; +using COMM; +using System.Windows.Forms; +using Project.ViewForm; + +namespace Project +{ + + public partial class fMain + { + + + DateTime lastDeleteTime = DateTime.Now; + DateTime startuptime = new DateTime(1982, 11, 23); + enum EScreen + { + Auto = 0, + Manual, + IO, + Flag + } + void SetScreen(System.Windows.Forms.Form newscreen) + { + if (newscreen == null) + throw new Exception("화면전용용 폼이 Null 입니다. SM_RUN_INIT 에서 해당 폼이 초기화 되었는지 확인하세요"); + + //작업시작 + if (this.InvokeRequired) + { + this.BeginInvoke(new Action(() => + { + SetScreen(newscreen); + })); + } + else + { + if (newscreen.GetType() == typeof(fManual)) + { + + } + else if (PUB.DriveSpeed) + { + var rlt = PUB.AGV.AGVCommand("SSH", PUB.setting.SPD_H.ToString("0000")); + if (rlt) PUB.DriveSpeed = false; + PUB.log.Add($"Screen Change and DriveSpeed Off:{rlt}"); + } + + MenuAuto.ForeColor = Color.FromArgb(180, 180, 180); + MenuFlag.ForeColor = Color.FromArgb(180, 180, 180); + MenuLift.ForeColor = Color.FromArgb(180, 180, 180); + MenuLog.ForeColor = Color.FromArgb(180, 180, 180); + MenuMAN.ForeColor = Color.FromArgb(180, 180, 180); + MenuAGV.ForeColor = Color.FromArgb(180, 180, 180); + MenuBMS.ForeColor = Color.FromArgb(180, 180, 180); + + + if (panDlg.Controls.Count > 0) + { + var f = panDlg.Controls[0] as System.Windows.Forms.Form; + if (f.GetType() == newscreen.GetType()) return; + else f.Hide(); //숨김처리 + } + panDlg.Controls.Clear(); + panDlg.Controls.Add(newscreen); + newscreen.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + newscreen.WindowState = System.Windows.Forms.FormWindowState.Maximized; + newscreen.Show(); + } + } + + + void sm_Running(object sender, StateMachine.RunningEventArgs e) + { + + //창을 닫아야하는 상황에는 처리하지 않는다. + if (PUB.popup.needClose) + { + System.Threading.Thread.Sleep(10); //팝업이 닫힐때까지 기다린다. + PUB.sm.WaitFirstRun = true; + return; + } + else PUB.sm.WaitFirstRun = false; + + //main loop + switch (e.Step) + { + case eSMStep.CLOSING: + _STEP_CLOSING_START(e.Step); + PUB.sm.SetNewStep(eSMStep.CLOSED); + break; + case eSMStep.CLOSED: + if (e.isFirst) _STEP_CLOSED_START(e.Step); + else _STEP_CLOSED(e.Step, e.StepTime, e.StepTime); + break; + case eSMStep.NOTSET: + PUB.log.Add("S/M Initialize Start"); + PUB.sm.SetNewStep(eSMStep.INIT); + break; + + case eSMStep.INIT: //최초실행이다. + + if (_SM_RUN_INIT(e.isFirst, PUB.sm.StepRunTime)) + { + //메인화면을 설정한다 + form_auto = new ViewForm.fAuto(); + form_manu = new ViewForm.fManual(); + form_zlift = new ViewForm.fIO(); + form_flag = new ViewForm.fFlag(); + form_bms = new ViewForm.fBms(); + form_agv = new ViewForm.fAgv(); + + + form_auto.TopLevel = false; + form_manu.TopLevel = false; + form_zlift.TopLevel = false; + form_flag.TopLevel = false; + form_bms.TopLevel = false; + form_agv.TopLevel = false; + + + form_auto.Dock = System.Windows.Forms.DockStyle.Fill; + form_manu.Dock = System.Windows.Forms.DockStyle.Fill; + form_zlift.Dock = System.Windows.Forms.DockStyle.Fill; + form_flag.Dock = System.Windows.Forms.DockStyle.Fill; + form_bms.Dock = System.Windows.Forms.DockStyle.Fill; + form_agv.Dock = System.Windows.Forms.DockStyle.Fill; + + SetScreen(form_auto); + + PUB.sm.ResetRunStepSeq(); + PUB.sm.SetNewStep(eSMStep.SYNC); + PUB.Speak(Lang.프로그램이초기화되었습니다); + } + break; + + + case eSMStep.IDLE: + + if (e.isFirst) + { + PUB.sm.bPause = false; + //Pub.flag.set(eFlag.UserStepCheck, false); + PUB.sm.ClearRunStep(); + // Util_DO.SetMGZMotor(false); + PUB.Result.SMSG_ProgressEnable = false; + UpdateStatusMessage("준비 완료", Color.Red, Color.Gold); + if (startuptime.Year == 1982) startuptime = DateTime.Now; + } + + //자동소거기능 + if (PUB.setting.AutoDeleteDay > 0) + { + if (VAR.BOOL[eVarBool.MINSPACE] == true) + { + var ts = DateTime.Now - lastDeleteTime; + if (ts.TotalSeconds > 1) + { + //파일을 찾아서 소거한다. + if (System.IO.Directory.Exists(PUB.path.FullName)) + DeleteFile(PUB.path.FullName); + + + lastDeleteTime = DateTime.Now; + } + + } + } + break; + + case eSMStep.SYNC: + if (_SM_RUN_SYNC(runStepisFirst, PUB.sm.GetRunSteptime)) + { + var b1 = PUB.XBE.IsOpen; + var b2 = PUB.AGV.IsOpen; + var b3 = PUB.PLC.IsOpen; + var b4 = PUB.BMS.IsOpen; + + if (b1 == false || b2 == false || b3 == false || b4 == false) + PUB.Speak(Lang.하드웨어오류발생); + else + PUB.Speak( Lang.초기화완료); + + PUB.sm.SetNewStep(eSMStep.IDLE); + return; + } + break; + + case eSMStep.RUN: + _SM_RUN(e.isFirst, e.StepTime); + break; + + case eSMStep.PAUSE: + case eSMStep.EMERGENCY: + case eSMStep.ERROR: + + + //창을 닫아야하는 상황에는 처리하지 않는다. + if (PUB.popup.needClose) + { + System.Threading.Thread.Sleep(10); //팝업이 닫힐때까지 기다린다. + PUB.sm.WaitFirstRun = true; + return; + } + else PUB.sm.WaitFirstRun = false; + + if (e.isFirst) + { + + if (PUB.Result.ResultCode != eResult.NoError) + { + //에러메세지가 있는 경우에만 표시함 + if (PUB.Result.ResultMessage != "") + PUB.popup.setMessage(PUB.Result.ResultMessage); + + if (PUB.Result.ResultCode == eResult.Hardware) + { + PUB.Speak(Lang.하드웨어오류로인해진행할수없습니다); + } + else PUB.Speak(PUB.Result.ResultMessage); + + } + if (e.Step == eSMStep.EMERGENCY) PUB.log.AddE("Enter Emergency Step"); + else if (e.Step == eSMStep.PAUSE) PUB.log.AddE("Enter Pause Step : " + PUB.Result.ResultMessage); + else PUB.log.AddE(string.Format("Enter Error Step : {0}", PUB.Result.ResultMessage)); + + + + PUB.sm.bPause = false; + PUB.sm.ClearRunStep(); + PUB.sm.SetNewStep(eSMStep.IDLE); + } + break; + + case eSMStep.RESET: + + if (e.isFirst) + { + Resultclear(); + PUB.sm.bPause = false; + } + else + { + if (_SM_RUN_RESET(runStepisFirst, PUB.sm.GetRunSteptime)) + PUB.sm.SetNewStep(eSMStep.IDLE); + } + break; + } + } + + void DeleteFile(string path) + { + var basetime = DateTime.Now.AddDays(-1 * PUB.setting.AutoDeleteDay); + var di = new System.IO.DirectoryInfo(path); + if (di.Exists) + { + var dirYear = di.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirYear != null) + { + var dirMon = dirYear.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirMon != null) + { + var dirDay = dirMon.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirDay != null) + { + var curDay = DateTime.Parse(string.Format("{0}-{1}-{2} 00:00:00", dirYear.ToString(), dirMon.ToString(), dirDay.ToString())); + if (curDay < basetime) + { + var dirLot = dirDay.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirLot != null) + { + var delfile = dirLot.GetFiles().FirstOrDefault(); + if (delfile != null) + { + try + { + PUB.log.AddI("Remove Fle : " + delfile.FullName + ",time=" + delfile.LastWriteTime.ToString()); + delfile.Delete(); + } + catch (Exception ex) + { + PUB.log.AddE("deleete error : " + ex.Message); + } + } + else + { + string delpath = dirLot.FullName; + try + { + dirLot.Delete(true); + } + catch (Exception ex) + { + PUB.log.AddE("remove dir" + ex.Message + "," + delpath); + } + + } + } + else + { + //이 폴더아래에 다른 폴더가 하나도 없다 즉 비어 있따. + string delpath = dirDay.FullName; + try + { + dirDay.Delete(true); + } + catch (Exception ex) + { + PUB.log.AddE("remove dir" + ex.Message + "," + delpath); + } + } + } + + } + else + { + //날짜에 해당하는 폴더가 하나도 없다. 월 폴더를 제거한다. + string delpath = dirMon.FullName; + try + { + dirMon.Delete(true); + } + catch (Exception ex) + { + PUB.log.AddE("remove dir" + ex.Message + "," + delpath); + } + } + } + else + { + //이 달에 해당하는 데이터가 없다. 이 년도를 삭제한다. + string delpath = dirYear.FullName; + try + { + dirYear.Delete(true); + } + catch (Exception ex) + { + PUB.log.AddE("remove dir" + ex.Message + "," + delpath); + } + } + } + //년도별폴더목록을 정리함 + //가장작은 년도를 기준으로 파일을 검색해서 1개씩 삭제함 + } + } + + void sm_Message(object sender, StateMachine.StateMachineMessageEventArgs e) + { + //상태머신에서 발생한 메세지 + if (e.Header != "SM-STEP") + PUB.log.Add(e.Header, e.Message); + } + + + void sm_StepChanged(object sender, StateMachine.StepChangeEventArgs e) + { + //상태머신의 스텝이 변경될때 발생함 + //Pub.log.Add(string.Format("SM:Step Changed {0} to {1}",e.Old,e.New)); + VAR.BOOL[eVarBool.FLAG_AUTORUN] = e.New == eSMStep.RUN; + VAR.BOOL[eVarBool.FLAG_SYNC] = (e.New == eSMStep.SYNC); + + //230313 + var n = (eSMStep)e.New; + EEMStatus.AddStatusSQL(n, extrun: true); + + if (e.New == eSMStep.IDLE) + { + VAR.TIME[eVarTime.IdleStart] = DateTime.Now; + PUB.AGV.AGVMoveStop("_sm_stepchange", arDev.Narumi.eStopOpt.Stop); + + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] || VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + + if (VAR.BOOL[eVarBool.FLAG_AUTORUN]) + { + PUB.logagv.Add($"IDLE 전환으로인해 autorun 해제"); + VAR.BOOL[eVarBool.FLAG_AUTORUN] = false; + } + } + } + + //void uploadForm_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) + //{ + // //이벤트 해제 + // if (uploadForm != null) + // uploadForm.FormClosed -= uploadForm_FormClosed; + + // //업로드 창이 닫히면 그 결과를 화면에 표시 해준다. + // //foreach (System.Windows.Forms.ListViewItem lv in uploadForm.listView1.Items) + // //{ + // // string slot = lv.SubItems[0].Text; + // // string wafer = lv.SubItems[2].Text; + // // string state = lv.SubItems[3].Text; + + // //} + //} + } +} diff --git a/Cs_HMI/Project/StateMachine/_SPS.cs b/Cs_HMI/Project/StateMachine/_SPS.cs new file mode 100644 index 0000000..6c77a58 --- /dev/null +++ b/Cs_HMI/Project/StateMachine/_SPS.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using arCtl; +using COMM; +using static Project.StateMachine; + +namespace Project +{ + + public partial class fMain + { + DateTime chargesynctime = DateTime.Now; + DateTime agvsendstarttime = DateTime.Now; + + void ConnectSerialPort(arDev.arRS232 dev, string port, int baud, eVarTime conn, eVarTime conntry, eVarTime recvtime) + { + if (dev.IsOpen == false && port.isEmpty() == false) + { + var tsPLC = VAR.TIME.RUN(conntry); + if (tsPLC.TotalSeconds > 5) + { + VAR.TIME.Set(conntry); + try + { + VAR.TIME.Set(recvtime); //this.LastReceiveTime = DateTime.Now; + dev.PortName = port; + dev.BaudRate = baud; + if (dev.Open()) + { + PUB.log.Add(port, "연결완료"); + } + else + { + var errmessage = dev.errorMessage; + PUB.log.Add("ERROR-" + port, errmessage); + } + VAR.TIME.Set(conn); + VAR.TIME.Set(conntry); + } + catch (Exception ex) + { + PUB.log.AddE(ex.Message); + } + } + } + else if (dev.PortName.Equals(port) == false) + { + PUB.log.Add(port, $"포트변경({dev.PortName}->{port})으로 연결 종료"); + dev.Close(); + VAR.TIME.Set(conntry); + } + } + void sm_SPS(object sender, EventArgs e) + { + if (PUB.sm.Step < eSMStep.IDLE || PUB.sm.Step >= eSMStep.CLOSING) return; + + //plc connect + ConnectSerialPort(PUB.PLC, PUB.setting.Port_PLC, PUB.setting.Baud_PLC, + eVarTime.LastConn_PLC, eVarTime.LastConnTry_PLC, eVarTime.LastRecv_PLC); + + //agv connect + ConnectSerialPort(PUB.AGV, PUB.setting.Port_AGV, PUB.setting.Baud_AGV, + eVarTime.LastConn_AGV, eVarTime.LastConnTry_AGV, eVarTime.LastRecv_AGV); + + //xbee connect + ConnectSerialPort(PUB.XBE, PUB.setting.Port_XBE, PUB.setting.Baud_XBE, + eVarTime.LastConn_XBE, eVarTime.LastConnTry_XBE, eVarTime.LastRecv_XBE); + + //bms connect + ConnectSerialPort(PUB.BMS, PUB.setting.Port_BAT, PUB.setting.Baud_BAT, + eVarTime.LastConn_BAT, eVarTime.LastConnTry_BAT, eVarTime.LastRecv_BAT); + + //지그비상태전송 + if (PUB.XBE != null && PUB.XBE.IsOpen) + { + //일정간격으로 상태를 전송한다 + if (PUB.XBE.lastSendTime.Year == 1982) PUB.XBE.lastSendTime = DateTime.Now.AddSeconds(1); + var ts = DateTime.Now - PUB.XBE.lastSendTime; + if (ts.TotalSeconds >= PUB.setting.interval_xbe) + { + var statusMsg = PUB.XBE.GetStatusString(); + PUB.XBE.SendStatus(statusMsg); + } + } + //배터리쿼리 + if (PUB.BMS != null && PUB.BMS.IsOpen) + { + if (PUB.BMS.lastSendTime.Year == 1982) PUB.BMS.lastSendTime = DateTime.Now.AddSeconds(1); + var ts = DateTime.Now - PUB.BMS.lastSendTime; + if (ts.TotalMilliseconds >= PUB.setting.interval_bms) + { + PUB.BMS.SendQuery(); + } + + + Update_BatteryWarnSpeak(); + + } + } + } +} diff --git a/Cs_HMI/Project/StateMachine/_TMDisplay.cs b/Cs_HMI/Project/StateMachine/_TMDisplay.cs new file mode 100644 index 0000000..b79a4dd --- /dev/null +++ b/Cs_HMI/Project/StateMachine/_TMDisplay.cs @@ -0,0 +1,798 @@ +using COMM; +using System; +using System.Drawing; +using static Project.StateMachine; + +namespace Project +{ + public partial class fMain + { + + + + void BlinkGridViewItem(arFrame.Control.GridView ctl, int row, int col, int value1, int value2) + { + var curValue = ctl.getValue(row, col); + ctl.setValue(row, col, (byte)(curValue == value1 ? value2 : value1)); // + } + + void BlinkLabel(arCtl.arLabel ctl, bool Statue + , Color onColor1, Color onColor2, Color ofColor1, Color ofColor2, + String onText = "", String OffText = "") + { + if (Statue == false) + { + ctl.BackColor2 = ofColor2; + ctl.BackColor = ofColor1; + if (OffText != "" && ctl.Text != OffText) ctl.Text = OffText; + } + else + { + if (onText != "" && ctl.Text != onText) ctl.Text = onText; + //깜박인다 + if (ctl.BackColor2 == Color.DimGray) + { + ctl.BackColor = onColor1; + ctl.BackColor2 = onColor2; + } + else + { + ctl.BackColor2 = Color.DimGray; + ctl.BackColor = Color.FromArgb(100, 100, 100); + } + } + + } + + Boolean displayOn = false; + private void tmDisplay_Tick(object sender, EventArgs e) + { + if (displayOn == false) displayOn = true; + else + { + PUB.log.AddAT("Display Timer Overlab");// Console.WriteLine("display overlab"); + return; + } + + if (PUB.sm.Step > eSMStep.INIT && + panTopMenu.Enabled == false) panTopMenu.Enabled = true; + + //배터리정보표시 + lbBat.VLevel = PUB.BMS.Current_Level; + lbBat.Volt = PUB.BMS.Current_Volt; + lbBat.MaxA = PUB.BMS.Current_MaxAmp; + lbBat.CurA = PUB.BMS.Current_Amp; + lbBat.IsOpen = PUB.BMS.IsOpen; + + + //쓰레드로인해서 메인에서 진행하게한다. SPS는 메인쓰레드에서 진행 됨 + //팝을 제거 혹은 표시하는 기능 + if (PUB.popup.needShow) PUB.popup.showMessage(); + else if (PUB.popup.needClose) PUB.popup.Visible = false; // .setVision(false)(); + + //자동 리부트 코드 실행 (230710) + var chargeon = VAR.BOOL[eVarBool.FLAG_CHARGEONA] || VAR.BOOL[eVarBool.FLAG_CHARGEONM]; + if (PUB.sm.Step == eSMStep.RUN & PUB.sm.RunStep == ERunStep.READY && chargeon == false && + PUB.setting.AutoRebootTimeStart.isEmpty() == false && startuptime.Year != 1982 && + PUB.Automodeonreboot == false && PUB.setting.SetAutoModeOn == false && PUB.AutRebootAlreay == false) + { + var strbuf = PUB.setting.AutoRebootTimeStart.Split('~'); + if (strbuf.Length == 2) + { + strbuf[0] = strbuf[0].Trim(); + strbuf[1] = strbuf[1].Trim(); + + var btimes = DateTime.TryParse(DateTime.Now.ToString("yyyy-MM-dd ") + strbuf[0], out DateTime TimeS); + var btimee = DateTime.TryParse(DateTime.Now.ToString("yyyy-MM-dd ") + strbuf[1], out DateTime TimeE); + + //이미 재부팅을 했는지 확인한다 + if (PUB.setting.AutoRebootTimeStart.isEmpty() == false) + { + if (DateTime.TryParse(PUB.setting.AutoRebootTimeStart, out DateTime RebootLast)) + { + //지정된 시간내에서 재부팅이 되었다 + if (RebootLast >= TimeS.AddMinutes(-1) && RebootLast <= TimeE.AddMinutes(1)) + { + //재부팅이 완료됨 + PUB.log.Add($"이미 재부팅을 진행 했습니다"); + PUB.AutRebootAlreay = true; + } + } + } + + if (PUB.AutRebootAlreay == false && btimes && btimee && TimeS <= TimeE && DateTime.Now >= TimeS && DateTime.Now <= TimeE) //둘다시간조건에 맞아야한다 + { + //기록을 남긴다.(확인용) + EEMStatus.AddStatusSQL(eSMStep.IDLE, $"자동재부팅실행({strbuf[0]}~{strbuf[1]})", DateTime.Now, true); + + //자동모드도 해제 해준다(다른 일이 발생하지 않도록) + VAR.BOOL[eVarBool.FLAG_AUTORUN] = false; + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + PUB.AGV.AGVMoveStop("autoreboot"); + PUB.sm.SetNewStep(eSMStep.IDLE); + + if (System.Diagnostics.Debugger.IsAttached == false) + { + PUB.Speak(Lang.자동재부팅을실행합니다); + Util.SystemReboot(5, true); + } + else PUB.setting.SetAutoModeOn = true; + + } + } + } + + //자동실행-230710 - 프로그램이 켜진 후 5분안에만 동작한다 + if (startuptime.Year != 1982 && PUB.setting.SetAutoModeOn && PUB.sm.Step == eSMStep.IDLE && PUB.Automodeonreboot == false) + { + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == true) //이미 자동상태라면 + { + //이미 켜져있으니 처리하지 않는다 + PUB.setting.SetAutoModeOn = false; + PUB.setting.Save(); + } + else + { + var tsStartup = DateTime.Now - startuptime; + if (tsStartup.TotalMinutes < 3) + { + if (tsStartup.TotalSeconds > 10) //5초이전에는동작하지 말자 + { + PUB.log.Add($"자동 오토런 실행"); + func_sw_start(false); + PUB.setting.SetAutoModeOn = false; + PUB.setting.Save(); + } + } + else + { + //5분을 넘어선 데이터는 쓸모없다 폐기 + PUB.setting.SetAutoModeOn = false; + PUB.setting.Save(); + } + } + + } + + + + lbTime.Text = PUB.sm.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss"); + + //자동충전중이다(프로그램에 의해 충전이 진행된 상태) + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true || VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true) + { + lbStStep.Text = VAR.BOOL[eVarBool.FLAG_CHARGEONA] ? "자동충전" : "수동충전"; + lbIDLE.ProgressForeColor = Color.Tomato; + if (lbIDLE.ProgressEnable == false) + lbIDLE.ProgressEnable = true; + + //lbIDLE.ForeColor = Color.Gold; + lbIDLE.ProgressForeColor = Color.Gold; + + if (PUB.sm.Step != eSMStep.RUN) + { + var tsIdle = VAR.TIME.RUN(eVarTime.ChargeStart); + lbIDLE.ProgressMax = 100;// PUB.setting.ChargeMaxLevel; + lbIDLE.ProgressMin = 0; + lbIDLE.Text = $"{PUB.BMS.Current_Level:N0}%"; + lbIDLE.ProgressValue = (float)PUB.BMS.Current_Level; + } + else + { + //if (PUB.setting.ChargeMaxTime < 1) + //{/ + var tsIdle = VAR.TIME.RUN(eVarTime.ChargeStart); + lbIDLE.ProgressMax = PUB.setting.ChargeMaxLevel; + lbIDLE.ProgressMin = 0; + lbIDLE.Text = $"({PUB.BMS.Current_Level:N0}/{PUB.setting.ChargeMaxLevel})%"; + lbIDLE.ProgressValue = (float)PUB.BMS.Current_Level; + //} + //else + //{ + // var tsIdle = VAR.TIME.RUN(eVarTime.ChargeStart); + // lbIDLE.ProgressMax = PUB.setting.ChargeMaxTime; + // lbIDLE.ProgressMin = 0; + // lbIDLE.Text = string.Format("{0:N0}/{1} 초 충전 중", tsIdle.TotalSeconds, PUB.setting.ChargeMaxTime); + // lbIDLE.ProgressValue = (float)tsIdle.TotalSeconds; + //} + + } + + + } + else + { + TimeSpan timerun; + if (PUB.sm.Step == eSMStep.RUN) + { + if (PUB.sm.RunStep == ERunStep.READY) + { + //대기시간 + lbStStep.Text = "대기중"; + timerun = VAR.TIME.RUN(eVarTime.ReadyStart); + } + else + { + //가동시간 + lbStStep.Text = "가동중"; + timerun = VAR.TIME.RUN(eVarTime.RunStart); + } + } + else + { + lbStStep.Text = "장비멈춤"; + timerun = VAR.TIME.RUN(eVarTime.IdleStart); + } + lbIDLE.Text = string.Format("{0}일 {1}시 {2}분 {3}초", timerun.Days, timerun.Hours, timerun.Minutes, timerun.Seconds); + if (lbIDLE.ProgressEnable == true) + lbIDLE.ProgressEnable = false; + } + + //hw접속상태 표시 + MenuAGV.BackColor = PUB.AGV.IsValid ? Color.FromArgb(40, 40, 40) : Color.Brown; + MenuBMS.BackColor = PUB.BMS.IsValid ? Color.FromArgb(40, 40, 40) : Color.Brown; + MenuMAN.BackColor = PUB.PLC.IsValid ? Color.FromArgb(40, 40, 40) : Color.Brown; + + + btChargeA.Enabled = !VAR.BOOL[eVarBool.FLAG_CHARGEONM]; + btHome.Enabled = btChargeA.Enabled; + btAutoRun.Enabled = btChargeA.Enabled; + + var bCharge = + (PUB.sm.RunStep == ERunStep.GOCHARGE || PUB.sm.RunStep == ERunStep.CHARGECHECK || VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true); + + var bHome = PUB.sm.Step == eSMStep.RUN && (PUB.sm.RunStep == ERunStep.GOHOME); + //var bChargeM = PUB.flag.get(EFlag.FLAG_CHARGEONM); + var bAuto = VAR.BOOL[eVarBool.FLAG_AUTORUN]; + //if(batu) + + var bChargeM = VAR.BOOL[eVarBool.FLAG_CHARGEONM]; + if (btHome.Enabled == false) + { + btHome.BackColor2 = Color.Gray; + btHome.BackColor = Color.DimGray; + } + else BlinkLabel(this.btHome, bHome, Color.Aqua, Color.Teal, Color.Aqua, Color.Teal, "홈\n취소", "홈\n이동"); + if (btChargeA.Enabled == false) + { + btChargeA.BackColor2 = Color.Gray; + btChargeA.BackColor = Color.DimGray; + } + else + { + //충전가능요건이라면 해당 시간을 표시해준다. + BlinkLabel(this.btChargeA, bCharge, Color.LightSalmon, Color.Tomato, Color.LightSalmon, Color.Tomato, "자동충전취소", "자동충전\n실행(" + PUB.counter.CountChargeA.ToString() + ")"); + } + BlinkLabel(this.btChargeM, bChargeM, Color.LightSalmon, Color.Tomato, Color.LightSalmon, Color.Tomato, "수동충전취소", "수동충전\n실행(" + PUB.counter.CountChargeM.ToString() + ")"); + //BlinkLabel(this.btChargeM, bChargeM, Color.LightSalmon, Color.Tomato, "수동충전취소", "수동충전\n실행(" + Pub.counter.CountChargeM.ToString() + ")"); + if (btAutoRun.Enabled == false) + { + btAutoRun.BackColor2 = Color.Gray; + btAutoRun.BackColor = Color.DimGray; + } + else BlinkLabel(this.btAutoRun, bAuto == false, Color.DarkMagenta, Color.BlueViolet, Color.Lime, Color.Green, "수동\n조작중", "자동\n실행중"); + + //상태 표시 + Update_SSStatus(); + + //IO상태(상단줄) 표시 + Update_IOStatus(); + + //display mesasge + Update_StatusMessage(); + + //음악 on/off 처리 + Update_Music(); + + //HWState.Invalidate(); + SSInfo.Invalidate(); + IOState.Invalidate(); + + #region retgion"1분 time 루틴" + var ts = DateTime.Now - tm1minute; + if (ts.TotalMinutes >= 1) + { + //리셋카운트 + _AutoResetCount(); + + //상태를 DB에 저장한다. 230314 + var tsrun = COMM.VAR.TIME.RUN(eVarTime.StatusReporttime); + if (tsrun.TotalSeconds >= PUB.setting.StatusInterval) EEMStatus.UpdateStatusSQL(PUB.sm.Step, _extrun: true); + + tm1minute = DateTime.Now; + } + #endregion + + #region retgion"5분 time 루틴" + ts = DateTime.Now - tm5minute; + if (ts.TotalMinutes >= 5) + { + //남은디스크확인 + CheckFreeSpace(); + tm5minute = DateTime.Now; + } + #endregion + + //wat.Stop(); + //Console.WriteLine("disp time : " + wat.ElapsedMilliseconds.ToString() + "ms"); + displayOn = false; + } + + void Update_Count() + { + if (this.InvokeRequired) + { + this.BeginInvoke(new System.Windows.Forms.MethodInvoker(Update_Count), null); + } + else + { + lbCntDN.Text = PUB.counter.CountDn.ToString(); + lbCNtUP.Text = PUB.counter.CountUp.ToString(); + lbCntQA.Text = PUB.counter.CountQA.ToString(); + lbCntQC.Text = PUB.counter.CountQC.ToString(); + // lbCntPk.Text = PUB.counter.CountQa2.ToString(); + } + + } + void Update_IOStatus() + { + int inputrow = 0; + int inputcol = 0; + + ////비상정지는 깜박임으로 알려준다 + if (VAR.BOOL[eVarBool.EMERGENCY]) BlinkGridViewItem(IOState, inputrow, inputcol++, 2, 0); + else IOState.setValue(inputrow, inputcol++, 0); + + IOState.setTitle(inputrow, inputcol, "DIR:" + PUB.AGV.data.Direction.ToString()); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, "MOV:" + PUB.AGV.data.Sts.ToString()); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, "SPD:" + PUB.AGV.data.Speed.ToString()); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, $"PBS:{PUB.AGV.data.guidesensor}"); IOState.setValue(inputrow, inputcol++, 0); + + if (PUB.AGV.data.TagNo < 0) + { + IOState.setTitle(inputrow, inputcol, "(TAG)"); IOState.setValue(inputrow, inputcol++, 0); + } + else + { + IOState.setTitle(inputrow, inputcol, "T" + PUB.AGV.data.TagNo.ToString()); IOState.setValue(inputrow, inputcol++, 0); + } + if (PUB.AGV.data.CallNo < 0) + { + IOState.setTitle(inputrow, inputcol, "(CAL)"); + IOState.setValue(inputrow, inputcol++, 0); + } + else + { + IOState.setTitle(inputrow, inputcol, "CAL:" + PUB.AGV.data.CallNo.ToString()); + IOState.setValue(inputrow, inputcol++, 0); + } + + IOState.setTitle(inputrow, inputcol, "RUN"); IOState.setValue(inputrow, inputcol++, (PUB.AGV.system1.agv_run ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "MARK"); IOState.setValue(inputrow, inputcol++, (PUB.AGV.signal.mark_sensor ? 1 : (VAR.BOOL[eVarBool.NEXTSTOP_MARK] ? 2 : 0))); + IOState.setTitle(inputrow, inputcol, "CHG"); IOState.setValue(inputrow, inputcol++, (PUB.AGV.system1.Battery_charging ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "ITM"); IOState.setValue(inputrow, inputcol++, (VAR.BOOL[eVarBool.ITEMON] ? 1 : 0)); + IOState.Invalidate(); + } + + /// + /// 가동중 40% 미만에서는 배터리 경고 메세지를 추가한다(리더) + /// + void Update_BatteryWarnSpeak() + { + if (PUB.BMS == null || PUB.BMS.Current_Level > 40) return; + + //가동중이거나 수동모드에서는 메세지 알림한다 + if (PUB.AGV.system1.agv_run || VAR.BOOL[eVarBool.FLAG_AUTORUN] == false) + { + var timeoutsec = 15; + if (PUB.BMS.IsValid == false) timeoutsec = 30; + + var tswarnmsg = VAR.TIME.RUN(eVarTime.BatWarnTime); + if (tswarnmsg.TotalSeconds >= timeoutsec) + { + if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]==false && VAR.BOOL[eVarBool.FLAG_CHARGEONA] == false) + { + if (PUB.BMS.IsValid == false) + { + PUB.Speak(Lang.배터리통신에문제가있습니다); + } + else + { + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false) + PUB.Speak(Lang.충전이필요합니다자동모드로전환하세요); + else + PUB.Speak(Lang.충전이필요합니다); + } + } + else + { + //충전중이므로 메세지처리를 하지 않는다 + } + + + VAR.TIME.Set(eVarTime.BatWarnTime); + } + } + } + + /// + /// 가동중일때 음악이 나오게 한다 + /// + void Update_Music() + { + + if (PUB.mplayer != null && PUB.mplayer.HasAudio && PUB.bPlayMusic) + { + if (PUB.AGV.system1.agv_run == false) + { + if (PUB.bPlayMusic) + { + PUB.mplayer.Stop(); + PUB.bPlayMusic = false; + } + + } + } + else if (PUB.setting.Enable_Music && PUB.mplayer != null && PUB.mplayer.HasAudio) + { + if (PUB.AGV.system1.agv_run == true) + { + if (PUB.bPlayMusic == false) + { + PUB.mplayer.Play(); + PUB.bPlayMusic = true; + } + } + } + } + + void Update_SSStatus() + { + if (PUB.sm.IsThreadRun) SSInfo.setValue(0, 0, 0); + else SSInfo.setValue(0, 0, 2); + + var runspeed = PUB.sm.RunSpeed.TotalMilliseconds; + SSInfo.setTitle(0, 0, $"{PUB.sm.Step}\n{runspeed:N1} ms"); + + if (runspeed > 9) + SSInfo.setValue(0, 0, 2); + else if (runspeed > 4) + SSInfo.setValue(0, 0, 3); + else + SSInfo.setValue(0, 0, 0); + + + SSInfo.setTitle(1, 0, string.Format("{0}({1})", PUB.sm.RunStep, PUB.sm.RunStepSeq)); + if (PUB.sm.Step == eSMStep.RUN) + SSInfo.setTitle(1, 1, string.Format("{0:N1} sec", PUB.sm.GetRunSteptime.TotalSeconds)); + else + SSInfo.setTitle(1, 1, "--"); + + } + + /// + /// 환경설정에따른 카운트를 리셋처리한다. 171128 + /// + void _AutoResetCount() + { + if (PUB.setting.datetime_Check_1 && PUB.setting.datetime_Reset_1 != "") //오전 + { + try + { + DateTime SetTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " " + PUB.setting.datetime_Reset_1 + ":00"); + DateTime LastClearTime = PUB.counter.CountReset; + + //현재 시간이 클리어대상 시간보다 크고, 마지막으로 클리어한 시간이 지정시간보다 작아야함 + if (DateTime.Now > SetTime && LastClearTime < SetTime) + { + PUB.log.AddI("Count Reset #1"); + PUB.counter.CountClear(); + } + } + catch { } + } + + if (PUB.setting.datetime_Check_2 && PUB.setting.datetime_Reset_2 != "") //오후 + { + try + { + DateTime SetTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " " + PUB.setting.datetime_Reset_2 + ":00"); + DateTime LastClearTime = PUB.counter.CountReset; + + //현재 시간이 클리어대상 시간보다 크고, 마지막으로 클리어한 시간이 지정시간보다 작아야함 + if (DateTime.Now > SetTime && LastClearTime < SetTime) + { + PUB.log.AddI("Count Reset #2"); + PUB.counter.CountClear(); + } + } + catch { } + } + } + + DateTime tm1minute = DateTime.Now.AddDays(-1); + DateTime tm5minute = DateTime.Now; + + void UpdateProgressStatus(double value, double max, string title) + { + UpdateProgressStatus((float)value, (float)max, title); + } + + void UpdateProgressStatus(float value, float max, string title = "") + { + if (PUB.Result.SMSG_ProgressEnable == false) PUB.Result.SMSG_ProgressEnable = true; + if (PUB.Result.SMSG_ProgressMax != max) PUB.Result.SMSG_ProgressMax = max; + if (PUB.Result.SMSG_ProgressValue != value) + { + if (value < max) PUB.Result.SMSG_ProgressValue = value; + else PUB.Result.SMSG_ProgressValue = max; + } + if (PUB.Result.SMSG_ProgressForeColor != Color.White) + PUB.Result.SMSG_ProgressForeColor = Color.White; + + if (title != "") + if (VAR.STR[eVarString.StatusMessage].Equals(title) == false) VAR.STR[eVarString.StatusMessage] = title; + } + + void UpdateStatusMessage(string dispmsg, Color fcolor, Color shadow) + { + UpdateStatusMessage(dispmsg, Color.DimGray, Color.Gray, fcolor, shadow); + } + + void UpdateStatusMessage(string dispmsg, Color bColor, Color bColor2, Color fcolor, Color shadow, Boolean blank = false) + { + + //if (lbMsg.ProgressEnable == true) lbMsg.ProgressEnable = false; + if (dispmsg != VAR.STR[eVarString.StatusMessage] || PUB.Result.SMSG_ForeColor != fcolor || + PUB.Result.SMSG_ShadowColor != shadow + || (PUB.Result.SMSG_BackColor != bColor && PUB.Result.SMSG_BackColor2 != bColor)) + { + PUB.Result.SMSG_BackColor = bColor; + PUB.Result.SMSG_BackColor2 = bColor2; + PUB.Result.SMSG_ForeColor = fcolor; + PUB.Result.SMSG_ShadowColor = shadow; + VAR.STR[eVarString.StatusMessage] = dispmsg; + if (blank) PUB.Result.SMSG_Tag = "BLANK"; + else PUB.Result.SMSG_Tag = null; + //PUB.Result.UpdateStatusMessage(); + } + } + + + void Update_StatusMessage() + { + //최우선 점검 사항 표시 + if (PUB.sm.Step > eSMStep.INIT) + { + //오류가 있다면 오류를 표시해준다. + if (PUB.AGV.IsOpen == false) + { + UpdateStatusMessage("AGV 연결실패", Color.Tomato, Color.Black); + } + else if (PUB.AGV.error.Emergency) + { + if (PUB.AGV.error.runerror_by_no_magent_line) + { + UpdateStatusMessage("마그넷이 감지 되지 않습니다", Color.Tomato, Color.Black); + } + else + { + UpdateStatusMessage("비상 정지", Color.Tomato, Color.Black); + } + } + else if (PUB.PLC.IsOpen == false) + { + UpdateStatusMessage(Lang.PLC연결실패, Color.Tomato, Color.Black); + } + else if (PUB.PLC.IsValid == false) + { + UpdateStatusMessage(Lang.PLC통신실패, Color.Tomato, Color.Black); + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true) + { + //남은 충전시간 계산 + string msg = string.Empty; + if (PUB.BMS.Current_Level < PUB.setting.ChargeEmergencyLevel) + { + msg = $"충전 진행 중(이동 불가)\n저전압으로 인해 사용이 불가 합니다"; + } + else + { + var remaintime = VAR.TIME.RUN(eVarTime.ChargeStart); + var remainsec = PUB.setting.ChargeMaxTime - remaintime.TotalSeconds; + msg = "충전 진행 중 (이동 불가) " + remainsec.ToString("N0") + "초 후 충전이 자동 OFF 됩니다"; + } + UpdateStatusMessage(msg, Color.Orange, Color.Black); + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true)// PUB.flag.get(EFlag.FLAG_CHARGEONM) == true) + { + UpdateStatusMessage("충전(수동) 진행 중 (이동 불가)", Color.Orange, Color.Black); + } + else if (PUB.AGV.IsOpen == false) + { + UpdateStatusMessage(Lang.AGV연결실패, Color.Tomato, Color.Black); + } + else + { + if (PUB.sm.Step == eSMStep.IDLE) + { + if (PUB.AGV.system1.agv_run) + { + if (PUB.AGV.system1.stop_by_front_detect) + UpdateStatusMessage("장애물로 인한 일시 정지", Color.SkyBlue, Color.Black); + else + UpdateStatusMessage("AGV 이동 중", Color.SkyBlue, Color.Black); + } + else if (PUB.AGV.error.Emergency) + { + if (PUB.AGV.error.runerror_by_no_magent_line) + { + UpdateStatusMessage("비상 정지 : 마그넷 라인이 감지 안됨", Color.SkyBlue, Color.Black); + } + else + { + UpdateStatusMessage("비상 정지", Color.SkyBlue, Color.Black); + } + } + else + { + var smg = "(작업을 시작 하려면 [AUTO]로 전환 하세요)"; + UpdateStatusMessage(smg, Color.SkyBlue, Color.Black); + } + } + else if (PUB.sm.Step == eSMStep.RUN) + { + + string stMsg; + if (PUB.AGV.system1.stop_by_front_detect)//.GetValueI(arDev.FakePLC.DIName.PINI_LIDAR_STOP)) + stMsg = Lang.전방에물체가감지되었습니다; + else if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_EMG)) + stMsg = Lang.비상정지신호가감지되었습니다; + else if (PUB.AGV.signal.front_gate_out == true) + stMsg = Lang.선로를이탈했습니다; + else if (PUB.AGV.error.runerror_by_no_magent_line) + stMsg = "마그네틱 라인을 벗어났습니다"; + else + { + stMsg = "자동 대기"; + if (PUB.setting.Enable_AutoCharge) + { + var tsIdle = VAR.TIME.RUN(eVarTime.ReadyStart); + var remainTry = (int)(PUB.setting.ChargeRetryTerm - tsIdle.TotalSeconds); + var progMax = PUB.setting.ChargeRetryTerm; + stMsg += " / (" + remainTry.ToString() + ") 초 후 충전을 시작 합니다"; + UpdateProgressStatus(tsIdle.TotalSeconds, progMax, ""); + } + else + { + stMsg += "(자동충전 해제됨)"; + } + } + + UpdateStatusMessage(stMsg, Color.SkyBlue, Color.Black); + //자동 충전 대기상태를 프로그레시브로 표시한다 + + + if (PUB.AGV.system1.stop_by_front_detect == true) + { + UpdateStatusMessage("이동 방향 근접거리 물체 감지(이동 불가 - 일시정지)", Color.Tomato, Color.Black); + } + else if (VAR.BOOL[eVarBool.OVERLOAD] == true) + { + UpdateStatusMessage("오버로드 감지(안전커버를 확인하세요)", Color.Tomato, Color.Black); + } + else if (PUB.AGV.error.runerror_by_no_magent_line) + { + UpdateStatusMessage("마그네틱 라인을 벗어 났습니다", Color.Black, Color.White); + } + else + { + if (VAR.BOOL[eVarBool.WAIT_COVER_DOWN] == true) + { + UpdateStatusMessage(Lang.안전커버를내려주세요, Color.Lime, Color.Black); + } + else if (VAR.BOOL[eVarBool.WAIT_COVER_UP] == true) + { + UpdateStatusMessage(Lang.안전커버를올려주세요, Color.Lime, Color.Black); + } + else + { + if (PUB.sm.RunStep == ERunStep.GODOWN) + { + if (PUB.sm.RunStepSeq == 1) + { + UpdateStatusMessage(String.Format("하차 이동 전 (현재 위치 검색)", PUB.Result.TargetPos), Color.Lime, Color.Black); + } + else UpdateStatusMessage(String.Format("하차 이동 중 ({0})", PUB.Result.TargetPos), Color.Lime, Color.Black); + } + else if (PUB.sm.RunStep == ERunStep.GOUP) + { + if (PUB.sm.RunStepSeq == 1) + { + UpdateStatusMessage(String.Format("상차 이동 전 (현재 위치 검색)", PUB.Result.TargetPos), Color.Lime, Color.Black); + } + else UpdateStatusMessage(String.Format("상차 이동 중 ({0})", PUB.Result.TargetPos), Color.Lime, Color.Black); + } + else if (PUB.sm.RunStep == ERunStep.GOCHARGE) + { + if (PUB.Result.result_message.isEmpty() == true) + { + UpdateStatusMessage(String.Format("충전기로 이동 중"), Color.Lime, Color.Black); + } + else + { + if (PUB.Result.result_progressmax > 0) + UpdateProgressStatus(PUB.Result.result_progressvalue, PUB.Result.result_progressmax, PUB.Result.result_message); + else + UpdateStatusMessage(PUB.Result.result_message, Color.Lime, Color.Black); + } + } + else if (PUB.sm.RunStep == ERunStep.CHARGECHECK) + { + if (PUB.Result.result_message.isEmpty() == true) + { + UpdateStatusMessage(String.Format("충전기 작동 확인 중"), Color.Lime, Color.Black); + } + else + { + if (PUB.Result.result_progressmax > 0) + UpdateProgressStatus(PUB.Result.result_progressvalue, PUB.Result.result_progressmax, PUB.Result.result_message); + else + UpdateStatusMessage(PUB.Result.result_message, Color.Lime, Color.Black); + } + } + else if (PUB.sm.RunStep == ERunStep.GOHOME) + { + UpdateStatusMessage(String.Format("홈(QC) 이동 중", PUB.Result.TargetPos), Color.Lime, Color.Black); + } + else + { + //충전준비상태라면 관련 정보를 표시한다 230117 + if (VAR.BOOL[eVarBool.CHARGE_READY]) + { + var sec = VAR.I32[eVarInt32.ChargeWaitSec]; + UpdateStatusMessage($"{sec} 초 후 충전이 시작 됩니다", Color.Lime, Color.Black); + } + else + { + var msg = $"대기상태(현재위치:{PUB.Result.CurrentPos}/대상위치:{PUB.Result.TargetPos})"; + if (PUB.setting.Enable_AutoCharge) msg += "(자동충전:ON)"; + else msg += "(자동충전:OFF)"; + UpdateStatusMessage(msg, Color.Lime, Color.Black); + } + + //UpdateStatusMessage(String.Format("--", Pub.Result.TargetPos), Color.White, Color.Black); + } + } + } + + + } + else if (PUB.sm.Step == eSMStep.ERROR) + { + UpdateStatusMessage("오류 발생", Color.Red, Color.Black); + } + else if (PUB.sm.Step == eSMStep.PAUSE) + { + UpdateStatusMessage("정지 됨", Color.Tomato, Color.Black); + } + else if (PUB.sm.Step == eSMStep.FINISH) + { + UpdateStatusMessage("작업 완료", Color.Lime, Color.Black); + } + else if (PUB.sm.bPause == true) + { + UpdateStatusMessage("[START]를 누르면 시작 됩니다", Color.Yellow, Color.Black); + } + else + { + string msg = "진행 중"; + UpdateStatusMessage(msg, Color.Lime, Color.Black); + } + } + + + } + } + } +} diff --git a/Cs_HMI/Project/Util.cs b/Cs_HMI/Project/Util.cs new file mode 100644 index 0000000..142bd73 --- /dev/null +++ b/Cs_HMI/Project/Util.cs @@ -0,0 +1,510 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Management; +using System.Net; +using System.Text; +using System.Windows; +using System.Windows.Forms; + +namespace Project +{ + public static class Util + { + #region "MessageBox" + public static void MsgI(string m, Boolean legacy = false) + { + if (legacy) + { + MessageBox.Show(m, "확인", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + var f = new fMessageWindow("알림\n" + m); + f.SetWindowColor(fMessageWindow.EWinColor.Information); + f.btNo.Visible = false; + f.btYes.Text = "확인"; + f.EnableUserClose = true; + f.DialogMode = true; + f.ShowDialog(); + } + } + public static void MsgE(string m, Boolean legacy = false) + { + if (legacy) + { + MessageBox.Show(m, "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + var f = new fMessageWindow("오류 알림\n" + m); + f.SetWindowColor(fMessageWindow.EWinColor.Error); + f.btNo.Visible = false; + f.btYes.Text = "확인"; + f.EnableUserClose = true; + f.DialogMode = true; + f.ShowDialog(); + } + } + public static DialogResult MsgQ(string m, Boolean legacy = false, string btOK = "확인", string btCancel = "아니오") + { + if (legacy) + { + DialogResult dlg = MessageBox.Show(m, "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question); + return dlg; + } + else + { + var f = new fMessageWindow("선택 알림\n" + m); + f.SetWindowColor(fMessageWindow.EWinColor.Attention); + f.EnableUserClose = true; + f.DialogMode = true; + f.btNo.Text = btCancel; + f.btYes.Text = btOK; + var dlg = f.ShowDialog(); + return dlg; + } + } + + #endregion + + public static string SelectSerialPort() + { + var f = new System.Windows.Forms.Form(); + f.WindowState = System.Windows.Forms.FormWindowState.Normal; + f.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + f.Size = new System.Drawing.Size(800, 400); + f.MaximizeBox = false; + f.MinimizeBox = false; + f.Text = "Select Port"; + f.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + var lst = new System.Windows.Forms.ListBox(); + lst.Font = new System.Drawing.Font("Consolas", 15, System.Drawing.FontStyle.Bold); + lst.Dock = System.Windows.Forms.DockStyle.Fill; + lst.DoubleClick += (s1, e1) => + { + if (lst.SelectedItem != null) f.DialogResult = System.Windows.Forms.DialogResult.OK; + }; + using (var searcher = new ManagementObjectSearcher("SELECT * FROM WIN32_SerialPort")) + { + var portnames = System.IO.Ports.SerialPort.GetPortNames().OrderBy(t => t); + var ports = searcher.Get().Cast().ToList(); + foreach (var port in portnames) + { + var desc = ""; + var portInfo = ports.Where(t => t["DeviceId"].ToString() == port).FirstOrDefault(); + if (portInfo != null) desc = portInfo["Caption"].ToString(); + lst.Items.Add(string.Format("{0} - {1}", port, desc)); + } + } + f.Controls.Add(lst); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + var name = lst.SelectedItem.ToString().Split('-'); + return name[0].Trim(); + } + else return string.Empty; + } + + public static void ScreenCaptrue(int _BitmapWidth, int _BitmapHeight, System.Drawing.Point ptSouce) + { + try + { + Bitmap bitmap = new Bitmap(_BitmapWidth, _BitmapHeight); + Graphics _graphic = Graphics.FromImage(bitmap); + + _graphic.CopyFromScreen(ptSouce, new System.Drawing.Point(0, 0), new System.Drawing.Size(_BitmapWidth, _BitmapHeight)); + + string savefile = System.IO.Path.Combine(Util.CurrentPath, "ScreenShot", DateTime.Now.ToString("yyyyMMddHHmmss") + ".png"); + System.IO.FileInfo grpath = new FileInfo(savefile); + if (!grpath.Directory.Exists) grpath.Directory.Create(); + + bitmap.Save(grpath.FullName, System.Drawing.Imaging.ImageFormat.Png); + Util.MsgI("화면 캡쳐 성공\n" + + "위치:" + grpath.Directory.FullName + "\n" + + "파일명: " + grpath.Name); + } + catch (Exception ex) + { + Util.MsgE("화면 캡쳐 실패\n" + ex.Message); + } + } + + public static void SystemReboot(UInt16 timeout, bool setautomode = false) + { + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(); + si.FileName = @"c:\windows\system32\shutdown.exe"; + si.Arguments = "-r -t " + timeout.ToString(); + si.UseShellExecute = false; + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + prc.StartInfo = si; + + PUB.AGV.AGVMoveStop("user reboot"); + + if (setautomode) + { + PUB.Automodeonreboot = true; + PUB.setting.SetAutoModeOn = true; + PUB.setting.AUtoRebootLastTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + PUB.setting.Save(); + } + + + prc.Start(); + + } + public static void SystemShutdown(UInt16 timeout) + { + //System.Text.StringBuilder sb = new StringBuilder(); + //sb.AppendLine("@echo off"); + //sb.AppendLine("echo System OFF After " + timeout.ToString() + "Seconds"); + //sb.AppendLine("shutdown -s -t " + timeout.ToString()); + //string bfile = AppDomain.CurrentDomain.BaseDirectory + "Shutdown.bat"; + //System.IO.File.WriteAllText(bfile, string.Format(sb.ToString(), AppDomain.CurrentDomain.BaseDirectory), System.Text.Encoding.Default); + + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(); + si.FileName = @"c:\windows\system32\shutdown.exe"; + si.Arguments = "-s -t " + timeout.ToString(); + si.UseShellExecute = false; + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + prc.StartInfo = si; + prc.Start(); + } + public static void SaveBugReport(string content, string subdirName = "BugReport") + { + try + { + var path = CurrentPath + subdirName; + if (!System.IO.Directory.Exists(path)) System.IO.Directory.CreateDirectory(path); + var file = path + "\\" + DateTime.Now.ToString("yyyyMMdd_HHmmss_fff") + ".txt"; + System.IO.File.WriteAllText(file, content, System.Text.Encoding.UTF8); + } + catch + { + //nothing + } + } + + public static void CopyData(System.Data.DataRow drSrc, System.Data.DataRow drDes) + { + if (drDes == null || drSrc == null) return; + foreach (System.Data.DataColumn col in drSrc.Table.Columns) + { + if (col.ColumnName.ToUpper() == "IDX") continue; + drDes[col.ColumnName] = drSrc[col.ColumnName]; + } + + } + + /// + /// 현재실행중인폴더를 반환합니다. + /// + public static string CurrentPath + { + get + { + return AppDomain.CurrentDomain.BaseDirectory; + } + } + /// + /// 콤마와 줄바꿈등을 제거합니다. + /// + /// + public static string ToCSVString(string src) + { + string retval = src.Replace("\r", "").Replace("\n", "").Replace(",", ""); + return retval; + } + + public static Boolean RunProcess(string file, string arg = "") + { + var fi = new System.IO.FileInfo(file); + if (!fi.Exists) + { + PUB.log.AddE("Run Error : " + file); + return false; + } + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(file); + si.Arguments = arg; + prc.StartInfo = si; + prc.Start(); + return true; + } + + #region "convert" + public static string RectToStr(Rectangle rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string RectToStr(RectangleF rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string PointToStr(System.Drawing.Point pt) + { + return string.Format("{0};{1}", pt.X, pt.Y); + } + public static string PointToStr(PointF pt) + { + return string.Format("{0};{1}", pt.X, pt.Y); + } + public static Rectangle StrToRect(string str) + { + if (str.isEmpty() || str.Split(';').Length != 4) str = "0;0;0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.Rectangle( + int.Parse(roibuf1[0]), + int.Parse(roibuf1[1]), + int.Parse(roibuf1[2]), + int.Parse(roibuf1[3])); + } + public static RectangleF StrToRectF(string str) + { + if (str.isEmpty() || str.Split(';').Length != 4) str = "0;0;0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.RectangleF( + float.Parse(roibuf1[0]), + float.Parse(roibuf1[1]), + float.Parse(roibuf1[2]), + float.Parse(roibuf1[3])); + } + public static System.Drawing.Point StrToPoint(string str) + { + if (str.isEmpty() || str.Split(';').Length != 2) str = "0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.Point( + int.Parse(roibuf1[0]), + int.Parse(roibuf1[1])); + } + public static PointF StrToPointF(string str) + { + if (str.isEmpty() || str.Split(';').Length != 2) str = "0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.PointF( + float.Parse(roibuf1[0]), + float.Parse(roibuf1[1])); + } + #endregion + + #region "NIC" + + /// + /// 지정된 nic카드가 현재 목록에 존재하는지 확인한다. + /// + /// + public static Boolean ExistNIC(string NICName) + { + if (string.IsNullOrEmpty(NICName)) return false; + foreach (string NetName in NICCardList()) + { + if (NetName.ToLower() == NICName.ToLower()) + { + return true; + } + } + return false; + } + + /// + /// Ehternet Card 를 사용안함으로 설정합니다.(관리자권한필요) + /// + /// + public static Boolean NICDisable(string NICName) + { + //해당 nic 가 현재 목록에 존재하는지 확인한다. + + string cmd = "interface set interface " + NICName + " disable"; + Process prc = new Process(); + ProcessStartInfo si = new ProcessStartInfo("netsh", cmd); + si.WindowStyle = ProcessWindowStyle.Hidden; + prc.StartInfo = si; + prc.Start(); + + ////목록에서 사라질때까지 기다린다. + DateTime SD = DateTime.Now; + Boolean timeout = false; + while ((true)) + { + + bool FindNetwork = false; + foreach (string NetName in NICCardList()) + { + if (NetName == NICName.ToLower()) + { + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + + if (!FindNetwork) + break; // TODO: might not be correct. Was : Exit While + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + timeout = true; + break; // TODO: might not be correct. Was : Exit While + } + } + return !timeout; + } + + public static List NICCardList() + { + List Retval = new List(); + foreach (System.Net.NetworkInformation.NetworkInterface Net in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()) + { + if (Net.NetworkInterfaceType == System.Net.NetworkInformation.NetworkInterfaceType.Ethernet) + { + Retval.Add(Net.Name.ToUpper()); + } + } + return Retval; + } + + /// + /// 이더넷카드를 사용함으로 설정합니다. + /// + /// + public static Boolean NICEnable(string NICName) + { + string cmd = "interface set interface " + NICName + " enable"; + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo("netsh", cmd); + si.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; + prc.StartInfo = si; + prc.Start(); + + + ////목록에생길떄까지 대기 + DateTime SD = DateTime.Now; + while ((true)) + { + + bool FindNetwork = false; + foreach (string NetName in NICCardList()) + { + if (NetName.ToLower() == NICName.ToLower()) + { + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + + if (FindNetwork) + break; // TODO: might not be correct. Was : Exit While + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + return false; + } + } + + ////결이 완료될떄까지 기다린다. + SD = DateTime.Now; + while ((true)) + { + + bool FindNetwork = false; + foreach (System.Net.NetworkInformation.NetworkInterface Net in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()) + { + if (Net.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.GigabitEthernet && + Net.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Ethernet) continue; + if (Net.Name.ToLower() == NICName.ToLower()) + { + //string data = Net.GetIPProperties().GatewayAddresses[0].ToString(); + + if (Net.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up) + { + + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + } + if (FindNetwork) + return true; + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + return false; + } + } + + } + + #endregion + + public static void RunExplorer(string arg) + { + System.Diagnostics.ProcessStartInfo si = new ProcessStartInfo("explorer"); + si.Arguments = arg; + System.Diagnostics.Process.Start(si); + } + + #region "watchdog" + public static void WatchDog_Run() + { + System.IO.FileInfo fi = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "WatchCat.exe"); + if (!fi.Exists) return; + var Exist = CheckExistProcess("watchcat"); + if (Exist) return; + RunProcess(fi.FullName); + } + + public static Boolean CheckExistProcess(string ProcessName) + { + foreach (var prc in System.Diagnostics.Process.GetProcesses()) + { + if (prc.ProcessName.StartsWith("svchost")) continue; + if (prc.ProcessName.ToUpper() == ProcessName.ToUpper()) return true; + } + return false; + } + #endregion + + #region "web function" + /// + /// URL로부터 문자열을 수신합니다. + /// + /// + /// + /// + public static string GetStrfromurl(string url, out Boolean isError) + { + isError = false; + string result = ""; + try + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(url)); + request.Timeout = 60000; + request.ReadWriteTimeout = 60000; + + request.MaximumAutomaticRedirections = 4; + request.MaximumResponseHeadersLength = 4; + request.Credentials = CredentialCache.DefaultCredentials; + var response = request.GetResponse() as HttpWebResponse; + var txtReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8); + result = txtReader.ReadToEnd(); + } + catch (Exception ex) + { + isError = true; + result = ex.Message.ToString(); + } + return result; + } + + #endregion + + } +} diff --git a/Cs_HMI/Project/Util_FG.cs b/Cs_HMI/Project/Util_FG.cs new file mode 100644 index 0000000..aee2af5 --- /dev/null +++ b/Cs_HMI/Project/Util_FG.cs @@ -0,0 +1,273 @@ +///* +// * Created by SharpDevelop. +// * User: amkor +// * Date: 5/16/2018 +// * Time: 3:08 PM +// * +// * To change this template use Tools | Options | Coding | Edit Standard Headers. +// */ +//using System; + +//namespace Project +//{ +// public static class Util_DO +// { +// /// +// /// ADLink I/O Board input status +// /// +// /// +// /// +// public static Boolean GetIOInput(eDIName pin) +// { +// var curValue = Pub.dio.INPUT(GetDINum(pin) - 1); +// if (pin == eDIName.EMERGENCY || +// pin == eDIName.PCB_PUSHER_END || +// pin == eDIName.PCB_PUSHER_HOME || +// pin == eDIName.PCB_IN_MGZ || +// pin == eDIName.PCB_OVERLOAD || +// pin == eDIName.PCB_PUSHER_OVR) +// { +// return !curValue; +// } +// else return curValue; +// } + +// /// +// /// ADLink I/O Board Output Status +// /// +// /// +// /// +// public static Boolean GetIOOutput(eDOName pin) +// { +// return Pub.dio.OUTPUT(GetDONum(pin) - 1); +// } + +// /// +// /// A/D Link Digital input Pin number +// /// +// /// +// /// +// public static int GetDINum(eDIName pin) +// { +// return (int)pin + 1; +// //return Pub.setting.DI[(byte)pin]; +// } + +// /// +// /// adlink digital output in number +// /// +// /// +// /// +// public static int GetDONum(eDOName pin) +// { +// return (int)pin + 1; +// //return Pub.setting.DO[(byte)pin]; + +// } + +// /// +// /// 도어각 닫혀있는 경우 TRUE, +// /// +// /// +// public static Boolean CheckDoorSafty() +// { +// var door1 = CheckDoorSafty_Front(); +// var door2 = CheckDoorSafty_Rear(); +// var door3 = CheckDoorSafty_Left(); +// var door4 = CheckDoorSafty_Right(); +// if (door1 && door2 && door3 && door4) return true; +// else return false; +// } +// public static Boolean CheckDoorSafty_Front() +// { +// var door = GetIOInput(eDIName.DOOR_FRONT) || Pub.setting.DisableDoorFront; +// return door; +// } +// public static Boolean CheckDoorSafty_Rear() +// { +// var door = GetIOInput(eDIName.DOOR_REAR) || Pub.setting.DisableDoorRear; +// return door; +// } +// public static Boolean CheckDoorSafty_Left() +// { +// var door = GetIOInput(eDIName.DOOR_LEFT) || Pub.setting.DisableDoorLeft; +// return door; +// } +// public static Boolean CheckDoorSafty_Right() +// { +// var door = GetIOInput(eDIName.DOOR_RIGHT) || Pub.setting.DisableDoorRight; +// return door; +// } + +// public static Boolean checkMGZReady() +// { +// var ready1 = GetIOInput(eDIName.MGZ_CLAMP_RDY1); +// var ready2 = GetIOInput(eDIName.MGZ_CLAMP_RDY2); +// return ready1 && ready2; +// } + +// public static Boolean SetAIR(Boolean ON) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// return Pub.dio.SetOutput(GetDONum(eDOName.MAIN_AIR) - 1, ON); + +// } +// //public static Boolean SetEMGLamp(Boolean ON) +// //{ +// // if (Pub.dio == null || !Pub.dio.initOK) return false; +// // return Pub.dio.SetOutput(GetDONum(eDOName.em) - 1, ON); +// //} +// public static Boolean SetPusher(eMotDir Direction) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// if (Direction == eMotDir.CW) +// { +// if(Util_DO.GetIOInput( eDIName.MGZ_CLAMP_RDY1)==false && +// Util_DO.GetIOInput(eDIName.MGZ_CLAMP_RDY2)==false) +// { +// Pub.log.AddE("매거진이 없어서 푸셔 작동이 불가 합니다"); +// return false; +// } +// Pub.dio.SetOutput(GetDONum(eDOName.PCB_PUSHER_DIR) - 1, true); +// return Pub.dio.SetOutput(GetDONum(eDOName.PCB_PUSHER_RUN) - 1, true); +// } +// else if (Direction == eMotDir.CCW) +// { +// Pub.dio.SetOutput(GetDONum(eDOName.PCB_PUSHER_DIR) - 1, false); +// return Pub.dio.SetOutput(GetDONum(eDOName.PCB_PUSHER_RUN) - 1, true); +// } +// else +// { +// return Pub.dio.SetOutput(GetDONum(eDOName.PCB_PUSHER_RUN) - 1, false); +// } +// } + +// public static Boolean SetMGZMotor(Boolean run) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// if (run) +// { +// Pub.MGZRunTime = DateTime.Now; +// Pub.log.Add("MGZ In Run : " + Pub.MGZRunTime.ToString()); +// return Pub.dio.SetOutput((int)eDOName.MGZ_IN, true); +// } +// else +// { +// return Pub.dio.SetOutput((int)eDOName.MGZ_IN, false); +// } +// } + +// #region "Tower Lamp" + +// /// +// /// 타워램프버튼 작업 +// /// +// /// +// /// +// /// +// public static void SetTWLamp(Boolean r, Boolean g, Boolean y) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return; +// if (Util_DO.GetIOOutput(eDOName.TWR_GRN) != g) Pub.dio.SetOutput(GetDONum(eDOName.TWR_GRN) - 1, g); +// if (Util_DO.GetIOOutput(eDOName.TWR_RED) != r) Pub.dio.SetOutput(GetDONum(eDOName.TWR_RED) - 1, r); +// if (Util_DO.GetIOOutput(eDOName.TWR_YEL) != y) Pub.dio.SetOutput(GetDONum(eDOName.TWR_YEL) - 1, y); + +// if (Util_DO.GetIOOutput(eDOName.LED_START) != g) Pub.dio.SetOutput(GetDONum(eDOName.LED_START) - 1, g); +// if (Util_DO.GetIOOutput(eDOName.LED_STOP) != r) Pub.dio.SetOutput(GetDONum(eDOName.LED_STOP) - 1, r); +// if (Util_DO.GetIOOutput(eDOName.LED_RESET) != y) Pub.dio.SetOutput(GetDONum(eDOName.LED_RESET) - 1, y); +// } + +// public static Boolean SetTwRed(Boolean ON) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// Pub.dio.SetOutput(GetDONum(eDOName.LED_STOP) - 1, ON); +// return Pub.dio.SetOutput(GetDONum(eDOName.TWR_RED) - 1, ON); +// } +// public static Boolean SetTwYel(Boolean ON) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// Pub.dio.SetOutput(GetDONum(eDOName.LED_RESET) - 1, ON); +// return Pub.dio.SetOutput(GetDONum(eDOName.TWR_YEL) - 1, ON); +// } +// public static Boolean SetTwGrn(Boolean ON) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// Pub.dio.SetOutput(GetDONum(eDOName.LED_START) - 1, ON); +// return Pub.dio.SetOutput(GetDONum(eDOName.TWR_GRN) - 1, ON); +// } + +// #endregion + +// public static void ToggleRoomLight() +// { +// var current = Util_DO.GetIOOutput(eDOName.ROOM_LIGHT); +// Pub.dio.SetOutput((int)eDOName.ROOM_LIGHT, !current); +// } + + +// public static Boolean SetBrake(Boolean ON) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// return Pub.dio.SetOutput(GetDONum(eDOName.BRAKE_OFF) - 1, !ON); +// } + +// public static Boolean SetBuzzer(Boolean ON) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// if (ON) +// { +// Pub.BuzzerTime = DateTime.Now; +// if (Pub.setting.EnableBuzzer == false) return true; //부저기능OFF시 사용 안함 +// } +// if (ON && Pub.setting.EnableBuzzer==false) +// { +// Pub.log.AddAT("buzzer Disabled"); +// ON = false; +// } +// return Pub.dio.SetOutput(GetDONum(eDOName.BUZZER) - 1, ON); +// } +// public static Boolean getBrakeOn() +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// return !GetIOOutput(eDOName.BRAKE_OFF); +// } + +// public static Boolean setGripper(Boolean close) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// var rlt = Pub.dio.SetOutput(GetDONum(eDOName.PCB_GRIPPER_CLOSE) - 1, close); +// if (!rlt) Pub.log.AddE("Grip Set Error vlaue=" + close.ToString()); +// else +// { +// System.Threading.Thread.Sleep(Pub.setting.GripperOnOffDelay); +// //Pub.log.Add("DELAY:GRIP:" + Pub.setting.GripperOnOffDelay); +// } +// return rlt; +// } +// public static Boolean setMGZClamp(Boolean close) +// { +// if (Pub.dio == null || !Pub.dio.IsInit) return false; +// bool rlt1, rlt2; +// if (close) +// { +// rlt1 = Pub.dio.SetOutput((int)eDOName.MGZ_CLAMP_OPEN, false); +// rlt2 = Pub.dio.SetOutput((int)eDOName.MGZ_CLAMP_CLOSE, true); +// } +// else +// { +// rlt2 = Pub.dio.SetOutput((int)eDOName.MGZ_CLAMP_CLOSE, false); +// rlt1 = Pub.dio.SetOutput((int)eDOName.MGZ_CLAMP_OPEN, true); +// } + +// Pub.log.AddAT("gripper set close = " + close.ToString()); + +// if (rlt1 == false || rlt2 == false) Pub.log.AddE("Grip Set Error vlaue=" + close.ToString()); +// else +// { +// System.Threading.Thread.Sleep(Pub.setting.GripperOnOffDelay); +// // Pub.log.Add("DELAY:GRIP:" + Pub.setting.GripperOnOffDelay); +// } +// return rlt1 && rlt2; +// } +// } +//} diff --git a/Cs_HMI/Project/ViewForm/fAgv.Designer.cs b/Cs_HMI/Project/ViewForm/fAgv.Designer.cs new file mode 100644 index 0000000..77ccf4d --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fAgv.Designer.cs @@ -0,0 +1,273 @@ +namespace Project.ViewForm +{ + partial class fAgv + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.richTextBox2 = new System.Windows.Forms.RichTextBox(); + this.richTextBox3 = new System.Windows.Forms.RichTextBox(); + this.richTextBox4 = new System.Windows.Forms.RichTextBox(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.panel1 = new System.Windows.Forms.Panel(); + this.button7 = new System.Windows.Forms.Button(); + this.button6 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.tableLayoutPanel1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 4; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.Controls.Add(this.richTextBox1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.richTextBox2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.richTextBox3, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.richTextBox4, 3, 0); + this.tableLayoutPanel1.Controls.Add(this.label1, 0, 2); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1050, 510); + this.tableLayoutPanel1.TabIndex = 6; + // + // richTextBox1 + // + this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBox1.Location = new System.Drawing.Point(3, 3); + this.richTextBox1.Name = "richTextBox1"; + this.tableLayoutPanel1.SetRowSpan(this.richTextBox1, 2); + this.richTextBox1.Size = new System.Drawing.Size(256, 454); + this.richTextBox1.TabIndex = 1; + this.richTextBox1.Text = ""; + // + // richTextBox2 + // + this.richTextBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBox2.Location = new System.Drawing.Point(265, 3); + this.richTextBox2.Name = "richTextBox2"; + this.tableLayoutPanel1.SetRowSpan(this.richTextBox2, 2); + this.richTextBox2.Size = new System.Drawing.Size(256, 454); + this.richTextBox2.TabIndex = 1; + this.richTextBox2.Text = ""; + // + // richTextBox3 + // + this.richTextBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBox3.Location = new System.Drawing.Point(527, 3); + this.richTextBox3.Name = "richTextBox3"; + this.tableLayoutPanel1.SetRowSpan(this.richTextBox3, 2); + this.richTextBox3.Size = new System.Drawing.Size(256, 454); + this.richTextBox3.TabIndex = 1; + this.richTextBox3.Text = ""; + // + // richTextBox4 + // + this.richTextBox4.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBox4.Location = new System.Drawing.Point(789, 3); + this.richTextBox4.Name = "richTextBox4"; + this.tableLayoutPanel1.SetRowSpan(this.richTextBox4, 2); + this.richTextBox4.Size = new System.Drawing.Size(258, 454); + this.richTextBox4.TabIndex = 1; + this.richTextBox4.Text = ""; + // + // timer1 + // + this.timer1.Interval = 200; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // panel1 + // + this.panel1.Controls.Add(this.button7); + this.panel1.Controls.Add(this.button6); + this.panel1.Controls.Add(this.button5); + this.panel1.Controls.Add(this.button3); + this.panel1.Controls.Add(this.button2); + this.panel1.Controls.Add(this.button1); + this.panel1.Controls.Add(this.button8); + this.panel1.Controls.Add(this.button4); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(3, 513); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1050, 67); + this.panel1.TabIndex = 7; + // + // button7 + // + this.button7.Dock = System.Windows.Forms.DockStyle.Right; + this.button7.Location = new System.Drawing.Point(550, 0); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(100, 67); + this.button7.TabIndex = 6; + this.button7.Text = "Go - Front\r\nManual"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // button6 + // + this.button6.Dock = System.Windows.Forms.DockStyle.Right; + this.button6.Location = new System.Drawing.Point(650, 0); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(100, 67); + this.button6.TabIndex = 5; + this.button6.Text = "Go - Back\r\nManual"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // button5 + // + this.button5.Dock = System.Windows.Forms.DockStyle.Right; + this.button5.Location = new System.Drawing.Point(750, 0); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(100, 67); + this.button5.TabIndex = 4; + this.button5.Text = "Stop(Mark)"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // button3 + // + this.button3.Dock = System.Windows.Forms.DockStyle.Left; + this.button3.Location = new System.Drawing.Point(200, 0); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(100, 67); + this.button3.TabIndex = 2; + this.button3.Text = "Charge Off"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button2 + // + this.button2.Dock = System.Windows.Forms.DockStyle.Left; + this.button2.Location = new System.Drawing.Point(100, 0); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(100, 67); + this.button2.TabIndex = 1; + this.button2.Text = "Charge On"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button1 + // + this.button1.Dock = System.Windows.Forms.DockStyle.Left; + this.button1.Location = new System.Drawing.Point(0, 0); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(100, 67); + this.button1.TabIndex = 0; + this.button1.Text = "Reset"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button8 + // + this.button8.Dock = System.Windows.Forms.DockStyle.Right; + this.button8.Location = new System.Drawing.Point(850, 0); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(100, 67); + this.button8.TabIndex = 7; + this.button8.Text = "Run"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button8_Click); + // + // button4 + // + this.button4.Dock = System.Windows.Forms.DockStyle.Right; + this.button4.Location = new System.Drawing.Point(950, 0); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(100, 67); + this.button4.TabIndex = 3; + this.button4.Text = "Stop"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // label1 + // + this.tableLayoutPanel1.SetColumnSpan(this.label1, 2); + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.ForeColor = System.Drawing.Color.White; + this.label1.Location = new System.Drawing.Point(3, 460); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(518, 50); + this.label1.TabIndex = 2; + this.label1.Text = "label1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // fAgv + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.ClientSize = new System.Drawing.Size(1056, 583); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "fAgv"; + this.Padding = new System.Windows.Forms.Padding(3); + this.Text = "fFlag"; + this.Load += new System.EventHandler(this.fFlag_Load); + this.VisibleChanged += new System.EventHandler(this.fAgv_VisibleChanged); + this.tableLayoutPanel1.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.RichTextBox richTextBox2; + private System.Windows.Forms.RichTextBox richTextBox3; + private System.Windows.Forms.RichTextBox richTextBox4; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fAgv.cs b/Cs_HMI/Project/ViewForm/fAgv.cs new file mode 100644 index 0000000..aace338 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fAgv.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using COMM; + +namespace Project.ViewForm +{ + public partial class fAgv : Form + { + public fAgv() + { + InitializeComponent(); + + + this.FormClosed += FIO_FormClosed; + } + + private void fFlag_Load(object sender, EventArgs e) + { + this.timer1.Start(); + } + + private void FIO_FormClosed(object sender, FormClosedEventArgs e) + { + this.timer1.Stop(); + } + + + bool tmrun = false; + private void timer1_Tick(object sender, EventArgs e) + { + timer1.Stop(); + label1.Text = PUB.AGV.LastSTS; + richTextBox1.Text = PUB.AGV.system0.ToString(); + richTextBox2.Text = PUB.AGV.system1.ToString(); + richTextBox3.Text = PUB.AGV.signal.ToString() + "\n" + PUB.AGV.data.ToString(); + richTextBox4.Text = PUB.AGV.error.ToString(); + timer1.Start(); + } + + private void fAgv_VisibleChanged(object sender, EventArgs e) + { + this.timer1.Enabled = this.Visible; + if (timer1.Enabled) timer1.Start(); + else timer1.Stop(); + } + + private void button1_Click(object sender, EventArgs e) + { + PUB.AGV.AGVErrorReset(); + if(PUB.sm.Step == StateMachine.eSMStep.RUN) + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void button2_Click(object sender, EventArgs e) + { + PUB.log.Add($"사용자 충전 명령 전송 : {PUB.setting.ChargerID}"); + PUB.AGV.AGVCharge(PUB.setting.ChargerID, true); + if (PUB.sm.Step == StateMachine.eSMStep.RUN) + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void button3_Click(object sender, EventArgs e) + { + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + if (PUB.sm.Step == StateMachine.eSMStep.RUN) + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void button4_Click(object sender, EventArgs e) + { + PUB.AGV.AGVMoveStop("userbutton page:fagv button:button4"); + if (PUB.sm.Step == StateMachine.eSMStep.RUN) + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void button5_Click(object sender, EventArgs e) + { + PUB.AGV.AGVMoveStop("user button clic fagv",arDev.Narumi.eStopOpt.MarkStop); + if (PUB.sm.Step == StateMachine.eSMStep.RUN) + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void button7_Click(object sender, EventArgs e) + { + PUB.AGV.AGVMoveManual(arDev.Narumi.ManulOpt.FS, arDev.Narumi.Speed.Low, arDev.Narumi.Sensor.AllOn); + if (PUB.sm.Step == StateMachine.eSMStep.RUN) + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void button6_Click(object sender, EventArgs e) + { + PUB.AGV.AGVMoveManual(arDev.Narumi.ManulOpt.BS, arDev.Narumi.Speed.Low, arDev.Narumi.Sensor.AllOn); + if (PUB.sm.Step == StateMachine.eSMStep.RUN) + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void button8_Click(object sender, EventArgs e) + { + PUB.AGV.AGVMoveRun(); + } + } +} diff --git a/Cs_HMI/Project/ViewForm/fAgv.resx b/Cs_HMI/Project/ViewForm/fAgv.resx new file mode 100644 index 0000000..aac33d5 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fAgv.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fAuto.Designer.cs b/Cs_HMI/Project/ViewForm/fAuto.Designer.cs new file mode 100644 index 0000000..38e8041 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fAuto.Designer.cs @@ -0,0 +1,86 @@ +namespace Project.ViewForm +{ + partial class fAuto + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.ctlAuto1 = new Project.CtlAuto(); + this.SuspendLayout(); + // + // timer1 + // + this.timer1.Interval = 200; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // ctlAuto1 + // + this.ctlAuto1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + this.ctlAuto1.BorderColor = System.Drawing.Color.Transparent; + this.ctlAuto1.Dock = System.Windows.Forms.DockStyle.Fill; + this.ctlAuto1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.ctlAuto1.Font_BMS_Level = new System.Drawing.Font("Bahnschrift Condensed", 250F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ctlAuto1.Font_BMS_Volt = new System.Drawing.Font("Bahnschrift Condensed", 50.25F, System.Drawing.FontStyle.Bold); + this.ctlAuto1.Font_MAIN_BMSLevel = new System.Drawing.Font("Arial Narrow", 150F, System.Drawing.FontStyle.Bold); + this.ctlAuto1.ForeColor = System.Drawing.Color.White; + this.ctlAuto1.ItemGap = 0; + this.ctlAuto1.Items = null; + this.ctlAuto1.Location = new System.Drawing.Point(0, 0); + this.ctlAuto1.MinimumSize = new System.Drawing.Size(100, 30); + this.ctlAuto1.Name = "ctlAuto1"; + this.ctlAuto1.ProgressMax = 100F; + this.ctlAuto1.ProgressVal = 50F; + this.ctlAuto1.Scean = Project.CtlAuto.eScean.Normal; + this.ctlAuto1.Size = new System.Drawing.Size(1014, 579); + this.ctlAuto1.StatusMessage = "상태메세지 입니다"; + this.ctlAuto1.StopMessage = ""; + this.ctlAuto1.StopTime = new System.DateTime(((long)(0))); + this.ctlAuto1.TabIndex = 20; + this.ctlAuto1.Text = "ctlAuto1"; + // + // fAuto + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.ClientSize = new System.Drawing.Size(1014, 579); + this.Controls.Add(this.ctlAuto1); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "fAuto"; + this.Text = "fAuto"; + this.Load += new System.EventHandler(this.fAuto_Load); + this.VisibleChanged += new System.EventHandler(this.fAuto_VisibleChanged); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Timer timer1; + private CtlAuto ctlAuto1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fAuto.cs b/Cs_HMI/Project/ViewForm/fAuto.cs new file mode 100644 index 0000000..df7b060 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fAuto.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static Project.StateMachine; +using COMM; + +namespace Project.ViewForm +{ + public partial class fAuto : Form + { + public fAuto() + { + InitializeComponent(); + this.FormClosed += FAuto_FormClosed; + PUB.sm.StepChanged += Sm_StepChanged; + this.ctlAuto1.ButtonClick += CtlAuto1_ButtonClick; + if (PUB.sm.Step == eSMStep.INIT || PUB.sm.Step == eSMStep.SYNC) + this.ctlAuto1.Scean = CtlAuto.eScean.Progress; + else + this.ctlAuto1.Scean = CtlAuto.eScean.Normal; + } + private void fAuto_Load(object sender, EventArgs e) + { + ctlAuto1.dev_agv = PUB.AGV; + ctlAuto1.dev_plc = PUB.PLC; + ctlAuto1.dev_bms = PUB.BMS; + ctlAuto1.dev_xbe = PUB.XBE; + this.timer1.Start(); + } + + private void CtlAuto1_ButtonClick(CtlAuto.UIButton idx) + { + if (idx.cmd.Equals("EMG")) + { + PUB.log.Add("ui reset click"); + PUB.AGV.AGVErrorReset(); + } + } + + private void Sm_StepChanged(object sender, StepChangeEventArgs e) + { + if (e.New == eSMStep.INIT || e.New == eSMStep.SYNC) + this.ctlAuto1.Scean = CtlAuto.eScean.Progress; + else + this.ctlAuto1.Scean = CtlAuto.eScean.Normal; + } + + private void FAuto_FormClosed(object sender, FormClosedEventArgs e) + { + timer1.Stop(); + PUB.sm.StepChanged -= Sm_StepChanged; + this.ctlAuto1.ButtonClick -= CtlAuto1_ButtonClick; + } + + bool tmrun = false; + private void timer1_Tick(object sender, EventArgs e) + { + if (this.Visible == false) return; + if (tmrun == true) return; + tmrun = true; + + this.ctlAuto1.OnUpdateMode = true; + + //lbBatteryLevel.Text = $"{PUB.BMS.Current_Level}%"; + //lbBatteryLevel.ProgressValue = PUB.BMS.Current_Level; + + if(this.ctlAuto1.Scean == CtlAuto.eScean.Progress) + { + ctlAuto1.ProgressVal = PUB.Result.SMSG_ProgressValue; + ctlAuto1.ProgressMax = PUB.Result.SMSG_ProgressMax; + ctlAuto1.StatusMessage = VAR.STR?.Get(eVarString.StatusMessage) ?? string.Empty; + } + + //if(Pub.Result.StopMessagePLC.StartsWith() + if (PUB.PLC.GetValueI(arDev.FakePLC.DIName.PINI_EMG) == true) + this.ctlAuto1.StopMessage = PUB.Result.StopMessagePLC; + else + this.ctlAuto1.StopMessage = string.Empty; + + if (PUB.sm.Step == StateMachine.eSMStep.RUN) + { + this.ctlAuto1.runStep = PUB.sm.RunStep; + } + else + { + this.ctlAuto1.runStep = ERunStep.READY; + } + this.ctlAuto1.OnUpdateMode = false; + this.ctlAuto1.Invalidate(); + tmrun = false; + } + + private void fAuto_VisibleChanged(object sender, EventArgs e) + { + this.timer1.Enabled = this.Visible; + if (timer1.Enabled) timer1.Start(); + else timer1.Stop(); + } + } +} diff --git a/Cs_HMI/Project/ViewForm/fAuto.resx b/Cs_HMI/Project/ViewForm/fAuto.resx new file mode 100644 index 0000000..aac33d5 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fAuto.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fBms.Designer.cs b/Cs_HMI/Project/ViewForm/fBms.Designer.cs new file mode 100644 index 0000000..65b3f8d --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fBms.Designer.cs @@ -0,0 +1,541 @@ +namespace Project.ViewForm +{ + partial class fBms + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.panel1 = new System.Windows.Forms.Panel(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.arLabel1 = new arCtl.arLabel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.cv1 = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.cv2 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.cv3 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.panel5 = new System.Windows.Forms.Panel(); + this.cv4 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.panel6 = new System.Windows.Forms.Panel(); + this.cv5 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.panel7 = new System.Windows.Forms.Panel(); + this.cv6 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.panel8 = new System.Windows.Forms.Panel(); + this.cv7 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.panel9 = new System.Windows.Forms.Panel(); + this.cv8 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.lbinfost = new System.Windows.Forms.Label(); + this.lbcvSt = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel6.SuspendLayout(); + this.panel7.SuspendLayout(); + this.panel8.SuspendLayout(); + this.panel9.SuspendLayout(); + this.SuspendLayout(); + // + // timer1 + // + this.timer1.Interval = 200; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // panel1 + // + this.panel1.Controls.Add(this.groupBox1); + this.panel1.Controls.Add(this.button2); + this.panel1.Controls.Add(this.button1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Left; + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(187, 577); + this.panel1.TabIndex = 0; + // + // button2 + // + this.button2.Dock = System.Windows.Forms.DockStyle.Top; + this.button2.Location = new System.Drawing.Point(0, 67); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(187, 67); + this.button2.TabIndex = 1; + this.button2.Text = "Query Cell Voltage"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button1 + // + this.button1.Dock = System.Windows.Forms.DockStyle.Top; + this.button1.Location = new System.Drawing.Point(0, 0); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(187, 67); + this.button1.TabIndex = 0; + this.button1.Text = "Query Remain"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // arLabel1 + // + this.arLabel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + this.arLabel1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.arLabel1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel1.BorderColor = System.Drawing.Color.Red; + this.arLabel1.BorderColorOver = System.Drawing.Color.Red; + this.arLabel1.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.arLabel1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.arLabel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 150F, System.Drawing.FontStyle.Bold); + this.arLabel1.ForeColor = System.Drawing.Color.White; + this.arLabel1.GradientEnable = true; + this.arLabel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arLabel1.GradientRepeatBG = false; + this.arLabel1.isButton = false; + this.arLabel1.Location = new System.Drawing.Point(190, 3); + this.arLabel1.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel1.msg = null; + this.arLabel1.Name = "arLabel1"; + this.arLabel1.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel1.ProgressEnable = false; + this.arLabel1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel1.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel1.ProgressMax = 100F; + this.arLabel1.ProgressMin = 0F; + this.arLabel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel1.ProgressValue = 0F; + this.arLabel1.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.arLabel1.Sign = "26.5v"; + this.arLabel1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel1.SignColor = System.Drawing.Color.Yellow; + this.arLabel1.SignFont = new System.Drawing.Font("Microsoft Sans Serif", 50F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)))); + this.arLabel1.Size = new System.Drawing.Size(863, 577); + this.arLabel1.TabIndex = 1; + this.arLabel1.Text = "80%"; + this.arLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel1.TextShadow = false; + this.arLabel1.TextVisible = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.lbcvSt); + this.groupBox1.Controls.Add(this.panel9); + this.groupBox1.Controls.Add(this.panel8); + this.groupBox1.Controls.Add(this.panel7); + this.groupBox1.Controls.Add(this.panel6); + this.groupBox1.Controls.Add(this.panel5); + this.groupBox1.Controls.Add(this.panel4); + this.groupBox1.Controls.Add(this.panel3); + this.groupBox1.Controls.Add(this.panel2); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.ForeColor = System.Drawing.Color.White; + this.groupBox1.Location = new System.Drawing.Point(0, 134); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(187, 443); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Cell voltage"; + // + // panel2 + // + this.panel2.Controls.Add(this.cv1); + this.panel2.Controls.Add(this.label1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(3, 17); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(181, 40); + this.panel2.TabIndex = 0; + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Left; + this.label1.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(47, 40); + this.label1.TabIndex = 0; + this.label1.Text = "#1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // cv1 + // + this.cv1.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv1.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv1.Location = new System.Drawing.Point(47, 0); + this.cv1.Name = "cv1"; + this.cv1.Size = new System.Drawing.Size(134, 40); + this.cv1.TabIndex = 0; + this.cv1.Text = "--"; + this.cv1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel3 + // + this.panel3.Controls.Add(this.cv2); + this.panel3.Controls.Add(this.label4); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(3, 57); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(181, 40); + this.panel3.TabIndex = 1; + this.panel3.Paint += new System.Windows.Forms.PaintEventHandler(this.panel3_Paint); + // + // cv2 + // + this.cv2.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv2.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv2.Location = new System.Drawing.Point(47, 0); + this.cv2.Name = "cv2"; + this.cv2.Size = new System.Drawing.Size(134, 40); + this.cv2.TabIndex = 0; + this.cv2.Text = "--"; + this.cv2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label4 + // + this.label4.Dock = System.Windows.Forms.DockStyle.Left; + this.label4.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label4.Location = new System.Drawing.Point(0, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(47, 40); + this.label4.TabIndex = 0; + this.label4.Text = "#2"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel4 + // + this.panel4.Controls.Add(this.cv3); + this.panel4.Controls.Add(this.label6); + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(3, 97); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(181, 40); + this.panel4.TabIndex = 2; + this.panel4.Paint += new System.Windows.Forms.PaintEventHandler(this.panel4_Paint); + // + // cv3 + // + this.cv3.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv3.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv3.Location = new System.Drawing.Point(47, 0); + this.cv3.Name = "cv3"; + this.cv3.Size = new System.Drawing.Size(134, 40); + this.cv3.TabIndex = 0; + this.cv3.Text = "--"; + this.cv3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label6 + // + this.label6.Dock = System.Windows.Forms.DockStyle.Left; + this.label6.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label6.Location = new System.Drawing.Point(0, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(47, 40); + this.label6.TabIndex = 0; + this.label6.Text = "#3"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel5 + // + this.panel5.Controls.Add(this.cv4); + this.panel5.Controls.Add(this.label8); + this.panel5.Dock = System.Windows.Forms.DockStyle.Top; + this.panel5.Location = new System.Drawing.Point(3, 137); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(181, 40); + this.panel5.TabIndex = 3; + // + // cv4 + // + this.cv4.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv4.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv4.Location = new System.Drawing.Point(47, 0); + this.cv4.Name = "cv4"; + this.cv4.Size = new System.Drawing.Size(134, 40); + this.cv4.TabIndex = 0; + this.cv4.Text = "--"; + this.cv4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label8 + // + this.label8.Dock = System.Windows.Forms.DockStyle.Left; + this.label8.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label8.Location = new System.Drawing.Point(0, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(47, 40); + this.label8.TabIndex = 0; + this.label8.Text = "#4"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel6 + // + this.panel6.Controls.Add(this.cv5); + this.panel6.Controls.Add(this.label10); + this.panel6.Dock = System.Windows.Forms.DockStyle.Top; + this.panel6.Location = new System.Drawing.Point(3, 177); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(181, 40); + this.panel6.TabIndex = 4; + this.panel6.Paint += new System.Windows.Forms.PaintEventHandler(this.panel6_Paint); + // + // cv5 + // + this.cv5.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv5.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv5.Location = new System.Drawing.Point(47, 0); + this.cv5.Name = "cv5"; + this.cv5.Size = new System.Drawing.Size(134, 40); + this.cv5.TabIndex = 0; + this.cv5.Text = "--"; + this.cv5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label10 + // + this.label10.Dock = System.Windows.Forms.DockStyle.Left; + this.label10.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label10.Location = new System.Drawing.Point(0, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(47, 40); + this.label10.TabIndex = 0; + this.label10.Text = "#5"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel7 + // + this.panel7.Controls.Add(this.cv6); + this.panel7.Controls.Add(this.label12); + this.panel7.Dock = System.Windows.Forms.DockStyle.Top; + this.panel7.Location = new System.Drawing.Point(3, 217); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(181, 40); + this.panel7.TabIndex = 5; + // + // cv6 + // + this.cv6.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv6.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv6.Location = new System.Drawing.Point(47, 0); + this.cv6.Name = "cv6"; + this.cv6.Size = new System.Drawing.Size(134, 40); + this.cv6.TabIndex = 0; + this.cv6.Text = "--"; + this.cv6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label12 + // + this.label12.Dock = System.Windows.Forms.DockStyle.Left; + this.label12.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label12.Location = new System.Drawing.Point(0, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(47, 40); + this.label12.TabIndex = 0; + this.label12.Text = "#6"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel8 + // + this.panel8.Controls.Add(this.cv7); + this.panel8.Controls.Add(this.label14); + this.panel8.Dock = System.Windows.Forms.DockStyle.Top; + this.panel8.Location = new System.Drawing.Point(3, 257); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(181, 40); + this.panel8.TabIndex = 6; + this.panel8.Paint += new System.Windows.Forms.PaintEventHandler(this.panel8_Paint); + // + // cv7 + // + this.cv7.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv7.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv7.Location = new System.Drawing.Point(47, 0); + this.cv7.Name = "cv7"; + this.cv7.Size = new System.Drawing.Size(134, 40); + this.cv7.TabIndex = 0; + this.cv7.Text = "--"; + this.cv7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label14 + // + this.label14.Dock = System.Windows.Forms.DockStyle.Left; + this.label14.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label14.Location = new System.Drawing.Point(0, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(47, 40); + this.label14.TabIndex = 0; + this.label14.Text = "#7"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel9 + // + this.panel9.Controls.Add(this.cv8); + this.panel9.Controls.Add(this.label16); + this.panel9.Dock = System.Windows.Forms.DockStyle.Top; + this.panel9.Location = new System.Drawing.Point(3, 297); + this.panel9.Name = "panel9"; + this.panel9.Size = new System.Drawing.Size(181, 40); + this.panel9.TabIndex = 7; + // + // cv8 + // + this.cv8.Dock = System.Windows.Forms.DockStyle.Fill; + this.cv8.Font = new System.Drawing.Font("Tahoma", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cv8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.cv8.Location = new System.Drawing.Point(47, 0); + this.cv8.Name = "cv8"; + this.cv8.Size = new System.Drawing.Size(134, 40); + this.cv8.TabIndex = 0; + this.cv8.Text = "--"; + this.cv8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label16 + // + this.label16.Dock = System.Windows.Forms.DockStyle.Left; + this.label16.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label16.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); + this.label16.Location = new System.Drawing.Point(0, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(47, 40); + this.label16.TabIndex = 0; + this.label16.Text = "#8"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbinfost + // + this.lbinfost.AutoSize = true; + this.lbinfost.Font = new System.Drawing.Font("굴림", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.lbinfost.ForeColor = System.Drawing.Color.White; + this.lbinfost.Location = new System.Drawing.Point(194, 8); + this.lbinfost.Name = "lbinfost"; + this.lbinfost.Size = new System.Drawing.Size(39, 27); + this.lbinfost.TabIndex = 2; + this.lbinfost.Text = "●"; + // + // lbcvSt + // + this.lbcvSt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lbcvSt.AutoSize = true; + this.lbcvSt.Font = new System.Drawing.Font("굴림", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.lbcvSt.ForeColor = System.Drawing.Color.White; + this.lbcvSt.Location = new System.Drawing.Point(2, 411); + this.lbcvSt.Name = "lbcvSt"; + this.lbcvSt.Size = new System.Drawing.Size(39, 27); + this.lbcvSt.TabIndex = 8; + this.lbcvSt.Text = "●"; + // + // fBms + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.ClientSize = new System.Drawing.Size(1056, 583); + this.Controls.Add(this.lbinfost); + this.Controls.Add(this.arLabel1); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "fBms"; + this.Padding = new System.Windows.Forms.Padding(3); + this.Text = "fFlag"; + this.Load += new System.EventHandler(this.fFlag_Load); + this.VisibleChanged += new System.EventHandler(this.fAgv_VisibleChanged); + this.panel1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.panel6.ResumeLayout(false); + this.panel7.ResumeLayout(false); + this.panel8.ResumeLayout(false); + this.panel9.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button button1; + private arCtl.arLabel arLabel1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label cv1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel panel9; + private System.Windows.Forms.Label cv8; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Label cv7; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Label cv6; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label cv5; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Label cv4; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label cv3; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label cv2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label lbinfost; + private System.Windows.Forms.Label lbcvSt; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fBms.cs b/Cs_HMI/Project/ViewForm/fBms.cs new file mode 100644 index 0000000..431c95f --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fBms.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using COMM; + +namespace Project.ViewForm +{ + public partial class fBms : Form + { + public fBms() + { + InitializeComponent(); + + + this.FormClosed += FIO_FormClosed; + PUB.BMS.BMSCellDataReceive += BMS_BMSCellDataReceive; + PUB.BMS.BMSDataReceive += BMS_BMSDataReceive; + } + + private void BMS_BMSDataReceive(object sender, arDev.BMSInformationEventArgs e) + { + if (this.IsDisposed == true || this.Visible == false) return; + this.BeginInvoke(new Action(() => + { + if (lbinfost.ForeColor == Color.FromArgb(32, 32, 32)) + lbinfost.ForeColor = Color.Lime; + else + lbinfost.ForeColor = Color.FromArgb(32, 32, 32); + })); + } + + private void BMS_BMSCellDataReceive(object sender, arDev.BMSCelvoltageEventArgs e) + { + if (this.IsDisposed == true || this.Visible == false) return; + this.BeginInvoke(new Action(() => + { + if (lbcvSt.ForeColor == Color.FromArgb(15, 15, 15)) + lbcvSt.ForeColor = Color.Lime; + else + lbcvSt.ForeColor = Color.FromArgb(15, 15, 15); + })); + } + + private void fFlag_Load(object sender, EventArgs e) + { + this.timer1.Start(); + } + + private void FIO_FormClosed(object sender, FormClosedEventArgs e) + { + this.timer1.Stop(); + PUB.BMS.BMSCellDataReceive -= BMS_BMSCellDataReceive; + PUB.BMS.BMSDataReceive -= BMS_BMSDataReceive; + } + + + bool tmrun = false; + private void timer1_Tick(object sender, EventArgs e) + { + timer1.Stop(); + this.arLabel1.Text = PUB.BMS.Current_Level.ToString("N1") + "%"; + this.arLabel1.Sign = PUB.BMS.Current_Volt.ToString() + "v"; + this.cv1.Text = PUB.BMS.CellVoltage[0].ToString("N3") + "v"; + this.cv2.Text = PUB.BMS.CellVoltage[1].ToString("N3") + "v"; + this.cv3.Text = PUB.BMS.CellVoltage[2].ToString("N3") + "v"; + this.cv4.Text = PUB.BMS.CellVoltage[3].ToString("N3") + "v"; + this.cv5.Text = PUB.BMS.CellVoltage[4].ToString("N3") + "v"; + this.cv6.Text = PUB.BMS.CellVoltage[5].ToString("N3") + "v"; + this.cv7.Text = PUB.BMS.CellVoltage[6].ToString("N3") + "v"; + this.cv8.Text = PUB.BMS.CellVoltage[7].ToString("N3") + "v"; + timer1.Start(); + } + + private void fAgv_VisibleChanged(object sender, EventArgs e) + { + this.timer1.Enabled = this.Visible; + } + + private void button1_Click(object sender, EventArgs e) + { + PUB.BMS.SendQuery_ReadStatue(); + } + + private void button2_Click(object sender, EventArgs e) + { + PUB.BMS.SendQuery_ReadCellvoltage(); + } + + private void panel3_Paint(object sender, PaintEventArgs e) + { + + } + + private void panel4_Paint(object sender, PaintEventArgs e) + { + + } + + private void panel6_Paint(object sender, PaintEventArgs e) + { + + } + + private void panel8_Paint(object sender, PaintEventArgs e) + { + + } + } +} diff --git a/Cs_HMI/Project/ViewForm/fBms.resx b/Cs_HMI/Project/ViewForm/fBms.resx new file mode 100644 index 0000000..aac33d5 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fBms.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fFlag.Designer.cs b/Cs_HMI/Project/ViewForm/fFlag.Designer.cs new file mode 100644 index 0000000..1f9be26 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fFlag.Designer.cs @@ -0,0 +1,189 @@ +namespace Project.ViewForm +{ + partial class fFlag + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.listView1 = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.listView2 = new System.Windows.Forms.ListView(); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.listView3 = new System.Windows.Forms.ListView(); + this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.listView4 = new System.Windows.Forms.ListView(); + this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 4; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.Controls.Add(this.listView1, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.listView2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.listView3, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.listView4, 3, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1050, 577); + this.tableLayoutPanel1.TabIndex = 6; + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView1.HideSelection = false; + this.listView1.Location = new System.Drawing.Point(3, 3); + this.listView1.Name = "listView1"; + this.tableLayoutPanel1.SetRowSpan(this.listView1, 2); + this.listView1.Size = new System.Drawing.Size(256, 571); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Width = 120; + // + // columnHeader2 + // + this.columnHeader2.Width = 120; + // + // listView2 + // + this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader3, + this.columnHeader4}); + this.listView2.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView2.HideSelection = false; + this.listView2.Location = new System.Drawing.Point(265, 3); + this.listView2.Name = "listView2"; + this.tableLayoutPanel1.SetRowSpan(this.listView2, 2); + this.listView2.Size = new System.Drawing.Size(256, 571); + this.listView2.TabIndex = 0; + this.listView2.UseCompatibleStateImageBehavior = false; + this.listView2.View = System.Windows.Forms.View.Details; + // + // columnHeader3 + // + this.columnHeader3.Width = 120; + // + // listView3 + // + this.listView3.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader5, + this.columnHeader6}); + this.listView3.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView3.HideSelection = false; + this.listView3.Location = new System.Drawing.Point(527, 3); + this.listView3.Name = "listView3"; + this.tableLayoutPanel1.SetRowSpan(this.listView3, 2); + this.listView3.Size = new System.Drawing.Size(256, 571); + this.listView3.TabIndex = 0; + this.listView3.UseCompatibleStateImageBehavior = false; + this.listView3.View = System.Windows.Forms.View.Details; + // + // columnHeader5 + // + this.columnHeader5.Width = 120; + // + // listView4 + // + this.listView4.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader7, + this.columnHeader8}); + this.listView4.Dock = System.Windows.Forms.DockStyle.Fill; + this.listView4.HideSelection = false; + this.listView4.Location = new System.Drawing.Point(789, 3); + this.listView4.Name = "listView4"; + this.tableLayoutPanel1.SetRowSpan(this.listView4, 2); + this.listView4.Size = new System.Drawing.Size(258, 571); + this.listView4.TabIndex = 0; + this.listView4.UseCompatibleStateImageBehavior = false; + this.listView4.View = System.Windows.Forms.View.Details; + // + // columnHeader7 + // + this.columnHeader7.Width = 120; + // + // timer1 + // + this.timer1.Interval = 500; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // fFlag + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.ClientSize = new System.Drawing.Size(1056, 583); + this.Controls.Add(this.tableLayoutPanel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "fFlag"; + this.Padding = new System.Windows.Forms.Padding(3); + this.Text = "fFlag"; + this.Load += new System.EventHandler(this.fFlag_Load); + this.VisibleChanged += new System.EventHandler(this.fFlag_VisibleChanged); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.ListView listView2; + private System.Windows.Forms.ListView listView3; + private System.Windows.Forms.ListView listView4; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.ColumnHeader columnHeader7; + private System.Windows.Forms.ColumnHeader columnHeader8; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fFlag.cs b/Cs_HMI/Project/ViewForm/fFlag.cs new file mode 100644 index 0000000..877fe32 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fFlag.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using COMM; + +namespace Project.ViewForm +{ + public partial class fFlag : Form + { + public fFlag() + { + InitializeComponent(); + + + this.FormClosed += FIO_FormClosed; + } + + private void fFlag_Load(object sender, EventArgs e) + { + MakeControl(); + this.timer1.Start(); + } + + void MakeControl() + { + ListView[] lvs = new ListView[] { listView1, listView2, listView3, listView4 }; + foreach (var lv in lvs) + { + lv.Columns.Clear(); + lv.Columns.Add("Idx"); + lv.Columns.Add("Title"); + lv.Columns.Add("Value"); + lv.Columns[0].Width = 25; + lv.Columns[1].Width = 150; + lv.Columns[2].Width = 100; + } + Array valuelist; + + valuelist = Enum.GetValues(typeof(COMM.eVarBool)); + foreach (var item in valuelist) + { + var v = (COMM.eVarBool)item; + var lv = listView1.Items.Add($"{(int)v}"); + lv.SubItems.Add($"{item}"); + lv.SubItems.Add("--"); + } + + valuelist = Enum.GetValues(typeof(COMM.eVarInt32)); + foreach (var item in valuelist) + { + var v = (COMM.eVarInt32)item; + var lv = listView2.Items.Add($"{(int)v}"); + lv.SubItems.Add($"{item}"); + lv.SubItems.Add("--"); + } + + valuelist = Enum.GetValues(typeof(COMM.eVarString)); + foreach (var item in valuelist) + { + var v = (COMM.eVarString)item; + var lv = listView3.Items.Add($"{(int)v}"); + lv.SubItems.Add($"{item}"); + lv.SubItems.Add("--"); + } + + valuelist = Enum.GetValues(typeof(COMM.eVarTime)); + foreach (var item in valuelist) + { + var v = (COMM.eVarString)item; + var lv = listView4.Items.Add($"{(int)v}"); + lv.SubItems.Add($"{item}"); + lv.SubItems.Add("--"); + } + + + } + + private void FIO_FormClosed(object sender, FormClosedEventArgs e) + { + this.timer1.Stop(); + } + + + bool tmrun = false; + private void timer1_Tick(object sender, EventArgs e) + { + timer1.Stop(); + listView1.SuspendLayout(); + foreach (ListViewItem item in listView1.Items) + { + var idx = int.Parse(item.SubItems[0].Text); + var v = VAR.BOOL.Get(idx); + var desc = VAR.BOOL.GetCodeDesc(idx); + item.SubItems[2].Text = v ? "O" : "X"; + } + listView1.ResumeLayout(); + listView2.SuspendLayout(); + foreach (ListViewItem item in listView2.Items) + { + var idx = int.Parse(item.SubItems[0].Text); + var v = VAR.I32.Get(idx); + var desc = VAR.I32.GetCodeDesc(idx); + item.SubItems[2].Text = v.ToString(); + } + listView2.ResumeLayout(); + listView3.SuspendLayout(); + foreach (ListViewItem item in listView3.Items) + { + var idx = int.Parse(item.SubItems[0].Text); + var v = VAR.STR.Get(idx); + var desc = VAR.STR.GetCodeDesc(idx); + item.SubItems[2].Text = v; + } + listView3.ResumeLayout(); + listView4.SuspendLayout(); + foreach (ListViewItem item in listView4.Items) + { + var idx = int.Parse(item.SubItems[0].Text); + var v = VAR.TIME.Get(idx); + var desc = VAR.TIME.GetCodeDesc(idx); + item.SubItems[2].Text = v.ToString("HH:mm:ss.fff"); + } + listView4.ResumeLayout(); + timer1.Start(); + } + + private void fFlag_VisibleChanged(object sender, EventArgs e) + { + this.timer1.Enabled = this.Visible; + if (timer1.Enabled) timer1.Start(); + else timer1.Stop(); + } + + private void listView1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + } +} diff --git a/Cs_HMI/Project/ViewForm/fFlag.resx b/Cs_HMI/Project/ViewForm/fFlag.resx new file mode 100644 index 0000000..aac33d5 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fFlag.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fIO.Designer.cs b/Cs_HMI/Project/ViewForm/fIO.Designer.cs new file mode 100644 index 0000000..9445ff9 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fIO.Designer.cs @@ -0,0 +1,302 @@ +namespace Project.ViewForm +{ + partial class fIO + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + arFrame.Control.ColorListItem colorListItem1 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem2 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem3 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem4 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem5 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem6 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem7 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem8 = new arFrame.Control.ColorListItem(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fIO)); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.HWState = new arFrame.Control.GridView(); + this.tblMain = new arFrame.Control.GridView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.panel2 = new System.Windows.Forms.Panel(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.tableLayoutPanel1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.HWState, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.tblMain, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 58F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(957, 583); + this.tableLayoutPanel1.TabIndex = 5; + // + // HWState + // + this.HWState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); + this.HWState.BorderSize = 0; + colorListItem1.BackColor1 = System.Drawing.Color.Gray; + colorListItem1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + colorListItem1.Remark = "타이틀바(상)"; + colorListItem2.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + colorListItem2.Remark = "상태표시(하)"; + colorListItem3.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem3.BackColor2 = System.Drawing.Color.Lime; + colorListItem3.Remark = "정상"; + colorListItem4.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem4.BackColor2 = System.Drawing.Color.Red; + colorListItem4.Remark = "오류"; + colorListItem5.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem5.BackColor2 = System.Drawing.Color.Yellow; + colorListItem5.Remark = "오류(깜박)"; + colorListItem6.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem6.BackColor2 = System.Drawing.Color.DarkViolet; + colorListItem6.Remark = "오류(유효)"; + this.HWState.ColorList = new arFrame.Control.ColorListItem[] { + colorListItem1, + colorListItem2, + colorListItem3, + colorListItem4, + colorListItem5, + colorListItem6}; + this.HWState.Dock = System.Windows.Forms.DockStyle.Fill; + this.HWState.Font = new System.Drawing.Font("Consolas", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.HWState.FontPin = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.HWState.ForeColor = System.Drawing.Color.Moccasin; + this.HWState.ForeColorPin = System.Drawing.Color.Moccasin; + this.HWState.Location = new System.Drawing.Point(0, 525); + this.HWState.Margin = new System.Windows.Forms.Padding(0); + this.HWState.MatrixSize = new System.Drawing.Point(4, 2); + this.HWState.MenuBorderSize = 1; + this.HWState.MenuGap = 5; + this.HWState.MinimumSize = new System.Drawing.Size(100, 0); + this.HWState.Name = "HWState"; + this.HWState.Names = new string[] { + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ""}; + this.HWState.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); + this.HWState.showDebugInfo = false; + this.HWState.ShowIndexString = false; + this.HWState.Size = new System.Drawing.Size(957, 58); + this.HWState.TabIndex = 9; + this.HWState.Tags = null; + this.HWState.Text = "gridView3"; + this.HWState.TextAttachToImage = true; + this.HWState.Titles = new string[] { + "AGV|XBE|PLC|BAT|", + "C00|C00|C00|C00|"}; + this.HWState.Values = new ushort[] { + ((ushort)(0)), + ((ushort)(0)), + ((ushort)(0)), + ((ushort)(0)), + ((ushort)(1)), + ((ushort)(1)), + ((ushort)(1)), + ((ushort)(1))}; + // + // tblMain + // + this.tblMain.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.tblMain.BorderSize = 1; + colorListItem7.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30))))); + colorListItem7.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + colorListItem7.Remark = ""; + colorListItem8.BackColor1 = System.Drawing.Color.Orange; + colorListItem8.BackColor2 = System.Drawing.Color.DarkOrange; + colorListItem8.Remark = ""; + this.tblMain.ColorList = new arFrame.Control.ColorListItem[] { + colorListItem7, + colorListItem8}; + this.tblMain.Cursor = System.Windows.Forms.Cursors.Arrow; + this.tblMain.Dock = System.Windows.Forms.DockStyle.Fill; + this.tblMain.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tblMain.FontPin = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold); + this.tblMain.ForeColor = System.Drawing.Color.White; + this.tblMain.ForeColorPin = System.Drawing.Color.WhiteSmoke; + this.tblMain.Location = new System.Drawing.Point(3, 23); + this.tblMain.MatrixSize = new System.Drawing.Point(8, 4); + this.tblMain.MenuBorderSize = 1; + this.tblMain.MenuGap = 5; + this.tblMain.MinimumSize = new System.Drawing.Size(100, 50); + this.tblMain.Name = "tblMain"; + this.tblMain.Names = null; + this.tblMain.ShadowColor = System.Drawing.Color.Black; + this.tblMain.showDebugInfo = false; + this.tblMain.ShowIndexString = true; + this.tblMain.Size = new System.Drawing.Size(951, 499); + this.tblMain.TabIndex = 4; + this.tblMain.Tags = null; + this.tblMain.Text = "gridView1"; + this.tblMain.TextAttachToImage = true; + this.tblMain.Titles = null; + this.tblMain.Values = null; + this.tblMain.ItemClick += new System.EventHandler(this.tblIn1_ItemClick); + // + // panel1 + // + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.label3); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(951, 14); + this.panel1.TabIndex = 6; + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.ForeColor = System.Drawing.Color.White; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(551, 14); + this.label1.TabIndex = 5; + this.label1.Text = "label1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label3 + // + this.label3.Dock = System.Windows.Forms.DockStyle.Right; + this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); + this.label3.Location = new System.Drawing.Point(551, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(400, 14); + this.label3.TabIndex = 6; + this.label3.Text = "label3"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // timer1 + // + this.timer1.Interval = 200; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); + this.panel2.Controls.Add(this.button2); + this.panel2.Controls.Add(this.button3); + this.panel2.Controls.Add(this.button1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Right; + this.panel2.Location = new System.Drawing.Point(957, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(99, 583); + this.panel2.TabIndex = 6; + // + // button2 + // + this.button2.Dock = System.Windows.Forms.DockStyle.Fill; + this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image"))); + this.button2.Location = new System.Drawing.Point(0, 100); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(99, 383); + this.button2.TabIndex = 1; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Dock = System.Windows.Forms.DockStyle.Bottom; + this.button3.Image = ((System.Drawing.Image)(resources.GetObject("button3.Image"))); + this.button3.Location = new System.Drawing.Point(0, 483); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(99, 100); + this.button3.TabIndex = 2; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click_1); + // + // button1 + // + this.button1.Dock = System.Windows.Forms.DockStyle.Top; + this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image"))); + this.button1.Location = new System.Drawing.Point(0, 0); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(99, 100); + this.button1.TabIndex = 0; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // fIO + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.ClientSize = new System.Drawing.Size(1056, 583); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.panel2); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "fIO"; + this.Text = "fIO"; + this.Load += new System.EventHandler(this.fIO_Load); + this.VisibleChanged += new System.EventHandler(this.fIO_VisibleChanged); + this.tableLayoutPanel1.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private arFrame.Control.GridView tblMain; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Panel panel1; + private arFrame.Control.GridView HWState; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button1; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fIO.cs b/Cs_HMI/Project/ViewForm/fIO.cs new file mode 100644 index 0000000..4163df5 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fIO.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.ViewForm +{ + public partial class fIO : Form + { + public fIO() + { + InitializeComponent(); + + tblMain.SuspendLayout(); + + //이름설정 INput #1 + List namearray = new List(32); + List tagarray = new List(32); + + namearray.Clear(); + tagarray.Clear(); + for (byte i = 0; i < 16; i++) + { + var flagName = ((arDev.FakePLC.DIName)i).ToString(); + var enumValue = Enum.Parse(typeof(arDev.FakePLC.DIPin), flagName); + if (flagName == i.ToString()) tagarray.Add(string.Empty); + else + { + //동일한 이름의 pin 번호르 찾아서 할당해준다. + var eV = (arDev.FakePLC.DIPin)enumValue; + tagarray.Add(((byte)eV).ToString()); + } + namearray.Add(flagName.Replace("_", "\n")); + } + for (byte i = 0; i < 8; i++) + { + var flagName = ((arDev.FakePLC.DOName)i).ToString(); + var enumValue = Enum.Parse(typeof(arDev.FakePLC.DOPin), flagName); + if (flagName == i.ToString()) tagarray.Add(string.Empty); + else + { + //동일한 이름의 pin 번호르 찾아서 할당해준다. + var eV = (arDev.FakePLC.DOPin)enumValue; + tagarray.Add(((byte)eV).ToString()); + } + namearray.Add(flagName); + } + this.tblMain.setTitle(namearray.ToArray()); + this.tblMain.setTag(tagarray.ToArray()); + this.tblMain.setItemTextAlign(ContentAlignment.BottomLeft); + + + //값설정 + List fgValueM = new List(); + List fgValueS = new List(); + + //mainplc + for (byte i = 0; i < 16; i++) + fgValueM.Add(PUB.PLC.GetValueI(i)); + for (byte i = 0; i < 16; i++) + fgValueM.Add(PUB.PLC.GetValueO(i)); + + + + tblMain.setValue(fgValueM.ToArray()); + tblMain.ResumeLayout(); + + this.FormClosed += FIO_FormClosed; + UpdateControl(); + } + void Update_HWStatus() + { + var rownum = 1; + var colIdx = 0; + + + if (PUB.AGV.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4); + else HWState.setValue(rownum, colIdx++, 2); // + + if (PUB.XBE.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4); + else HWState.setValue(rownum, colIdx++, 2); // + + if (PUB.PLC.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4); + else HWState.setValue(rownum, colIdx++, 2); // + + if (PUB.BMS.IsOpen == false) BlinkGridViewItem(HWState, rownum, colIdx++, 3, 4); + else HWState.setValue(rownum, colIdx++, 2); // + } + void BlinkGridViewItem(arFrame.Control.GridView ctl, int row, int col, int value1, int value2) + { + var curValue = ctl.getValue(row, col); + ctl.setValue(row, col, (byte)(curValue == value1 ? value2 : value1)); // + } + + void UpdateControl() + { + var rowNum = 1; + var colIdx = 0; + HWState.setTitle(0, colIdx++, "AGV"); + HWState.setTitle(0, colIdx++, "XBE"); + HWState.setTitle(0, colIdx++, "PLC"); + HWState.setTitle(0, colIdx++, "BAT"); + + colIdx = 0; + HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_AGV); + HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_XBE); + HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_PLC); + HWState.setTitle(rowNum, colIdx++, PUB.setting.Port_BAT); + + HWState.Invalidate(); + + } + private void fIO_Load(object sender, EventArgs e) + { + this.timer1.Start(); + } + private void FIO_FormClosed(object sender, FormClosedEventArgs e) + { + //Pub.plcM.ValueChanged -= Plc1_ValueChanged; + //Pub.plcS.ValueChanged -= Plc2_ValueChanged; + } + + + private void tblIn1_ItemClick(object sender, arFrame.Control.GridView.ItemClickEventArgs e) + { + var dataIndex = (byte)e.idx; + if (dataIndex >= 16) + { + var ctl = sender as arFrame.Control.GridView; + var pinNoStr = ctl.Tags[e.idx]; + if (pinNoStr.isEmpty() == true) + { + Util.MsgE("해당 포트는 핀번호가 설정되지 않았습니다", true); + } + else + { + var pinNo = byte.Parse(pinNoStr); + var curVal = PUB.PLC.GetValueO((byte)(dataIndex - 16)); + PUB.PLC.SetOutput(pinNo, !curVal);// .Sendcommand(Device.PLC1.eCommand.SET_DOUTPUT, pinNo, newval); + } + } + else Util.MsgE("해당 주소는 허용되지 않습니다.", true); + } + + + + bool tmrun = false; + private void timer1_Tick(object sender, EventArgs e) + { + if (this.Visible == false) return; + if (tmrun == true) return; + tmrun = true; + + label1.Text = string.Format("{0} / {1}", + PUB.PLC.ioBinStr, PUB.PLC.SetupStr); + label3.Text = PUB.PLC.LastMessage; + + Update_HWStatus(); + + List fgValueM = new List(); + List fgValueS = new List(); + + //mainplc + for (byte i = 0; i < 16; i++) + this.tblMain.setValue(i, PUB.PLC.GetValueI(i)); + + for (byte i = 0; i < 16; i++) + this.tblMain.setValue(i + 16, PUB.PLC.GetValueO(i)); + + + this.tblMain.Invalidate(); + + tmrun = false; + } + + private void fIO_VisibleChanged(object sender, EventArgs e) + { + this.timer1.Enabled = this.Visible; + if (timer1.Enabled) timer1.Start(); + else timer1.Stop(); + } + + private void button1_Click(object sender, EventArgs e) + { + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up); + } + + + private void button2_Click(object sender, EventArgs e) + { + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Stop); + } + + private void button3_Click_1(object sender, EventArgs e) + { + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down); + } + } +} diff --git a/Cs_HMI/Project/ViewForm/fIO.resx b/Cs_HMI/Project/ViewForm/fIO.resx new file mode 100644 index 0000000..f0d1f60 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fIO.resx @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAA/ZJREFUWEfd + WLtOG0EUtZR0ST4jDyVR8gE0GNtrGxKlwKYAFOAHMA9DxRsaCl6/kR5RpiH4AY0DOBgpiYkjmoCR2LUp + smhzzjLgRwZ7/QpWjnSk9e7M3OOZO3PvHdt/i4jd/jrsco1uezwbEY8nGVGUTMjp1Ek+4913fgu5XCNs + K7o1FpstLY8iLtd4xO1O7XR0qIcDAxfHwaCRnp01tMVFI7u0ZJLPfHc8NmYc9vdn2RZ9foSdzuDH1taH + Yrj6AYPeDytKEOLUeG9v5mRy0rhYWbHO5WWDfeI9PRpmXeXMc0wxfG3YUpRnUUU53O3qUs/m5+UCKiDH + 2PX51Kjbndi0258KM9UBS/IO4rSfw8OXMmO1MBUIXGJFtFBb21thrjJEHI4+/MtMemZGaqAePJ2eNqIe + TybidL4XZq3BnDmIO1tYkA5cT3LJKXLL4XgjzJeG8DmtkTNXzNOpKYPLjVV7ImTIwZ3FDdEInytH+KSO + VTsoubu5/T/7/eeyAf4FY36/hpkcEXIKIQ5ha0fJ6uoVZd9ktNj+bG7OQBQ6lx7mEDfOQ1jWsYAwpMfj + hr63Z1mkHosZeiJhXKytSb/nM97drTHiCFk5MHydwFllnW4oxF3DikiKu4YVkYw48MUjIesKDOaMlwxJ + sk75zDdIlBJZSdsbQsN2e7v2SVFeCnnmuRdk4Jd2kNCK4arECTLBgKYhIc9mY1rErETW+DaWElCLOJJa + oGldyDMFJpkeyRqXokxIreLINEIgNH0V8uCDiBzM4WSNy7FYUD6qEUeq0IL0ThXybDZmwVkLG+Q2ykRW + K47MIOmFD/4W8hokcH+/fgKbfombfpPgxwYLHFnj21hKSK0ij0dHDVSFuWOGWQwOx6Y5qBN9fVloCgh5 + EOhwvGqqUOf1alG7/YWQd4VttztZtpzE4Nyd17BiMF+kfnBQNln4NTHxd7JAMB6zbpV1KqAQWcmSUaQV + caSZbsHlhKwcmCTiw50mrGkkrDhezmOK8kDIKkTI4RhBUX03KT98L+bzaWG3O5fFFMMsmlDxs6iWDtJA + pgYHdYj78sHvvyfkyMHrCJaALKplAzWCzOQZzeBij4WM0uB1BA7KTD3uYsrRLJQ8nmzE6ewQ5q2B1xGs + +FlUywauBzlztIGZ6xVmKwOvI7jcqaGh+vokNgR9jsta8cwVg9cRrPhR0KtcDqnBCsijJNbZqXJDWPa5 + cuDuxj8dZlHNw9yMOJXkj2hrXmDyEMYYEBYou1urgXmYI+Kghj7a8XpVVl/mFTB2vHkFDCGkeQWMd8xK + GPhZRqJPEsJ4s1r/K2AZGMxZGiJVW4cLfKOv3lyi49l8h29sg2Tkuej2v8Fm+wNDbvcV8BObjwAAAABJ + RU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAABnlJREFUWEfd + WGlzU1UYzoz6xe1PqOMyjqP/wE/OIDa5SanIUqUgZWQtlBaS3CzUQhfQERBwKcii7KvNvTdpKNDUBSGd + oePYQlu2tIAUbQtZAGl7fJ/Tc5tSa7m3gRF5Zs7Myb3nPe+Tc971Wh5Z2JzqK1muwDyHr+aQwxdqlTzB + 6za3chsDczzDO6yxy4GXhdiDxVuLQ09JbrXA7gmen+CtScxcczJZtKWVeXd3sOWHOll5oIsPzH2729ni + zS3sw89OpLL9NQmHJ3jO6lIWZPmrnxTb3T/k5Ox+zObR5uNkpq36OSHvjLFKtYet1IyObibvvMggK8na + dUlW52FPsX1msC4NPm/3hJqmlEXiy/ZdGVRaFviTFW1tZbPXNbDpKyPsvZIaRor5mEhzPJu9LsqKaU05 + rdXl/PsusylldXG7V/uN1j4n1IwNNqf2Nv3jeMGm5l5dQcn+K+yjz6Ms2xtkhRt+Ygfqz7HTsW7Wk7jN + env7+cAcz/ZHzrLC9T+yCb4QyTRwWeyB0y+oau4lU4lnudRxQp052DzKZIc3mPSSLWHTCqWLzd1wiivb + qDZzEkaBtZCB7LwvGvle2NOzK8aIZFJyK5OEWmOwugLj7UROv1L889yyY6x0W5Rd67kp1JpHZ3eKlWyJ + srzKCHck7O3fe5lIhlKGT/IdufoFutaEfnK+PZfIpsJsR20r6+8XmjIA9thOe00uPczJDTnJOOxd0BgZ + 8Cy7N9S8aNNpbnM4OZCLNF4S298/1J26RCRrB0+S2yQ5zqjeLXnUgqnkYRCAnbxfXsdPzggoxt01jGB7 + +Az7gK4buuA45N0JhDNB527k+I8+Lbm1GyX7B44dDgGbM3qtIAU5DKMEsTdscv5Xv3I5XLkkB68jIQha + aVBMKsz75HgCC3G18DgzDjEWggAcZ+KymsGrRjC3ydpCQSsNsr3zMFYsQpxDWDCDsRIEqgLNbM76Bi6L + LEVp8YKgNQCrS3ttgj8chx0gQ+D0zMQ5IBOC3fFbXCfyODggz6MYEfTo9NzKollroilsjvSFDGEWmRAE + FlHGWbKtjcvnr46mJFlZIOhZLNnekFpMVQleIrcifZlFpgSRFueQbsgXbWlhDm9NQNCzWBxkfwjIeIkk + jzxqFpkSbLrQxWasqufyvj0djOrJs4Ie5V05mCj7/hp/CY8ya39ApgRhh9AN+RXExS4H44IeEXSpvZXq + QAK3yxq709snxIwjU4J/3emjdKdxeQRum1u9I+j9HwjKavKhuuLqYVdMXnzRv/chchLqcYjTOUGPvNgX + 1hD/8BJl+n8VZhDiIA8uDk9IEfToit3q4vy10Zt4iR4CZfpoOBxth41wIkPHUILDx47aFiE9MhauSwfq + matPpmyyks7Hkkt5XU91aHCMpLrQiRibQvXcxwd+HyQ2fCBcoBL/lsqq0dB14xbLGZrqfOH4eFfgVUFv + ABSs29PFQgOrUu5dLAR/ibHJy2tZ6YGrYyYHfB1oYrOpQIGcvKsdLUBM0EqDQs2SvE+PJ7FIL7dQCt0L + B384z6auOMJKRblkltzVrhTXVSJuAiWf5A4WC1ppjPOrz1IMjOut4dwNjbyYNFKwwqlAcvnBTlPksLd/ + 80k298tGrnMZ9czgYC0+9IygdTfAPLciwotWBMtpVI5vPzy6cevYdaSVSB6lNsEYOQDr8lbWc13QObU8 + kkDhLOj8E2/6jz5OvXBr4Tdn+iCAKncSdV91Bpum7+jPGCV3bFjTRI1aH3V2LeAg6IwMfImitjOJYAlB + 9AkgCeVG+5PRgD2wF5wLn0GgAx+aqBdJWGXtRUFjdBBJBxp33R7xL9FswyaNOM6/4SrJwuZwrfrJwe4o + giSz3IpNqDcGyanNoD5l8CRhJ+i+3qV8iR4CudMoEOeqlCburUM/feDkKGOkbE4lT6g1B5tbs+O6dZvU + TxMNDpShTEeKar7YxQmjCkJVgjly6766szxDYC3SmB5KMAo3nu7DtZo+ueGATVIZ1JZbUZ/QrxwDUR+p + iX9+oySPSgSlGgbmeIYSvnhrG1+ry+FK4a1wxixn9UtCTWbIz48+gUBOjX1iOgVzj/huY2YgSyERoIyi + P1F0T28dCxDMqUhwkd10IHfPWtNwCycETy+r/mOQDObocXDC+WsbbmKtw6N1SC7NiT3Edg8W1qXqG1an + WpztC4Wp0Y7BVvXKBXM8o8YnTL+LUIwIsUcNFsvfgCyVUQFWoEAAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAABrZJREFUWEfd + WGlPVFcYnqTtl25/om3amqZp/0E/NbGW2YAqLlXaCta44AI4M3cWKQhI2xjUVhPrgl0UxQaZuXcWEQW3 + CJjaloIDQgWqVmVzZkBkZk7f5865MlSK9zKaJj7JSc5w7znn4T3v9lzdUwuDRZyTZnWvNjv9tWanr9No + 944YbJ5xDMzxNzzDOybB/SZf9mTx/kbfC0abmGeye3syHP7w8srmSP6BTuao7mcltbdYmXtQHpg7q/vY + xv1B9tm2i6PpLn/YbPd2662etWmuuuf5do8PmZnVzxjs0hpYZtmX58PCoV62VRxmFZLaMcSEQ9cY1hoF + acQoiKuxJ98+Neg3eV812X1/LCptDG2uufHg0HLPICs8eJV9vrM1ml3RNDG/KBBPd0gMA/NlFY3RlTta + JwoPdslWVda5aq6zRaWnQyaH1EZEX+HHzA4Gi/QB/cehvL3tUeWALXW32cqdl6IZTi9bu+MMO9LQxX7r + HmCDd++xsfGoPDBv6xlgNaevsnU7zzK8u2JHS7To55vyHrB+3p72KLlKKM0qzuXHaYPB7llodngjDvIl + eVPPEFuz+/fYgiI/23W8jQ2MjDG1AOE97naWSURXfXs5ButjT/vhXkYkI0abJ4sfqw56q3seyClXCqtl + V5yNOfc3s78HR/mx2nFraJQVVbWwpVuboggk7O06el0mqdqSHwp1r9G1hhXLFR27wRaWnIxX+YMsHucn + pQDs8VN9kGWV1MdBLsmSIfg7pzE9EFkmh699/d4O2edgOZCrb+3n28+M7wNX2D6pg/+aGU2/XpdJKpaU + fZICZ8boNtrFvMUUYVgAn8O1wnJqAHIfl52SB+ZqcPhkJ1tW0RSFTyJwKLrDSGeczlRkuhpeNNqku0XH + EmZHQMDn1FwrCC0pbZAT9Jbjt2l+SpUlsXfxwVa26pvLMZyJKzcK3hEUBE5rEpSTNmR/dSGsXC2iVU1A + JJPDWnm9BpJ3hsdYhstLvp5IQUjmBkFax2lNgkrRNeFwIjCQ55BKHoXpyClDC8l93g6Wu71Z9nshETA9 + nFYCeqv0doYrEIIfwB+QWB+V52Yipwy1JIfD4/KZpe4B2RdR59GMcHo6ncnmWZ9T2TKKTVG+UCFmwo8n + gowK/0NDITbdswNkpZmQv+scK6DGA+uXb2seNQqetZyeTpfu8InKQ9TWaipfWgESyQS1ovZMN1uxvWUC + 6/MPBJnZ4XdzeuR/Dl+P88hf8ubZVORRR7UiVYLBviGqMKdlP3Qe6WfUT17l9KjuCt5wKfkLHs7/IhC/ + o6HOKkiV4N3IOMt0+eT18F2T4A1xekTQKka3iokCjnYJHYlWpEowFoszgyDKQYJANdjECU5vKkGzXWL3 + 7v8/BKlb/w+CghhJvmItrZSCVAmGRu9TquFXTIViyhVTFF9zHU0Kkj8H+TL1SJVgsG+YLS3nQUIahzh1 + c3oUxc6AlF+lpJmWKDphrUiVYN25HkozzYk0Q1zMdp+H06MrtokbcytbxvAQiRptulakSrBw93k5/2E9 + qcUxg+CZrMdGq+cdpdRB4KDsoE3XglQIJvzPy8rqeKlzBkLzrO63OL0EKFn3obPFARA40BBakArBKv8V + llt5kTcLfWgWejmtSVCqKcz++kIEL0F9QeBAQ6jFbAkiYyTarYT+QctntHkLOK1JzHWJL5tIYiovQn1B + 4KjVIbMlWPbDJWrvfpEb1s2kmcFBX1D7Eqc1FWC+pLxRblqRLKG+IHDUAKSShxrUNHYjtTyQoYvLGsNo + nDmdh/Geq+FZkpudG/Zdkf8j9HpZJSfiEDiPG+fbbrIFxSfixbyfJKEWI98LggOnMz3wJYpkZwTJEguh + ExYW18cPkcB5HLITgOWyiJzSQeFDE2mRsF6QXuc0ZgaRNJP8jCj+CEviuiFwoCFmCwQEfA7XqlgOfkcZ + JJJm8xj48epgtEifgqRiSfgJ1Bcibi+18CPUHqkF8hxSCdYiIBSfg+WoYowaLJ5sfqw2GGySCdet+CQG + 1BeVJPnjEdp0dMJoNqErFIA8aivKFyoEWjjkOeVGMDZ81xHDtWq23L8BnzTZpa4l5U3h5AMgcCAT0Kaj + E/5ocyCuRDDmKPwrKpsnUFdRIZR1uFJEK4IxzVL3Bj8mNeTktDyHRE7CPvwJJXM7/26jZaBKoRCgjaJc + l//IaJ0NkMypsbCS3/SjdudWtt4rqOqSI7207s4DMpgjQvHxMmd76xjepUa432iVLNiDb/dkod8kvqu3 + iAXpTl+ARH8vfFW5YszxNxI+Afqdj2aEL3vaoNP9AxkclDhe7/QIAAAAAElFTkSuQmCC + + + \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fManual.Designer.cs b/Cs_HMI/Project/ViewForm/fManual.Designer.cs new file mode 100644 index 0000000..1187632 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fManual.Designer.cs @@ -0,0 +1,900 @@ +namespace Project.ViewForm +{ + partial class fManual + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.btStart = new arCtl.arLabel(); + this.btRight = new arCtl.arLabel(); + this.btBack = new arCtl.arLabel(); + this.btForward = new arCtl.arLabel(); + this.btLeft = new arCtl.arLabel(); + this.btMarkStop = new System.Windows.Forms.Button(); + this.btchargeOff = new System.Windows.Forms.Button(); + this.btChargeOn = new System.Windows.Forms.Button(); + this.btErrReset = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.panel2 = new System.Windows.Forms.Panel(); + this.button1 = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.radpbs2 = new AGVControl.MyRadioButton(); + this.panel9 = new System.Windows.Forms.Panel(); + this.radpbs1 = new AGVControl.MyRadioButton(); + this.panel3 = new System.Windows.Forms.Panel(); + this.radpbs0 = new AGVControl.MyRadioButton(); + this.grpSpeed = new System.Windows.Forms.GroupBox(); + this.radspdh = new AGVControl.MyRadioButton(); + this.panel8 = new System.Windows.Forms.Panel(); + this.radspdm = new AGVControl.MyRadioButton(); + this.panel4 = new System.Windows.Forms.Panel(); + this.radspdl = new AGVControl.MyRadioButton(); + this.grpBunki = new System.Windows.Forms.GroupBox(); + this.radright = new AGVControl.MyRadioButton(); + this.panel7 = new System.Windows.Forms.Panel(); + this.radstrai = new AGVControl.MyRadioButton(); + this.panel5 = new System.Windows.Forms.Panel(); + this.radleft = new AGVControl.MyRadioButton(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.arLabel1 = new arCtl.arLabel(); + this.panel12 = new System.Windows.Forms.Panel(); + this.radbackward = new AGVControl.MyRadioButton(); + this.panel6 = new System.Windows.Forms.Panel(); + this.radforward = new AGVControl.MyRadioButton(); + this.label1 = new System.Windows.Forms.Label(); + this.guideSensor1 = new Narumi.UC.GuideSensor(); + this.tableLayoutPanel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.grpSpeed.SuspendLayout(); + this.grpBunki.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 3; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.Controls.Add(this.btStart, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.btRight, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.btBack, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.btForward, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.btLeft, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.btMarkStop, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.btchargeOff, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.btChargeOn, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.btErrReset, 2, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Left; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 21); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(604, 555); + this.tableLayoutPanel1.TabIndex = 7; + // + // btStart + // + this.btStart.BackColor = System.Drawing.Color.Gray; + this.btStart.BackColor2 = System.Drawing.Color.Black; + this.btStart.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btStart.BorderColor = System.Drawing.Color.Black; + this.btStart.BorderColorOver = System.Drawing.Color.DarkBlue; + this.btStart.BorderSize = new System.Windows.Forms.Padding(1); + this.btStart.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btStart.Cursor = System.Windows.Forms.Cursors.Hand; + this.btStart.Dock = System.Windows.Forms.DockStyle.Fill; + this.btStart.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btStart.ForeColor = System.Drawing.Color.White; + this.btStart.GradientEnable = true; + this.btStart.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btStart.GradientRepeatBG = false; + this.btStart.isButton = true; + this.btStart.Location = new System.Drawing.Point(204, 188); + this.btStart.MouseDownColor = System.Drawing.Color.Yellow; + this.btStart.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btStart.msg = new string[] { + "커버", + "UP"}; + this.btStart.Name = "btStart"; + this.btStart.ProgressBorderColor = System.Drawing.Color.Black; + this.btStart.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btStart.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btStart.ProgressEnable = false; + this.btStart.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btStart.ProgressForeColor = System.Drawing.Color.Black; + this.btStart.ProgressMax = 100F; + this.btStart.ProgressMin = 0F; + this.btStart.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btStart.ProgressValue = 0F; + this.btStart.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btStart.Sign = ""; + this.btStart.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btStart.SignColor = System.Drawing.Color.Yellow; + this.btStart.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btStart.Size = new System.Drawing.Size(195, 179); + this.btStart.TabIndex = 6; + this.btStart.Text = "RUN"; + this.btStart.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btStart.TextShadow = true; + this.btStart.TextVisible = true; + this.btStart.Click += new System.EventHandler(this.arLabel11_Click); + // + // btRight + // + this.btRight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(55)))), ((int)(((byte)(93))))); + this.btRight.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(36)))), ((int)(((byte)(64))))); + this.btRight.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btRight.BorderColor = System.Drawing.Color.Black; + this.btRight.BorderColorOver = System.Drawing.Color.DarkBlue; + this.btRight.BorderSize = new System.Windows.Forms.Padding(1); + this.btRight.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btRight.Cursor = System.Windows.Forms.Cursors.Hand; + this.btRight.Dock = System.Windows.Forms.DockStyle.Fill; + this.btRight.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btRight.ForeColor = System.Drawing.Color.White; + this.btRight.GradientEnable = true; + this.btRight.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btRight.GradientRepeatBG = false; + this.btRight.isButton = true; + this.btRight.Location = new System.Drawing.Point(405, 188); + this.btRight.MouseDownColor = System.Drawing.Color.Yellow; + this.btRight.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btRight.msg = null; + this.btRight.Name = "btRight"; + this.btRight.ProgressBorderColor = System.Drawing.Color.Black; + this.btRight.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btRight.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btRight.ProgressEnable = false; + this.btRight.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btRight.ProgressForeColor = System.Drawing.Color.Black; + this.btRight.ProgressMax = 100F; + this.btRight.ProgressMin = 0F; + this.btRight.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btRight.ProgressValue = 0F; + this.btRight.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btRight.Sign = ""; + this.btRight.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btRight.SignColor = System.Drawing.Color.Yellow; + this.btRight.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btRight.Size = new System.Drawing.Size(196, 179); + this.btRight.TabIndex = 0; + this.btRight.Text = "좌회전"; + this.btRight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btRight.TextShadow = true; + this.btRight.TextVisible = true; + this.btRight.Click += new System.EventHandler(this.arLabel4_Click); + // + // btBack + // + this.btBack.AccessibleDescription = ""; + this.btBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(55)))), ((int)(((byte)(93))))); + this.btBack.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(36)))), ((int)(((byte)(64))))); + this.btBack.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btBack.BorderColor = System.Drawing.Color.Black; + this.btBack.BorderColorOver = System.Drawing.Color.DarkBlue; + this.btBack.BorderSize = new System.Windows.Forms.Padding(1); + this.btBack.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btBack.Cursor = System.Windows.Forms.Cursors.Hand; + this.btBack.Dock = System.Windows.Forms.DockStyle.Fill; + this.btBack.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btBack.ForeColor = System.Drawing.Color.White; + this.btBack.GradientEnable = true; + this.btBack.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btBack.GradientRepeatBG = false; + this.btBack.isButton = true; + this.btBack.Location = new System.Drawing.Point(204, 3); + this.btBack.MouseDownColor = System.Drawing.Color.Yellow; + this.btBack.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btBack.msg = null; + this.btBack.Name = "btBack"; + this.btBack.ProgressBorderColor = System.Drawing.Color.Black; + this.btBack.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btBack.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btBack.ProgressEnable = false; + this.btBack.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btBack.ProgressForeColor = System.Drawing.Color.Black; + this.btBack.ProgressMax = 100F; + this.btBack.ProgressMin = 0F; + this.btBack.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btBack.ProgressValue = 0F; + this.btBack.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btBack.Sign = ""; + this.btBack.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btBack.SignColor = System.Drawing.Color.Yellow; + this.btBack.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btBack.Size = new System.Drawing.Size(195, 179); + this.btBack.TabIndex = 0; + this.btBack.Text = "후진"; + this.btBack.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btBack.TextShadow = true; + this.btBack.TextVisible = true; + this.btBack.Click += new System.EventHandler(this.arLabel1_Click); + // + // btForward + // + this.btForward.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(55)))), ((int)(((byte)(93))))); + this.btForward.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(36)))), ((int)(((byte)(64))))); + this.btForward.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btForward.BorderColor = System.Drawing.Color.Black; + this.btForward.BorderColorOver = System.Drawing.Color.DarkBlue; + this.btForward.BorderSize = new System.Windows.Forms.Padding(1); + this.btForward.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btForward.Cursor = System.Windows.Forms.Cursors.Hand; + this.btForward.Dock = System.Windows.Forms.DockStyle.Fill; + this.btForward.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btForward.ForeColor = System.Drawing.Color.White; + this.btForward.GradientEnable = true; + this.btForward.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btForward.GradientRepeatBG = false; + this.btForward.isButton = true; + this.btForward.Location = new System.Drawing.Point(204, 373); + this.btForward.MouseDownColor = System.Drawing.Color.Yellow; + this.btForward.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btForward.msg = null; + this.btForward.Name = "btForward"; + this.btForward.ProgressBorderColor = System.Drawing.Color.Black; + this.btForward.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btForward.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btForward.ProgressEnable = false; + this.btForward.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btForward.ProgressForeColor = System.Drawing.Color.Black; + this.btForward.ProgressMax = 100F; + this.btForward.ProgressMin = 0F; + this.btForward.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btForward.ProgressValue = 0F; + this.btForward.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btForward.Sign = ""; + this.btForward.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btForward.SignColor = System.Drawing.Color.Yellow; + this.btForward.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btForward.Size = new System.Drawing.Size(195, 179); + this.btForward.TabIndex = 0; + this.btForward.Text = "전진"; + this.btForward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btForward.TextShadow = true; + this.btForward.TextVisible = true; + this.btForward.Click += new System.EventHandler(this.arLabel2_Click); + // + // btLeft + // + this.btLeft.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(55)))), ((int)(((byte)(93))))); + this.btLeft.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(36)))), ((int)(((byte)(64))))); + this.btLeft.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btLeft.BorderColor = System.Drawing.Color.Black; + this.btLeft.BorderColorOver = System.Drawing.Color.DarkBlue; + this.btLeft.BorderSize = new System.Windows.Forms.Padding(1); + this.btLeft.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btLeft.Cursor = System.Windows.Forms.Cursors.Hand; + this.btLeft.Dock = System.Windows.Forms.DockStyle.Fill; + this.btLeft.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btLeft.ForeColor = System.Drawing.Color.White; + this.btLeft.GradientEnable = true; + this.btLeft.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btLeft.GradientRepeatBG = false; + this.btLeft.isButton = true; + this.btLeft.Location = new System.Drawing.Point(3, 188); + this.btLeft.MouseDownColor = System.Drawing.Color.Yellow; + this.btLeft.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btLeft.msg = null; + this.btLeft.Name = "btLeft"; + this.btLeft.ProgressBorderColor = System.Drawing.Color.Black; + this.btLeft.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btLeft.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btLeft.ProgressEnable = false; + this.btLeft.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btLeft.ProgressForeColor = System.Drawing.Color.Black; + this.btLeft.ProgressMax = 100F; + this.btLeft.ProgressMin = 0F; + this.btLeft.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btLeft.ProgressValue = 0F; + this.btLeft.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btLeft.Sign = ""; + this.btLeft.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btLeft.SignColor = System.Drawing.Color.Yellow; + this.btLeft.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btLeft.Size = new System.Drawing.Size(195, 179); + this.btLeft.TabIndex = 0; + this.btLeft.Text = "우회전"; + this.btLeft.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btLeft.TextShadow = true; + this.btLeft.TextVisible = true; + this.btLeft.Click += new System.EventHandler(this.arLabel3_Click); + // + // btMarkStop + // + this.btMarkStop.Dock = System.Windows.Forms.DockStyle.Fill; + this.btMarkStop.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btMarkStop.Location = new System.Drawing.Point(3, 3); + this.btMarkStop.Name = "btMarkStop"; + this.btMarkStop.Size = new System.Drawing.Size(195, 179); + this.btMarkStop.TabIndex = 7; + this.btMarkStop.Text = "마크정지"; + this.btMarkStop.UseVisualStyleBackColor = true; + this.btMarkStop.Click += new System.EventHandler(this.button1_Click); + // + // btchargeOff + // + this.btchargeOff.Dock = System.Windows.Forms.DockStyle.Fill; + this.btchargeOff.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btchargeOff.Location = new System.Drawing.Point(405, 373); + this.btchargeOff.Name = "btchargeOff"; + this.btchargeOff.Size = new System.Drawing.Size(196, 179); + this.btchargeOff.TabIndex = 8; + this.btchargeOff.Text = "충전해제"; + this.btchargeOff.UseVisualStyleBackColor = true; + this.btchargeOff.Click += new System.EventHandler(this.btchargeOff_Click); + // + // btChargeOn + // + this.btChargeOn.Dock = System.Windows.Forms.DockStyle.Fill; + this.btChargeOn.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btChargeOn.Location = new System.Drawing.Point(3, 373); + this.btChargeOn.Name = "btChargeOn"; + this.btChargeOn.Size = new System.Drawing.Size(195, 179); + this.btChargeOn.TabIndex = 9; + this.btChargeOn.Text = "충전"; + this.btChargeOn.UseVisualStyleBackColor = true; + this.btChargeOn.Click += new System.EventHandler(this.btChargeOn_Click); + // + // btErrReset + // + this.btErrReset.Dock = System.Windows.Forms.DockStyle.Fill; + this.btErrReset.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btErrReset.Location = new System.Drawing.Point(405, 3); + this.btErrReset.Name = "btErrReset"; + this.btErrReset.Size = new System.Drawing.Size(196, 179); + this.btErrReset.TabIndex = 10; + this.btErrReset.Text = "오류소거"; + this.btErrReset.UseVisualStyleBackColor = true; + this.btErrReset.Click += new System.EventHandler(this.button3_Click); + // + // timer1 + // + this.timer1.Interval = 250; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // panel2 + // + this.panel2.Controls.Add(this.button1); + this.panel2.Controls.Add(this.groupBox1); + this.panel2.Controls.Add(this.grpSpeed); + this.panel2.Controls.Add(this.grpBunki); + this.panel2.Controls.Add(this.groupBox2); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(607, 21); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(404, 517); + this.panel2.TabIndex = 9; + this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint); + // + // button1 + // + this.button1.Dock = System.Windows.Forms.DockStyle.Fill; + this.button1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.button1.Location = new System.Drawing.Point(0, 380); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(404, 137); + this.button1.TabIndex = 10; + this.button1.Text = "설정 적용"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click_2); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.radpbs2); + this.groupBox1.Controls.Add(this.panel9); + this.groupBox1.Controls.Add(this.radpbs1); + this.groupBox1.Controls.Add(this.panel3); + this.groupBox1.Controls.Add(this.radpbs0); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox1.Location = new System.Drawing.Point(0, 285); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Padding = new System.Windows.Forms.Padding(10, 5, 5, 10); + this.groupBox1.Size = new System.Drawing.Size(404, 95); + this.groupBox1.TabIndex = 9; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "근접센서(PBS)"; + // + // radpbs2 + // + this.radpbs2.BackColor = System.Drawing.Color.WhiteSmoke; + this.radpbs2.Bordercolor = System.Drawing.Color.DimGray; + this.radpbs2.BorderRadius = 7; + this.radpbs2.BorderSize = 2; + this.radpbs2.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radpbs2.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radpbs2.CheckWidth = 30; + this.radpbs2.Dock = System.Windows.Forms.DockStyle.Left; + this.radpbs2.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radpbs2.Location = new System.Drawing.Point(278, 19); + this.radpbs2.Name = "radpbs2"; + this.radpbs2.Size = new System.Drawing.Size(119, 66); + this.radpbs2.TabIndex = 10; + this.radpbs2.Text = "On(2)"; + this.radpbs2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radpbs2.UseVisualStyleBackColor = false; + // + // panel9 + // + this.panel9.Dock = System.Windows.Forms.DockStyle.Left; + this.panel9.Location = new System.Drawing.Point(263, 19); + this.panel9.Name = "panel9"; + this.panel9.Size = new System.Drawing.Size(15, 66); + this.panel9.TabIndex = 12; + // + // radpbs1 + // + this.radpbs1.BackColor = System.Drawing.Color.WhiteSmoke; + this.radpbs1.Bordercolor = System.Drawing.Color.DimGray; + this.radpbs1.BorderRadius = 7; + this.radpbs1.BorderSize = 2; + this.radpbs1.Checked = true; + this.radpbs1.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radpbs1.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radpbs1.CheckWidth = 30; + this.radpbs1.Dock = System.Windows.Forms.DockStyle.Left; + this.radpbs1.Font = new System.Drawing.Font("맑은 고딕", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radpbs1.ForeColor = System.Drawing.Color.Blue; + this.radpbs1.Location = new System.Drawing.Point(144, 19); + this.radpbs1.Name = "radpbs1"; + this.radpbs1.Size = new System.Drawing.Size(119, 66); + this.radpbs1.TabIndex = 9; + this.radpbs1.TabStop = true; + this.radpbs1.Text = "On(1)"; + this.radpbs1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radpbs1.UseVisualStyleBackColor = false; + // + // panel3 + // + this.panel3.Dock = System.Windows.Forms.DockStyle.Left; + this.panel3.Location = new System.Drawing.Point(129, 19); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(15, 66); + this.panel3.TabIndex = 11; + // + // radpbs0 + // + this.radpbs0.BackColor = System.Drawing.Color.WhiteSmoke; + this.radpbs0.Bordercolor = System.Drawing.Color.DimGray; + this.radpbs0.BorderRadius = 7; + this.radpbs0.BorderSize = 2; + this.radpbs0.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radpbs0.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radpbs0.CheckWidth = 30; + this.radpbs0.Dock = System.Windows.Forms.DockStyle.Left; + this.radpbs0.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radpbs0.Location = new System.Drawing.Point(10, 19); + this.radpbs0.Name = "radpbs0"; + this.radpbs0.Size = new System.Drawing.Size(119, 66); + this.radpbs0.TabIndex = 8; + this.radpbs0.Text = "Off(0)"; + this.radpbs0.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radpbs0.UseVisualStyleBackColor = false; + // + // grpSpeed + // + this.grpSpeed.Controls.Add(this.radspdh); + this.grpSpeed.Controls.Add(this.panel8); + this.grpSpeed.Controls.Add(this.radspdm); + this.grpSpeed.Controls.Add(this.panel4); + this.grpSpeed.Controls.Add(this.radspdl); + this.grpSpeed.Dock = System.Windows.Forms.DockStyle.Top; + this.grpSpeed.Location = new System.Drawing.Point(0, 190); + this.grpSpeed.Name = "grpSpeed"; + this.grpSpeed.Padding = new System.Windows.Forms.Padding(10, 5, 5, 10); + this.grpSpeed.Size = new System.Drawing.Size(404, 95); + this.grpSpeed.TabIndex = 0; + this.grpSpeed.TabStop = false; + this.grpSpeed.Text = "속도"; + // + // radspdh + // + this.radspdh.BackColor = System.Drawing.Color.WhiteSmoke; + this.radspdh.Bordercolor = System.Drawing.Color.DimGray; + this.radspdh.BorderRadius = 7; + this.radspdh.BorderSize = 2; + this.radspdh.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radspdh.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radspdh.CheckWidth = 30; + this.radspdh.Dock = System.Windows.Forms.DockStyle.Left; + this.radspdh.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radspdh.Location = new System.Drawing.Point(278, 19); + this.radspdh.Name = "radspdh"; + this.radspdh.Size = new System.Drawing.Size(119, 66); + this.radspdh.TabIndex = 2; + this.radspdh.Text = "고속"; + this.radspdh.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radspdh.UseVisualStyleBackColor = false; + // + // panel8 + // + this.panel8.Dock = System.Windows.Forms.DockStyle.Left; + this.panel8.Location = new System.Drawing.Point(263, 19); + this.panel8.Name = "panel8"; + this.panel8.Size = new System.Drawing.Size(15, 66); + this.panel8.TabIndex = 13; + // + // radspdm + // + this.radspdm.BackColor = System.Drawing.Color.WhiteSmoke; + this.radspdm.Bordercolor = System.Drawing.Color.DimGray; + this.radspdm.BorderRadius = 7; + this.radspdm.BorderSize = 2; + this.radspdm.Checked = true; + this.radspdm.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radspdm.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radspdm.CheckWidth = 30; + this.radspdm.Dock = System.Windows.Forms.DockStyle.Left; + this.radspdm.Font = new System.Drawing.Font("맑은 고딕", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radspdm.ForeColor = System.Drawing.Color.Blue; + this.radspdm.Location = new System.Drawing.Point(144, 19); + this.radspdm.Name = "radspdm"; + this.radspdm.Size = new System.Drawing.Size(119, 66); + this.radspdm.TabIndex = 1; + this.radspdm.TabStop = true; + this.radspdm.Text = "중속"; + this.radspdm.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radspdm.UseVisualStyleBackColor = false; + // + // panel4 + // + this.panel4.Dock = System.Windows.Forms.DockStyle.Left; + this.panel4.Location = new System.Drawing.Point(129, 19); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(15, 66); + this.panel4.TabIndex = 12; + // + // radspdl + // + this.radspdl.BackColor = System.Drawing.Color.WhiteSmoke; + this.radspdl.Bordercolor = System.Drawing.Color.DimGray; + this.radspdl.BorderRadius = 7; + this.radspdl.BorderSize = 2; + this.radspdl.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radspdl.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radspdl.CheckWidth = 30; + this.radspdl.Dock = System.Windows.Forms.DockStyle.Left; + this.radspdl.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radspdl.Location = new System.Drawing.Point(10, 19); + this.radspdl.Name = "radspdl"; + this.radspdl.Size = new System.Drawing.Size(119, 66); + this.radspdl.TabIndex = 0; + this.radspdl.Text = "저속"; + this.radspdl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radspdl.UseVisualStyleBackColor = false; + // + // grpBunki + // + this.grpBunki.Controls.Add(this.radright); + this.grpBunki.Controls.Add(this.panel7); + this.grpBunki.Controls.Add(this.radstrai); + this.grpBunki.Controls.Add(this.panel5); + this.grpBunki.Controls.Add(this.radleft); + this.grpBunki.Dock = System.Windows.Forms.DockStyle.Top; + this.grpBunki.Location = new System.Drawing.Point(0, 95); + this.grpBunki.Name = "grpBunki"; + this.grpBunki.Padding = new System.Windows.Forms.Padding(10, 5, 5, 10); + this.grpBunki.Size = new System.Drawing.Size(404, 95); + this.grpBunki.TabIndex = 1; + this.grpBunki.TabStop = false; + this.grpBunki.Text = "분기"; + // + // radright + // + this.radright.BackColor = System.Drawing.Color.WhiteSmoke; + this.radright.Bordercolor = System.Drawing.Color.DimGray; + this.radright.BorderRadius = 7; + this.radright.BorderSize = 2; + this.radright.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radright.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radright.CheckWidth = 30; + this.radright.Dock = System.Windows.Forms.DockStyle.Left; + this.radright.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radright.Location = new System.Drawing.Point(278, 19); + this.radright.Name = "radright"; + this.radright.Size = new System.Drawing.Size(119, 66); + this.radright.TabIndex = 4; + this.radright.Text = "우측"; + this.radright.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radright.UseVisualStyleBackColor = false; + // + // panel7 + // + this.panel7.Dock = System.Windows.Forms.DockStyle.Left; + this.panel7.Location = new System.Drawing.Point(263, 19); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(15, 66); + this.panel7.TabIndex = 13; + // + // radstrai + // + this.radstrai.BackColor = System.Drawing.Color.WhiteSmoke; + this.radstrai.Bordercolor = System.Drawing.Color.DimGray; + this.radstrai.BorderRadius = 7; + this.radstrai.BorderSize = 2; + this.radstrai.Checked = true; + this.radstrai.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radstrai.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radstrai.CheckWidth = 30; + this.radstrai.Dock = System.Windows.Forms.DockStyle.Left; + this.radstrai.Font = new System.Drawing.Font("맑은 고딕", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radstrai.ForeColor = System.Drawing.Color.Blue; + this.radstrai.Location = new System.Drawing.Point(144, 19); + this.radstrai.Name = "radstrai"; + this.radstrai.Size = new System.Drawing.Size(119, 66); + this.radstrai.TabIndex = 3; + this.radstrai.TabStop = true; + this.radstrai.Text = "직진"; + this.radstrai.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radstrai.UseVisualStyleBackColor = false; + // + // panel5 + // + this.panel5.Dock = System.Windows.Forms.DockStyle.Left; + this.panel5.Location = new System.Drawing.Point(129, 19); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(15, 66); + this.panel5.TabIndex = 12; + // + // radleft + // + this.radleft.BackColor = System.Drawing.Color.WhiteSmoke; + this.radleft.Bordercolor = System.Drawing.Color.DimGray; + this.radleft.BorderRadius = 7; + this.radleft.BorderSize = 2; + this.radleft.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radleft.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radleft.CheckWidth = 30; + this.radleft.Dock = System.Windows.Forms.DockStyle.Left; + this.radleft.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radleft.Location = new System.Drawing.Point(10, 19); + this.radleft.Name = "radleft"; + this.radleft.Size = new System.Drawing.Size(119, 66); + this.radleft.TabIndex = 5; + this.radleft.Text = "좌측"; + this.radleft.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radleft.UseVisualStyleBackColor = false; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.arLabel1); + this.groupBox2.Controls.Add(this.panel12); + this.groupBox2.Controls.Add(this.radbackward); + this.groupBox2.Controls.Add(this.panel6); + this.groupBox2.Controls.Add(this.radforward); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox2.Location = new System.Drawing.Point(0, 0); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(10, 5, 5, 10); + this.groupBox2.Size = new System.Drawing.Size(404, 95); + this.groupBox2.TabIndex = 3; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "방향"; + // + // arLabel1 + // + this.arLabel1.BackColor = System.Drawing.Color.Pink; + this.arLabel1.BackColor2 = System.Drawing.Color.Tomato; + this.arLabel1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel1.BorderColor = System.Drawing.Color.Black; + this.arLabel1.BorderColorOver = System.Drawing.Color.DarkBlue; + this.arLabel1.BorderSize = new System.Windows.Forms.Padding(1); + this.arLabel1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel1.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.arLabel1.Font = new System.Drawing.Font("맑은 고딕", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.arLabel1.ForeColor = System.Drawing.Color.White; + this.arLabel1.GradientEnable = true; + this.arLabel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel1.GradientRepeatBG = false; + this.arLabel1.isButton = true; + this.arLabel1.Location = new System.Drawing.Point(278, 19); + this.arLabel1.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel1.msg = new string[] { + "커버", + "UP"}; + this.arLabel1.Name = "arLabel1"; + this.arLabel1.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel1.ProgressEnable = false; + this.arLabel1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel1.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel1.ProgressMax = 100F; + this.arLabel1.ProgressMin = 0F; + this.arLabel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel1.ProgressValue = 0F; + this.arLabel1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel1.Sign = ""; + this.arLabel1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel1.SignColor = System.Drawing.Color.Yellow; + this.arLabel1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel1.Size = new System.Drawing.Size(121, 66); + this.arLabel1.TabIndex = 15; + this.arLabel1.Text = "주행속도"; + this.arLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel1.TextShadow = true; + this.arLabel1.TextVisible = true; + this.arLabel1.Click += new System.EventHandler(this.arLabel1_Click_1); + // + // panel12 + // + this.panel12.Dock = System.Windows.Forms.DockStyle.Left; + this.panel12.Location = new System.Drawing.Point(263, 19); + this.panel12.Name = "panel12"; + this.panel12.Size = new System.Drawing.Size(15, 66); + this.panel12.TabIndex = 14; + // + // radbackward + // + this.radbackward.BackColor = System.Drawing.Color.WhiteSmoke; + this.radbackward.Bordercolor = System.Drawing.Color.DimGray; + this.radbackward.BorderRadius = 7; + this.radbackward.BorderSize = 2; + this.radbackward.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radbackward.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radbackward.CheckWidth = 30; + this.radbackward.Dock = System.Windows.Forms.DockStyle.Left; + this.radbackward.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radbackward.Location = new System.Drawing.Point(144, 19); + this.radbackward.Name = "radbackward"; + this.radbackward.Size = new System.Drawing.Size(119, 66); + this.radbackward.TabIndex = 6; + this.radbackward.Text = "후진"; + this.radbackward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radbackward.UseVisualStyleBackColor = false; + // + // panel6 + // + this.panel6.Dock = System.Windows.Forms.DockStyle.Left; + this.panel6.Location = new System.Drawing.Point(129, 19); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(15, 66); + this.panel6.TabIndex = 12; + // + // radforward + // + this.radforward.BackColor = System.Drawing.Color.WhiteSmoke; + this.radforward.Bordercolor = System.Drawing.Color.DimGray; + this.radforward.BorderRadius = 7; + this.radforward.BorderSize = 2; + this.radforward.Checked = true; + this.radforward.CheckOffColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.radforward.CheckOnColor = System.Drawing.Color.LimeGreen; + this.radforward.CheckWidth = 30; + this.radforward.Dock = System.Windows.Forms.DockStyle.Left; + this.radforward.Font = new System.Drawing.Font("맑은 고딕", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.radforward.ForeColor = System.Drawing.Color.Blue; + this.radforward.Location = new System.Drawing.Point(10, 19); + this.radforward.Name = "radforward"; + this.radforward.Size = new System.Drawing.Size(119, 66); + this.radforward.TabIndex = 7; + this.radforward.TabStop = true; + this.radforward.Text = "전진"; + this.radforward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.radforward.UseVisualStyleBackColor = false; + // + // label1 + // + this.label1.BackColor = System.Drawing.Color.Blue; + this.label1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.label1.Font = new System.Drawing.Font("맑은 고딕", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label1.ForeColor = System.Drawing.Color.White; + this.label1.Location = new System.Drawing.Point(607, 538); + this.label1.Name = "label1"; + this.label1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.label1.Size = new System.Drawing.Size(404, 38); + this.label1.TabIndex = 9; + this.label1.Text = "----------"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // guideSensor1 + // + this.guideSensor1.Dock = System.Windows.Forms.DockStyle.Top; + this.guideSensor1.LMark = false; + this.guideSensor1.Location = new System.Drawing.Point(3, 3); + this.guideSensor1.Name = "guideSensor1"; + this.guideSensor1.RMark = false; + this.guideSensor1.SensorValue = 0; + this.guideSensor1.Size = new System.Drawing.Size(1008, 18); + this.guideSensor1.TabIndex = 8; + this.guideSensor1.Text = "guideSensor1"; + // + // fManual + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.SlateGray; + this.ClientSize = new System.Drawing.Size(1014, 579); + this.Controls.Add(this.panel2); + this.Controls.Add(this.label1); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.guideSensor1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "fManual"; + this.Padding = new System.Windows.Forms.Padding(3); + this.Text = "fManual"; + this.Load += new System.EventHandler(this.fManual_Load); + this.VisibleChanged += new System.EventHandler(this.fManual_VisibleChanged); + this.tableLayoutPanel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.grpSpeed.ResumeLayout(false); + this.grpBunki.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private arCtl.arLabel btBack; + private arCtl.arLabel btForward; + private arCtl.arLabel btLeft; + private arCtl.arLabel btRight; + private arCtl.arLabel btStart; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Button btMarkStop; + private System.Windows.Forms.Button btchargeOff; + private System.Windows.Forms.Button btChargeOn; + private Narumi.UC.GuideSensor guideSensor1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Button btErrReset; + private System.Windows.Forms.GroupBox grpSpeed; + private System.Windows.Forms.GroupBox grpBunki; + private System.Windows.Forms.GroupBox groupBox2; + private AGVControl.MyRadioButton radspdl; + private AGVControl.MyRadioButton radspdh; + private AGVControl.MyRadioButton radspdm; + private AGVControl.MyRadioButton radleft; + private AGVControl.MyRadioButton radright; + private AGVControl.MyRadioButton radstrai; + private AGVControl.MyRadioButton radbackward; + private AGVControl.MyRadioButton radforward; + private AGVControl.MyRadioButton radpbs0; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.GroupBox groupBox1; + private AGVControl.MyRadioButton radpbs1; + private AGVControl.MyRadioButton radpbs2; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel9; + private System.Windows.Forms.Panel panel8; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Button button1; + private arCtl.arLabel arLabel1; + private System.Windows.Forms.Panel panel12; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/ViewForm/fManual.cs b/Cs_HMI/Project/ViewForm/fManual.cs new file mode 100644 index 0000000..94513ce --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fManual.cs @@ -0,0 +1,372 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using arDev; +using COMM; + +namespace Project.ViewForm +{ + public partial class fManual : Form + { + public fManual() + { + InitializeComponent(); + this.FormClosed += FIO_FormClosed; + } + + private void fManual_Load(object sender, EventArgs e) + { + if (PUB.AGV.data.Direction == 'F') radforward.Checked = true; + else radbackward.Checked = false; + + //if (PUB.AGV.data.Sts == 'L') radleft.Checked = true; + //else if (PUB.AGV.data.Sts == 'R') radright.Checked = true; + //else + radstrai.Checked = true; + + if (PUB.AGV.data.Speed == 'H') radspdh.Checked = true; + else if (PUB.AGV.data.Speed == 'L') radspdl.Checked = true; + else radspdm.Checked = true; + + this.timer1.Start(); + } + private void FIO_FormClosed(object sender, FormClosedEventArgs e) + { + timer1.Stop(); + } + + #region "Z축 커버" + + private void arLabel10_Click(object sender, EventArgs e) + { + + } + + + + private void arLabel8_Click(object sender, EventArgs e) + { + + + } + + private void arLabel7_Click(object sender, EventArgs e) + { + + } + #endregion + + #region "AGV 수동 이동" + private void arLabel1_Click(object sender, EventArgs e) + { + //후진 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA]) + { + Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요"); + return; + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + { + Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요"); + return; + } + if (PUB.CheckManualChargeMode() == false) return; + arDev.Narumi.Speed spd = arDev.Narumi.Speed.Low; + if (radspdh.Checked) spd = arDev.Narumi.Speed.High; + else if (radspdl.Checked) spd = arDev.Narumi.Speed.Mid; + arDev.Narumi.Sensor ss = arDev.Narumi.Sensor.PBSOff; + if (radpbs0.Checked) ss = arDev.Narumi.Sensor.PBSOn; + PUB.AGV.AGVMoveManual(arDev.Narumi.ManulOpt.BS, spd, ss); + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void arLabel2_Click(object sender, EventArgs e) + { + //전진 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA]) + { + Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요"); + return; + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + { + Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요"); + return; + } + if (PUB.CheckManualChargeMode() == false) return; + arDev.Narumi.Speed spd = arDev.Narumi.Speed.Low; + if (radspdh.Checked) spd = arDev.Narumi.Speed.High; + else if (radspdl.Checked) spd = arDev.Narumi.Speed.Mid; + arDev.Narumi.Sensor ss = arDev.Narumi.Sensor.PBSOff; + if (radpbs0.Checked) ss = arDev.Narumi.Sensor.PBSOn; + PUB.AGV.AGVMoveManual(arDev.Narumi.ManulOpt.FS, spd, ss); + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void arLabel3_Click(object sender, EventArgs e) + { + //우회전 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA]) + { + Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요"); + return; + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + { + Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요"); + return; + } + if (PUB.CheckManualChargeMode() == false) return; + arDev.Narumi.Speed spd = arDev.Narumi.Speed.Low; + if (radspdh.Checked) spd = arDev.Narumi.Speed.High; + else if (radspdl.Checked) spd = arDev.Narumi.Speed.Mid; + arDev.Narumi.Sensor ss = arDev.Narumi.Sensor.PBSOff; + if (radpbs0.Checked) ss = arDev.Narumi.Sensor.PBSOn; + PUB.AGV.AGVMoveManual(arDev.Narumi.ManulOpt.RT, spd, ss); + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void arLabel4_Click(object sender, EventArgs e) + { + //좌회전 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA]) + { + Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요"); + return; + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + { + Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요"); + return; + } + if (PUB.CheckManualChargeMode() == false) return; + arDev.Narumi.Speed spd = arDev.Narumi.Speed.Low; + if (radspdh.Checked) spd = arDev.Narumi.Speed.High; + else if (radspdl.Checked) spd = arDev.Narumi.Speed.Mid; + arDev.Narumi.Sensor ss = arDev.Narumi.Sensor.PBSOff; + if (radpbs0.Checked) ss = arDev.Narumi.Sensor.PBSOn; + PUB.AGV.AGVMoveManual(arDev.Narumi.ManulOpt.LT, spd, ss); + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + } + + private void arLabel11_Click(object sender, EventArgs e) + { + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA]) + { + Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요"); + return; + } + else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + { + Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요"); + return; + } + if (PUB.CheckManualChargeMode() == false) return; + PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE); + if (PUB.AGV.system1.agv_run == false && PUB.AGV.system1.agv_run_manual == false) + { + var dlg = Util.MsgQ("자동 진행을 시작할까요?\n우측 옵션을 확인 하세요"); + if (dlg != DialogResult.Yes) return; + var opt = makeopt(); + PUB.AGV.AGVMoveSet(opt); + PUB.AGV.AGVMoveRun(); + } + else + { + PUB.AGV.AGVMoveStop("fmanual arlabel11_Clcik", arDev.Narumi.eStopOpt.Stop); + } + + } + #endregion + + + bool tmrun = false; + private void timer1_Tick(object sender, EventArgs e) + { + if (this.Visible == false) return; + if (tmrun == true) return; + tmrun = true; + + //충전중이면 수동버튼을 누를수없게한다 + if (VAR.BOOL[eVarBool.FLAG_CHARGEONA] || VAR.BOOL[eVarBool.FLAG_CHARGEONM]) btLeft.Enabled = false; + else btLeft.Enabled = true; + + btRight.Enabled = btLeft.Enabled; + btStart.Enabled = btLeft.Enabled; + btBack.Enabled = btLeft.Enabled; + btForward.Enabled = btLeft.Enabled; + + + + //상태메세지 + label1.Text = VAR.STR[eVarString.StatusMessage]; + + //마크정보 + guideSensor1.SensorValue = PUB.AGV.data.guidesensor; + guideSensor1.LMark = PUB.AGV.signal.mark_sensor_1; + guideSensor1.RMark = PUB.AGV.signal.mark_sensor_2; + guideSensor1.Invalidate(); + + if (PUB.AGV.system1.agv_run || PUB.AGV.system1.agv_run_manual) + { + btStart.Text = "동작\n멈춤"; + btStart.BackColor = Color.Tomato; + btStart.BackColor2 = Color.Orange; + } + else + { + btStart.Text = "자돟\n진행"; + btStart.BackColor = Color.DimGray; + btStart.BackColor2 = Color.Gray; + } + + + //모터전원상태에따라서 배경색상을 변경해준다. + //var Mot_Dir_Backward = PUB.AGV.data.Direction == 'B';// PUB.flag.get(EFlag.FLAG_DIR_CW);// PUB.flag.get(EFlag.FLAG_DIR_CW); + + //if (Mot_Dir_Backward == true) + //{ + // btBack.BackColor = Color.Lime; + // btBack.BackColor2 = Color.Green; + + // btForward.BackColor = Color.FromArgb(23, 55, 93); + // btForward.BackColor2 = Color.FromArgb(12, 36, 64); + //} + //else + //{ + // btForward.BackColor = Color.Lime; + // btForward.BackColor2 = Color.Green; + + // btBack.BackColor = Color.FromArgb(23, 55, 93); + // btBack.BackColor2 = Color.FromArgb(12, 36, 64); + //} + + tmrun = false; + } + + + + + private void button1_Click(object sender, EventArgs e) + { + PUB.AGV.AGVMoveStop("fmanual button1_click", arDev.Narumi.eStopOpt.MarkStop); + //VAR.BOOL[eVarBool.FLAG_NEXTSTOP_MARK] = true; + + + } + + private void fManual_VisibleChanged(object sender, EventArgs e) + { + this.timer1.Enabled = this.Visible; + if (timer1.Enabled) timer1.Start(); + else timer1.Stop(); + } + + private void button3_Click(object sender, EventArgs e) + { + PUB.AGV.AGVErrorReset(); + } + + private void panel2_Paint(object sender, PaintEventArgs e) + { + + } + + arDev.Narumi.BunkiData makeopt() + { + var p = new arDev.Narumi.BunkiData(); + if (radbackward.Checked) p.Direction = arDev.Narumi.eMoveDir.Backward; + else p.Direction = arDev.Narumi.eMoveDir.Forward; + + if (radleft.Checked) p.Bunki = arDev.Narumi.eBunki.Left; + else if (radright.Checked) p.Bunki = arDev.Narumi.eBunki.Right; + else p.Bunki = arDev.Narumi.eBunki.Strate; + + if (radspdh.Checked) p.Speed = arDev.Narumi.eMoveSpd.High; + else if (radspdl.Checked) p.Speed = arDev.Narumi.eMoveSpd.Low; + else p.Speed = arDev.Narumi.eMoveSpd.Middle; + + if (radpbs1.Checked) p.PBSSensor = 2; + else if (radpbs2.Checked) p.PBSSensor = 2; + else p.PBSSensor = 0; + return p; + } + + private void btchargeOff_Click(object sender, EventArgs e) + { + if (Util.MsgQ("충전 해제 명령을 전송 할까요?") == DialogResult.Yes) + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); + } + + private void btChargeOn_Click(object sender, EventArgs e) + { + if (PUB.AGV.signal.mark_sensor == false) + { + Util.MsgE("마크센서가 확인되지 않아 충전을 시작할 수 없습니다"); + return; + } + var dlg = Util.MsgQ("충전 시작 명령을 전송 할까요?"); + if (dlg != DialogResult.Yes) return; + PUB.AGV.AGVCharge(PUB.setting.ChargerID, true); + } + + arDev.Narumi.BunkiData bunkiopt = null; + private void button1_Click_2(object sender, EventArgs e) + { + bunkiopt = makeopt(); + PUB.AGV.AGVMoveSet(bunkiopt); + PUB.log.Add($"사용자 설정 : {bunkiopt}"); + if (PUB.DriveSpeed) + { + if (PUB.AGV.AGVCommand("SSH", PUB.setting.SPD_H.ToString("0000")) == true) + PUB.DriveSpeed = false; + } + + } + + private void button2_Click(object sender, EventArgs e) + { + PUB.AGV.AGVCommand("SCK", "0010"); + } + + private void button2_Click_1(object sender, EventArgs e) + { + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Stop); + } + + private void button3_Click_1(object sender, EventArgs e) + { + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Up); + } + + private void button4_Click_1(object sender, EventArgs e) + { + PUB.PLC.ZMot(arDev.FakePLC.ZMotDirection.Down); + } + + private void arLabel1_Click_1(object sender, EventArgs e) + { + + if (PUB.AGV.AGVCommand("SSH", PUB.setting.SPD_DRIVE.ToString("0000")) == false) + { + AR.UTIL.MsgE("고속속도에 주행속도 연결 실패\n잠시 후 다시 시도하세요"); + return; + } + + if (this.bunkiopt == null) bunkiopt = makeopt(); + bunkiopt.Speed = arDev.Narumi.eMoveSpd.High; + PUB.AGV.AGVMoveSet(bunkiopt); + PUB.log.Add($"고속주행설정 : {bunkiopt}"); + PUB.DriveSpeed = true; + + AR.UTIL.MsgI($"주행속도({PUB.setting.SPD_DRIVE})가 '고속' 속도에 연결되었습니다.\n" + + $"창을 이동하거나 '설정적용'을 누르면 원래속도({PUB.setting.SPD_H})로 변경 됩니다"); + } + } +} diff --git a/Cs_HMI/Project/ViewForm/fManual.resx b/Cs_HMI/Project/ViewForm/fManual.resx new file mode 100644 index 0000000..aac33d5 --- /dev/null +++ b/Cs_HMI/Project/ViewForm/fManual.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/app.config b/Cs_HMI/Project/app.config new file mode 100644 index 0000000..16d62dc --- /dev/null +++ b/Cs_HMI/Project/app.config @@ -0,0 +1,17 @@ + + + + +
+ + + + + + asdfasdfasdf +asdfasdfasdf +asdf + + + + diff --git a/Cs_HMI/Project/fMain.Designer.cs b/Cs_HMI/Project/fMain.Designer.cs new file mode 100644 index 0000000..453156f --- /dev/null +++ b/Cs_HMI/Project/fMain.Designer.cs @@ -0,0 +1,2284 @@ +namespace Project +{ + partial class fMain + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fMain)); + arFrame.Control.ColorListItem colorListItem1 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem2 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem3 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem4 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem5 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem6 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem7 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem8 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem9 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem10 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem11 = new arFrame.Control.ColorListItem(); + Project.CtlPos.item item1 = new Project.CtlPos.item(); + Project.CtlPos.item item2 = new Project.CtlPos.item(); + Project.CtlPos.item item3 = new Project.CtlPos.item(); + Project.CtlPos.item item4 = new Project.CtlPos.item(); + Project.CtlPos.item item5 = new Project.CtlPos.item(); + Project.CtlPos.item item6 = new Project.CtlPos.item(); + Project.CtlPos.item item7 = new Project.CtlPos.item(); + Project.CtlPos.item item8 = new Project.CtlPos.item(); + Project.CtlPos.item item9 = new Project.CtlPos.item(); + Project.CtlPos.item item10 = new Project.CtlPos.item(); + Project.CtlPos.item item11 = new Project.CtlPos.item(); + Project.CtlPos.item item12 = new Project.CtlPos.item(); + Project.CtlPos.item item13 = new Project.CtlPos.item(); + Project.CtlPos.item item14 = new Project.CtlPos.item(); + Project.CtlPos.item item15 = new Project.CtlPos.item(); + Project.CtlPos.item item16 = new Project.CtlPos.item(); + this.tmDisplay = new System.Windows.Forms.Timer(this.components); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.MenuLift = new System.Windows.Forms.Button(); + this.MenuMAN = new System.Windows.Forms.Button(); + this.MenuFlag = new System.Windows.Forms.Button(); + this.MenuAuto = new System.Windows.Forms.Button(); + this.MenuLog = new System.Windows.Forms.Button(); + this.MenuAGV = new System.Windows.Forms.Button(); + this.MenuBMS = new System.Windows.Forms.Button(); + this.btAutoRun = new arCtl.arLabel(); + this.btChargeA = new arCtl.arLabel(); + this.lbTime = new arCtl.arLabel(); + this.btDebug = new arCtl.arLabel(); + this.btOpenDir = new arCtl.arLabel(); + this.btMReset = new arCtl.arLabel(); + this.btCapture = new arCtl.arLabel(); + this.arLabel3 = new arCtl.arLabel(); + this.arLabel2 = new arCtl.arLabel(); + this.arLabel5 = new arCtl.arLabel(); + this.btClose = new arCtl.arLabel(); + this.systemParameterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator(); + this.demoRunToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.setZValidToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); + this.gridviewTestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.으ㅆㄷㄴㅅToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.messageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.errorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.informationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.attentionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.reloadLotListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveSourceListToDestListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.needShowUploadTrueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.선택상태보기ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.idxDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.stripIdDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.oKDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.nGDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.mISSDataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.fileMapDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataPathDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.mapOriginDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.mapArrayDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panRight = new System.Windows.Forms.Panel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.btHome = new arCtl.arLabel(); + this.btChargeM = new arCtl.arLabel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lbCntQA = new arCtl.arLabel(); + this.arLabel4 = new arCtl.arLabel(); + this.lbCntQC = new arCtl.arLabel(); + this.arLabel9 = new arCtl.arLabel(); + this.panel16 = new System.Windows.Forms.Panel(); + this.lbCntDN = new arCtl.arLabel(); + this.arLabel7 = new arCtl.arLabel(); + this.lbCNtUP = new arCtl.arLabel(); + this.arLabel8 = new arCtl.arLabel(); + this.panel5 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lbIDLE = new arCtl.arLabel(); + this.lbStStep = new arCtl.arLabel(); + this.panTopMenu = new System.Windows.Forms.Panel(); + this.lbBat = new AGVControl.BatteryLevelGauge(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.cmDebug = new System.Windows.Forms.ContextMenuStrip(this.components); + this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.demoListLotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.refreshListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.debugtestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.pandBottomDIO = new System.Windows.Forms.Panel(); + this.panel9 = new System.Windows.Forms.Panel(); + this.IOState = new arFrame.Control.GridView(); + this.SSInfo = new arFrame.Control.GridView(); + this.panDlg = new System.Windows.Forms.Panel(); + this.arPanel2 = new arCtl.arPanel(); + this.arPanel1 = new arCtl.arPanel(); + this.ctlPos1 = new Project.CtlPos(); + this.panRight.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel16.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panTopMenu.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.cmDebug.SuspendLayout(); + this.pandBottomDIO.SuspendLayout(); + this.panel9.SuspendLayout(); + this.SuspendLayout(); + // + // tmDisplay + // + this.tmDisplay.Interval = 300; + this.tmDisplay.Tick += new System.EventHandler(this.tmDisplay_Tick); + // + // MenuLift + // + this.MenuLift.AutoSize = true; + this.MenuLift.Dock = System.Windows.Forms.DockStyle.Left; + this.MenuLift.FlatAppearance.BorderSize = 0; + this.MenuLift.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.MenuLift.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.MenuLift.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.MenuLift.Location = new System.Drawing.Point(285, 0); + this.MenuLift.Name = "MenuLift"; + this.MenuLift.Size = new System.Drawing.Size(92, 50); + this.MenuLift.TabIndex = 6; + this.MenuLift.Text = "LIFT"; + this.toolTip1.SetToolTip(this.MenuLift, "I/O 및 FLAG를 확인 합니다"); + this.MenuLift.UseVisualStyleBackColor = true; + this.MenuLift.Click += new System.EventHandler(this.button3_Click); + // + // MenuMAN + // + this.MenuMAN.AutoSize = true; + this.MenuMAN.Dock = System.Windows.Forms.DockStyle.Left; + this.MenuMAN.FlatAppearance.BorderSize = 0; + this.MenuMAN.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.MenuMAN.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.MenuMAN.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.MenuMAN.Location = new System.Drawing.Point(154, 0); + this.MenuMAN.Name = "MenuMAN"; + this.MenuMAN.Size = new System.Drawing.Size(131, 50); + this.MenuMAN.TabIndex = 1; + this.MenuMAN.Text = "MANUAL"; + this.toolTip1.SetToolTip(this.MenuMAN, "작업 내역을 확인 합니다"); + this.MenuMAN.UseVisualStyleBackColor = true; + this.MenuMAN.Click += new System.EventHandler(this.button4_Click); + // + // MenuFlag + // + this.MenuFlag.AutoSize = true; + this.MenuFlag.Dock = System.Windows.Forms.DockStyle.Left; + this.MenuFlag.FlatAppearance.BorderSize = 0; + this.MenuFlag.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.MenuFlag.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.MenuFlag.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.MenuFlag.Location = new System.Drawing.Point(561, 0); + this.MenuFlag.Name = "MenuFlag"; + this.MenuFlag.Size = new System.Drawing.Size(92, 50); + this.MenuFlag.TabIndex = 17; + this.MenuFlag.Text = "FLAG"; + this.toolTip1.SetToolTip(this.MenuFlag, "I/O 및 FLAG를 확인 합니다"); + this.MenuFlag.UseVisualStyleBackColor = true; + this.MenuFlag.Click += new System.EventHandler(this.button1_Click); + // + // MenuAuto + // + this.MenuAuto.AutoSize = true; + this.MenuAuto.Dock = System.Windows.Forms.DockStyle.Left; + this.MenuAuto.FlatAppearance.BorderSize = 0; + this.MenuAuto.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.MenuAuto.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.MenuAuto.ForeColor = System.Drawing.Color.Gold; + this.MenuAuto.Location = new System.Drawing.Point(49, 0); + this.MenuAuto.Name = "MenuAuto"; + this.MenuAuto.Size = new System.Drawing.Size(105, 50); + this.MenuAuto.TabIndex = 18; + this.MenuAuto.Text = "AUTO"; + this.toolTip1.SetToolTip(this.MenuAuto, "작업 내역을 확인 합니다"); + this.MenuAuto.UseVisualStyleBackColor = true; + this.MenuAuto.Click += new System.EventHandler(this.button2_Click); + // + // MenuLog + // + this.MenuLog.AutoSize = true; + this.MenuLog.Dock = System.Windows.Forms.DockStyle.Left; + this.MenuLog.FlatAppearance.BorderSize = 0; + this.MenuLog.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.MenuLog.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.MenuLog.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.MenuLog.Location = new System.Drawing.Point(653, 0); + this.MenuLog.Name = "MenuLog"; + this.MenuLog.Size = new System.Drawing.Size(92, 50); + this.MenuLog.TabIndex = 19; + this.MenuLog.Text = "LOG"; + this.toolTip1.SetToolTip(this.MenuLog, "I/O 및 FLAG를 확인 합니다"); + this.MenuLog.UseVisualStyleBackColor = true; + this.MenuLog.Click += new System.EventHandler(this.btLog_Click); + // + // MenuAGV + // + this.MenuAGV.AutoSize = true; + this.MenuAGV.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.MenuAGV.Dock = System.Windows.Forms.DockStyle.Left; + this.MenuAGV.FlatAppearance.BorderSize = 0; + this.MenuAGV.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.MenuAGV.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.MenuAGV.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.MenuAGV.Location = new System.Drawing.Point(377, 0); + this.MenuAGV.Name = "MenuAGV"; + this.MenuAGV.Size = new System.Drawing.Size(92, 50); + this.MenuAGV.TabIndex = 21; + this.MenuAGV.Text = "AGV"; + this.toolTip1.SetToolTip(this.MenuAGV, "I/O 및 FLAG를 확인 합니다"); + this.MenuAGV.UseVisualStyleBackColor = false; + this.MenuAGV.Click += new System.EventHandler(this.button1_Click_1); + // + // MenuBMS + // + this.MenuBMS.AutoSize = true; + this.MenuBMS.Dock = System.Windows.Forms.DockStyle.Left; + this.MenuBMS.FlatAppearance.BorderSize = 0; + this.MenuBMS.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.MenuBMS.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold); + this.MenuBMS.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.MenuBMS.Location = new System.Drawing.Point(469, 0); + this.MenuBMS.Name = "MenuBMS"; + this.MenuBMS.Size = new System.Drawing.Size(92, 50); + this.MenuBMS.TabIndex = 22; + this.MenuBMS.Text = "BMS"; + this.toolTip1.SetToolTip(this.MenuBMS, "I/O 및 FLAG를 확인 합니다"); + this.MenuBMS.UseVisualStyleBackColor = true; + this.MenuBMS.Click += new System.EventHandler(this.button2_Click_1); + // + // btAutoRun + // + this.btAutoRun.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btAutoRun.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.btAutoRun.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btAutoRun.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btAutoRun.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btAutoRun.BorderSize = new System.Windows.Forms.Padding(0, 0, 1, 1); + this.btAutoRun.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.tableLayoutPanel1.SetColumnSpan(this.btAutoRun, 2); + this.btAutoRun.Cursor = System.Windows.Forms.Cursors.Hand; + this.btAutoRun.Dock = System.Windows.Forms.DockStyle.Fill; + this.btAutoRun.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btAutoRun.ForeColor = System.Drawing.Color.WhiteSmoke; + this.btAutoRun.GradientEnable = true; + this.btAutoRun.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btAutoRun.GradientRepeatBG = false; + this.btAutoRun.isButton = true; + this.btAutoRun.Location = new System.Drawing.Point(0, 274); + this.btAutoRun.Margin = new System.Windows.Forms.Padding(0); + this.btAutoRun.MouseDownColor = System.Drawing.Color.Empty; + this.btAutoRun.MouseOverColor = System.Drawing.Color.Empty; + this.btAutoRun.msg = null; + this.btAutoRun.Name = "btAutoRun"; + this.btAutoRun.ProgressBorderColor = System.Drawing.Color.Black; + this.btAutoRun.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btAutoRun.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btAutoRun.ProgressEnable = false; + this.btAutoRun.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btAutoRun.ProgressForeColor = System.Drawing.Color.Black; + this.btAutoRun.ProgressMax = 100F; + this.btAutoRun.ProgressMin = 0F; + this.btAutoRun.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btAutoRun.ProgressValue = 0F; + this.btAutoRun.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btAutoRun.Sign = ""; + this.btAutoRun.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btAutoRun.SignColor = System.Drawing.Color.Yellow; + this.btAutoRun.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btAutoRun.Size = new System.Drawing.Size(259, 139); + this.btAutoRun.TabIndex = 22; + this.btAutoRun.Text = "수동"; + this.btAutoRun.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btAutoRun.TextShadow = true; + this.btAutoRun.TextVisible = true; + this.toolTip1.SetToolTip(this.btAutoRun, "작업상태(자동/수동)를 표시 합니다"); + this.btAutoRun.Click += new System.EventHandler(this.btStart_Click); + // + // btChargeA + // + this.btChargeA.BackColor = System.Drawing.Color.LightSalmon; + this.btChargeA.BackColor2 = System.Drawing.Color.Tomato; + this.btChargeA.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btChargeA.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btChargeA.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btChargeA.BorderSize = new System.Windows.Forms.Padding(0, 0, 1, 1); + this.btChargeA.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btChargeA.Cursor = System.Windows.Forms.Cursors.Hand; + this.btChargeA.Dock = System.Windows.Forms.DockStyle.Fill; + this.btChargeA.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.btChargeA.ForeColor = System.Drawing.Color.WhiteSmoke; + this.btChargeA.GradientEnable = true; + this.btChargeA.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btChargeA.GradientRepeatBG = false; + this.btChargeA.isButton = true; + this.btChargeA.Location = new System.Drawing.Point(116, 0); + this.btChargeA.Margin = new System.Windows.Forms.Padding(0); + this.btChargeA.MouseDownColor = System.Drawing.Color.Yellow; + this.btChargeA.MouseOverColor = System.Drawing.Color.Lime; + this.btChargeA.msg = null; + this.btChargeA.Name = "btChargeA"; + this.btChargeA.ProgressBorderColor = System.Drawing.Color.Black; + this.btChargeA.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btChargeA.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btChargeA.ProgressEnable = false; + this.btChargeA.ProgressFont = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.btChargeA.ProgressForeColor = System.Drawing.Color.Black; + this.btChargeA.ProgressMax = 100F; + this.btChargeA.ProgressMin = 0F; + this.btChargeA.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btChargeA.ProgressValue = 0F; + this.btChargeA.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btChargeA.Sign = ""; + this.btChargeA.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btChargeA.SignColor = System.Drawing.Color.Yellow; + this.btChargeA.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btChargeA.Size = new System.Drawing.Size(143, 137); + this.btChargeA.TabIndex = 141; + this.btChargeA.Text = "자동충전"; + this.btChargeA.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btChargeA.TextShadow = true; + this.btChargeA.TextVisible = true; + this.toolTip1.SetToolTip(this.btChargeA, "도어 상태"); + this.btChargeA.Click += new System.EventHandler(this.btCharge_Click); + // + // lbTime + // + this.lbTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.lbTime.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.lbTime.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbTime.BorderColor = System.Drawing.Color.Red; + this.lbTime.BorderColorOver = System.Drawing.Color.Red; + this.lbTime.BorderSize = new System.Windows.Forms.Padding(0); + this.lbTime.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbTime.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbTime.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lbTime.Font = new System.Drawing.Font("Consolas", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbTime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.lbTime.GradientEnable = false; + this.lbTime.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.lbTime.GradientRepeatBG = false; + this.lbTime.isButton = false; + this.lbTime.Location = new System.Drawing.Point(5, 554); + this.lbTime.Margin = new System.Windows.Forms.Padding(0); + this.lbTime.MouseDownColor = System.Drawing.Color.Yellow; + this.lbTime.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbTime.msg = null; + this.lbTime.Name = "lbTime"; + this.lbTime.ProgressBorderColor = System.Drawing.Color.Black; + this.lbTime.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbTime.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbTime.ProgressEnable = false; + this.lbTime.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbTime.ProgressForeColor = System.Drawing.Color.Black; + this.lbTime.ProgressMax = 100F; + this.lbTime.ProgressMin = 0F; + this.lbTime.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbTime.ProgressValue = 0F; + this.lbTime.ShadowColor = System.Drawing.Color.WhiteSmoke; + this.lbTime.Sign = ""; + this.lbTime.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbTime.SignColor = System.Drawing.Color.Yellow; + this.lbTime.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbTime.Size = new System.Drawing.Size(259, 25); + this.lbTime.TabIndex = 0; + this.lbTime.Text = "1982-11-23 00:00:00"; + this.lbTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbTime.TextShadow = false; + this.lbTime.TextVisible = true; + this.toolTip1.SetToolTip(this.lbTime, "현재 시간"); + // + // btDebug + // + this.btDebug.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btDebug.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.btDebug.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btDebug.BackgroundImage"))); + this.btDebug.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btDebug.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btDebug.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btDebug.BorderColorOver = System.Drawing.Color.SkyBlue; + this.btDebug.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.btDebug.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btDebug.Cursor = System.Windows.Forms.Cursors.Hand; + this.btDebug.Dock = System.Windows.Forms.DockStyle.Right; + this.btDebug.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.btDebug.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.btDebug.GradientEnable = false; + this.btDebug.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btDebug.GradientRepeatBG = false; + this.btDebug.isButton = true; + this.btDebug.Location = new System.Drawing.Point(878, 0); + this.btDebug.Margin = new System.Windows.Forms.Padding(0); + this.btDebug.MouseDownColor = System.Drawing.Color.Yellow; + this.btDebug.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btDebug.msg = null; + this.btDebug.Name = "btDebug"; + this.btDebug.ProgressBorderColor = System.Drawing.Color.Black; + this.btDebug.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btDebug.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btDebug.ProgressEnable = false; + this.btDebug.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btDebug.ProgressForeColor = System.Drawing.Color.Black; + this.btDebug.ProgressMax = 100F; + this.btDebug.ProgressMin = 0F; + this.btDebug.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btDebug.ProgressValue = 0F; + this.btDebug.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btDebug.Sign = ""; + this.btDebug.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btDebug.SignColor = System.Drawing.Color.Yellow; + this.btDebug.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btDebug.Size = new System.Drawing.Size(50, 50); + this.btDebug.TabIndex = 15; + this.btDebug.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btDebug.TextShadow = true; + this.btDebug.TextVisible = true; + this.toolTip1.SetToolTip(this.btDebug, "개발자 메뉴"); + this.btDebug.Visible = false; + this.btDebug.Click += new System.EventHandler(this.btDebug_Click); + // + // btOpenDir + // + this.btOpenDir.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btOpenDir.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.btOpenDir.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btOpenDir.BackgroundImage"))); + this.btOpenDir.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btOpenDir.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btOpenDir.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btOpenDir.BorderColorOver = System.Drawing.Color.SkyBlue; + this.btOpenDir.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.btOpenDir.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btOpenDir.Cursor = System.Windows.Forms.Cursors.Hand; + this.btOpenDir.Dock = System.Windows.Forms.DockStyle.Right; + this.btOpenDir.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.btOpenDir.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.btOpenDir.GradientEnable = false; + this.btOpenDir.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btOpenDir.GradientRepeatBG = false; + this.btOpenDir.isButton = true; + this.btOpenDir.Location = new System.Drawing.Point(928, 0); + this.btOpenDir.Margin = new System.Windows.Forms.Padding(0); + this.btOpenDir.MouseDownColor = System.Drawing.Color.Yellow; + this.btOpenDir.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btOpenDir.msg = null; + this.btOpenDir.Name = "btOpenDir"; + this.btOpenDir.ProgressBorderColor = System.Drawing.Color.Black; + this.btOpenDir.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btOpenDir.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btOpenDir.ProgressEnable = false; + this.btOpenDir.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btOpenDir.ProgressForeColor = System.Drawing.Color.Black; + this.btOpenDir.ProgressMax = 100F; + this.btOpenDir.ProgressMin = 0F; + this.btOpenDir.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btOpenDir.ProgressValue = 0F; + this.btOpenDir.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btOpenDir.Sign = ""; + this.btOpenDir.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btOpenDir.SignColor = System.Drawing.Color.Yellow; + this.btOpenDir.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btOpenDir.Size = new System.Drawing.Size(50, 50); + this.btOpenDir.TabIndex = 16; + this.btOpenDir.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btOpenDir.TextShadow = true; + this.btOpenDir.TextVisible = true; + this.toolTip1.SetToolTip(this.btOpenDir, "폴더 열기"); + this.btOpenDir.Click += new System.EventHandler(this.btOpenDir_Click); + // + // btMReset + // + this.btMReset.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btMReset.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.btMReset.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btMReset.BackgroundImage"))); + this.btMReset.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btMReset.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btMReset.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btMReset.BorderColorOver = System.Drawing.Color.SkyBlue; + this.btMReset.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.btMReset.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btMReset.Cursor = System.Windows.Forms.Cursors.Hand; + this.btMReset.Dock = System.Windows.Forms.DockStyle.Right; + this.btMReset.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.btMReset.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.btMReset.GradientEnable = false; + this.btMReset.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btMReset.GradientRepeatBG = false; + this.btMReset.isButton = true; + this.btMReset.Location = new System.Drawing.Point(978, 0); + this.btMReset.Margin = new System.Windows.Forms.Padding(0); + this.btMReset.MouseDownColor = System.Drawing.Color.Yellow; + this.btMReset.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btMReset.msg = null; + this.btMReset.Name = "btMReset"; + this.btMReset.ProgressBorderColor = System.Drawing.Color.Black; + this.btMReset.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btMReset.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btMReset.ProgressEnable = false; + this.btMReset.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btMReset.ProgressForeColor = System.Drawing.Color.Black; + this.btMReset.ProgressMax = 100F; + this.btMReset.ProgressMin = 0F; + this.btMReset.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btMReset.ProgressValue = 0F; + this.btMReset.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btMReset.Sign = ""; + this.btMReset.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btMReset.SignColor = System.Drawing.Color.Yellow; + this.btMReset.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btMReset.Size = new System.Drawing.Size(50, 50); + this.btMReset.TabIndex = 13; + this.btMReset.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btMReset.TextShadow = true; + this.btMReset.TextVisible = true; + this.toolTip1.SetToolTip(this.btMReset, "장치 초기화"); + this.btMReset.Click += new System.EventHandler(this.btMReset_Click); + // + // btCapture + // + this.btCapture.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btCapture.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.btCapture.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btCapture.BackgroundImage"))); + this.btCapture.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btCapture.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btCapture.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btCapture.BorderColorOver = System.Drawing.Color.SkyBlue; + this.btCapture.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.btCapture.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btCapture.Cursor = System.Windows.Forms.Cursors.Hand; + this.btCapture.Dock = System.Windows.Forms.DockStyle.Right; + this.btCapture.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.btCapture.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.btCapture.GradientEnable = false; + this.btCapture.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btCapture.GradientRepeatBG = false; + this.btCapture.isButton = true; + this.btCapture.Location = new System.Drawing.Point(1028, 0); + this.btCapture.Margin = new System.Windows.Forms.Padding(0); + this.btCapture.MouseDownColor = System.Drawing.Color.Yellow; + this.btCapture.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btCapture.msg = null; + this.btCapture.Name = "btCapture"; + this.btCapture.ProgressBorderColor = System.Drawing.Color.Black; + this.btCapture.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btCapture.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btCapture.ProgressEnable = false; + this.btCapture.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btCapture.ProgressForeColor = System.Drawing.Color.Black; + this.btCapture.ProgressMax = 100F; + this.btCapture.ProgressMin = 0F; + this.btCapture.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btCapture.ProgressValue = 0F; + this.btCapture.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btCapture.Sign = ""; + this.btCapture.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btCapture.SignColor = System.Drawing.Color.Yellow; + this.btCapture.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btCapture.Size = new System.Drawing.Size(50, 50); + this.btCapture.TabIndex = 12; + this.btCapture.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btCapture.TextShadow = true; + this.btCapture.TextVisible = true; + this.toolTip1.SetToolTip(this.btCapture, "화면 캡쳐"); + this.btCapture.Click += new System.EventHandler(this.btCapture_Click); + // + // arLabel3 + // + this.arLabel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel3.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arLabel3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("arLabel3.BackgroundImage"))); + this.arLabel3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.arLabel3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel3.BorderColorOver = System.Drawing.Color.SkyBlue; + this.arLabel3.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.arLabel3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel3.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel3.Dock = System.Windows.Forms.DockStyle.Right; + this.arLabel3.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.arLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.arLabel3.GradientEnable = false; + this.arLabel3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel3.GradientRepeatBG = false; + this.arLabel3.isButton = true; + this.arLabel3.Location = new System.Drawing.Point(1078, 0); + this.arLabel3.Margin = new System.Windows.Forms.Padding(0); + this.arLabel3.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel3.msg = null; + this.arLabel3.Name = "arLabel3"; + this.arLabel3.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel3.ProgressEnable = false; + this.arLabel3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel3.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel3.ProgressMax = 100F; + this.arLabel3.ProgressMin = 0F; + this.arLabel3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel3.ProgressValue = 0F; + this.arLabel3.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel3.Sign = ""; + this.arLabel3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel3.SignColor = System.Drawing.Color.Yellow; + this.arLabel3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel3.Size = new System.Drawing.Size(50, 50); + this.arLabel3.TabIndex = 10; + this.arLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel3.TextShadow = true; + this.arLabel3.TextVisible = true; + this.toolTip1.SetToolTip(this.arLabel3, "메뉴얼 보기"); + this.arLabel3.Click += new System.EventHandler(this.arLabel3_Click); + // + // arLabel2 + // + this.arLabel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arLabel2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("arLabel2.BackgroundImage"))); + this.arLabel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.arLabel2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel2.BorderColorOver = System.Drawing.Color.SkyBlue; + this.arLabel2.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.arLabel2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel2.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel2.Dock = System.Windows.Forms.DockStyle.Right; + this.arLabel2.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.arLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.arLabel2.GradientEnable = false; + this.arLabel2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel2.GradientRepeatBG = false; + this.arLabel2.isButton = true; + this.arLabel2.Location = new System.Drawing.Point(1128, 0); + this.arLabel2.Margin = new System.Windows.Forms.Padding(0); + this.arLabel2.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel2.msg = null; + this.arLabel2.Name = "arLabel2"; + this.arLabel2.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel2.ProgressEnable = false; + this.arLabel2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel2.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel2.ProgressMax = 100F; + this.arLabel2.ProgressMin = 0F; + this.arLabel2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel2.ProgressValue = 0F; + this.arLabel2.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel2.Sign = ""; + this.arLabel2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel2.SignColor = System.Drawing.Color.Yellow; + this.arLabel2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel2.Size = new System.Drawing.Size(50, 50); + this.arLabel2.TabIndex = 20; + this.arLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel2.TextShadow = true; + this.arLabel2.TextVisible = true; + this.toolTip1.SetToolTip(this.arLabel2, "개발자 메뉴"); + this.arLabel2.Click += new System.EventHandler(this.arLabel2_Click_1); + // + // arLabel5 + // + this.arLabel5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel5.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.arLabel5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("arLabel5.BackgroundImage"))); + this.arLabel5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.arLabel5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel5.BorderColorOver = System.Drawing.Color.SkyBlue; + this.arLabel5.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.arLabel5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel5.Cursor = System.Windows.Forms.Cursors.Hand; + this.arLabel5.Dock = System.Windows.Forms.DockStyle.Right; + this.arLabel5.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.arLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.arLabel5.GradientEnable = false; + this.arLabel5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel5.GradientRepeatBG = false; + this.arLabel5.isButton = true; + this.arLabel5.Location = new System.Drawing.Point(1178, 0); + this.arLabel5.Margin = new System.Windows.Forms.Padding(0); + this.arLabel5.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel5.msg = null; + this.arLabel5.Name = "arLabel5"; + this.arLabel5.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel5.ProgressEnable = false; + this.arLabel5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel5.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel5.ProgressMax = 100F; + this.arLabel5.ProgressMin = 0F; + this.arLabel5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel5.ProgressValue = 0F; + this.arLabel5.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel5.Sign = ""; + this.arLabel5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel5.SignColor = System.Drawing.Color.Yellow; + this.arLabel5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.arLabel5.Size = new System.Drawing.Size(50, 50); + this.arLabel5.TabIndex = 9; + this.arLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel5.TextShadow = true; + this.arLabel5.TextVisible = true; + this.toolTip1.SetToolTip(this.arLabel5, "프로그램 설정"); + this.arLabel5.Click += new System.EventHandler(this.arLabel5_Click); + // + // btClose + // + this.btClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btClose.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.btClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btClose.BackgroundImage"))); + this.btClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btClose.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btClose.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btClose.BorderColorOver = System.Drawing.Color.SkyBlue; + this.btClose.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.btClose.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btClose.Cursor = System.Windows.Forms.Cursors.Hand; + this.btClose.Dock = System.Windows.Forms.DockStyle.Right; + this.btClose.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.btClose.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.btClose.GradientEnable = false; + this.btClose.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btClose.GradientRepeatBG = false; + this.btClose.isButton = true; + this.btClose.Location = new System.Drawing.Point(1228, 0); + this.btClose.Margin = new System.Windows.Forms.Padding(0); + this.btClose.MouseDownColor = System.Drawing.Color.Yellow; + this.btClose.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btClose.msg = null; + this.btClose.Name = "btClose"; + this.btClose.ProgressBorderColor = System.Drawing.Color.Black; + this.btClose.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btClose.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btClose.ProgressEnable = false; + this.btClose.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btClose.ProgressForeColor = System.Drawing.Color.Black; + this.btClose.ProgressMax = 100F; + this.btClose.ProgressMin = 0F; + this.btClose.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btClose.ProgressValue = 0F; + this.btClose.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btClose.Sign = ""; + this.btClose.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btClose.SignColor = System.Drawing.Color.Yellow; + this.btClose.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btClose.Size = new System.Drawing.Size(50, 50); + this.btClose.TabIndex = 7; + this.btClose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btClose.TextShadow = true; + this.btClose.TextVisible = true; + this.toolTip1.SetToolTip(this.btClose, "프로그램 종료"); + this.btClose.Click += new System.EventHandler(this.btClose_Click); + // + // systemParameterToolStripMenuItem + // + this.systemParameterToolStripMenuItem.Name = "systemParameterToolStripMenuItem"; + this.systemParameterToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.systemParameterToolStripMenuItem.Text = "System Parameter"; + // + // toolStripMenuItem4 + // + this.toolStripMenuItem4.Name = "toolStripMenuItem4"; + this.toolStripMenuItem4.Size = new System.Drawing.Size(225, 6); + // + // demoRunToolStripMenuItem + // + this.demoRunToolStripMenuItem.Name = "demoRunToolStripMenuItem"; + this.demoRunToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.demoRunToolStripMenuItem.Text = "Demo Run"; + this.demoRunToolStripMenuItem.Click += new System.EventHandler(this.demoRunToolStripMenuItem_Click); + // + // setZValidToolStripMenuItem + // + this.setZValidToolStripMenuItem.Name = "setZValidToolStripMenuItem"; + this.setZValidToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.setZValidToolStripMenuItem.Text = "Set A-Valid On"; + this.setZValidToolStripMenuItem.Click += new System.EventHandler(this.setZValidToolStripMenuItem_Click); + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(225, 6); + // + // gridviewTestToolStripMenuItem + // + this.gridviewTestToolStripMenuItem.Name = "gridviewTestToolStripMenuItem"; + this.gridviewTestToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.gridviewTestToolStripMenuItem.Text = "GridviewTest"; + this.gridviewTestToolStripMenuItem.Click += new System.EventHandler(this.gridviewTestToolStripMenuItem_Click); + // + // 으ㅆㄷㄴㅅToolStripMenuItem + // + this.으ㅆㄷㄴㅅToolStripMenuItem.Name = "으ㅆㄷㄴㅅToolStripMenuItem"; + this.으ㅆㄷㄴㅅToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.으ㅆㄷㄴㅅToolStripMenuItem.Text = "Test DataMatrix StripID"; + this.으ㅆㄷㄴㅅToolStripMenuItem.Click += new System.EventHandler(this.으ㅆㄷㄴㅅToolStripMenuItem_Click); + // + // messageToolStripMenuItem + // + this.messageToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.errorToolStripMenuItem, + this.informationToolStripMenuItem, + this.attentionToolStripMenuItem}); + this.messageToolStripMenuItem.Name = "messageToolStripMenuItem"; + this.messageToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.messageToolStripMenuItem.Text = "Message"; + // + // errorToolStripMenuItem + // + this.errorToolStripMenuItem.Name = "errorToolStripMenuItem"; + this.errorToolStripMenuItem.Size = new System.Drawing.Size(137, 22); + this.errorToolStripMenuItem.Text = "Error"; + this.errorToolStripMenuItem.Click += new System.EventHandler(this.errorToolStripMenuItem_Click); + // + // informationToolStripMenuItem + // + this.informationToolStripMenuItem.Name = "informationToolStripMenuItem"; + this.informationToolStripMenuItem.Size = new System.Drawing.Size(137, 22); + this.informationToolStripMenuItem.Text = "Information"; + this.informationToolStripMenuItem.Click += new System.EventHandler(this.informationToolStripMenuItem_Click); + // + // attentionToolStripMenuItem + // + this.attentionToolStripMenuItem.Name = "attentionToolStripMenuItem"; + this.attentionToolStripMenuItem.Size = new System.Drawing.Size(137, 22); + this.attentionToolStripMenuItem.Text = "Attention"; + this.attentionToolStripMenuItem.Click += new System.EventHandler(this.attentionToolStripMenuItem_Click); + // + // reloadLotListToolStripMenuItem + // + this.reloadLotListToolStripMenuItem.Name = "reloadLotListToolStripMenuItem"; + this.reloadLotListToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.reloadLotListToolStripMenuItem.Text = "Reload Lot List"; + this.reloadLotListToolStripMenuItem.Click += new System.EventHandler(this.reloadLotListToolStripMenuItem_Click); + // + // moveSourceListToDestListToolStripMenuItem + // + this.moveSourceListToDestListToolStripMenuItem.Name = "moveSourceListToDestListToolStripMenuItem"; + this.moveSourceListToDestListToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.moveSourceListToDestListToolStripMenuItem.Text = "Move Source List to DestList"; + // + // needShowUploadTrueToolStripMenuItem + // + this.needShowUploadTrueToolStripMenuItem.Name = "needShowUploadTrueToolStripMenuItem"; + this.needShowUploadTrueToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.needShowUploadTrueToolStripMenuItem.Text = "Need Show Upload = True"; + // + // 선택상태보기ToolStripMenuItem + // + this.선택상태보기ToolStripMenuItem.Name = "선택상태보기ToolStripMenuItem"; + this.선택상태보기ToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.선택상태보기ToolStripMenuItem.Text = "선택 상태 보기"; + // + // idxDataGridViewTextBoxColumn + // + this.idxDataGridViewTextBoxColumn.DataPropertyName = "idx"; + this.idxDataGridViewTextBoxColumn.HeaderText = "idx"; + this.idxDataGridViewTextBoxColumn.Name = "idxDataGridViewTextBoxColumn"; + this.idxDataGridViewTextBoxColumn.Width = 5; + // + // stripIdDataGridViewTextBoxColumn2 + // + this.stripIdDataGridViewTextBoxColumn2.DataPropertyName = "StripId"; + this.stripIdDataGridViewTextBoxColumn2.HeaderText = "StripId"; + this.stripIdDataGridViewTextBoxColumn2.Name = "stripIdDataGridViewTextBoxColumn2"; + this.stripIdDataGridViewTextBoxColumn2.Width = 5; + // + // oKDataGridViewTextBoxColumn2 + // + this.oKDataGridViewTextBoxColumn2.DataPropertyName = "OK"; + this.oKDataGridViewTextBoxColumn2.HeaderText = "OK"; + this.oKDataGridViewTextBoxColumn2.Name = "oKDataGridViewTextBoxColumn2"; + this.oKDataGridViewTextBoxColumn2.Width = 5; + // + // nGDataGridViewTextBoxColumn2 + // + this.nGDataGridViewTextBoxColumn2.DataPropertyName = "NG"; + this.nGDataGridViewTextBoxColumn2.HeaderText = "NG"; + this.nGDataGridViewTextBoxColumn2.Name = "nGDataGridViewTextBoxColumn2"; + this.nGDataGridViewTextBoxColumn2.Width = 5; + // + // mISSDataGridViewTextBoxColumn2 + // + this.mISSDataGridViewTextBoxColumn2.DataPropertyName = "MISS"; + this.mISSDataGridViewTextBoxColumn2.HeaderText = "MISS"; + this.mISSDataGridViewTextBoxColumn2.Name = "mISSDataGridViewTextBoxColumn2"; + this.mISSDataGridViewTextBoxColumn2.Width = 5; + // + // fileMapDataGridViewTextBoxColumn + // + this.fileMapDataGridViewTextBoxColumn.DataPropertyName = "FileMap"; + this.fileMapDataGridViewTextBoxColumn.HeaderText = "FileMap"; + this.fileMapDataGridViewTextBoxColumn.Name = "fileMapDataGridViewTextBoxColumn"; + this.fileMapDataGridViewTextBoxColumn.Width = 5; + // + // dataPathDataGridViewTextBoxColumn + // + this.dataPathDataGridViewTextBoxColumn.DataPropertyName = "DataPath"; + this.dataPathDataGridViewTextBoxColumn.HeaderText = "DataPath"; + this.dataPathDataGridViewTextBoxColumn.Name = "dataPathDataGridViewTextBoxColumn"; + this.dataPathDataGridViewTextBoxColumn.Width = 5; + // + // mapOriginDataGridViewTextBoxColumn + // + this.mapOriginDataGridViewTextBoxColumn.DataPropertyName = "MapOrigin"; + this.mapOriginDataGridViewTextBoxColumn.HeaderText = "MapOrigin"; + this.mapOriginDataGridViewTextBoxColumn.Name = "mapOriginDataGridViewTextBoxColumn"; + this.mapOriginDataGridViewTextBoxColumn.Width = 5; + // + // mapArrayDataGridViewTextBoxColumn + // + this.mapArrayDataGridViewTextBoxColumn.DataPropertyName = "MapArray"; + this.mapArrayDataGridViewTextBoxColumn.HeaderText = "MapArray"; + this.mapArrayDataGridViewTextBoxColumn.Name = "mapArrayDataGridViewTextBoxColumn"; + this.mapArrayDataGridViewTextBoxColumn.Width = 5; + // + // panRight + // + this.panRight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.panRight.Controls.Add(this.tableLayoutPanel1); + this.panRight.Controls.Add(this.panel2); + this.panRight.Controls.Add(this.panel4); + this.panRight.Controls.Add(this.panel16); + this.panRight.Controls.Add(this.panel5); + this.panRight.Controls.Add(this.lbTime); + this.panRight.Controls.Add(this.panel3); + this.panRight.Controls.Add(this.panel1); + this.panRight.Dock = System.Windows.Forms.DockStyle.Right; + this.panRight.Location = new System.Drawing.Point(1015, 146); + this.panRight.Name = "panRight"; + this.panRight.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); + this.panRight.Size = new System.Drawing.Size(264, 579); + this.panRight.TabIndex = 131; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 45F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 55F)); + this.tableLayoutPanel1.Controls.Add(this.btAutoRun, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.btHome, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.btChargeA, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.btChargeM, 1, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(5, 136); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(259, 413); + this.tableLayoutPanel1.TabIndex = 0; + // + // btHome + // + this.btHome.BackColor = System.Drawing.Color.Aqua; + this.btHome.BackColor2 = System.Drawing.Color.Teal; + this.btHome.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btHome.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btHome.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btHome.BorderSize = new System.Windows.Forms.Padding(0, 0, 1, 1); + this.btHome.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btHome.Cursor = System.Windows.Forms.Cursors.Hand; + this.btHome.Dock = System.Windows.Forms.DockStyle.Fill; + this.btHome.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.btHome.ForeColor = System.Drawing.Color.WhiteSmoke; + this.btHome.GradientEnable = true; + this.btHome.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btHome.GradientRepeatBG = false; + this.btHome.isButton = true; + this.btHome.Location = new System.Drawing.Point(0, 0); + this.btHome.Margin = new System.Windows.Forms.Padding(0); + this.btHome.MouseDownColor = System.Drawing.Color.Yellow; + this.btHome.MouseOverColor = System.Drawing.Color.Lime; + this.btHome.msg = null; + this.btHome.Name = "btHome"; + this.btHome.ProgressBorderColor = System.Drawing.Color.Black; + this.btHome.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btHome.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btHome.ProgressEnable = false; + this.btHome.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btHome.ProgressForeColor = System.Drawing.Color.Black; + this.btHome.ProgressMax = 100F; + this.btHome.ProgressMin = 0F; + this.btHome.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btHome.ProgressValue = 0F; + this.tableLayoutPanel1.SetRowSpan(this.btHome, 2); + this.btHome.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btHome.Sign = ""; + this.btHome.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btHome.SignColor = System.Drawing.Color.Yellow; + this.btHome.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btHome.Size = new System.Drawing.Size(116, 274); + this.btHome.TabIndex = 141; + this.btHome.Text = "홈"; + this.btHome.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btHome.TextShadow = true; + this.btHome.TextVisible = true; + this.btHome.Click += new System.EventHandler(this.arLabel1_Click); + // + // btChargeM + // + this.btChargeM.BackColor = System.Drawing.Color.LightSalmon; + this.btChargeM.BackColor2 = System.Drawing.Color.Tomato; + this.btChargeM.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btChargeM.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btChargeM.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btChargeM.BorderSize = new System.Windows.Forms.Padding(0, 0, 1, 1); + this.btChargeM.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btChargeM.Cursor = System.Windows.Forms.Cursors.Hand; + this.btChargeM.Dock = System.Windows.Forms.DockStyle.Fill; + this.btChargeM.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.btChargeM.ForeColor = System.Drawing.Color.WhiteSmoke; + this.btChargeM.GradientEnable = true; + this.btChargeM.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btChargeM.GradientRepeatBG = false; + this.btChargeM.isButton = true; + this.btChargeM.Location = new System.Drawing.Point(116, 137); + this.btChargeM.Margin = new System.Windows.Forms.Padding(0); + this.btChargeM.MouseDownColor = System.Drawing.Color.Yellow; + this.btChargeM.MouseOverColor = System.Drawing.Color.Lime; + this.btChargeM.msg = null; + this.btChargeM.Name = "btChargeM"; + this.btChargeM.ProgressBorderColor = System.Drawing.Color.Black; + this.btChargeM.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btChargeM.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btChargeM.ProgressEnable = false; + this.btChargeM.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btChargeM.ProgressForeColor = System.Drawing.Color.Black; + this.btChargeM.ProgressMax = 100F; + this.btChargeM.ProgressMin = 0F; + this.btChargeM.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btChargeM.ProgressValue = 0F; + this.btChargeM.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btChargeM.Sign = ""; + this.btChargeM.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btChargeM.SignColor = System.Drawing.Color.Yellow; + this.btChargeM.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btChargeM.Size = new System.Drawing.Size(143, 137); + this.btChargeM.TabIndex = 141; + this.btChargeM.Text = "수동충전"; + this.btChargeM.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btChargeM.TextShadow = true; + this.btChargeM.TextVisible = true; + this.btChargeM.Click += new System.EventHandler(this.btChargeM_Click); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(5, 131); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(259, 5); + this.panel2.TabIndex = 139; + // + // panel4 + // + this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.panel4.Controls.Add(this.lbCntQA); + this.panel4.Controls.Add(this.arLabel4); + this.panel4.Controls.Add(this.lbCntQC); + this.panel4.Controls.Add(this.arLabel9); + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(5, 82); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(259, 49); + this.panel4.TabIndex = 145; + // + // lbCntQA + // + this.lbCntQA.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCntQA.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCntQA.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbCntQA.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbCntQA.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbCntQA.BorderSize = new System.Windows.Forms.Padding(0); + this.lbCntQA.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbCntQA.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbCntQA.Dock = System.Windows.Forms.DockStyle.Left; + this.lbCntQA.Font = new System.Drawing.Font("Consolas", 25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbCntQA.ForeColor = System.Drawing.Color.Gray; + this.lbCntQA.GradientEnable = true; + this.lbCntQA.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbCntQA.GradientRepeatBG = false; + this.lbCntQA.isButton = false; + this.lbCntQA.Location = new System.Drawing.Point(161, 0); + this.lbCntQA.Margin = new System.Windows.Forms.Padding(0); + this.lbCntQA.MouseDownColor = System.Drawing.Color.Yellow; + this.lbCntQA.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbCntQA.msg = null; + this.lbCntQA.Name = "lbCntQA"; + this.lbCntQA.ProgressBorderColor = System.Drawing.Color.Black; + this.lbCntQA.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbCntQA.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbCntQA.ProgressEnable = false; + this.lbCntQA.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbCntQA.ProgressForeColor = System.Drawing.Color.Black; + this.lbCntQA.ProgressMax = 100F; + this.lbCntQA.ProgressMin = 0F; + this.lbCntQA.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbCntQA.ProgressValue = 0F; + this.lbCntQA.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbCntQA.Sign = ""; + this.lbCntQA.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbCntQA.SignColor = System.Drawing.Color.Yellow; + this.lbCntQA.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbCntQA.Size = new System.Drawing.Size(93, 49); + this.lbCntQA.TabIndex = 6; + this.lbCntQA.Text = "0000"; + this.lbCntQA.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbCntQA.TextShadow = true; + this.lbCntQA.TextVisible = true; + // + // arLabel4 + // + this.arLabel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel4.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.arLabel4.BorderColorOver = System.Drawing.Color.DarkBlue; + this.arLabel4.BorderSize = new System.Windows.Forms.Padding(0); + this.arLabel4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel4.Cursor = System.Windows.Forms.Cursors.Arrow; + this.arLabel4.Dock = System.Windows.Forms.DockStyle.Left; + this.arLabel4.Font = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.arLabel4.GradientEnable = true; + this.arLabel4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel4.GradientRepeatBG = false; + this.arLabel4.isButton = false; + this.arLabel4.Location = new System.Drawing.Point(127, 0); + this.arLabel4.Margin = new System.Windows.Forms.Padding(0); + this.arLabel4.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel4.msg = null; + this.arLabel4.Name = "arLabel4"; + this.arLabel4.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel4.ProgressEnable = false; + this.arLabel4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel4.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel4.ProgressMax = 100F; + this.arLabel4.ProgressMin = 0F; + this.arLabel4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel4.ProgressValue = 0F; + this.arLabel4.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel4.Sign = ""; + this.arLabel4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel4.SignColor = System.Drawing.Color.Yellow; + this.arLabel4.SignFont = new System.Drawing.Font("Consolas", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)))); + this.arLabel4.Size = new System.Drawing.Size(34, 49); + this.arLabel4.TabIndex = 5; + this.arLabel4.Text = "QA"; + this.arLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel4.TextShadow = true; + this.arLabel4.TextVisible = true; + // + // lbCntQC + // + this.lbCntQC.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCntQC.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCntQC.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbCntQC.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbCntQC.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbCntQC.BorderSize = new System.Windows.Forms.Padding(0); + this.lbCntQC.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbCntQC.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbCntQC.Dock = System.Windows.Forms.DockStyle.Left; + this.lbCntQC.Font = new System.Drawing.Font("Consolas", 25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbCntQC.ForeColor = System.Drawing.Color.Gray; + this.lbCntQC.GradientEnable = true; + this.lbCntQC.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbCntQC.GradientRepeatBG = false; + this.lbCntQC.isButton = false; + this.lbCntQC.Location = new System.Drawing.Point(34, 0); + this.lbCntQC.Margin = new System.Windows.Forms.Padding(0); + this.lbCntQC.MouseDownColor = System.Drawing.Color.Yellow; + this.lbCntQC.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbCntQC.msg = null; + this.lbCntQC.Name = "lbCntQC"; + this.lbCntQC.ProgressBorderColor = System.Drawing.Color.Black; + this.lbCntQC.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbCntQC.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbCntQC.ProgressEnable = false; + this.lbCntQC.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbCntQC.ProgressForeColor = System.Drawing.Color.Black; + this.lbCntQC.ProgressMax = 100F; + this.lbCntQC.ProgressMin = 0F; + this.lbCntQC.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbCntQC.ProgressValue = 0F; + this.lbCntQC.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbCntQC.Sign = ""; + this.lbCntQC.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbCntQC.SignColor = System.Drawing.Color.Yellow; + this.lbCntQC.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbCntQC.Size = new System.Drawing.Size(93, 49); + this.lbCntQC.TabIndex = 4; + this.lbCntQC.Text = "0000"; + this.lbCntQC.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbCntQC.TextShadow = true; + this.lbCntQC.TextVisible = true; + // + // arLabel9 + // + this.arLabel9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel9.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel9.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel9.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.arLabel9.BorderColorOver = System.Drawing.Color.DarkBlue; + this.arLabel9.BorderSize = new System.Windows.Forms.Padding(0); + this.arLabel9.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel9.Cursor = System.Windows.Forms.Cursors.Arrow; + this.arLabel9.Dock = System.Windows.Forms.DockStyle.Left; + this.arLabel9.Font = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.arLabel9.GradientEnable = true; + this.arLabel9.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel9.GradientRepeatBG = false; + this.arLabel9.isButton = false; + this.arLabel9.Location = new System.Drawing.Point(0, 0); + this.arLabel9.Margin = new System.Windows.Forms.Padding(0); + this.arLabel9.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel9.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel9.msg = null; + this.arLabel9.Name = "arLabel9"; + this.arLabel9.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel9.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel9.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel9.ProgressEnable = false; + this.arLabel9.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel9.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel9.ProgressMax = 100F; + this.arLabel9.ProgressMin = 0F; + this.arLabel9.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel9.ProgressValue = 0F; + this.arLabel9.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel9.Sign = ""; + this.arLabel9.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel9.SignColor = System.Drawing.Color.Yellow; + this.arLabel9.SignFont = new System.Drawing.Font("Consolas", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)))); + this.arLabel9.Size = new System.Drawing.Size(34, 49); + this.arLabel9.TabIndex = 4; + this.arLabel9.Text = "QC"; + this.arLabel9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel9.TextShadow = true; + this.arLabel9.TextVisible = true; + // + // panel16 + // + this.panel16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.panel16.Controls.Add(this.lbCntDN); + this.panel16.Controls.Add(this.arLabel7); + this.panel16.Controls.Add(this.lbCNtUP); + this.panel16.Controls.Add(this.arLabel8); + this.panel16.Dock = System.Windows.Forms.DockStyle.Top; + this.panel16.Location = new System.Drawing.Point(5, 33); + this.panel16.Name = "panel16"; + this.panel16.Size = new System.Drawing.Size(259, 49); + this.panel16.TabIndex = 16; + // + // lbCntDN + // + this.lbCntDN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCntDN.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCntDN.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbCntDN.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbCntDN.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbCntDN.BorderSize = new System.Windows.Forms.Padding(0); + this.lbCntDN.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbCntDN.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbCntDN.Dock = System.Windows.Forms.DockStyle.Left; + this.lbCntDN.Font = new System.Drawing.Font("Consolas", 25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbCntDN.ForeColor = System.Drawing.Color.Gray; + this.lbCntDN.GradientEnable = true; + this.lbCntDN.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbCntDN.GradientRepeatBG = false; + this.lbCntDN.isButton = false; + this.lbCntDN.Location = new System.Drawing.Point(161, 0); + this.lbCntDN.Margin = new System.Windows.Forms.Padding(0); + this.lbCntDN.MouseDownColor = System.Drawing.Color.Yellow; + this.lbCntDN.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbCntDN.msg = null; + this.lbCntDN.Name = "lbCntDN"; + this.lbCntDN.ProgressBorderColor = System.Drawing.Color.Black; + this.lbCntDN.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbCntDN.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbCntDN.ProgressEnable = false; + this.lbCntDN.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbCntDN.ProgressForeColor = System.Drawing.Color.Black; + this.lbCntDN.ProgressMax = 100F; + this.lbCntDN.ProgressMin = 0F; + this.lbCntDN.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbCntDN.ProgressValue = 0F; + this.lbCntDN.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbCntDN.Sign = ""; + this.lbCntDN.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbCntDN.SignColor = System.Drawing.Color.Yellow; + this.lbCntDN.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbCntDN.Size = new System.Drawing.Size(93, 49); + this.lbCntDN.TabIndex = 4; + this.lbCntDN.Text = "0000"; + this.lbCntDN.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbCntDN.TextShadow = true; + this.lbCntDN.TextVisible = true; + this.lbCntDN.Click += new System.EventHandler(this.lbCNtUp_Click); + // + // arLabel7 + // + this.arLabel7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel7.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel7.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel7.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.arLabel7.BorderColorOver = System.Drawing.Color.DarkBlue; + this.arLabel7.BorderSize = new System.Windows.Forms.Padding(0); + this.arLabel7.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel7.Cursor = System.Windows.Forms.Cursors.Arrow; + this.arLabel7.Dock = System.Windows.Forms.DockStyle.Left; + this.arLabel7.Font = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.arLabel7.GradientEnable = true; + this.arLabel7.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel7.GradientRepeatBG = false; + this.arLabel7.isButton = false; + this.arLabel7.Location = new System.Drawing.Point(127, 0); + this.arLabel7.Margin = new System.Windows.Forms.Padding(0); + this.arLabel7.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel7.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel7.msg = null; + this.arLabel7.Name = "arLabel7"; + this.arLabel7.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel7.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel7.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel7.ProgressEnable = false; + this.arLabel7.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel7.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel7.ProgressMax = 100F; + this.arLabel7.ProgressMin = 0F; + this.arLabel7.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel7.ProgressValue = 0F; + this.arLabel7.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel7.Sign = ""; + this.arLabel7.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel7.SignColor = System.Drawing.Color.Yellow; + this.arLabel7.SignFont = new System.Drawing.Font("Consolas", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)))); + this.arLabel7.Size = new System.Drawing.Size(34, 49); + this.arLabel7.TabIndex = 4; + this.arLabel7.Text = "DN"; + this.arLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel7.TextShadow = true; + this.arLabel7.TextVisible = true; + // + // lbCNtUP + // + this.lbCNtUP.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCNtUP.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbCNtUP.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbCNtUP.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbCNtUP.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbCNtUP.BorderSize = new System.Windows.Forms.Padding(0); + this.lbCNtUP.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbCNtUP.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbCNtUP.Dock = System.Windows.Forms.DockStyle.Left; + this.lbCNtUP.Font = new System.Drawing.Font("Consolas", 25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbCNtUP.ForeColor = System.Drawing.Color.Gray; + this.lbCNtUP.GradientEnable = true; + this.lbCNtUP.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbCNtUP.GradientRepeatBG = false; + this.lbCNtUP.isButton = false; + this.lbCNtUP.Location = new System.Drawing.Point(34, 0); + this.lbCNtUP.Margin = new System.Windows.Forms.Padding(0); + this.lbCNtUP.MouseDownColor = System.Drawing.Color.Yellow; + this.lbCNtUP.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbCNtUP.msg = null; + this.lbCNtUP.Name = "lbCNtUP"; + this.lbCNtUP.ProgressBorderColor = System.Drawing.Color.Black; + this.lbCNtUP.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbCNtUP.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbCNtUP.ProgressEnable = false; + this.lbCNtUP.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbCNtUP.ProgressForeColor = System.Drawing.Color.Black; + this.lbCNtUP.ProgressMax = 100F; + this.lbCNtUP.ProgressMin = 0F; + this.lbCNtUP.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbCNtUP.ProgressValue = 0F; + this.lbCNtUP.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbCNtUP.Sign = ""; + this.lbCNtUP.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbCNtUP.SignColor = System.Drawing.Color.Yellow; + this.lbCNtUP.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbCNtUP.Size = new System.Drawing.Size(93, 49); + this.lbCNtUP.TabIndex = 4; + this.lbCNtUP.Text = "0000"; + this.lbCNtUP.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbCNtUP.TextShadow = true; + this.lbCNtUP.TextVisible = true; + this.lbCNtUP.Click += new System.EventHandler(this.lbCNtUp_Click); + // + // arLabel8 + // + this.arLabel8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel8.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.arLabel8.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.arLabel8.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.arLabel8.BorderColorOver = System.Drawing.Color.DarkBlue; + this.arLabel8.BorderSize = new System.Windows.Forms.Padding(0); + this.arLabel8.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.arLabel8.Cursor = System.Windows.Forms.Cursors.Arrow; + this.arLabel8.Dock = System.Windows.Forms.DockStyle.Left; + this.arLabel8.Font = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.arLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); + this.arLabel8.GradientEnable = true; + this.arLabel8.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.arLabel8.GradientRepeatBG = false; + this.arLabel8.isButton = false; + this.arLabel8.Location = new System.Drawing.Point(0, 0); + this.arLabel8.Margin = new System.Windows.Forms.Padding(0); + this.arLabel8.MouseDownColor = System.Drawing.Color.Yellow; + this.arLabel8.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.arLabel8.msg = null; + this.arLabel8.Name = "arLabel8"; + this.arLabel8.ProgressBorderColor = System.Drawing.Color.Black; + this.arLabel8.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arLabel8.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arLabel8.ProgressEnable = false; + this.arLabel8.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.arLabel8.ProgressForeColor = System.Drawing.Color.Black; + this.arLabel8.ProgressMax = 100F; + this.arLabel8.ProgressMin = 0F; + this.arLabel8.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arLabel8.ProgressValue = 0F; + this.arLabel8.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arLabel8.Sign = ""; + this.arLabel8.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.arLabel8.SignColor = System.Drawing.Color.Yellow; + this.arLabel8.SignFont = new System.Drawing.Font("Consolas", 15F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic)))); + this.arLabel8.Size = new System.Drawing.Size(34, 49); + this.arLabel8.TabIndex = 4; + this.arLabel8.Text = "UP"; + this.arLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.arLabel8.TextShadow = true; + this.arLabel8.TextVisible = true; + // + // panel5 + // + this.panel5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + this.panel5.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel5.Location = new System.Drawing.Point(5, 549); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(259, 5); + this.panel5.TabIndex = 142; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(5, 28); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(259, 5); + this.panel3.TabIndex = 144; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.panel1.Controls.Add(this.lbIDLE); + this.panel1.Controls.Add(this.lbStStep); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(5, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(259, 28); + this.panel1.TabIndex = 143; + // + // lbIDLE + // + this.lbIDLE.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbIDLE.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbIDLE.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbIDLE.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbIDLE.BorderColorOver = System.Drawing.Color.DodgerBlue; + this.lbIDLE.BorderSize = new System.Windows.Forms.Padding(0); + this.lbIDLE.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbIDLE.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbIDLE.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbIDLE.Font = new System.Drawing.Font("맑은 고딕", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbIDLE.ForeColor = System.Drawing.Color.Gold; + this.lbIDLE.GradientEnable = true; + this.lbIDLE.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbIDLE.GradientRepeatBG = false; + this.lbIDLE.isButton = false; + this.lbIDLE.Location = new System.Drawing.Point(70, 0); + this.lbIDLE.Margin = new System.Windows.Forms.Padding(0); + this.lbIDLE.MouseDownColor = System.Drawing.Color.Yellow; + this.lbIDLE.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbIDLE.msg = null; + this.lbIDLE.Name = "lbIDLE"; + this.lbIDLE.ProgressBorderColor = System.Drawing.Color.Black; + this.lbIDLE.ProgressColor1 = System.Drawing.Color.DarkCyan; + this.lbIDLE.ProgressColor2 = System.Drawing.Color.DarkTurquoise; + this.lbIDLE.ProgressEnable = true; + this.lbIDLE.ProgressFont = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbIDLE.ProgressForeColor = System.Drawing.Color.DimGray; + this.lbIDLE.ProgressMax = 100F; + this.lbIDLE.ProgressMin = 0F; + this.lbIDLE.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbIDLE.ProgressValue = 50F; + this.lbIDLE.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbIDLE.Sign = ""; + this.lbIDLE.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbIDLE.SignColor = System.Drawing.Color.Yellow; + this.lbIDLE.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbIDLE.Size = new System.Drawing.Size(189, 28); + this.lbIDLE.TabIndex = 4; + this.lbIDLE.Text = "75%"; + this.lbIDLE.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbIDLE.TextShadow = true; + this.lbIDLE.TextVisible = true; + // + // lbStStep + // + this.lbStStep.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbStStep.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.lbStStep.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.lbStStep.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.lbStStep.BorderColorOver = System.Drawing.Color.DarkBlue; + this.lbStStep.BorderSize = new System.Windows.Forms.Padding(0); + this.lbStStep.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.lbStStep.Cursor = System.Windows.Forms.Cursors.Arrow; + this.lbStStep.Dock = System.Windows.Forms.DockStyle.Left; + this.lbStStep.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbStStep.ForeColor = System.Drawing.Color.White; + this.lbStStep.GradientEnable = true; + this.lbStStep.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.lbStStep.GradientRepeatBG = false; + this.lbStStep.isButton = false; + this.lbStStep.Location = new System.Drawing.Point(0, 0); + this.lbStStep.Margin = new System.Windows.Forms.Padding(0); + this.lbStStep.MouseDownColor = System.Drawing.Color.Yellow; + this.lbStStep.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.lbStStep.msg = null; + this.lbStStep.Name = "lbStStep"; + this.lbStStep.ProgressBorderColor = System.Drawing.Color.Black; + this.lbStStep.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.lbStStep.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.lbStStep.ProgressEnable = false; + this.lbStStep.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.lbStStep.ProgressForeColor = System.Drawing.Color.Black; + this.lbStStep.ProgressMax = 100F; + this.lbStStep.ProgressMin = 0F; + this.lbStStep.ProgressPadding = new System.Windows.Forms.Padding(0); + this.lbStStep.ProgressValue = 0F; + this.lbStStep.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.lbStStep.Sign = ""; + this.lbStStep.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.lbStStep.SignColor = System.Drawing.Color.Yellow; + this.lbStStep.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.lbStStep.Size = new System.Drawing.Size(70, 28); + this.lbStStep.TabIndex = 4; + this.lbStStep.Text = "--"; + this.lbStStep.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbStStep.TextShadow = true; + this.lbStStep.TextVisible = true; + // + // panTopMenu + // + this.panTopMenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.panTopMenu.Controls.Add(this.lbBat); + this.panTopMenu.Controls.Add(this.MenuLog); + this.panTopMenu.Controls.Add(this.MenuFlag); + this.panTopMenu.Controls.Add(this.MenuBMS); + this.panTopMenu.Controls.Add(this.MenuAGV); + this.panTopMenu.Controls.Add(this.btDebug); + this.panTopMenu.Controls.Add(this.btOpenDir); + this.panTopMenu.Controls.Add(this.btMReset); + this.panTopMenu.Controls.Add(this.btCapture); + this.panTopMenu.Controls.Add(this.arLabel3); + this.panTopMenu.Controls.Add(this.MenuLift); + this.panTopMenu.Controls.Add(this.MenuMAN); + this.panTopMenu.Controls.Add(this.MenuAuto); + this.panTopMenu.Controls.Add(this.pictureBox1); + this.panTopMenu.Controls.Add(this.arLabel2); + this.panTopMenu.Controls.Add(this.arLabel5); + this.panTopMenu.Controls.Add(this.btClose); + this.panTopMenu.Dock = System.Windows.Forms.DockStyle.Top; + this.panTopMenu.Location = new System.Drawing.Point(1, 1); + this.panTopMenu.Name = "panTopMenu"; + this.panTopMenu.Size = new System.Drawing.Size(1278, 50); + this.panTopMenu.TabIndex = 134; + // + // lbBat + // + this.lbBat.BorderColor = System.Drawing.Color.DimGray; + this.lbBat.CurA = 0F; + this.lbBat.Dock = System.Windows.Forms.DockStyle.Right; + this.lbBat.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbBat.ForeColor = System.Drawing.Color.Gray; + this.lbBat.IsOpen = true; + this.lbBat.Location = new System.Drawing.Point(830, 0); + this.lbBat.MaxA = 0F; + this.lbBat.Name = "lbBat"; + this.lbBat.Padding = new System.Windows.Forms.Padding(0, 12, 0, 12); + this.lbBat.sign = "%"; + this.lbBat.Size = new System.Drawing.Size(48, 50); + this.lbBat.TabIndex = 23; + this.lbBat.Text = "12"; + this.lbBat.VLevel = 50F; + this.lbBat.Volt = 0F; + this.lbBat.Click += new System.EventHandler(this.lbBat_Click); + // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(49, 50); + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); + // + // cmDebug + // + this.cmDebug.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.systemParameterToolStripMenuItem, + this.toolStripMenuItem4, + this.demoRunToolStripMenuItem, + this.setZValidToolStripMenuItem, + this.toolStripMenuItem1, + this.gridviewTestToolStripMenuItem, + this.으ㅆㄷㄴㅅToolStripMenuItem, + this.messageToolStripMenuItem, + this.reloadLotListToolStripMenuItem, + this.moveSourceListToDestListToolStripMenuItem, + this.needShowUploadTrueToolStripMenuItem, + this.선택상태보기ToolStripMenuItem, + this.toolStripMenuItem5, + this.demoListLotToolStripMenuItem, + this.refreshListToolStripMenuItem}); + this.cmDebug.Name = "cmVision"; + this.cmDebug.Size = new System.Drawing.Size(229, 302); + // + // toolStripMenuItem5 + // + this.toolStripMenuItem5.Name = "toolStripMenuItem5"; + this.toolStripMenuItem5.Size = new System.Drawing.Size(228, 22); + this.toolStripMenuItem5.Text = "--"; + // + // demoListLotToolStripMenuItem + // + this.demoListLotToolStripMenuItem.Name = "demoListLotToolStripMenuItem"; + this.demoListLotToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.demoListLotToolStripMenuItem.Text = "demo List (Lot)"; + // + // refreshListToolStripMenuItem + // + this.refreshListToolStripMenuItem.Name = "refreshListToolStripMenuItem"; + this.refreshListToolStripMenuItem.Size = new System.Drawing.Size(228, 22); + this.refreshListToolStripMenuItem.Text = "Refresh List"; + // + // debugtestToolStripMenuItem + // + this.debugtestToolStripMenuItem.Name = "debugtestToolStripMenuItem"; + this.debugtestToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.debugtestToolStripMenuItem.Text = "debugtest"; + // + // pandBottomDIO + // + this.pandBottomDIO.Controls.Add(this.panel9); + this.pandBottomDIO.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pandBottomDIO.Location = new System.Drawing.Point(1, 725); + this.pandBottomDIO.Margin = new System.Windows.Forms.Padding(0); + this.pandBottomDIO.Name = "pandBottomDIO"; + this.pandBottomDIO.Size = new System.Drawing.Size(1278, 55); + this.pandBottomDIO.TabIndex = 136; + // + // panel9 + // + this.panel9.Controls.Add(this.IOState); + this.panel9.Controls.Add(this.SSInfo); + this.panel9.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel9.Location = new System.Drawing.Point(0, 0); + this.panel9.Margin = new System.Windows.Forms.Padding(0); + this.panel9.Name = "panel9"; + this.panel9.Size = new System.Drawing.Size(1278, 55); + this.panel9.TabIndex = 0; + // + // IOState + // + this.IOState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50))))); + this.IOState.BorderSize = 0; + colorListItem1.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem1.Remark = ""; + colorListItem2.BackColor1 = System.Drawing.Color.ForestGreen; + colorListItem2.BackColor2 = System.Drawing.Color.ForestGreen; + colorListItem2.Remark = ""; + colorListItem3.BackColor1 = System.Drawing.Color.Firebrick; + colorListItem3.BackColor2 = System.Drawing.Color.Firebrick; + colorListItem3.Remark = ""; + colorListItem4.BackColor1 = System.Drawing.Color.Purple; + colorListItem4.BackColor2 = System.Drawing.Color.Purple; + colorListItem4.Remark = ""; + colorListItem5.BackColor1 = System.Drawing.Color.SteelBlue; + colorListItem5.BackColor2 = System.Drawing.Color.SteelBlue; + colorListItem5.Remark = ""; + colorListItem6.BackColor1 = System.Drawing.Color.DarkGoldenrod; + colorListItem6.BackColor2 = System.Drawing.Color.DarkGoldenrod; + colorListItem6.Remark = ""; + colorListItem7.BackColor1 = System.Drawing.Color.Teal; + colorListItem7.BackColor2 = System.Drawing.Color.Teal; + colorListItem7.Remark = ""; + this.IOState.ColorList = new arFrame.Control.ColorListItem[] { + colorListItem1, + colorListItem2, + colorListItem3, + colorListItem4, + colorListItem5, + colorListItem6, + colorListItem7}; + this.IOState.Dock = System.Windows.Forms.DockStyle.Fill; + this.IOState.Font = new System.Drawing.Font("Consolas", 20F, System.Drawing.FontStyle.Bold); + this.IOState.FontPin = new System.Drawing.Font("Consolas", 8F, System.Drawing.FontStyle.Bold); + this.IOState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.IOState.ForeColorPin = System.Drawing.Color.WhiteSmoke; + this.IOState.Location = new System.Drawing.Point(0, 0); + this.IOState.MatrixSize = new System.Drawing.Point(11, 1); + this.IOState.MenuBorderSize = 1; + this.IOState.MenuGap = 5; + this.IOState.MinimumSize = new System.Drawing.Size(100, 0); + this.IOState.Name = "IOState"; + this.IOState.Names = new string[] { + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ""}; + this.IOState.ShadowColor = System.Drawing.Color.Transparent; + this.IOState.showDebugInfo = false; + this.IOState.ShowIndexString = false; + this.IOState.Size = new System.Drawing.Size(1151, 55); + this.IOState.TabIndex = 6; + this.IOState.Tags = null; + this.IOState.Text = "gridView2"; + this.IOState.TextAttachToImage = true; + this.IOState.Titles = new string[] { + "EMG|TAG|DIR|STS|SPD|SEN|CAL|RUN|MARK|CHG|ITM"}; + this.IOState.Values = new ushort[] { + ((ushort)(0)), + ((ushort)(1)), + ((ushort)(2)), + ((ushort)(3)), + ((ushort)(4)), + ((ushort)(5)), + ((ushort)(6)), + ((ushort)(7)), + ((ushort)(8)), + ((ushort)(8)), + ((ushort)(8))}; + this.IOState.ItemClick += new System.EventHandler(this.IOState_ItemClick_1); + // + // SSInfo + // + this.SSInfo.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50))))); + this.SSInfo.BorderSize = 0; + colorListItem8.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem8.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + colorListItem8.Remark = ""; + colorListItem9.BackColor1 = System.Drawing.Color.Lime; + colorListItem9.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + colorListItem9.Remark = ""; + colorListItem10.BackColor1 = System.Drawing.Color.Red; + colorListItem10.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + colorListItem10.Remark = ""; + colorListItem11.BackColor1 = System.Drawing.Color.DarkViolet; + colorListItem11.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + colorListItem11.Remark = ""; + this.SSInfo.ColorList = new arFrame.Control.ColorListItem[] { + colorListItem8, + colorListItem9, + colorListItem10, + colorListItem11}; + this.SSInfo.Dock = System.Windows.Forms.DockStyle.Right; + this.SSInfo.Font = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Bold); + this.SSInfo.FontPin = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Bold); + this.SSInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.SSInfo.ForeColorPin = System.Drawing.Color.WhiteSmoke; + this.SSInfo.Location = new System.Drawing.Point(1151, 0); + this.SSInfo.MatrixSize = new System.Drawing.Point(2, 2); + this.SSInfo.MenuBorderSize = 1; + this.SSInfo.MenuGap = 5; + this.SSInfo.MinimumSize = new System.Drawing.Size(100, 0); + this.SSInfo.Name = "SSInfo"; + this.SSInfo.Names = new string[] { + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ""}; + this.SSInfo.ShadowColor = System.Drawing.Color.Transparent; + this.SSInfo.showDebugInfo = false; + this.SSInfo.ShowIndexString = false; + this.SSInfo.Size = new System.Drawing.Size(127, 55); + this.SSInfo.TabIndex = 10; + this.SSInfo.Tags = null; + this.SSInfo.Text = "gridView3"; + this.SSInfo.TextAttachToImage = true; + this.SSInfo.Titles = new string[] { + "STEPINFO|FREESPACE", + "INFO1|INFO2"}; + this.SSInfo.Values = new ushort[] { + ((ushort)(0)), + ((ushort)(0)), + ((ushort)(0)), + ((ushort)(0))}; + this.SSInfo.Click += new System.EventHandler(this.SSInfo_Click); + // + // panDlg + // + this.panDlg.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(64))))); + this.panDlg.Dock = System.Windows.Forms.DockStyle.Fill; + this.panDlg.Location = new System.Drawing.Point(1, 146); + this.panDlg.Margin = new System.Windows.Forms.Padding(0); + this.panDlg.Name = "panDlg"; + this.panDlg.Size = new System.Drawing.Size(1014, 579); + this.panDlg.TabIndex = 146; + // + // arPanel2 + // + this.arPanel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5))))); + this.arPanel2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arPanel2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25))))); + this.arPanel2.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 5); + this.arPanel2.Dock = System.Windows.Forms.DockStyle.Top; + this.arPanel2.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Italic); + this.arPanel2.ForeColor = System.Drawing.Color.Khaki; + this.arPanel2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arPanel2.GradientRepeatBG = false; + this.arPanel2.Location = new System.Drawing.Point(1, 143); + this.arPanel2.Name = "arPanel2"; + this.arPanel2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arPanel2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arPanel2.ProgressMax = 100F; + this.arPanel2.ProgressMin = 0F; + this.arPanel2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arPanel2.ProgressValue = 0F; + this.arPanel2.ShadowColor = System.Drawing.Color.Black; + this.arPanel2.ShowBorder = true; + this.arPanel2.Size = new System.Drawing.Size(1278, 3); + this.arPanel2.TabIndex = 145; + this.arPanel2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.arPanel2.TextShadow = false; + this.arPanel2.UseProgressBar = false; + // + // arPanel1 + // + this.arPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(5)))), ((int)(((byte)(5))))); + this.arPanel1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.arPanel1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25))))); + this.arPanel1.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 5); + this.arPanel1.Dock = System.Windows.Forms.DockStyle.Top; + this.arPanel1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Italic); + this.arPanel1.ForeColor = System.Drawing.Color.Khaki; + this.arPanel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.arPanel1.GradientRepeatBG = false; + this.arPanel1.Location = new System.Drawing.Point(1, 51); + this.arPanel1.Name = "arPanel1"; + this.arPanel1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.arPanel1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.arPanel1.ProgressMax = 100F; + this.arPanel1.ProgressMin = 0F; + this.arPanel1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.arPanel1.ProgressValue = 0F; + this.arPanel1.ShadowColor = System.Drawing.Color.Black; + this.arPanel1.ShowBorder = true; + this.arPanel1.Size = new System.Drawing.Size(1278, 4); + this.arPanel1.TabIndex = 135; + this.arPanel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.arPanel1.TextShadow = false; + this.arPanel1.UseProgressBar = false; + // + // ctlPos1 + // + this.ctlPos1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); + this.ctlPos1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.ctlPos1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.ctlPos1.Dock = System.Windows.Forms.DockStyle.Top; + this.ctlPos1.Font = new System.Drawing.Font("맑은 고딕", 30F, System.Drawing.FontStyle.Bold); + this.ctlPos1.ForeColor = System.Drawing.Color.White; + this.ctlPos1.ItemGap = 5; + item1.Active = true; + item1.Direction = '1'; + item1.Enable_Direction = true; + item1.Focus = false; + item1.fullrect = new System.Drawing.Rectangle(8, 8, 10, 75); + item1.ItemType = Project.CtlPos.itemtype.NLimit; + item1.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item1.Position = Project.ePosition.NOT; + item1.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item1.Target = false; + item1.Title = "N"; + item2.Active = false; + item2.Direction = '1'; + item2.Enable_Direction = true; + item2.Focus = false; + item2.fullrect = new System.Drawing.Rectangle(23, 8, 138, 58); + item2.ItemType = Project.CtlPos.itemtype.Item; + item2.leftrect = new System.Drawing.Rectangle(23, 70, 67, 13); + item2.Position = Project.ePosition.QA; + item2.rightrect = new System.Drawing.Rectangle(94, 70, 67, 13); + item2.Target = false; + item2.Title = "QC"; + item3.Active = false; + item3.Direction = '0'; + item3.Enable_Direction = true; + item3.Focus = false; + item3.fullrect = new System.Drawing.Rectangle(166, 8, 10, 75); + item3.ItemType = Project.CtlPos.itemtype.Spacer; + item3.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item3.Position = Project.ePosition.QA_QC; + item3.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item3.Target = false; + item3.Title = null; + item4.Active = false; + item4.Direction = '1'; + item4.Enable_Direction = true; + item4.Focus = false; + item4.fullrect = new System.Drawing.Rectangle(181, 8, 138, 58); + item4.ItemType = Project.CtlPos.itemtype.Item; + item4.leftrect = new System.Drawing.Rectangle(181, 70, 67, 13); + item4.Position = Project.ePosition.QC; + item4.rightrect = new System.Drawing.Rectangle(252, 70, 67, 13); + item4.Target = true; + item4.Title = "QA"; + item5.Active = true; + item5.Direction = '0'; + item5.Enable_Direction = false; + item5.Focus = true; + item5.fullrect = new System.Drawing.Rectangle(324, 8, 138, 75); + item5.ItemType = Project.CtlPos.itemtype.Item; + item5.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item5.Position = Project.ePosition.CHARGE; + item5.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item5.Target = false; + item5.Title = "BAT"; + item6.Active = false; + item6.Direction = '0'; + item6.Enable_Direction = true; + item6.Focus = false; + item6.fullrect = new System.Drawing.Rectangle(467, 8, 10, 75); + item6.ItemType = Project.CtlPos.itemtype.Spacer; + item6.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item6.Position = Project.ePosition.QC_F1; + item6.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item6.Target = false; + item6.Title = null; + item7.Active = false; + item7.Direction = '2'; + item7.Enable_Direction = true; + item7.Focus = false; + item7.fullrect = new System.Drawing.Rectangle(482, 8, 138, 58); + item7.ItemType = Project.CtlPos.itemtype.Item; + item7.leftrect = new System.Drawing.Rectangle(482, 70, 67, 13); + item7.Position = Project.ePosition.F1; + item7.rightrect = new System.Drawing.Rectangle(553, 70, 67, 13); + item7.Target = false; + item7.Title = "#1"; + item8.Active = false; + item8.Direction = '0'; + item8.Enable_Direction = true; + item8.Focus = false; + item8.fullrect = new System.Drawing.Rectangle(625, 8, 10, 75); + item8.ItemType = Project.CtlPos.itemtype.Spacer; + item8.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item8.Position = Project.ePosition.F1_F2; + item8.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item8.Target = false; + item8.Title = null; + item9.Active = false; + item9.Direction = '0'; + item9.Enable_Direction = true; + item9.Focus = false; + item9.fullrect = new System.Drawing.Rectangle(640, 8, 138, 58); + item9.ItemType = Project.CtlPos.itemtype.Item; + item9.leftrect = new System.Drawing.Rectangle(640, 70, 67, 13); + item9.Position = Project.ePosition.F2; + item9.rightrect = new System.Drawing.Rectangle(711, 70, 67, 13); + item9.Target = false; + item9.Title = "#2"; + item10.Active = false; + item10.Direction = '0'; + item10.Enable_Direction = true; + item10.Focus = false; + item10.fullrect = new System.Drawing.Rectangle(783, 8, 10, 75); + item10.ItemType = Project.CtlPos.itemtype.Spacer; + item10.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item10.Position = Project.ePosition.F2_F3; + item10.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item10.Target = false; + item10.Title = null; + item11.Active = false; + item11.Direction = '1'; + item11.Enable_Direction = true; + item11.Focus = false; + item11.fullrect = new System.Drawing.Rectangle(798, 8, 138, 58); + item11.ItemType = Project.CtlPos.itemtype.Item; + item11.leftrect = new System.Drawing.Rectangle(798, 70, 67, 13); + item11.Position = Project.ePosition.F3; + item11.rightrect = new System.Drawing.Rectangle(869, 70, 67, 13); + item11.Target = false; + item11.Title = "#3"; + item12.Active = false; + item12.Direction = '0'; + item12.Enable_Direction = true; + item12.Focus = false; + item12.fullrect = new System.Drawing.Rectangle(941, 8, 10, 75); + item12.ItemType = Project.CtlPos.itemtype.Spacer; + item12.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item12.Position = Project.ePosition.F3_F4; + item12.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item12.Target = false; + item12.Title = null; + item13.Active = false; + item13.Direction = '2'; + item13.Enable_Direction = true; + item13.Focus = false; + item13.fullrect = new System.Drawing.Rectangle(956, 8, 138, 58); + item13.ItemType = Project.CtlPos.itemtype.Item; + item13.leftrect = new System.Drawing.Rectangle(956, 70, 67, 13); + item13.Position = Project.ePosition.F4; + item13.rightrect = new System.Drawing.Rectangle(1027, 70, 67, 13); + item13.Target = false; + item13.Title = "#4"; + item14.Active = false; + item14.Direction = '0'; + item14.Enable_Direction = true; + item14.Focus = false; + item14.fullrect = new System.Drawing.Rectangle(1099, 8, 10, 75); + item14.ItemType = Project.CtlPos.itemtype.Spacer; + item14.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item14.Position = Project.ePosition.F4_F5; + item14.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item14.Target = false; + item14.Title = null; + item15.Active = false; + item15.Direction = '2'; + item15.Enable_Direction = true; + item15.Focus = false; + item15.fullrect = new System.Drawing.Rectangle(1114, 8, 138, 58); + item15.ItemType = Project.CtlPos.itemtype.Item; + item15.leftrect = new System.Drawing.Rectangle(1114, 70, 67, 13); + item15.Position = Project.ePosition.F5; + item15.rightrect = new System.Drawing.Rectangle(1185, 70, 67, 13); + item15.Target = false; + item15.Title = "#5"; + item16.Active = true; + item16.Direction = '1'; + item16.Enable_Direction = true; + item16.Focus = false; + item16.fullrect = new System.Drawing.Rectangle(1257, 8, 10, 75); + item16.ItemType = Project.CtlPos.itemtype.PLimit; + item16.leftrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item16.Position = Project.ePosition.POT; + item16.rightrect = new System.Drawing.Rectangle(0, 0, 0, 0); + item16.Target = false; + item16.Title = "P"; + this.ctlPos1.Items = new Project.CtlPos.item[] { + item1, + item2, + item3, + item4, + item5, + item6, + item7, + item8, + item9, + item10, + item11, + item12, + item13, + item14, + item15, + item16}; + this.ctlPos1.Location = new System.Drawing.Point(1, 55); + this.ctlPos1.MinimumSize = new System.Drawing.Size(100, 30); + this.ctlPos1.msg = null; + this.ctlPos1.Name = "ctlPos1"; + this.ctlPos1.Padding = new System.Windows.Forms.Padding(8); + this.ctlPos1.Size = new System.Drawing.Size(1278, 88); + this.ctlPos1.TabIndex = 0; + this.ctlPos1.Text = "ctlPos1"; + // + // fMain + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.ClientSize = new System.Drawing.Size(1280, 781); + this.Controls.Add(this.panDlg); + this.Controls.Add(this.panRight); + this.Controls.Add(this.arPanel2); + this.Controls.Add(this.pandBottomDIO); + this.Controls.Add(this.ctlPos1); + this.Controls.Add(this.arPanel1); + this.Controls.Add(this.panTopMenu); + this.DoubleBuffered = true; + this.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.Name = "fMain"; + this.Padding = new System.Windows.Forms.Padding(1); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.@__Load); + this.panRight.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel16.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panTopMenu.ResumeLayout(false); + this.panTopMenu.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.cmDebug.ResumeLayout(false); + this.pandBottomDIO.ResumeLayout(false); + this.panel9.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Timer tmDisplay; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.ToolStripMenuItem systemParameterToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem demoRunToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem setZValidToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem gridviewTestToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem 으ㅆㄷㄴㅅToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem messageToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem errorToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem informationToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem attentionToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem reloadLotListToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveSourceListToDestListToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem needShowUploadTrueToolStripMenuItem; + private System.Windows.Forms.DataGridViewTextBoxColumn idxDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn stripIdDataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn oKDataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn nGDataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn mISSDataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn fileMapDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn dataPathDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn mapOriginDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn mapArrayDataGridViewTextBoxColumn; + private System.Windows.Forms.Panel panRight; + private System.Windows.Forms.ToolStripMenuItem 선택상태보기ToolStripMenuItem; + private System.Windows.Forms.Panel panTopMenu; + private arCtl.arLabel btDebug; + private arCtl.arLabel btOpenDir; + private arCtl.arLabel btMReset; + private arCtl.arLabel btCapture; + private arCtl.arLabel arLabel3; + private arCtl.arLabel arLabel5; + private arCtl.arLabel btClose; + private System.Windows.Forms.Button MenuLift; + private System.Windows.Forms.Button MenuMAN; + private System.Windows.Forms.PictureBox pictureBox1; + private arCtl.arPanel arPanel1; + private System.Windows.Forms.ContextMenuStrip cmDebug; + private System.Windows.Forms.ToolStripMenuItem debugtestToolStripMenuItem; + private System.Windows.Forms.Panel pandBottomDIO; + private System.Windows.Forms.Panel panel9; + private arFrame.Control.GridView IOState; + private System.Windows.Forms.Panel panel16; + private arCtl.arLabel lbCntDN; + private arCtl.arLabel arLabel7; + private arCtl.arLabel lbCNtUP; + private arCtl.arLabel arLabel8; + private arCtl.arLabel lbTime; + private arFrame.Control.GridView SSInfo; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem demoListLotToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem refreshListToolStripMenuItem; + private arCtl.arLabel btChargeA; + private System.Windows.Forms.Panel panel5; + private arCtl.arPanel arPanel2; + private System.Windows.Forms.Button MenuFlag; + private System.Windows.Forms.Button MenuAuto; + private System.Windows.Forms.Panel panDlg; + private System.Windows.Forms.Button MenuLog; + private CtlPos ctlPos1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private arCtl.arLabel btHome; + private arCtl.arLabel arLabel2; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Panel panel1; + private arCtl.arLabel lbIDLE; + private arCtl.arLabel lbStStep; + private arCtl.arLabel btAutoRun; + private System.Windows.Forms.Button MenuBMS; + private System.Windows.Forms.Button MenuAGV; + private AGVControl.BatteryLevelGauge lbBat; + private arCtl.arLabel btChargeM; + private System.Windows.Forms.Panel panel4; + private arCtl.arLabel lbCntQA; + private arCtl.arLabel arLabel4; + private arCtl.arLabel lbCntQC; + private arCtl.arLabel arLabel9; + } +} + diff --git a/Cs_HMI/Project/fMain.cs b/Cs_HMI/Project/fMain.cs new file mode 100644 index 0000000..c0249be --- /dev/null +++ b/Cs_HMI/Project/fMain.cs @@ -0,0 +1,1029 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Runtime.InteropServices; +using static Project.StateMachine; +using Microsoft.Speech.Synthesis; +using Microsoft.Speech; +using COMM; +using System.CodeDom; + +namespace Project +{ + public partial class fMain : Form + { + double freeSpaceRate = 0.0; + + //뷰어용화면 + ViewForm.fAuto form_auto = null; + ViewForm.fManual form_manu = null; + ViewForm.fIO form_zlift = null; + ViewForm.fFlag form_flag = null; + ViewForm.fAgv form_agv = null; + ViewForm.fBms form_bms = null; + + readonly usbdetect.DriveDetector usbdet; + public fMain() + { + InitializeComponent(); + COMM.VAR.Init(128); + PUB.initCore(); + this.KeyDown += (s1, e1) => + { + if (e1.KeyCode == Keys.Escape) this.Close(); + else if (e1.KeyCode == Keys.F1 && e1.Control && e1.Shift) + { + + } + else if (e1.KeyCode == Keys.F5) btAutoRun.PerformClick(); + else if (e1.KeyCode == Keys.F9) btAutoRun.PerformClick(); + + if (DateTime.Now > PUB.LastInputTime) PUB.LastInputTime = DateTime.Now; + }; + usbdet = new usbdetect.DriveDetector(this); + usbdet.DeviceArrived += Usbdet_DeviceArrived; + usbdet.DeviceRemoved += Usbdet_DeviceRemoved; + + this.panTopMenu.MouseMove += LbTitle_MouseMove; + this.panTopMenu.MouseUp += LbTitle_MouseUp; + this.panTopMenu.MouseDown += LbTitle_MouseDown; + this.panTopMenu.DoubleClick += LbTitle_DoubleClick; + + this.ctlPos1.ItemClick += CtlPos1_ItemClick; + this.MouseMove += (s1, e1) => { if (DateTime.Now > PUB.LastInputTime) PUB.LastInputTime = DateTime.Now; }; + this.FormClosing += __Closing; + + if (PUB.setting.FullScreen) this.WindowState = FormWindowState.Maximized; + } + + protected override void WndProc(ref Message m) + { + base.WndProc(ref m); + if (usbdet != null) + { + usbdet.WndProc(ref m); + } + } + + private void Usbdet_DeviceRemoved(object sender, usbdetect.DriveDetectorEventArgs e) + { + //throw new NotImplementedException(); + Console.WriteLine(e.Drive); + } + + private void Usbdet_DeviceArrived(object sender, usbdetect.DriveDetectorEventArgs e) + { + //throw new NotImplementedException(); + using (var fUpdate = new Dialog.fUpdateForm(e.Drive)) + if (fUpdate.ShowDialog() == DialogResult.Yes) + { + //종료한다 + remoteClose = true; + this.Close(); + } + } + + /// + /// 상단 위치 표시기의 대상 위치값을 표시 합니다 + /// + /// + /// + private void Display_Position_TargetPosSet(object sender, EventArgs e) + { + //대상위치가 설정되었다x + this.ctlPos1.SetTargetPosition(PUB.Result.TargetPos); + this.ctlPos1.Invalidate(); + } + + bool remoteClose = false; + bool forceClose = false; + private void __Closing(object sender, FormClosingEventArgs e) + { + PUB.popup.needClose = true; + if (remoteClose == true) + { + PUB.log.Add("패치로 인해 프로그램을 종료 합니다"); + PUB.sm.SetNewStep(eSMStep.IDLE); + //_Close_Start(); + _STEP_CLOSING_START(PUB.sm.Step); + PUB.sm.Stop(); + + var patchfile = new System.IO.FileInfo(System.IO.Path.Combine(Util.CurrentPath, "SWPatch.exe")); + if (patchfile.Exists == false) + { + Util.MsgE("패치파일(" + patchfile.Name + ")이 없습니다.\n프로그램을 다시 실행해주세요", true); + } + else + { + Util.RunProcess(patchfile.FullName); + } + } + else if (forceClose == true) + { + PUB.log.Add("강제 종료"); + PUB.sm.SetNewStep(eSMStep.IDLE); + //_Close_Start(); + _STEP_CLOSING_START(PUB.sm.Step); + PUB.sm.Stop(); + + + } + else + { + if (PUB.sm.Step == eSMStep.RUN) + { + Util.MsgE("동작 중에는 종료 할 수 없습니다."); + e.Cancel = true; + return; + } + if (PUB.sm.Step < eSMStep.CLOSING) + { + var rlt = Util.MsgQ("종료하시겠습니까"); + if (rlt == System.Windows.Forms.DialogResult.Yes) + { + //비젼의 측정상태가 변경된 경우 + PUB.sm.SetNewStep(eSMStep.CLOSING, true); + + } + e.Cancel = true; + return; + //_Close_Start(); + } + } + + } + + short[] FlagMapValue; + private void __Load(object sender, EventArgs e) + { + this.Text = Application.ProductName + " ver " + Application.ProductVersion; + //this.lbTitle.Text = this.Text; + PUB.init(); //public initialize + if (PUB.setting.FullScreen) this.WindowState = FormWindowState.Maximized; + // PUB.log.RaiseMsg += log_RaiseMsg; + this.Show(); + + PUB.Result.TargetPosSet += Display_Position_TargetPosSet; + + this.ctlPos1.ClearData(); + this.ctlPos1.Invalidate(); + + //lbDM1.Text = ""; + //sbBatteryLv.Text = ""; + btHome.Text = "홈"; + btChargeA.Text = "자동충전"; + VAR.STR[eVarString.SWVersion] = Application.ProductVersion; + Application.DoEvents(); + + //setting dio events + this.IOState.ItemClick += gridView2_ItemClick; + //PUB.flag.ValueChanged += Flag_ValueChagned; + VAR.BOOL.PropertyChanged += BOOL_PropertyChanged; + + + ///모터용 pLC + PUB.PLC = new arDev.FakePLC(); + PUB.PLC.ValueChanged += PLC_DioChanged; + PUB.PLC.FlagChanged += PLC_FlagChanged; + PUB.PLC.Message += PLC_Message; + + //지그비통신 + PUB.XBE = new Device.Xbee(); + PUB.XBE.Message += Xbee_Message; + //HWState.setTitle(1, 3, Pub.setting.Port_Xbee); + //HWState.setTitle(1, 0, Pub.setting.Address_RFID); + + //AGV + PUB.AGV = new arDev.Narumi(); + PUB.AGV.Message += AGV_Message; + PUB.AGV.DataReceive += AGV_DataReceive; + + + //배터리관리시스템 + PUB.BMS = new arDev.BMS(); + PUB.BMS.BMSDataReceive += Bms_BMSDataReceive; + PUB.BMS.Message += Bms_Message; + PUB.BMS.ChargeDetect += BMS_ChargeDetect; + + + //디버그메세지 출력용 소켓 + PUB.sock_debug = new Device.Socket(); + PUB.sock_debug.GetMessage += socket_GetMessage; + PUB.sock_debug.RecvMessage += socket_RecvMessage; + PUB.sock_debug.SendMessage += socket_SendMessage; + + //clear + Resultclear(); + + //충전이 시작되지 않도록 기본값을 넣는다 + VAR.TIME[eVarTime.ChargeTry] = DateTime.Now; + VAR.TIME[eVarTime.ChargeSearch] = DateTime.Now; + + PUB.sm.SetMsgOptOff(); //모든 메세지출력을 해제한다. (이벤트는 동작함) + + PUB.log.Add("State Machine Start"); + PUB.sm = new StateMachine(); + PUB.sm.StepChanged += sm_StepChanged; + PUB.sm.Message += sm_Message; + PUB.sm.Running += sm_Running; + PUB.sm.SPS += sm_SPS; + PUB.sm.Start(); + + tmDisplay.Start(); //start Display + this.btDebug.Visible = PUB.setting.UseDebugMode; + + PUB.log.Add("Program Start"); + UpdateControlText(); + + //수량표시 + PUB.counter.PropertyChanged += Counter_PropertyChanged; + Update_Count(); + + PUB.log.Add("프로그램 실행 기록 추가"); + PUB.CheckNRegister3(Application.ProductName, "chi", Application.ProductVersion); + + if (PUB.setting.StartLog) + MenuLog.PerformClick(); + + PUB.AddEEDB("프로그램 시작"); + + } + + + private void Counter_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + //수량에 변화가 잇다면 업데이트 한다 + Update_Count(); + } + + + #region "Mouse Form Move" + + private Boolean fMove = false; + private Point MDownPos; + + private void LbTitle_DoubleClick(object sender, EventArgs e) + { + if (this.WindowState == FormWindowState.Maximized) this.WindowState = FormWindowState.Normal; + else this.WindowState = FormWindowState.Maximized; + } + private void LbTitle_MouseMove(object sender, MouseEventArgs e) + { + if (fMove) + { + Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y); + this.Left += offset.X; + this.Top += offset.Y; + //offset = new Point(0, 0); + } + } + private void LbTitle_MouseUp(object sender, MouseEventArgs e) + { + fMove = false; + } + private void LbTitle_MouseDown(object sender, MouseEventArgs e) + { + MDownPos = new Point(e.X, e.Y); + fMove = true; + } + + #endregion + + string last_xbee_tx = ""; + string last_xbee_rx = ""; + + DateTime lasttime_xbee_tx = DateTime.Now; + DateTime lasttime_xbee_rx = DateTime.Now; + private void Xbee_Message(object sender, arDev.arRS232.MessageEventArgs e) + { + if (e.MsgType == arDev.arRS232.MessageType.Error) PUB.logcal.AddE("xbee err : " + e.Message); + else if (e.MsgType == arDev.arRS232.MessageType.Normal) PUB.logcal.Add("xbe", e.Message); + else if (e.MsgType == arDev.arRS232.MessageType.Recv) + { + var datastr = System.Text.Encoding.Default.GetString(e.Data, 1, e.Data.Length - 2); + var val = datastr.Substring(datastr.Length - 1); + var kitno = datastr.Substring(0, datastr.Length - 1); + + if (last_xbee_rx.Equals(e.Message) == false) + { + PUB.logcal.Add("xbe-rx", e.Message); + last_xbee_rx = e.Message; + lasttime_xbee_rx = DateTime.Now; + } + else + { + var ts = DateTime.Now - lasttime_xbee_rx; + if (ts.TotalSeconds > 30) + { + PUB.logcal.Add("xbe-rx", e.Message); + last_xbee_rx = e.Message; + lasttime_xbee_rx = DateTime.Now; + } + } + + PUB.log.Add($"콜버튼:{kitno} 값:{val} 수신"); + //PUB.XBE.NewMsgEvent(kitno[0], val[0]); + } + else if (e.MsgType == arDev.arRS232.MessageType.Send) + { + if (last_xbee_tx.Equals(e.Message) == false) + { + PUB.logcal.Add("xbe-tx", e.Message); + last_xbee_tx = e.Message; + lasttime_xbee_tx = DateTime.Now; + } + else + { + var ts = DateTime.Now - lasttime_xbee_tx; + if (ts.TotalSeconds > 30) + { + PUB.logcal.Add("xbe-tx", e.Message); + last_xbee_tx = e.Message; + lasttime_xbee_tx = DateTime.Now; + } + } + + } + else PUB.logcal.Add("XBEE", $"Rx:{e.Message}"); + } + private void CtlPos1_ItemClick(object sender, CtlPos.ItemClickEventArgs e) + { + if (VAR.BOOL[eVarBool.FLAG_CHARGEONM] == true) + { + Util.MsgE("수동 충전 상태이므로 진행 할 수 없습니다"); + return; + } + if (VAR.BOOL[eVarBool.EMERGENCY]==true) + { + var dlgE = Util.MsgQ("비상정지 상태입니다.\n오류를 먼저 소거하고 실행 할까요?"); + if (dlgE == DialogResult.Yes) PUB.AGV.AGVErrorReset(); + else return; + } + //위치표시 컨트롤에서 아이템을 클릭했다 + var dlg = new Dialog.fJobSelect(); + PUB.log.Add("사용자 임의 위치 클릭 : " + e.Item.Title); + switch (e.Item.Position) + { + case ePosition.QA: + + //아이템을 가지고 있었으니 하차를 해야한다 + if (VAR.BOOL[eVarBool.ITEMON]) + { + dlg.setMessage("작업 실행\n" + + "(QA) 위치로 하차를 진행 할까요?\n" + + "대상위치 : QA\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + if (dlg.ShowDialog() == DialogResult.Yes) + { + //아이템이 있으면 하차이고 없으면 상차이다 + PUB.sm.ClearRunStep(); + PUB.Result.TargetPos = ePosition.QA; + PUB.sm.SetNewRunStep(ERunStep.GODOWN); + PUB.sm.SetNewStep(eSMStep.RUN); + } + } + else + { + dlg.setMessage("작업 실행\n" + + "(QA) 위치로 이동을 실행 할까요?\n" + + "대상위치 : QA\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + + if (dlg.ShowDialog() == DialogResult.Yes) + { + + //아이템이 있으면 하차이고 없으면 상차이다 + PUB.sm.ClearRunStep(); + PUB.Result.TargetPos = ePosition.QA; + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + PUB.sm.SetNewStep(eSMStep.RUN); + } + } + + break; + case ePosition.QC: + + //아이템을 가지고 있었으니 하차를 해야한다 + if (VAR.BOOL[eVarBool.ITEMON]) + { + dlg.setMessage("작업 실행\n" + + "홈(QC) 위치로 하차를 진행 할까요?\n" + + "대상위치 : QC\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + if (dlg.ShowDialog() == DialogResult.Yes) + { + //아이템이 있으면 하차이고 없으면 상차이다 + PUB.sm.ClearRunStep(); + PUB.Result.TargetPos = ePosition.QC; + PUB.sm.SetNewRunStep(ERunStep.GODOWN); + PUB.sm.SetNewStep(eSMStep.RUN); + } + } + else + { + dlg.setMessage("작업 실행\n" + + "홈(QC) 위치로 이동을 실행 할까요?\n" + + "대상위치 : QC\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + + if (dlg.ShowDialog() == DialogResult.Yes) + { + + //아이템이 있으면 하차이고 없으면 상차이다 + PUB.sm.ClearRunStep(); + PUB.Result.TargetPos = ePosition.QC; + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + PUB.sm.SetNewStep(eSMStep.RUN); + } + } + + break; + case ePosition.F1: //FVI영역은 모두 상차이동 + dlg.setMessage("작업 실행\n" + + "(상차) 작업을 실행 할까요?\n" + + "대상위치 : FVI-1\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + if (dlg.ShowDialog() == DialogResult.Yes) + { + PUB.Result.TargetPos = ePosition.F1; + PUB.sm.SetNewRunStep(ERunStep.GOUP); + PUB.sm.SetNewStep(eSMStep.RUN); + } + + break; + case ePosition.F2: + dlg.setMessage("작업 실행\n" + + "(상차) 작업을 실행 할까요?\n" + + "대상위치 : FVI-2\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + if (dlg.ShowDialog() == DialogResult.Yes) + { + + PUB.Result.TargetPos = ePosition.F2; + PUB.sm.SetNewRunStep(ERunStep.GOUP); + PUB.sm.SetNewStep(eSMStep.RUN); + } + + break; + case ePosition.F3: + dlg.setMessage("작업 실행\n" + + "(상차) 작업을 실행 할까요?\n" + + "대상위치 : FVI-3\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + if (dlg.ShowDialog() == DialogResult.Yes) + { + + PUB.Result.TargetPos = ePosition.F3; + PUB.sm.SetNewRunStep(ERunStep.GOUP); + PUB.sm.SetNewStep(eSMStep.RUN); + //VAR.BOOL[eVarBool.FLAG_AUTORUN] = true; + } + + break; + case ePosition.F4: + dlg.setMessage("작업 실행\n" + + "(상차) 작업을 실행 할까요?\n" + + "대상위치 : FVI-4\n" + + "현재위치 : " + PUB.Result.CurrentPos.ToString()); + if (dlg.ShowDialog() == DialogResult.Yes) + { + + PUB.Result.TargetPos = ePosition.F4; + PUB.sm.SetNewRunStep(ERunStep.GOUP); + PUB.sm.SetNewStep(eSMStep.RUN); + } + + break; + + } + if (dlg != null) dlg.Dispose(); + } + + void socket_SendMessage(object sender, Device.Socket.SocketMessageEventArgs e) + { + //핑로그가 꺼져있는 상황일때 핑로그는 로그를 기록하지 않는다. 181205 + if (!PUB.setting.Log_Ping && e.Message.Type == Device.Socket.eType.REPLY && e.Message.SType == Device.Socket.eSType.STATUS) + { + return; + } + PUB.log.Add("WS << " + e.rawData); + } + + void socket_RecvMessage(object sender, Device.Socket.SocketMessageEventArgs e) + { + if (e.Message.isError) + PUB.log.AddE("WS >> " + e.Message.ErrorMessage + ",RAW=" + e.rawData); + else + { + + switch (e.Message.Type) + { + case Device.Socket.eType.REQUEST: + if (e.Message.SType == Device.Socket.eSType.STATUS) + { + var packet = PUB.sock_debug.makeReplyStatus(Device.Socket.eStatus.IDLE); + var rlt = PUB.sock_debug.Send(PUB.setting.Asset, Device.Socket.eType.REPLY, Device.Socket.eSType.STATUS, packet); + if (!rlt) + { + PUB.log.AddE("Status Reply Error"); + } + else + { + if (PUB.setting.Log_Ping) PUB.log.AddI("Server Status Reply OK"); + } + } + else + { + PUB.log.Add("WS >> " + e.rawData); + } + break; + } + } + } + + void socket_GetMessage(object sender, Device.Socket.MesasgeEventArgs e) + { + if (e.isError) PUB.log.AddE("WS:" + e.Message); + else PUB.log.Add("WS:" + e.Message); + } + delegate void SelectModelHandler(string modelName); + void SelectModelM(string modelName) + { + if (this.InvokeRequired) + { + this.Invoke(new SelectModelHandler(SelectModelM), new object[] { modelName }); + return; + } + } + + void func_sw_start(bool Prompt = false) + { + if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false) //자동상태가 아니라면 + { + PUB.AGV.AGVErrorReset(); + if (Prompt) + { + if (Util.MsgQ("AGV상태를 자동으로 전환 할까요?") != DialogResult.Yes) return; + } + //충전상태확인 + if (PUB.CheckManualChargeMode() == false) return; + PUB.popup.needClose = true; + PUB.sm.bPause = false; + PUB.sm.SetNewStep(eSMStep.RUN); + + if (PUB.Result.CurrentPos == ePosition.NONE || PUB.Result.TargetPos == ePosition.NONE) + { + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + } + PUB.Speak(Lang.자동전환); + } + else + { + PUB.AGV.AGVCharge(PUB.setting.ChargerID, false); //230425 수동전환하면 충전 해제한다 + PUB.sm.SetNewStep(eSMStep.IDLE); + PUB.Speak(Lang.작업종료); + } + } + + void Resultclear() + { + PUB.Result.Clear(); + PUB.log.AddI("Clear Resultclear"); + } + + + void CheckFreeSpace() + { + try + { + + if (PUB.path.FullName.StartsWith("\\")) + { + SSInfo.setTitle(0, 1, "UNC Path Detected"); + SSInfo.setValue(0, 1, 2); + } + else + { + double freeSpaceRate_ = PUB.GetFreeSpace(); + this.freeSpaceRate = freeSpaceRate_; + SSInfo.setTitle(0, 1, "FREE(" + PUB.path.FullName.Substring(0, 1) + ") : " + freeSpaceRate.ToString("N2") + "%"); + if (freeSpaceRate < PUB.setting.AutoDeleteThreshold) + { + VAR.BOOL[eVarBool.MINSPACE] = true; + SSInfo.setValue(0, 1, 2); //lbFreeSpace.ForeColor = Color.Tomato; + } + else + { + VAR.BOOL[eVarBool.MINSPACE] = false; + SSInfo.setValue(0, 1, 3);// lbFreeSpace.ForeColor = Color.White; + } + } + + //Pub.log.Add("남은디스크공간확인:" + freeSpaceRate.ToString("N2") + "%"); 190129 + } + catch (Exception ex) + { + SSInfo.setTitle(0, 1, "FREE SPACE : -ERROR-"); + PUB.log.AddE("check free space : " + ex.Message); + } + } + + private void demoRunToolStripMenuItem_Click(object sender, EventArgs e) + { + PUB.Result.JobEndTime = DateTime.Now; + // Pub.flag.Toggle(eFlag.DemoRun); + // Pub.log.AddAT(string.Format("데모변경: {0}", Pub.flag.get(eFlag.DemoRun))); + } + + private void openMapFileToolStripMenuItem_Click(object sender, EventArgs e) + { + using (OpenFileDialog od = new OpenFileDialog()) + if (od.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; + //if (orgImage != null) orgImage.Dispose(); + + } + + + + private void setZValidToolStripMenuItem_Click(object sender, EventArgs e) + { + + PUB.log.Add("user set z-home set on"); + } + + private void gridviewTestToolStripMenuItem_Click(object sender, EventArgs e) + { + + + } + + private void 으ㅆㄷㄴㅅToolStripMenuItem_Click(object sender, EventArgs e) + { + /////HB9225-4280A 0901 + //var striplist = new string[]{ + // "HB9125-7560A 0704", + //"HB9125-7800A 0104", + //"HB9125-8480A 0701", + //"HB9130-8550A 5108", + //"HB9130-8620A 0701", + //"HB9131-9340A 0201", + //"HB9206-0810A 5301", + //"HB9206-0820A 0902", + //"HB9222-3020A 0208", + //"HB9222-3020A 0508", + //"HB9222-3720A 0205", + //"HB9222-3720A 0902", + //"HB9225-3790A 0604", + //"HB9225-4280A 0901", + //"HB9228-4840A 0104", + //"HB9228-4840A 5908", + //"HB9313-7600A 1006", + //"HB9319-9540A 6003", + //"ZGP490510700 1305" + //}; + + } + + private void errorToolStripMenuItem_Click(object sender, EventArgs e) + { + PUB.popup.setMessage("error\berror message"); + } + + private void informationToolStripMenuItem_Click(object sender, EventArgs e) + { + PUB.popup.setMessage("info\ninformation message", MessageWindow.eWindowType.information); + } + + private void attentionToolStripMenuItem_Click(object sender, EventArgs e) + { + PUB.popup.setMessage("attention\nattention message", MessageWindow.eWindowType.attention); + } + + private void reloadLotListToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + + + private void arLabel3_Click(object sender, EventArgs e) + { + string file = System.IO.Path.Combine(Util.CurrentPath, "manual.pdf"); + if (System.IO.File.Exists(file) == false) + { + Util.MsgE("사용설명서 파일이 존재하지 않습니다\n" + + "문의 : T8567 (장비기술 1파트)\n" + + "파일명 : " + file); + return; + } + Util.RunExplorer(file); + } + + private void btClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + void UpdateControlText() + { + + } + + private void arLabel5_Click(object sender, EventArgs e) + { + //SetScreen(form_setup); + + + var popmsg = PUB.popup.Visible; + PUB.popup.Visible = false; + VAR.BOOL[eVarBool.FLAG_SETUP] = true; + using (var f = new fSetup()) + if (f.ShowDialog() == DialogResult.OK) + { + //music volume200522 + PUB.mplayer.Volume = PUB.setting.musicvol / 100.0; + + //AGV정보 싱크 + PUB.sm.ResetRunStepSeq(); + PUB.sm.SetNewStep(eSMStep.SYNC); + } + + VAR.BOOL[eVarBool.FLAG_SETUP] = false;// VAR.BOOL[eVarBool.FLAG_SETUP] = false;//VAR.BOOL[eVarBool.FLAG_SETUP] = false; + UpdateControlText(); + if (popmsg) PUB.popup.Visible = true; + } + + private void btMReset_Click(object sender, EventArgs e) + { + + //if (Pub.sm.Step != eSMStep.IDLE) + //{ + var dlg = Util.MsgQ( + "프로그램 상태를 초기화 하시겠습니까?\n" + + "진행 중인 사항은 모두 취소 됩니다"); + if (dlg != System.Windows.Forms.DialogResult.Yes) return; + //} + //else Pub.log.AddAT("대기상태일때에는 초기화 할 수 없습니다"); + + PUB.log.Add("User Click : initialize", false); + PUB.sm.ClearRunStep(); + PUB.sm.SetNewStep(eSMStep.RESET); + PUB.sm.bPause = false; + if (PUB.mplayer != null && PUB.mplayer.HasAudio) + { + PUB.mplayer.Stop(); + PUB.bPlayMusic = false; + } + } + + private void btCapture_Click(object sender, EventArgs e) + { + Util.ScreenCaptrue(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height, new Point(0, 0)); + } + + private void btOpenDir_Click(object sender, EventArgs e) + { + Util.RunExplorer(Util.CurrentPath); + } + + private void button4_Click(object sender, EventArgs e) + { + SetScreen(form_manu); + MenuMAN.ForeColor = Color.Gold; + } + + private void button3_Click(object sender, EventArgs e) + { + SetScreen(form_zlift); + MenuLift.ForeColor = Color.Gold; + } + + private void btDebug_Click(object sender, EventArgs e) + { + arCtl.arLabel ctl = sender as arCtl.arLabel; + this.cmDebug.Show(ctl, new Point((int)(ctl.Width / 1.5), (int)(ctl.Height / 1.5))); + } + + private void btStart_Click(object sender, EventArgs e) + { + var ctl = sender as arCtl.arLabel; + if (ctl.Enabled == false) return; + PUB.log.Add("User Click : Start", false); + func_sw_start(true); + } + + private void button2_Click(object sender, EventArgs e) + { + SetScreen(form_auto); + MenuAuto.ForeColor = Color.Gold; + } + + private void button1_Click(object sender, EventArgs e) + { + SetScreen(form_flag); + MenuFlag.ForeColor = Color.Gold; + } + + + Dialog.fLog form_log = null; + private void btLog_Click(object sender, EventArgs e) + { + if (form_log == null || form_log.IsDisposed || form_log.Disposing) + form_log = new Dialog.fLog(); + + form_log.Show(); + form_log.Activate(); + if (form_log.WindowState == FormWindowState.Minimized) + form_log.WindowState = FormWindowState.Normal; + } + + + private void btCharge_Click(object sender, EventArgs e) + { + var bCharge = + (PUB.sm.RunStep == ERunStep.GOCHARGE || PUB.sm.RunStep == ERunStep.CHARGECHECK || VAR.BOOL[eVarBool.FLAG_CHARGEONA] == true); + + if (VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + { + Util.MsgE("수동 충전 상태이므로 진행 할 수 없습니다"); + return; + } + + //충전을 시작해라ㅏ + if (bCharge == true) + { + var dlg = Util.MsgQ("충전을 중지할까요?"); + if (dlg == DialogResult.Yes) + { + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.log.Add("사용자 충전 해제"); + } + } + else + { + var dlg = Util.MsgQ("충전을 시작할까요?"); + if (dlg == DialogResult.Yes) + { + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.GOCHARGE); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.log.Add("충전(사용자)작업 시작"); + } + } + } + + private void pictureBox1_Click(object sender, EventArgs e) + { + using (var f = new Dialog.fSystem()) + { + f.ShowDialog(); + if (f.shutdown) + { + forceClose = true; + this.Close(); + } + } + + } + + private void SSInfo_Click(object sender, EventArgs e) + { + PUB.Speak("고경석 수석님 밥은 드셨습니까?", true); + UpdateProgressStatus(20, 100, "progre"); + } + + private void arLabel1_Click(object sender, EventArgs e) + { + var bCharge = PUB.sm.Step == eSMStep.RUN && + (PUB.sm.RunStep == ERunStep.GOHOME); + + if (PUB.CheckManualChargeMode() == false) return; + + if (bCharge == true) + { + var dlg = Util.MsgQ("홈(QC) 이동을 취소 할까요?"); + if (dlg == DialogResult.Yes) + { + PUB.sm.ClearRunStep(); + PUB.sm.SetNewStep(eSMStep.IDLE); + PUB.AGV.AGVMoveStop("user home cancle", arDev.Narumi.eStopOpt.Stop); + //PUB.AGV.AddCommand(arDev.Narumi.eAgvCmd.MoveStop);//.Move(Device.PLC.Rundirection.Stop, "사용자 홈 이동 취소"); + PUB.log.Add("사용자 홈 이동 취소"); + } + } + else + { + var dlg = Util.MsgQ("홈(QC) 이동을 실행 할까요?"); + if (dlg == DialogResult.Yes) + { + PUB.sm.ClearRunStep(); + PUB.sm.SetNewRunStep(ERunStep.GOHOME); + PUB.sm.SetNewStep(eSMStep.RUN); + PUB.log.Add("사용자 홈 이동 실행"); + } + } + + } + + //private void btChargeM_Click(object sender, EventArgs e) + //{ + // var bCharge = PUB.flag.get(EFlag.FLAG_CHARGEONM); + + // //충전을 시작해라ㅏ + // if (bCharge == true) + // { + // var dlg = Util.MsgQ("수동 충전 상태를 해제 할까요?"); + // if (dlg == DialogResult.Yes) + // { + // PUB.flag.set(EFlag.FLAG_CHARGEONM, false); + // Pub.log.Add("수동 충전 상태 해제"); + // } + // } + // else + // { + // var dlg = Util.MsgQ("수동 충전 상태를 설정 할까요?\n수동충전이 설정되면 AGV는 움직지 않습니다"); + // if (dlg == DialogResult.Yes) + // { + // PUB.flag.set(EFlag.FLAG_CHARGEONM, true); + // Pub.log.Add("수동 충전 상태 설정"); + // } + // } + //} + + private void arLabel2_Click_1(object sender, EventArgs e) + { + using (var f = new Dialog.fVolume()) + f.ShowDialog(); + } + + private void lbCNtUp_Click(object sender, EventArgs e) + { + using (var f = new Dialog.fCounter()) + f.ShowDialog(); + } + + private void button1_Click_1(object sender, EventArgs e) + { + SetScreen(form_agv); + MenuAGV.ForeColor = Color.Gold; + } + + private void button2_Click_1(object sender, EventArgs e) + { + SetScreen(form_bms); + MenuBMS.ForeColor = Color.Gold; + } + + private void lbBat_Click(object sender, EventArgs e) + { + var bat = (int)PUB.BMS.Current_Level; + var msg = $"{bat}퍼센트"; + PUB.Speak(msg, false, false); + PUB.counter.CountQA += 1; + } + private void IOState_ItemClick_1(object sender, arFrame.Control.GridView.ItemClickEventArgs e) + { + var title = IOState.Titles[e.idx]; + switch (title.ToLower()) + { + case "emg": + PUB.AGV.AGVErrorReset(); + break; + case "itm": + var itemon = VAR.BOOL[eVarBool.ITEMON]; + VAR.BOOL[eVarBool.ITEMON] = !itemon; + break; + } + } + + private void btChargeM_Click(object sender, EventArgs e) + { + if (COMM.VAR.BOOL[eVarBool.FLAG_CHARGEONM]) + { + var dlg = Util.MsgQ("수동 충전을 해제 할까요?"); + if (dlg != DialogResult.Yes) return; + VAR.BOOL[eVarBool.FLAG_CHARGEONM] = false; + PUB.log.Add("수동 충전 실행"); + } + else + { + if (PUB.AGV.system1.Battery_charging) + { + Util.MsgE("현재 자동 충전 중이라 진행 할 수 없습니다"); + return; + } + var dlg = Util.MsgQ("수동 충전을 진행 할까요?"); + if (dlg != DialogResult.Yes) return; + VAR.BOOL[eVarBool.FLAG_CHARGEONM] = true; + PUB.log.Add("수동 충전 실행"); + } + } + } +} diff --git a/Cs_HMI/Project/fMain.resx b/Cs_HMI/Project/fMain.resx new file mode 100644 index 0000000..a0d11b6 --- /dev/null +++ b/Cs_HMI/Project/fMain.resx @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 124, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAA2xJREFUWEfV + l01IVFEUx1+fFEQQVASVRBFREYVGVKvCaldEYIsQWgQRmNgyClxkRQTZok0fRknYx1BoQaugiQKZRp0Z + x2bbh5HtjMJIzZp+53oc38cd51Yk9Ic/955zz/mfM/e9d98b779GZ2fnDKGak4eurq7V8AnFvwtlLj5d + /rdIJBJLKNoHX8OMUuZ9sqZh/w7t7e2z8/n8VDULEJ+sqfl7oPsGeFBNK6QAMbs6Ojou6vbLL+9VZvQy + NLK+09agH8QcIueUmuaa3sd5Rc0IWK8g4RXMO7IHlmt6BKxdlZpqmgLXaeCumgEQXAY/QVuhidifTCaX + qkwArN2DTWqaLTmDI6FmAPjPQVsBF55VmQDwv4QNahrHXvgNRp5pfK3QJu7CVpUpAJ+cHYP86D3q8rzu + 7u6FOOV53q2uAvC3QJu4C1tUpgApjH84lUotUNco5B6ggWfcwVPUZUCw7E4ajkBbkWIcQu+wyhiIttRg + 7ba6xsENs5aFr7BeXV4ul5uJPV/nc+i6kkZP4mtGSB7FBHzB/CHjDcbTjFXErIrH49ONiA+s1cMBdNao + KwgE9hMgx2sb8xrGz1B+zTsYg3UkbwlvnzTKD1iEfz151TRwntjHMMf8FuMBxkeMw7BK0+wgcJMGy26E + tzXMfjgQ8tkoMW00uFHLlAYJF3wCf0W5NCrrDpIu2cT+hGg1qqwdmUxmMdu+3E8SXR6/H0rbmp8tYX2p + aYpj7LAkuLJOaVsrSe6JSi8Wi03jDt7ANlX4SWNyJ1sTx0hctdC25qdo+bWFUlNqm12wgcTtYaEwpbjQ + tuYnDWxTWXdwkMwieewcsNKxgS+ipbLuIFFewymfUISODYhGmcqWBtdmKwlx+BPKCSijTdi1gQ9QNJ4S + u1nL2EHACQJHuGZyfK5T32XmNmGXBm6KBmM5cXcY5YV2XHwRUPQoi4ME7lOXAV+6c/G/gZECJRrozWaz + 81TGAF8VHIJH1DUKebnglLO/Vl0B0JwcTG9hoMgEDbxPp9MrNT0A4o+xLu8G85Y1wKiF8q1f9F8OgstI + ThJTKFSkgefSsKZFoK/4j+TVqMs00IRj/Cu1COQdj7h8UmelWKiBHpmHP2hsQOMB8dfUNA00w8KHiAuI + XyHnuVDm6naC1JKaanrmONbppEB2abJrFoHn/QK21s0ynEiLrwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAb9JREFUWEft + lr8vBEEUxxchEST8ARIkOo1KqFwpUQgKdFRKKoVG+AtUSirFSkiuVCk2m9zt7e7dJtcIkVxFcK4QCYld + 3517e9ZkHGLfRuEln8zsvLf7/e7M7A/tP8rlckehUFgCG03IUHnygYsfgeALfMuy5uiUZAMXf5bEPqOa + y+UG6bTkQiHUjCq4/CU2ZnOK5H9sICkedF1vUxnwgQuOgc6JYRg9soFbMBaOlUqlLs/z+jgJgqD1gwGs + yyIYQf8iGmOmBr2FyMCLaZqdaA/pOC1uIgMuzcYVHadFJTKw77puL9pwE8pFbGAJssKAbdtraDPxZErs + CANwMgnWpSQ70JwPDfjhY4H2IJ5MAyz7sNh4tAGL8WQKPIp3ATon9En+7kcpETD9ZnjjGjpbYFRVxMye + MIDODAysSMk0WBUGsBEGcLArJdlxHGdcGMBGaMF74ExVxMgr9l13wwAGalIBN+dCPAys/5CigBud5DUN + 0z+rKGAFN71J8uIp2JYLuMFNT5O8WIKsqoiTfD7fT/JiBipyATP3JF0PDNxJBdycknQ9sB7LGHySiri4 + xvRPkPR7INEu/7Vy0PgT/juhaW/ZS5SxdhC40QAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAABAlJREFUWEft + V91vFFUU3wiC6AMBY0xIgb13ltJAjBoJMSF+BYkPIgkJH/ogxo8QP6ha1MDandn7qAkxmsiDoYkhJoUA + LyQYQwj1BfkPeFAeBLozszWh0PJR0XbX3296ZvbOfnVteewvOdmZc37nzJk7555zNzOP/4uqyTxQctWT + ZaO3Bq56L3D1+77n7C6Z7FPVvc88KLT7D991NvlF/WPg6b8g1RYyFhb1scCo58Vt7ghNbh0Cn6l7UCcy + RF8JMztwaRHothX0Hyz5Ofx+UvL05tDNrS8Z3Y1P8Zzvqn2w/QzbvxZ/wnf1OxIuE+Zzj3WcVOg5X1iB + KkFR/zRSyDlibonQZLNI5KTlS8kP93Utwe8IpOIb/bLQm8P39BskivN44DnbxdQxUDOvw3dMYlQR08TX + kD6hNWK4oNeA8LcQbwVGbxBTCpfM+kVXD65aRuG1qFMI3ewLiDEhseIXap8AjHHBVXxPvSbqBqA+eoXX + MiCSXwXbKYvXlp9hMcUkbidRJwg81Y+l/J7fE1vycBKwqI5e7s0txvW35AidL/NHwklLiwSKzhEhTAX9 + arWoIwSuU7ACXIPcs+5Z+VeTe1d9Oe2jzya6tDQmwC4Gww0SsHXOizoB3vI7K0BbwQ5y6VPdmVnAXTFi + urUtowf00iiojcBke5IgrvOxqBP8abIPwdauC8ZyZVYt2TdqWxwExbdF1Oj9Ly7kG4WeOg6bXckXOBM4 + A3D9m6Xn5xikD30lzMxA8bwpASrXzMoVosbKrHhY9Cnhw4WSkSQaOPQVSoTQ1R9C/03588cfEVUN053K + OYTl3yuqCC0TwEOFgqaTe7oZx07A73dWxnqszluinhlRIbnOntDTX8F5MgmOZWcSfDg+z0VLf48FyxlA + XwmDFc6+EnPa9ZeWGDZdy+E8GgdpI8P1S09gS34aczjARF0Dt0b9dikXVqv4LTiMrIfMJANRUAvoDb+K + 7XrT4oShTwhpQTOhPRq3tV3AphP3eAqbEpsTryvkRkEFfBHopyJ7Uf0g6jRgbJ6Ap38XCka0+oi1wJ6A + Vv11zGFbjnSwkSP0BCjuEwkXJytRpwFjswROcaAIJQU87IOYx8Ek6gZwlMc8FPNpUTcCBDuBeKknOFKF + kkJH49iojYhxR2LdbXugASFJoO7wMMYDitA6Bj7FTvjekhhToat2iak50BxeIhES8I3wmxfnacExi4NF + 6C3BA010Mq6tYgXJfCbm9vALam0p3/Oo3PJo9jYC3JVAlElsp1+iHYGjN/k8mHJ2IMH9nKLg2IfScXyG + HRJudpBj+ZAVtCNhwTFBCTN3yGlpEHLTflCdlCEDZZN9VtzuPzjrOQlZVFh2/C1T72JLvlp29RP82ya0 + eXSITOY/N4AkP6QQbUkAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAkNJREFUWEft + lU1LVFEYx6+F0KKXhRKR9QVSVxLoQqJoUdjCiAgl3CpKi/AjiGG0KVfRIiVoM34DC2Yzi7nz1sxiKkjQ + xahEazVfp98znYnT47nTmRgHIg/8OM88/3PO87/n3HsmOG7/TIvH46cymcxsNptN0Ue1EJ5Bq5nWuMai + c1D2ZNZM82+xWOxkOp3ugpsaFhxTBf7EHjv10LUWdEktU/Zny+VyfUxaUYscJcsY7K0UTyQSZ0isqQHN + oFQsFk8Hsi0OUThw5BqK1A7krBzCY/pWtDdaM+ybr+GtYOJ9o3kjtZ0GyPXI8WBkVGl78DyVSl0QPQzD + NkFiyaG9MGPsOZFEGoCP5J/Sf7NyG+Ru0Z+DJ7Bq8kIJs9PJZPIs/W1+b1haJLUMHIJxD3jKy8SftWbx + CROX6IdV3kk9BhbL5fIJxspZu3SbpIxlJ947tN/wNsBi9wSX5oI179Lf13mNtwFoh3mViwSzrwuFwnmX + ZuNrYJctbfHZ0iqs+U7mEO9qzcZ7B+TGol/Q+RrEzA3r0n7hbYAx/fSPdD4Kxk/wxVxzaTb1GHgp3zjx + V605WDdP/0rlD+FtAHZ4ok7G3iDeUprNJlyHbtgxuUjqMSB84W/7Ikau8kKmHXrIWj0yhnhJaU7qNSCU + YMDc/Z34GBIoekVyrHUH3b6ia/I3Bqp8gCmKjwgSQ95o3lQMEAxqoYkMBvl8voNgWwnN4Lu8L3J0cgwT + JLz/xxuA3JDjleLVRkI+nUmYOWKkRrcpe9z++xYEPwDT4GdbjzYebAAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAP5JREFUWEft + lj0KwkAQhVNY6n0Uj6BtagvxEFqJvYWnEL1EmiBKfrrcIK3gDfSNTDZk2WQj65IQ9sFHZObtzCMkQc/J + qTdKkmQax/G1gQs4gVUYhhM+JkQ16rGHvKoZX2gXHyuFhg/eLXlFUbTmoxR+QzXJ04TPR0tRUTJpQYg9 + rge53oL/BDDAeoAjoHl1M60HEAsUvUpfiIqSyYTOA+gYeAC8njdciw+PyjP8Z8AFcAG6DdCH11BHDwPg + ts0VRiukaTrjtaWCIBih+ZDNFrjTLl5bVZZlY/y/24EzjMVDVMcTFEPpt8oj4Jlb2sHrzISBSwzMmQWX + nZx+lOd9AOxqphdZ7gKgAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABGdBTUEAALGPC/xhBQAABHFJREFUWEe1 + mFtIXFcUhifk8pqSPORCSGn7VPIcaFpCA+lDSUjfpIRCI97vKN5vGUEUhEFFRGkfRBEVa0GtdzQ+WBE1 + EPRF0XhDJAreo45Dra78a7tncs6e7ajjnAUfnnPW2mv97r32uYzNXwsODv4iPDz8+8jIyN9BVERERBzO + Q8BPYWFh92SYtRYdHf01CueBd+AQkA/mQQWLlsMDZ0j6AMn/BqeJOIlR8Fym89+CgoKuIVER+E8mvij/ + xMTE3Jbpz2chISF3kYD/M13ii7CCHnssy5zNMOgbwD2gSxgI9tEGv8hyvg3Bd8CcYbBVuKKiop7IsnrL + y8u7gsB/lYFWshEaGvqlLO9tCMhVBlyI2NhYyszM1Prc4B72BqUvHSswGBrtKwQ41QGnkZ6eToODg1RU + VOTlKygoIKfTSTU1NV4+IxD1Usr4bLj4py74JBBPVVVVtLu7S2xtbW0mPwvlv/n5+bS9vS1ijX6F97jF + XJZSbDZM7U1cdClBJ5KVlUWTk5NCiNtUQUtLS9TX10doXCosLKS9vT0xzhhjxLTrcBKjC1LhWamtrSWX + yyVlfDZVUHJyMs3NzVF7e7s47+npoZGREVOMEWhoknKEoA5dUFxcHBUXF1NJSQmVl5fT/Py8LO9tbkH1 + 9fVi9hITEykjI0Msqd1up7S0NDo4OKCUlBSvOpKP4CrruYSDbYPDAxc5q7kF4QFMo6OjNDw8LM67u7up + t7dXHE9PT1N1dbUnvwom5iFv9fuqww0nOqsZlywhIUHMTE5Ojmjq9fV1cb2lpYUGBgY8cRpe8XZ/rHEI + /BXEDA0NUWNjo+i7w8NDsfy806ampkxxCnbe7s80DsFFBDU3N4tdxsebm5titrgfFxcXTXEKDssE8e7q + 7OwUx7zls7OzqbS0lGZnZ01xCg7Llmx8fFw0MPeTccnGxsZMcQp2S5qab4D7+/uUlJREFRUV4n7E13kJ + Ozo6PHEaXvnc9rzmExMTgpmZGVlab25BLIb7hHuIz3lG+GbKxysrK+RwODz5VcS2Z8NJu+rUUVZWRhsb + G1KC2dyCFhYWqLW1VeyuyspK8RzjZWMha2tr4lGi5pV4bowsKNrg8An3At/sjo6OpJRjU3uIZ3dnZ0f8 + EyyCm7murs4Uo/CXEMOGl6QbuHDmhyvDrxvLy8tSjllQQ0MDbW1tCTF83tXVJQT5mB2e0RdSzrHh4h9q + 0GnwCxg/NHkXNTU1ea7zErEvPj6e+vv7aXV1lVJTU01jFaZNrx9s/CoJx7lf0Bh+98HnjekaP+15lrip + +djoU8Hs/CplmA3ObDXYX7ipc3NztT6FXlne23jakOiNZpBVrIP7srze+MsSQbOGQVbB32Y/yrK+DcH8 + oWjlt5nTa1edZhjEH4zDhiSB4gO2/w+yzPkMg6+CAhCoHxua8TC/JdP7b0jyLaa4EQn9+jkGvTKC8T/L + dIEz/phE8tco8hb8byyqYQaUQ8gjOdxaQ7HrEPgdBP6Gou6f9IJx/JR/ypFh5zSb7RMJw7xfBlQNxwAA + AABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAlxJREFUWEfV + l81u00AUhcOrIMGqgg0sYEMFe1QE5QlQd63oug/QbstT0B2UVgEKgW1+7GxoWSAeghKJSgGF70bHlpnc + cYbW5edIn6LcuefesT0e263/Ur1e7/pgMHiZZdmB0e/327Cg4fMXzTdhUoUJbGj4/MVRP3cm8FTDzYiC + DyjcodkVhUoR/1RtLg41XMq8xDvUuq9QmjA+xDhW4RP+P55MJhdsjOt/i9h3jVUZ53l+w3Isl/9r8K0Y + g2UbmyubrQxhg3fwIYh55NR448THSWeCpF3H3Ai2dtQmLiZwkeTj0NwAo263e1lt6sVMV5wCZ+WRys+X + LaLIdTwV1GqrdJq0ij+GhQJM2yIDL2cKZ7Sn0mnidrrjFRJfOKK7Si1FfAmia8e2b6XOSnv7lu6Az/Cj + MIZ4zQtxpPc8j7C9wzawZ7DJQV6TbTr7ffBMv0DzvixRkVd7OSrsyzK99dpOgse2LFGR8yTwuFhPWf6B + CRDYCxMiZLJERc4w8MTYk2V6BhZgg+AOHIH3LChYkm1G1LDniOcxrOYh7Fgv6ynbrFjNtyvGkGNb7Uot + peZfg9yS2tswVOJGlINdb6P2tP/2RmQTwPTeK3ZKXltNlZ8vTue6U+SsrKp8vWxxkFy8yTTJCbvfVbWJ + i8ROYGySt2oTl1bzzG3ImjjgN+mVDF4FMSPtlcxE8rIZZBzRfEVDNsFFYt7DasytdlNpxUvNqBiDtJfS + QjZb2B0Oh5cUKkUxe2KGEzjScCnzWo3kI08VzV4EzW1vb/bDpE403HIm8Oc+zfQC8/c+TptTq/UT/J7v + URSJG9cAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAsRJREFUWEft + lz9TU0EUxdOovWKv9Golo59AsRMr0ELQRjsHO4n4CWD8A/oNUD9IZpKQxCYVIg1gKTYChejvvDmbbN57 + IS8gY8OZOZPHuefe3b27+xJKpzgKqtXqhdXV1Sv1ev0OHNezNIdPBgw0Cl8xWAv+6cNmo9GYZzKXnXZ8 + NJvNixR+A/ejgQZR3tdwxGWOBlZzgyLbLhq4g77C5xyfD0U/S9uxJ3Cbro253HAg8R4FdqNiX9Em+Txj + SwaKwSm4DkPeLpObsKUYSNDKO4Mz8Lt2u33W4YGQl7ylkA93C3fCe/49JJP4zKGhQf5sqAO3Ct0UjDpw + SRKdeGs5QZECaQ91lkM9FrNoOR8YRjGG074et53O3ETTIXtsKQPF5JHXUmltbe0c2jeomvuHXlEmoHse + ZjtpWYVHYDjhv2FmEtIck0fezhWkkw+siy8tZ0Hwi0076UPHhGbQwwAH8KlDebEnDiXgb92OH443LPdC + e2eD9n7Fcg+IxatMOpGn2d4D9E/2HFQqlfOWu2Dfrtmg9r+wnAHx9IADBxeIzdmnBV613AWD6kslGKYt + 5yLVcjHT9jScE+rfttyFxGCQ2XIu+kygcybyQM6j4GesW5a7+O9bEB9CJvDRcg+IHecQfrYn/xAKBJs2 + FbmGnT3PifVsh19GPxXHW7ecBa2ZdxFxyrIm9i9fRGXLWeg1ieEkXsUbUDX3Wq3WJYfygUm/ZMJslywn + SH/R5CHtocb7UI9OLFjuD4xqd/wraNahoUHu86jOZpEFJOCcjJEQ/xpaVisdHgh5We2HKP9XrVa77nAx + UGCCxHgSG2j307cjhmI+cGHPk8HR7toyHNyJraiYqOukL5YyhadFPVtLrlrEzaFXnob2jYksUmyYn+V7 + TGyh8J4XAcV0RbXSRjRQmoqVB16140KvUgbSv2bjop77vl5PcShKpb/SGsNeH5IytgAAAABJRU5ErkJg + gg== + + + + + iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAA5hJREFUaEPt + mvtTElEUx/3v+lea6X9oppnGV5LV+EABUSRG8f3gvaZGagaakuIDFdPR0nykaZqv0/1eASmuAstursbX + +fyye45zvnDv2XN3KMhLq3poefzgke2J/i6BmmPlXwk3rBNt1DHbeydArag5Vv6VcBEB3uW+OwFqzRvR + EnkjWiNvRA0axuxUM9x4I9aJVmGuZow4FjxU5jXS1Nr8jZR4aoT5mjFSNWSh8NoCpZPmjRS59HTB/qC1 + 3Q3htwE0beQ1Gy96Q/3cBMw8dVQJ9wfQ9B4p9dbSwfEhNxJanWUFW4VxN3HrRrrnXaQftHET0AupnpyL + HmHsTdy6kQp/Ay1sfuYmdg/3SddnFMal41aNeJYlKnbXcBNQc8BB9qkuYWw6ZBkxjNqoTDKk8Ixhn868 + EAt7APrCQ9zE2fk5M6UXxmWCLCNogSLtHx2wpWEQ5ogo9lTT0ckxzw1EQ2RiH5AoLhMUNQJV9lupJ+IW + 5iXTOesg07uWWBaRzmci15JPGJsJsowUsSXQNu5O0D7u4d8GNL8RpUq2gUV5ybwcMNPqzhees7G3ReVv + TMK4TJFlpCfiovaZ3gT1Y83UEnTzoqASdy15o6l5cdxLEpV6DLFoosaRTmoL9whjM0WWERGFrmq2Yc94 + Yf2zo9QQtAvjQF2gifyRII89ZTnXjR3ZoJgRI9uoI4sfL4s7O2Wf+PXFFTPTJywG8kcCZA42CeOyQTEj + 7qiPdGwMj8v6vpNaw90pcVhCFraU4sISQ+7fcdmimBGADbyyvc4L3PqxK9zAuPZ17xuPwZT7atCcEiMH + RY10zTnJ4LfzIqFyyfzH3ORm7fW5VBe7S7z9og0n/w+5KGoEYOMeHP/khYZW50ifNMliIvjAHnzQ8ekv + KvHmvsnjKG4k+WwBYZbCTIV7ha6qRGeTZobZiNKSki8XxY0AtOKLi8vTnvPTID8MYQbDUBhXumdNtqhi + BCe5yZUZXjBmKRycdJKRdg6/82uLmytU8Tb90z8bVDHiXPSyA5KZFw1hU+PAFJd+wManA1GuXFQxAtBm + N/e3eeFoszjCQmgEpT62rAQ5uaCakcsHXwcvPlloBGgIopxcUM0IwEEJbTZZmJzjXUxJVDWCV6BS7AQI + Ta9HqHoo+zckmaCqEbTXIqc+8XJN5zXxV6PC2BxR1wjDNtmWeLmGb0gUowSqG/lX5I1ojbwRrfF/GLkX + P+G4Nz+qyUsTKij4DaqNxnRXLBhpAAAAAElFTkSuQmCC + + + + 221, 17 + + + 84 + + + + AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAEAAAMMOAADDDgAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWqUeEVyo + H1Bbpx59W6gepVunH8xbqB7gW6gf7lqoH/1aqB/9W6gf7luoHuBaqB/LW6gepVunHn1apyBPX68fEAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF2n + ISZaqB+BW6cfzFunH/xbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1unH/xaqB/LWqgfgVypHCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAA/vwAEW6keXFunHsZbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6cexlupHlw/vwAEAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAD+/AARaqR5lWqcf3luoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf3FqnHmM/vwAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFynHjpapx7QW6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gezluoHzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX58fCFqnHpVbpx/+W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9aqB/9W6gfkUi2 + JAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWaUbJVunHs9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB7OWaUbJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWqgfQVun + HvBbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1qnHu9ZqSA/AAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAW6YeVFunHvhbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//Wqge91um + H1EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAWqcfUlunH/xbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bpx/8W6YdTgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXKYeQlunHvlbqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1unHvhcph5CAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW6kgJ1unHvBbqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//Zq4u/3CzPP9cqSH/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6ce8Fyp + HCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVKkcCVqn + HtBbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9cqCD/u9uj//7+/f//////5PHa/3O1QP9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9apx/NSLYkBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAFuoHpZbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//k8Zr//////////////////// + ///P5r7/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1qnH5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAFmqHTxbpx/+W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/7bY + nP//////////////////////8fjt/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9aqB/9W6gfOAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD+/AARbqB7RW6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/+726P///////////////////////X68v9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1unHs9VqgADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABbqCBnW6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//u9uj///////////////////////1+vL/W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6geZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAA/vwAEWqcf3luoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/7vbo/////////////// + ////////9fry/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH9w/vwAEAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAXKgdXluoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/+726P///////////////////////X68v9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//WageWwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFqoHshbqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//u9uj///////////////////////1+vL/W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1unHsYAAAAAAAAAAAAAAAAAAAAAAAAAAFmlHyhbqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/7vbo///////////////////////9fry/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//XKkcJAAAAAAAAAAAAAAAAAAA + AABaqB6EW6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/+726P///////// + //////////////X68v9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1qo + H4EAAAAAAAAAAAAAAAAAAAAAW6gezluoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//u9uj///////////////////////1+vL/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9aqB/LAAAAAAAAAAAAAAAAXa4aE1qoH/1bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//dbZC//D36v///////////////////////////6nRif9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6cf/FqlHhEAAAAAAAAAAFumH1FbqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//dbZC//D36v////////////////////////////// + ////////qdGJ/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9apyBPAAAAAAAA + AABbpx+AW6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//dbZC//D36v////////////// + ///2+vP/1+rJ//////////////////////+p0Yn/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6cefgAAAAAAAAAAWqcepluoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//dbZC//D3 + 6v/////////////////2+vP/gLxS/1+qJP/N5bv//////////////////////6nRif9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1unH6QAAAAAAAAAAFuoHs5bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//dbZC//D36v/////////////////2+vP/gLxS/1uoH/9bqB//X6ok/83lu/////////////// + ////////qdGJ/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9aqB/LAAAAAAAAAABapx7hW6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//dbZC//D36v/////////////////2+vP/gLxS/1uoH/9bqB//W6gf/1uo + H/9fqiT/zeW7//////////////////////+p0Yn/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//Wqce4QAA + AAAAAAAAW6ce8FuoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//dbZC//D36v/////////////////2+vP/gLxS/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1+qJP/N5bv//////////////////////6nRif9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1qnHu8AAAAAAAAAAFqoH/1bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//dbZC//D36v////////////// + ///2+vP/gLxS/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//X6ok/83lu/////////////// + ////////qdGJ/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bpx/8AAAAAAAAAABaqB/9W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9gqyb/q9KM/3a2RP9bqB//W6gf/1uoH/9bqB//dbZC//D3 + 6v/////////////////2+vP/gLxS/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9fqiT/zeW7//////////////////////+p0Yn/W6gf/1uoH/9bqB//W6gf/1+qJP+o0Yj/e7lL/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6cf/AAAAAAAAAAAW6ce8Fuo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//kMRn///////z+e7/erhJ/1uo + H/9bqB//dbZC//D36v/////////////////2+vP/gLxS/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1+qJP/N5bv//////////////////////6nRif9bqB//W6gf/1+q + JP/O5bz//////9Dmv/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1qn + Hu8AAAAAAAAAAFqnHuFbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/7PX + l/////////////P57v97uUr/dbZC//D36v/////////////////2+vP/gLxS/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//X6ok/83lu/////////////// + ////////qdGJ/1+qJP/O5bz////////////y+O3/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9apx7hAAAAAAAAAABbqB7OW6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH//W6cf/////////////////8/nu//D36v/////////////////2+vP/gLxS/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9fqiT/zeW7///////////////////////l8dv//////////////////////3K0P/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//WqgfywAAAAAAAAAAWqcepluoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9dqSL/9/v0//////////////////////////////////// + ///2+vP/gLxS/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1+qJP/N5bv///////////////////////////////////////// + //+Uxm3/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1unH6QAAAAAAAAAAFun + H4BbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//ebhH//////////////////// + ///////////////////2+vP/gLxS/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//X6ok/83lu/////////////// + ////////////////////////uNmd/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bpx5+AAAAAAAAAABapx9SW6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/5vK + dv//////////////////////////////////////8fjt/3m4SP9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/12p + Iv/E4K7//////////////////////////////////////9rszf9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//WqcgTwAAAAAAAAAAXa4aE1qoH/1bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/+/3af////////////////////////////////////////////x+O3/ebhI/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/12pIv/E4K7////////////////////////////////////////////6/Pj/X6ok/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6cf/FqlHhEAAAAAAAAAAAAAAABapx7QW6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//4e/W//////////////////////////////////// + //////////////H47f91tkP/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH//C36z///////////////////////////////////////// + /////////////3y5TP9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1unH8wAAAAAAAAAAAAA + AAAAAAAAWqgehVuoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//Yqwp//3+/P////////////// + ////////////////////////////////////////ptCG/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9hqyj//P37//////////////////// + //////////////////////////////////+gzX3/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9aqB+CAAAAAAAAAAAAAAAAAAAAAF2nHylbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/4O9 + Vf//////////////////////////////////////8ffs/87lvP+r043/iMBc/16pI/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/3W2 + Qv+gzX3/w9+t/+by3f/+//7/////////////////////////////////wd6r/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//WaUbJQAAAAAAAAAAAAAAAAAAAAAAAAAAWqcfyluoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/+Wx3D////////////5/Pf/2evL/7bYnP+Uxmz/cLM8/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//Za0t/4nAXf+r043/zuW8//H47f///////////9jq + yf9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//WqcexwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFqn + H2BbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//Xqoj/5DEaP97uUv/Xqkj/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//cLM8/5PGa/91tkP/W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1upHlwAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAA/vwAEW6ge31uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H90/vwAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFuoH2pbqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9apx5mAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/vwAEWqcf01uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bpx7PP78ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAFunHT1bpx/+W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bpx/+XKceOgAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW6cel1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gflAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGayGQpbqB7RW6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gezl+fHwgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAWaUfKFunHvBbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6ce8F2nISYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABcph5CW6ce+VuoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6ce+VymHkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFqoHlVbpx/8W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6cf/FumH1EAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAW6YeVFunHvhbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6ce+Fum + HlQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABbpx5DWqce8luoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//Wqge8VqoH0EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFmlHyhapx/TW6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6cez12nISYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAVKkcCVqnHphbpx/+W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bpx/+W6cel1+fHwgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW6cdPVqnH9NbqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB7RWqgeOwAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/vwAEWqYea1uo + Ht9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1qnH95bqCBnP78ABAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAABmmTMFW6kgX1unHslbqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//Wqcex1up + IF8/vwAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWaUfKFunHoZapx7QWqgf/Vuo + H/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//W6gf/1uoH/9bqB//Wqgf/Vuo + Hs5aqB6EWaUfKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAF2uGhNapx9SW6cfgFunHqdapx/NW6ge4luoH+5bpx/+W6cf/luoH+5bqB7iWqcfzVun + Hqdbpx+AW6YfUV2uGhMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAA//////////////8AAP//////+AAAH//////AAAAD/////wAAAAD////+AAAAAH////gAAAAA + H///8AAAAAAP///gAAAAAAf//8AAAAAAA///gAAAAAAB//8AAAAAAAD//gAAAAAAAH/8AAAAAAAAP/wA + AAAAAAA/+AAAAAAAAB/wAAAAAAAAD/AAAAAAAAAP4AAAAAAAAAfgAAAAAAAAB+AAAAAAAAAHwAAAAAAA + AAPAAAAAAAAAA8AAAAAAAAADgAAAAAAAAAGAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAYAA + AAAAAAABgAAAAAAAAAGAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAYAAAAAAAAABgAAAAAAA + AAGAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAHAAAAAAAAAA8AAAAAAAAADwAAAAAAAAAPgAAAAAAAAB+AA + AAAAAAAH4AAAAAAAAAfwAAAAAAAAD/AAAAAAAAAP+AAAAAAAAB/8AAAAAAAAP/wAAAAAAAA//gAAAAAA + AH//AAAAAAAA//+AAAAAAAH//8AAAAAAA///4AAAAAAH///wAAAAAA////gAAAAAH////gAAAAB///// + AAAAAP/////AAAAD//////gAAB///////wAA//////////////8= + + + \ No newline at end of file diff --git a/Cs_HMI/Project/fSetup.Designer.cs b/Cs_HMI/Project/fSetup.Designer.cs new file mode 100644 index 0000000..0e61e4b --- /dev/null +++ b/Cs_HMI/Project/fSetup.Designer.cs @@ -0,0 +1,3649 @@ +namespace Project +{ + partial class fSetup + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fSetup)); + this.label2 = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage6 = new System.Windows.Forms.TabPage(); + this.panel1 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.btMusic = new arCtl.arLabel(); + this.btAutoCharge = new arCtl.arLabel(); + this.btSpeaker = new arCtl.arLabel(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tbagvchannel = new System.Windows.Forms.TextBox(); + this.tbagvpanid = new System.Windows.Forms.TextBox(); + this.tbagvaddr = new System.Windows.Forms.TextBox(); + this.button7 = new System.Windows.Forms.Button(); + this.label52 = new System.Windows.Forms.Label(); + this.button6 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.label50 = new System.Windows.Forms.Label(); + this.label40 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label57 = new System.Windows.Forms.Label(); + this.label56 = new System.Windows.Forms.Label(); + this.label55 = new System.Windows.Forms.Label(); + this.label32 = new System.Windows.Forms.Label(); + this.label31 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.vcSAD = new AGVControl.ValueSelect(); + this.vcSpeedDrive = new AGVControl.ValueSelect(); + this.vcSTT = new AGVControl.ValueSelect(); + this.vcSSK = new AGVControl.ValueSelect(); + this.vcSCK = new AGVControl.ValueSelect(); + this.vcpidDS = new AGVControl.ValueSelect(); + this.vcpidPS = new AGVControl.ValueSelect(); + this.vcpidIS = new AGVControl.ValueSelect(); + this.vcpidDL = new AGVControl.ValueSelect(); + this.vcpidDH = new AGVControl.ValueSelect(); + this.vcpidDM = new AGVControl.ValueSelect(); + this.vcpidIL = new AGVControl.ValueSelect(); + this.vcpidIH = new AGVControl.ValueSelect(); + this.vcpidIM = new AGVControl.ValueSelect(); + this.vcpidPL = new AGVControl.ValueSelect(); + this.vcpidPH = new AGVControl.ValueSelect(); + this.vcpidPM = new AGVControl.ValueSelect(); + this.vcSpeedR = new AGVControl.ValueSelect(); + this.vcSpeedH = new AGVControl.ValueSelect(); + this.vcSpeedS = new AGVControl.ValueSelect(); + this.vcSpeedL = new AGVControl.ValueSelect(); + this.vcSpeedM = new AGVControl.ValueSelect(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.button3 = new System.Windows.Forms.Button(); + this.label30 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.tbBaudBAT = new System.Windows.Forms.ComboBox(); + this.tbportBMS = new System.Windows.Forms.TextBox(); + this.label27 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.tbBaudAGV = new System.Windows.Forms.ComboBox(); + this.tbPortAGV = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.btSelPlc1 = new System.Windows.Forms.Button(); + this.btSelXbee = new System.Windows.Forms.Button(); + this.tbBaudPLC = new System.Windows.Forms.ComboBox(); + this.tbBaudXBE = new System.Windows.Forms.ComboBox(); + this.tbPortPLC = new System.Windows.Forms.TextBox(); + this.tbPortXBE = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.valIntervalBMS = new AGVControl.ValueSelect(); + this.valueSelect4 = new AGVControl.ValueSelect(); + this.valIntervalXBE = new AGVControl.ValueSelect(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.cmbChargerPos = new System.Windows.Forms.ComboBox(); + this.label58 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label44 = new System.Windows.Forms.Label(); + this.label29 = new System.Windows.Forms.Label(); + this.label43 = new System.Windows.Forms.Label(); + this.label42 = new System.Windows.Forms.Label(); + this.label41 = new System.Windows.Forms.Label(); + this.label39 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label33 = new System.Windows.Forms.Label(); + this.label36 = new System.Windows.Forms.Label(); + this.label37 = new System.Windows.Forms.Label(); + this.label35 = new System.Windows.Forms.Label(); + this.label34 = new System.Windows.Forms.Label(); + this.label38 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.vcChargeStartLevel = new AGVControl.ValueSelect(); + this.vcChargeMaxLevel = new AGVControl.ValueSelect(); + this.vcChargeWaitSec = new AGVControl.ValueSelect(); + this.tbChargerID = new AGVControl.ValueSelect(); + this.vcChargeEmergencyLevel = new AGVControl.ValueSelect(); + this.vcChargeMaxTime = new AGVControl.ValueSelect(); + this.vcChargeRetryTerm = new AGVControl.ValueSelect(); + this.vcChargeSearchTime = new AGVControl.ValueSelect(); + this.tabPage5 = new System.Windows.Forms.TabPage(); + this.label54 = new System.Windows.Forms.Label(); + this.vcTagF5A = new AGVControl.ValueSelect(); + this.vcTagF5B = new AGVControl.ValueSelect(); + this.vcTagF4F5 = new AGVControl.ValueSelect(); + this.vcTagQAA = new AGVControl.ValueSelect(); + this.vcTagQAB = new AGVControl.ValueSelect(); + this.label17 = new System.Windows.Forms.Label(); + this.button4 = new System.Windows.Forms.Button(); + this.label49 = new System.Windows.Forms.Label(); + this.label53 = new System.Windows.Forms.Label(); + this.label47 = new System.Windows.Forms.Label(); + this.label48 = new System.Windows.Forms.Label(); + this.label51 = new System.Windows.Forms.Label(); + this.label46 = new System.Windows.Forms.Label(); + this.label45 = new System.Windows.Forms.Label(); + this.vcTagQAQC = new AGVControl.ValueSelect(); + this.vcTagF3F4 = new AGVControl.ValueSelect(); + this.vcTagF2F3 = new AGVControl.ValueSelect(); + this.vcTagF1A = new AGVControl.ValueSelect(); + this.vcTagF1B = new AGVControl.ValueSelect(); + this.vcTagF3A = new AGVControl.ValueSelect(); + this.vcTagQCA = new AGVControl.ValueSelect(); + this.vcTagF3B = new AGVControl.ValueSelect(); + this.vcTagF2A = new AGVControl.ValueSelect(); + this.vcTagQCB = new AGVControl.ValueSelect(); + this.vcTagF4A = new AGVControl.ValueSelect(); + this.vcTagF1F2 = new AGVControl.ValueSelect(); + this.vcTagF2B = new AGVControl.ValueSelect(); + this.vcTagF4B = new AGVControl.ValueSelect(); + this.vcTagQCF1 = new AGVControl.ValueSelect(); + this.vcTagPOT = new AGVControl.ValueSelect(); + this.vcTagNOT = new AGVControl.ValueSelect(); + this.tabPage4 = new System.Windows.Forms.TabPage(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.tbMCID = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.chkDetectManualCharge = new System.Windows.Forms.CheckBox(); + this.chkAGVDirBack = new System.Windows.Forms.CheckBox(); + this.chkFullScreen = new System.Windows.Forms.CheckBox(); + this.nudMusicVol = new System.Windows.Forms.NumericUpDown(); + this.label22 = new System.Windows.Forms.Label(); + this.linkLabel5 = new System.Windows.Forms.LinkLabel(); + this.linkLabel4 = new System.Windows.Forms.LinkLabel(); + this.linkLabel3 = new System.Windows.Forms.LinkLabel(); + this.tbMusic = new System.Windows.Forms.TextBox(); + this.label16 = new System.Windows.Forms.Label(); + this.nudDoorSoundTerm = new System.Windows.Forms.NumericUpDown(); + this.label3 = new System.Windows.Forms.Label(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.cleartime2 = new System.Windows.Forms.DateTimePicker(); + this.cleartime1 = new System.Windows.Forms.DateTimePicker(); + this.chkClear2 = new System.Windows.Forms.CheckBox(); + this.chkClear1 = new System.Windows.Forms.CheckBox(); + this.panel6 = new System.Windows.Forms.Panel(); + this.panTopMenu = new System.Windows.Forms.Panel(); + this.label10 = new System.Windows.Forms.Label(); + this.btClose = new arCtl.arLabel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.label8 = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.bt5 = new arCtl.arLabel(); + this.bt4 = new arCtl.arLabel(); + this.bt3 = new arCtl.arLabel(); + this.bt2 = new arCtl.arLabel(); + this.bt1 = new arCtl.arLabel(); + this.bt0 = new arCtl.arLabel(); + this.btSave = new arCtl.arLabel(); + this.chkClearPos = new System.Windows.Forms.CheckBox(); + this.tabControl1.SuspendLayout(); + this.tabPage6.SuspendLayout(); + this.panel1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.tabPage5.SuspendLayout(); + this.tabPage4.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudMusicVol)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDoorSoundTerm)).BeginInit(); + this.groupBox4.SuspendLayout(); + this.panTopMenu.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label2.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label2.Location = new System.Drawing.Point(76, 32); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(187, 24); + this.label2.TabIndex = 5; + this.label2.Text = "속도(저/중/고)"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // tabControl1 + // + this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Right; + this.tabControl1.Controls.Add(this.tabPage6); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Controls.Add(this.tabPage5); + this.tabControl1.Controls.Add(this.tabPage4); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(5, 142); + this.tabControl1.Multiline = true; + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(1270, 598); + this.tabControl1.TabIndex = 14; + // + // tabPage6 + // + this.tabPage6.Controls.Add(this.panel1); + this.tabPage6.Location = new System.Drawing.Point(4, 4); + this.tabPage6.Name = "tabPage6"; + this.tabPage6.Size = new System.Drawing.Size(1244, 590); + this.tabPage6.TabIndex = 6; + this.tabPage6.Text = "일반"; + this.tabPage6.UseVisualStyleBackColor = true; + // + // panel1 + // + this.panel1.Controls.Add(this.tableLayoutPanel1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0); + this.panel1.Size = new System.Drawing.Size(1244, 648); + this.panel1.TabIndex = 0; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.btMusic, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.btAutoCharge, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.btSpeaker, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1238, 648); + this.tableLayoutPanel1.TabIndex = 24; + // + // btMusic + // + this.btMusic.BackColor = System.Drawing.Color.Lime; + this.btMusic.BackColor2 = System.Drawing.Color.Green; + this.btMusic.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btMusic.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btMusic.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.btMusic.BorderSize = new System.Windows.Forms.Padding(2); + this.btMusic.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btMusic.Cursor = System.Windows.Forms.Cursors.Hand; + this.btMusic.Dock = System.Windows.Forms.DockStyle.Fill; + this.btMusic.Font = new System.Drawing.Font("맑은 고딕", 80F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btMusic.ForeColor = System.Drawing.Color.White; + this.btMusic.GradientEnable = true; + this.btMusic.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btMusic.GradientRepeatBG = false; + this.btMusic.isButton = true; + this.btMusic.Location = new System.Drawing.Point(3, 327); + this.btMusic.MouseDownColor = System.Drawing.Color.Yellow; + this.btMusic.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btMusic.msg = null; + this.btMusic.Name = "btMusic"; + this.btMusic.ProgressBorderColor = System.Drawing.Color.Black; + this.btMusic.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btMusic.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btMusic.ProgressEnable = false; + this.btMusic.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btMusic.ProgressForeColor = System.Drawing.Color.Black; + this.btMusic.ProgressMax = 100F; + this.btMusic.ProgressMin = 0F; + this.btMusic.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btMusic.ProgressValue = 0F; + this.btMusic.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btMusic.Sign = ""; + this.btMusic.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btMusic.SignColor = System.Drawing.Color.Yellow; + this.btMusic.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btMusic.Size = new System.Drawing.Size(613, 318); + this.btMusic.TabIndex = 23; + this.btMusic.Tag = "2"; + this.btMusic.Text = "배경음악"; + this.btMusic.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btMusic.TextShadow = true; + this.btMusic.TextVisible = true; + this.btMusic.Click += new System.EventHandler(this.btMagnet_Click); + // + // btAutoCharge + // + this.btAutoCharge.BackColor = System.Drawing.Color.Lime; + this.btAutoCharge.BackColor2 = System.Drawing.Color.Green; + this.btAutoCharge.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btAutoCharge.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btAutoCharge.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.btAutoCharge.BorderSize = new System.Windows.Forms.Padding(2); + this.btAutoCharge.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btAutoCharge.Cursor = System.Windows.Forms.Cursors.Hand; + this.btAutoCharge.Dock = System.Windows.Forms.DockStyle.Fill; + this.btAutoCharge.Font = new System.Drawing.Font("맑은 고딕", 80F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btAutoCharge.ForeColor = System.Drawing.Color.White; + this.btAutoCharge.GradientEnable = true; + this.btAutoCharge.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btAutoCharge.GradientRepeatBG = false; + this.btAutoCharge.isButton = true; + this.btAutoCharge.Location = new System.Drawing.Point(622, 3); + this.btAutoCharge.MouseDownColor = System.Drawing.Color.Yellow; + this.btAutoCharge.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btAutoCharge.msg = null; + this.btAutoCharge.Name = "btAutoCharge"; + this.btAutoCharge.ProgressBorderColor = System.Drawing.Color.Black; + this.btAutoCharge.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btAutoCharge.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btAutoCharge.ProgressEnable = false; + this.btAutoCharge.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btAutoCharge.ProgressForeColor = System.Drawing.Color.Black; + this.btAutoCharge.ProgressMax = 100F; + this.btAutoCharge.ProgressMin = 0F; + this.btAutoCharge.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btAutoCharge.ProgressValue = 0F; + this.btAutoCharge.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btAutoCharge.Sign = ""; + this.btAutoCharge.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btAutoCharge.SignColor = System.Drawing.Color.Yellow; + this.btAutoCharge.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btAutoCharge.Size = new System.Drawing.Size(613, 318); + this.btAutoCharge.TabIndex = 20; + this.btAutoCharge.Tag = "1"; + this.btAutoCharge.Text = "자동충전"; + this.btAutoCharge.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btAutoCharge.TextShadow = true; + this.btAutoCharge.TextVisible = true; + this.btAutoCharge.Click += new System.EventHandler(this.btMagnet_Click); + // + // btSpeaker + // + this.btSpeaker.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(50)))), ((int)(((byte)(50))))); + this.btSpeaker.BackColor2 = System.Drawing.Color.Gray; + this.btSpeaker.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btSpeaker.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btSpeaker.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.btSpeaker.BorderSize = new System.Windows.Forms.Padding(2); + this.btSpeaker.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btSpeaker.Cursor = System.Windows.Forms.Cursors.Hand; + this.btSpeaker.Dock = System.Windows.Forms.DockStyle.Fill; + this.btSpeaker.Font = new System.Drawing.Font("맑은 고딕", 80F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btSpeaker.ForeColor = System.Drawing.Color.White; + this.btSpeaker.GradientEnable = true; + this.btSpeaker.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.btSpeaker.GradientRepeatBG = false; + this.btSpeaker.isButton = true; + this.btSpeaker.Location = new System.Drawing.Point(3, 3); + this.btSpeaker.MouseDownColor = System.Drawing.Color.Yellow; + this.btSpeaker.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btSpeaker.msg = null; + this.btSpeaker.Name = "btSpeaker"; + this.btSpeaker.ProgressBorderColor = System.Drawing.Color.Black; + this.btSpeaker.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btSpeaker.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btSpeaker.ProgressEnable = false; + this.btSpeaker.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btSpeaker.ProgressForeColor = System.Drawing.Color.Black; + this.btSpeaker.ProgressMax = 100F; + this.btSpeaker.ProgressMin = 0F; + this.btSpeaker.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btSpeaker.ProgressValue = 0F; + this.btSpeaker.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btSpeaker.Sign = ""; + this.btSpeaker.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btSpeaker.SignColor = System.Drawing.Color.Yellow; + this.btSpeaker.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btSpeaker.Size = new System.Drawing.Size(613, 318); + this.btSpeaker.TabIndex = 11; + this.btSpeaker.Tag = "0"; + this.btSpeaker.Text = "음성지원"; + this.btSpeaker.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btSpeaker.TextShadow = true; + this.btSpeaker.TextVisible = true; + this.btSpeaker.Click += new System.EventHandler(this.btMagnet_Click); + // + // tabPage1 + // + this.tabPage1.BackColor = System.Drawing.Color.Navy; + this.tabPage1.Controls.Add(this.tbagvchannel); + this.tabPage1.Controls.Add(this.tbagvpanid); + this.tabPage1.Controls.Add(this.tbagvaddr); + this.tabPage1.Controls.Add(this.button7); + this.tabPage1.Controls.Add(this.label52); + this.tabPage1.Controls.Add(this.button6); + this.tabPage1.Controls.Add(this.button5); + this.tabPage1.Controls.Add(this.label50); + this.tabPage1.Controls.Add(this.label40); + this.tabPage1.Controls.Add(this.label20); + this.tabPage1.Controls.Add(this.label11); + this.tabPage1.Controls.Add(this.label18); + this.tabPage1.Controls.Add(this.label57); + this.tabPage1.Controls.Add(this.label56); + this.tabPage1.Controls.Add(this.label55); + this.tabPage1.Controls.Add(this.label32); + this.tabPage1.Controls.Add(this.label31); + this.tabPage1.Controls.Add(this.label15); + this.tabPage1.Controls.Add(this.label25); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.vcSAD); + this.tabPage1.Controls.Add(this.vcSpeedDrive); + this.tabPage1.Controls.Add(this.vcSTT); + this.tabPage1.Controls.Add(this.vcSSK); + this.tabPage1.Controls.Add(this.vcSCK); + this.tabPage1.Controls.Add(this.vcpidDS); + this.tabPage1.Controls.Add(this.vcpidPS); + this.tabPage1.Controls.Add(this.vcpidIS); + this.tabPage1.Controls.Add(this.vcpidDL); + this.tabPage1.Controls.Add(this.vcpidDH); + this.tabPage1.Controls.Add(this.vcpidDM); + this.tabPage1.Controls.Add(this.vcpidIL); + this.tabPage1.Controls.Add(this.vcpidIH); + this.tabPage1.Controls.Add(this.vcpidIM); + this.tabPage1.Controls.Add(this.vcpidPL); + this.tabPage1.Controls.Add(this.vcpidPH); + this.tabPage1.Controls.Add(this.vcpidPM); + this.tabPage1.Controls.Add(this.vcSpeedR); + this.tabPage1.Controls.Add(this.vcSpeedH); + this.tabPage1.Controls.Add(this.vcSpeedS); + this.tabPage1.Controls.Add(this.vcSpeedL); + this.tabPage1.Controls.Add(this.vcSpeedM); + this.tabPage1.Location = new System.Drawing.Point(4, 4); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(1244, 590); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "AGV"; + // + // tbagvchannel + // + this.tbagvchannel.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold); + this.tbagvchannel.Location = new System.Drawing.Point(975, 201); + this.tbagvchannel.Name = "tbagvchannel"; + this.tbagvchannel.Size = new System.Drawing.Size(164, 54); + this.tbagvchannel.TabIndex = 77; + // + // tbagvpanid + // + this.tbagvpanid.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold); + this.tbagvpanid.Location = new System.Drawing.Point(975, 141); + this.tbagvpanid.Name = "tbagvpanid"; + this.tbagvpanid.Size = new System.Drawing.Size(164, 54); + this.tbagvpanid.TabIndex = 76; + // + // tbagvaddr + // + this.tbagvaddr.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold); + this.tbagvaddr.Location = new System.Drawing.Point(975, 77); + this.tbagvaddr.Name = "tbagvaddr"; + this.tbagvaddr.Size = new System.Drawing.Size(164, 54); + this.tbagvaddr.TabIndex = 75; + // + // button7 + // + this.button7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button7.Font = new System.Drawing.Font("궁서체", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.button7.Location = new System.Drawing.Point(1145, 77); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(93, 56); + this.button7.TabIndex = 74; + this.button7.Tag = "SAD"; + this.button7.Text = "SET"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // label52 + // + this.label52.AutoSize = true; + this.label52.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label52.ForeColor = System.Drawing.Color.Gray; + this.label52.Location = new System.Drawing.Point(868, 92); + this.label52.Name = "label52"; + this.label52.Size = new System.Drawing.Size(101, 24); + this.label52.TabIndex = 73; + this.label52.Text = "Address"; + this.label52.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // button6 + // + this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button6.Font = new System.Drawing.Font("궁서체", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.button6.Location = new System.Drawing.Point(1145, 197); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(93, 56); + this.button6.TabIndex = 71; + this.button6.Tag = "SCH"; + this.button6.Text = "SET"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // button5 + // + this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button5.Font = new System.Drawing.Font("궁서체", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.button5.Location = new System.Drawing.Point(1145, 137); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(93, 56); + this.button5.TabIndex = 70; + this.button5.Tag = "SPN"; + this.button5.Text = "SET"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // label50 + // + this.label50.AutoSize = true; + this.label50.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label50.ForeColor = System.Drawing.Color.Gray; + this.label50.Location = new System.Drawing.Point(868, 212); + this.label50.Name = "label50"; + this.label50.Size = new System.Drawing.Size(101, 24); + this.label50.TabIndex = 69; + this.label50.Text = "Channel"; + this.label50.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label40 + // + this.label40.AutoSize = true; + this.label40.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label40.ForeColor = System.Drawing.Color.Gray; + this.label40.Location = new System.Drawing.Point(881, 152); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(88, 24); + this.label40.TabIndex = 67; + this.label40.Text = "Pan ID"; + this.label40.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label20.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label20.Location = new System.Drawing.Point(526, 464); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(101, 24); + this.label20.TabIndex = 65; + this.label20.Text = "Address"; + this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label11.ForeColor = System.Drawing.Color.Gray; + this.label11.Location = new System.Drawing.Point(846, 32); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(123, 24); + this.label11.TabIndex = 63; + this.label11.Text = "주행 속도"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label18.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label18.Location = new System.Drawing.Point(49, 342); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(214, 24); + this.label18.TabIndex = 61; + this.label18.Text = "정지상수 (P/I/D)"; + this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label57 + // + this.label57.AutoSize = true; + this.label57.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label57.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label57.Location = new System.Drawing.Point(63, 464); + this.label57.Name = "label57"; + this.label57.Size = new System.Drawing.Size(200, 24); + this.label57.TabIndex = 60; + this.label57.Text = "TAG 재입력 시간"; + this.label57.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label56 + // + this.label56.AutoSize = true; + this.label56.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label56.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label56.Location = new System.Drawing.Point(441, 404); + this.label56.Name = "label56"; + this.label56.Size = new System.Drawing.Size(186, 24); + this.label56.TabIndex = 58; + this.label56.Text = "정지 감속 주기"; + this.label56.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label55 + // + this.label55.AutoSize = true; + this.label55.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label55.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label55.Location = new System.Drawing.Point(77, 404); + this.label55.Name = "label55"; + this.label55.Size = new System.Drawing.Size(186, 24); + this.label55.TabIndex = 58; + this.label55.Text = "정지 감속 상수"; + this.label55.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label32 + // + this.label32.AutoSize = true; + this.label32.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label32.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label32.Location = new System.Drawing.Point(58, 280); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(205, 24); + this.label32.TabIndex = 51; + this.label32.Text = "PID (H/M/L) - D"; + this.label32.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label31.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label31.Location = new System.Drawing.Point(58, 218); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(205, 24); + this.label31.TabIndex = 47; + this.label31.Text = "PID (H/M/L) - I"; + this.label31.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label15.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label15.Location = new System.Drawing.Point(58, 156); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(205, 24); + this.label15.TabIndex = 43; + this.label15.Text = "PID (H/M/L) - P"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label25.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label25.Location = new System.Drawing.Point(64, 94); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(199, 24); + this.label25.TabIndex = 36; + this.label25.Text = "속도(정지/회전)"; + this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // vcSAD + // + this.vcSAD.BackColorButton = System.Drawing.Color.White; + this.vcSAD.ButtonWidth = "30"; + this.vcSAD.ColorBorder = System.Drawing.Color.White; + this.vcSAD.DecimalPosition = ((ushort)(0)); + this.vcSAD.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSAD.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSAD.ForeColor = System.Drawing.Color.White; + this.vcSAD.ForeColorButton = System.Drawing.Color.Black; + this.vcSAD.Location = new System.Drawing.Point(633, 449); + this.vcSAD.MaxValue = 9999D; + this.vcSAD.MinValue = 0D; + this.vcSAD.Name = "vcSAD"; + this.vcSAD.NullDisplay = "--"; + this.vcSAD.SideButtonClickValue = 1D; + this.vcSAD.Size = new System.Drawing.Size(164, 54); + this.vcSAD.TabIndex = 64; + this.vcSAD.Tag = "SAD"; + this.vcSAD.Text = "30"; + this.vcSAD.Value = 30D; + this.vcSAD.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSAD.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSpeedDrive + // + this.vcSpeedDrive.BackColorButton = System.Drawing.Color.White; + this.vcSpeedDrive.ButtonWidth = "30"; + this.vcSpeedDrive.ColorBorder = System.Drawing.Color.White; + this.vcSpeedDrive.DecimalPosition = ((ushort)(0)); + this.vcSpeedDrive.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSpeedDrive.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSpeedDrive.ForeColor = System.Drawing.Color.DimGray; + this.vcSpeedDrive.ForeColorButton = System.Drawing.Color.Black; + this.vcSpeedDrive.Location = new System.Drawing.Point(975, 17); + this.vcSpeedDrive.MaxValue = 9999D; + this.vcSpeedDrive.MinValue = 0D; + this.vcSpeedDrive.Name = "vcSpeedDrive"; + this.vcSpeedDrive.NullDisplay = "--"; + this.vcSpeedDrive.SideButtonClickValue = 3D; + this.vcSpeedDrive.Size = new System.Drawing.Size(164, 54); + this.vcSpeedDrive.TabIndex = 62; + this.vcSpeedDrive.Tag = "SSL"; + this.vcSpeedDrive.Text = "30"; + this.vcSpeedDrive.Value = 30D; + this.vcSpeedDrive.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSpeedDrive.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSTT + // + this.vcSTT.BackColorButton = System.Drawing.Color.White; + this.vcSTT.ButtonWidth = "30"; + this.vcSTT.ColorBorder = System.Drawing.Color.White; + this.vcSTT.DecimalPosition = ((ushort)(0)); + this.vcSTT.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSTT.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSTT.ForeColor = System.Drawing.Color.White; + this.vcSTT.ForeColorButton = System.Drawing.Color.Black; + this.vcSTT.Location = new System.Drawing.Point(269, 449); + this.vcSTT.MaxValue = 9999D; + this.vcSTT.MinValue = 0D; + this.vcSTT.Name = "vcSTT"; + this.vcSTT.NullDisplay = "--"; + this.vcSTT.SideButtonClickValue = 1D; + this.vcSTT.Size = new System.Drawing.Size(164, 54); + this.vcSTT.TabIndex = 59; + this.vcSTT.Tag = "SDH"; + this.vcSTT.Text = "30"; + this.vcSTT.Value = 30D; + this.vcSTT.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSTT.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSSK + // + this.vcSSK.BackColorButton = System.Drawing.Color.White; + this.vcSSK.ButtonWidth = "30"; + this.vcSSK.ColorBorder = System.Drawing.Color.White; + this.vcSSK.DecimalPosition = ((ushort)(0)); + this.vcSSK.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSSK.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSSK.ForeColor = System.Drawing.Color.White; + this.vcSSK.ForeColorButton = System.Drawing.Color.Black; + this.vcSSK.Location = new System.Drawing.Point(633, 389); + this.vcSSK.MaxValue = 9999D; + this.vcSSK.MinValue = 0D; + this.vcSSK.Name = "vcSSK"; + this.vcSSK.NullDisplay = "--"; + this.vcSSK.SideButtonClickValue = 1D; + this.vcSSK.Size = new System.Drawing.Size(164, 54); + this.vcSSK.TabIndex = 57; + this.vcSSK.Tag = "SDH"; + this.vcSSK.Text = "10"; + this.vcSSK.Value = 10D; + this.vcSSK.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSSK.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSCK + // + this.vcSCK.BackColorButton = System.Drawing.Color.White; + this.vcSCK.ButtonWidth = "30"; + this.vcSCK.ColorBorder = System.Drawing.Color.White; + this.vcSCK.DecimalPosition = ((ushort)(0)); + this.vcSCK.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSCK.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSCK.ForeColor = System.Drawing.Color.White; + this.vcSCK.ForeColorButton = System.Drawing.Color.Black; + this.vcSCK.Location = new System.Drawing.Point(269, 389); + this.vcSCK.MaxValue = 9999D; + this.vcSCK.MinValue = 0D; + this.vcSCK.Name = "vcSCK"; + this.vcSCK.NullDisplay = "--"; + this.vcSCK.SideButtonClickValue = 1D; + this.vcSCK.Size = new System.Drawing.Size(164, 54); + this.vcSCK.TabIndex = 57; + this.vcSCK.Tag = "SDH"; + this.vcSCK.Text = "10"; + this.vcSCK.Value = 10D; + this.vcSCK.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSCK.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidDS + // + this.vcpidDS.BackColorButton = System.Drawing.Color.White; + this.vcpidDS.ButtonWidth = "30"; + this.vcpidDS.ColorBorder = System.Drawing.Color.White; + this.vcpidDS.DecimalPosition = ((ushort)(0)); + this.vcpidDS.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidDS.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidDS.ForeColor = System.Drawing.Color.White; + this.vcpidDS.ForeColorButton = System.Drawing.Color.Black; + this.vcpidDS.Location = new System.Drawing.Point(633, 327); + this.vcpidDS.MaxValue = 9999D; + this.vcpidDS.MinValue = 0D; + this.vcpidDS.Name = "vcpidDS"; + this.vcpidDS.NullDisplay = "--"; + this.vcpidDS.SideButtonClickValue = 3D; + this.vcpidDS.Size = new System.Drawing.Size(164, 54); + this.vcpidDS.TabIndex = 56; + this.vcpidDS.Tag = "SDS"; + this.vcpidDS.Text = "15"; + this.vcpidDS.Value = 15D; + this.vcpidDS.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidDS.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidPS + // + this.vcpidPS.BackColorButton = System.Drawing.Color.White; + this.vcpidPS.ButtonWidth = "30"; + this.vcpidPS.ColorBorder = System.Drawing.Color.White; + this.vcpidPS.DecimalPosition = ((ushort)(0)); + this.vcpidPS.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidPS.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidPS.ForeColor = System.Drawing.Color.White; + this.vcpidPS.ForeColorButton = System.Drawing.Color.Black; + this.vcpidPS.Location = new System.Drawing.Point(269, 327); + this.vcpidPS.MaxValue = 9999D; + this.vcpidPS.MinValue = 0D; + this.vcpidPS.Name = "vcpidPS"; + this.vcpidPS.NullDisplay = "--"; + this.vcpidPS.SideButtonClickValue = 1D; + this.vcpidPS.Size = new System.Drawing.Size(164, 54); + this.vcpidPS.TabIndex = 53; + this.vcpidPS.Tag = "SPS"; + this.vcpidPS.Text = "200"; + this.vcpidPS.Value = 200D; + this.vcpidPS.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidPS.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidIS + // + this.vcpidIS.BackColorButton = System.Drawing.Color.White; + this.vcpidIS.ButtonWidth = "30"; + this.vcpidIS.ColorBorder = System.Drawing.Color.White; + this.vcpidIS.DecimalPosition = ((ushort)(0)); + this.vcpidIS.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidIS.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidIS.ForeColor = System.Drawing.Color.White; + this.vcpidIS.ForeColorButton = System.Drawing.Color.Black; + this.vcpidIS.Location = new System.Drawing.Point(454, 327); + this.vcpidIS.MaxValue = 9999D; + this.vcpidIS.MinValue = 0D; + this.vcpidIS.Name = "vcpidIS"; + this.vcpidIS.NullDisplay = "--"; + this.vcpidIS.SideButtonClickValue = 3D; + this.vcpidIS.Size = new System.Drawing.Size(164, 54); + this.vcpidIS.TabIndex = 54; + this.vcpidIS.Tag = "SIS"; + this.vcpidIS.Text = "1"; + this.vcpidIS.Value = 1D; + this.vcpidIS.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidIS.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidDL + // + this.vcpidDL.BackColorButton = System.Drawing.Color.White; + this.vcpidDL.ButtonWidth = "30"; + this.vcpidDL.ColorBorder = System.Drawing.Color.White; + this.vcpidDL.DecimalPosition = ((ushort)(0)); + this.vcpidDL.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidDL.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidDL.ForeColor = System.Drawing.Color.White; + this.vcpidDL.ForeColorButton = System.Drawing.Color.Black; + this.vcpidDL.Location = new System.Drawing.Point(633, 265); + this.vcpidDL.MaxValue = 9999D; + this.vcpidDL.MinValue = 0D; + this.vcpidDL.Name = "vcpidDL"; + this.vcpidDL.NullDisplay = "--"; + this.vcpidDL.SideButtonClickValue = 3D; + this.vcpidDL.Size = new System.Drawing.Size(164, 54); + this.vcpidDL.TabIndex = 52; + this.vcpidDL.Tag = "SDL"; + this.vcpidDL.Text = "15"; + this.vcpidDL.Value = 15D; + this.vcpidDL.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidDL.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidDH + // + this.vcpidDH.BackColorButton = System.Drawing.Color.White; + this.vcpidDH.ButtonWidth = "30"; + this.vcpidDH.ColorBorder = System.Drawing.Color.White; + this.vcpidDH.DecimalPosition = ((ushort)(0)); + this.vcpidDH.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidDH.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidDH.ForeColor = System.Drawing.Color.White; + this.vcpidDH.ForeColorButton = System.Drawing.Color.Black; + this.vcpidDH.Location = new System.Drawing.Point(269, 265); + this.vcpidDH.MaxValue = 9999D; + this.vcpidDH.MinValue = 0D; + this.vcpidDH.Name = "vcpidDH"; + this.vcpidDH.NullDisplay = "--"; + this.vcpidDH.SideButtonClickValue = 1D; + this.vcpidDH.Size = new System.Drawing.Size(164, 54); + this.vcpidDH.TabIndex = 49; + this.vcpidDH.Tag = "SDH"; + this.vcpidDH.Text = "15"; + this.vcpidDH.Value = 15D; + this.vcpidDH.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidDH.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidDM + // + this.vcpidDM.BackColorButton = System.Drawing.Color.White; + this.vcpidDM.ButtonWidth = "30"; + this.vcpidDM.ColorBorder = System.Drawing.Color.White; + this.vcpidDM.DecimalPosition = ((ushort)(0)); + this.vcpidDM.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidDM.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidDM.ForeColor = System.Drawing.Color.White; + this.vcpidDM.ForeColorButton = System.Drawing.Color.Black; + this.vcpidDM.Location = new System.Drawing.Point(454, 265); + this.vcpidDM.MaxValue = 9999D; + this.vcpidDM.MinValue = 0D; + this.vcpidDM.Name = "vcpidDM"; + this.vcpidDM.NullDisplay = "--"; + this.vcpidDM.SideButtonClickValue = 3D; + this.vcpidDM.Size = new System.Drawing.Size(164, 54); + this.vcpidDM.TabIndex = 50; + this.vcpidDM.Tag = "SDM"; + this.vcpidDM.Text = "15"; + this.vcpidDM.Value = 15D; + this.vcpidDM.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidDM.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidIL + // + this.vcpidIL.BackColorButton = System.Drawing.Color.White; + this.vcpidIL.ButtonWidth = "30"; + this.vcpidIL.ColorBorder = System.Drawing.Color.White; + this.vcpidIL.DecimalPosition = ((ushort)(0)); + this.vcpidIL.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidIL.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidIL.ForeColor = System.Drawing.Color.White; + this.vcpidIL.ForeColorButton = System.Drawing.Color.Black; + this.vcpidIL.Location = new System.Drawing.Point(633, 203); + this.vcpidIL.MaxValue = 9999D; + this.vcpidIL.MinValue = 0D; + this.vcpidIL.Name = "vcpidIL"; + this.vcpidIL.NullDisplay = "--"; + this.vcpidIL.SideButtonClickValue = 3D; + this.vcpidIL.Size = new System.Drawing.Size(164, 54); + this.vcpidIL.TabIndex = 48; + this.vcpidIL.Tag = "SIL"; + this.vcpidIL.Text = "1"; + this.vcpidIL.Value = 1D; + this.vcpidIL.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidIL.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidIH + // + this.vcpidIH.BackColorButton = System.Drawing.Color.White; + this.vcpidIH.ButtonWidth = "30"; + this.vcpidIH.ColorBorder = System.Drawing.Color.White; + this.vcpidIH.DecimalPosition = ((ushort)(0)); + this.vcpidIH.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidIH.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidIH.ForeColor = System.Drawing.Color.White; + this.vcpidIH.ForeColorButton = System.Drawing.Color.Black; + this.vcpidIH.Location = new System.Drawing.Point(269, 203); + this.vcpidIH.MaxValue = 9999D; + this.vcpidIH.MinValue = 0D; + this.vcpidIH.Name = "vcpidIH"; + this.vcpidIH.NullDisplay = "--"; + this.vcpidIH.SideButtonClickValue = 1D; + this.vcpidIH.Size = new System.Drawing.Size(164, 54); + this.vcpidIH.TabIndex = 45; + this.vcpidIH.Tag = "SIH"; + this.vcpidIH.Text = "1"; + this.vcpidIH.Value = 1D; + this.vcpidIH.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidIH.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidIM + // + this.vcpidIM.BackColorButton = System.Drawing.Color.White; + this.vcpidIM.ButtonWidth = "30"; + this.vcpidIM.ColorBorder = System.Drawing.Color.White; + this.vcpidIM.DecimalPosition = ((ushort)(0)); + this.vcpidIM.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidIM.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidIM.ForeColor = System.Drawing.Color.White; + this.vcpidIM.ForeColorButton = System.Drawing.Color.Black; + this.vcpidIM.Location = new System.Drawing.Point(454, 203); + this.vcpidIM.MaxValue = 9999D; + this.vcpidIM.MinValue = 0D; + this.vcpidIM.Name = "vcpidIM"; + this.vcpidIM.NullDisplay = "--"; + this.vcpidIM.SideButtonClickValue = 3D; + this.vcpidIM.Size = new System.Drawing.Size(164, 54); + this.vcpidIM.TabIndex = 46; + this.vcpidIM.Tag = "SIM"; + this.vcpidIM.Text = "1"; + this.vcpidIM.Value = 1D; + this.vcpidIM.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidIM.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidPL + // + this.vcpidPL.BackColorButton = System.Drawing.Color.White; + this.vcpidPL.ButtonWidth = "30"; + this.vcpidPL.ColorBorder = System.Drawing.Color.White; + this.vcpidPL.DecimalPosition = ((ushort)(0)); + this.vcpidPL.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidPL.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidPL.ForeColor = System.Drawing.Color.White; + this.vcpidPL.ForeColorButton = System.Drawing.Color.Black; + this.vcpidPL.Location = new System.Drawing.Point(633, 141); + this.vcpidPL.MaxValue = 9999D; + this.vcpidPL.MinValue = 0D; + this.vcpidPL.Name = "vcpidPL"; + this.vcpidPL.NullDisplay = "--"; + this.vcpidPL.SideButtonClickValue = 3D; + this.vcpidPL.Size = new System.Drawing.Size(164, 54); + this.vcpidPL.TabIndex = 44; + this.vcpidPL.Tag = "SPL"; + this.vcpidPL.Text = "200"; + this.vcpidPL.Value = 200D; + this.vcpidPL.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidPL.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidPH + // + this.vcpidPH.BackColorButton = System.Drawing.Color.White; + this.vcpidPH.ButtonWidth = "30"; + this.vcpidPH.ColorBorder = System.Drawing.Color.White; + this.vcpidPH.DecimalPosition = ((ushort)(0)); + this.vcpidPH.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidPH.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidPH.ForeColor = System.Drawing.Color.White; + this.vcpidPH.ForeColorButton = System.Drawing.Color.Black; + this.vcpidPH.Location = new System.Drawing.Point(269, 141); + this.vcpidPH.MaxValue = 9999D; + this.vcpidPH.MinValue = 0D; + this.vcpidPH.Name = "vcpidPH"; + this.vcpidPH.NullDisplay = "--"; + this.vcpidPH.SideButtonClickValue = 1D; + this.vcpidPH.Size = new System.Drawing.Size(164, 54); + this.vcpidPH.TabIndex = 41; + this.vcpidPH.Tag = "SPH"; + this.vcpidPH.Text = "200"; + this.vcpidPH.Value = 200D; + this.vcpidPH.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidPH.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcpidPM + // + this.vcpidPM.BackColorButton = System.Drawing.Color.White; + this.vcpidPM.ButtonWidth = "30"; + this.vcpidPM.ColorBorder = System.Drawing.Color.White; + this.vcpidPM.DecimalPosition = ((ushort)(0)); + this.vcpidPM.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcpidPM.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcpidPM.ForeColor = System.Drawing.Color.White; + this.vcpidPM.ForeColorButton = System.Drawing.Color.Black; + this.vcpidPM.Location = new System.Drawing.Point(454, 141); + this.vcpidPM.MaxValue = 9999D; + this.vcpidPM.MinValue = 0D; + this.vcpidPM.Name = "vcpidPM"; + this.vcpidPM.NullDisplay = "--"; + this.vcpidPM.SideButtonClickValue = 3D; + this.vcpidPM.Size = new System.Drawing.Size(164, 54); + this.vcpidPM.TabIndex = 42; + this.vcpidPM.Tag = "SPM"; + this.vcpidPM.Text = "200"; + this.vcpidPM.Value = 200D; + this.vcpidPM.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcpidPM.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSpeedR + // + this.vcSpeedR.BackColorButton = System.Drawing.Color.White; + this.vcSpeedR.ButtonWidth = "30"; + this.vcSpeedR.ColorBorder = System.Drawing.Color.White; + this.vcSpeedR.DecimalPosition = ((ushort)(0)); + this.vcSpeedR.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSpeedR.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSpeedR.ForeColor = System.Drawing.Color.White; + this.vcSpeedR.ForeColorButton = System.Drawing.Color.Black; + this.vcSpeedR.Location = new System.Drawing.Point(454, 79); + this.vcSpeedR.MaxValue = 9999D; + this.vcSpeedR.MinValue = 0D; + this.vcSpeedR.Name = "vcSpeedR"; + this.vcSpeedR.NullDisplay = "--"; + this.vcSpeedR.SideButtonClickValue = 1D; + this.vcSpeedR.Size = new System.Drawing.Size(164, 54); + this.vcSpeedR.TabIndex = 39; + this.vcSpeedR.Tag = "SRS"; + this.vcSpeedR.Text = "70"; + this.vcSpeedR.Value = 70D; + this.vcSpeedR.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSpeedR.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSpeedH + // + this.vcSpeedH.BackColorButton = System.Drawing.Color.White; + this.vcSpeedH.ButtonWidth = "30"; + this.vcSpeedH.ColorBorder = System.Drawing.Color.White; + this.vcSpeedH.DecimalPosition = ((ushort)(0)); + this.vcSpeedH.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSpeedH.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSpeedH.ForeColor = System.Drawing.Color.White; + this.vcSpeedH.ForeColorButton = System.Drawing.Color.Black; + this.vcSpeedH.Location = new System.Drawing.Point(633, 17); + this.vcSpeedH.MaxValue = 9999D; + this.vcSpeedH.MinValue = 0D; + this.vcSpeedH.Name = "vcSpeedH"; + this.vcSpeedH.NullDisplay = "--"; + this.vcSpeedH.SideButtonClickValue = 3D; + this.vcSpeedH.Size = new System.Drawing.Size(164, 54); + this.vcSpeedH.TabIndex = 38; + this.vcSpeedH.Tag = "SSL"; + this.vcSpeedH.Text = "30"; + this.vcSpeedH.Value = 30D; + this.vcSpeedH.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSpeedH.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSpeedS + // + this.vcSpeedS.BackColorButton = System.Drawing.Color.White; + this.vcSpeedS.ButtonWidth = "30"; + this.vcSpeedS.ColorBorder = System.Drawing.Color.White; + this.vcSpeedS.DecimalPosition = ((ushort)(0)); + this.vcSpeedS.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSpeedS.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSpeedS.ForeColor = System.Drawing.Color.White; + this.vcSpeedS.ForeColorButton = System.Drawing.Color.Black; + this.vcSpeedS.Location = new System.Drawing.Point(269, 79); + this.vcSpeedS.MaxValue = 9999D; + this.vcSpeedS.MinValue = 0D; + this.vcSpeedS.Name = "vcSpeedS"; + this.vcSpeedS.NullDisplay = "--"; + this.vcSpeedS.SideButtonClickValue = 1D; + this.vcSpeedS.Size = new System.Drawing.Size(164, 54); + this.vcSpeedS.TabIndex = 35; + this.vcSpeedS.Tag = "SSS"; + this.vcSpeedS.Text = "61"; + this.vcSpeedS.Value = 61D; + this.vcSpeedS.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSpeedS.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSpeedL + // + this.vcSpeedL.BackColorButton = System.Drawing.Color.White; + this.vcSpeedL.ButtonWidth = "30"; + this.vcSpeedL.ColorBorder = System.Drawing.Color.White; + this.vcSpeedL.DecimalPosition = ((ushort)(0)); + this.vcSpeedL.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSpeedL.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSpeedL.ForeColor = System.Drawing.Color.White; + this.vcSpeedL.ForeColorButton = System.Drawing.Color.Black; + this.vcSpeedL.Location = new System.Drawing.Point(269, 17); + this.vcSpeedL.MaxValue = 9999D; + this.vcSpeedL.MinValue = 0D; + this.vcSpeedL.Name = "vcSpeedL"; + this.vcSpeedL.NullDisplay = "--"; + this.vcSpeedL.SideButtonClickValue = 1D; + this.vcSpeedL.Size = new System.Drawing.Size(164, 54); + this.vcSpeedL.TabIndex = 2; + this.vcSpeedL.Tag = "SSH"; + this.vcSpeedL.Text = "110"; + this.vcSpeedL.Value = 110D; + this.vcSpeedL.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSpeedL.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcSpeedM + // + this.vcSpeedM.BackColorButton = System.Drawing.Color.White; + this.vcSpeedM.ButtonWidth = "30"; + this.vcSpeedM.ColorBorder = System.Drawing.Color.White; + this.vcSpeedM.DecimalPosition = ((ushort)(0)); + this.vcSpeedM.Font = new System.Drawing.Font("맑은 고딕", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcSpeedM.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcSpeedM.ForeColor = System.Drawing.Color.White; + this.vcSpeedM.ForeColorButton = System.Drawing.Color.Black; + this.vcSpeedM.Location = new System.Drawing.Point(454, 17); + this.vcSpeedM.MaxValue = 9999D; + this.vcSpeedM.MinValue = 0D; + this.vcSpeedM.Name = "vcSpeedM"; + this.vcSpeedM.NullDisplay = "--"; + this.vcSpeedM.SideButtonClickValue = 3D; + this.vcSpeedM.Size = new System.Drawing.Size(164, 54); + this.vcSpeedM.TabIndex = 4; + this.vcSpeedM.Tag = "SSM"; + this.vcSpeedM.Text = "70"; + this.vcSpeedM.Value = 70D; + this.vcSpeedM.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcSpeedM.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // tabPage2 + // + this.tabPage2.BackColor = System.Drawing.Color.Navy; + this.tabPage2.Controls.Add(this.button3); + this.tabPage2.Controls.Add(this.label30); + this.tabPage2.Controls.Add(this.label12); + this.tabPage2.Controls.Add(this.label13); + this.tabPage2.Controls.Add(this.button2); + this.tabPage2.Controls.Add(this.tbBaudBAT); + this.tabPage2.Controls.Add(this.tbportBMS); + this.tabPage2.Controls.Add(this.label27); + this.tabPage2.Controls.Add(this.button1); + this.tabPage2.Controls.Add(this.tbBaudAGV); + this.tabPage2.Controls.Add(this.tbPortAGV); + this.tabPage2.Controls.Add(this.label6); + this.tabPage2.Controls.Add(this.btSelPlc1); + this.tabPage2.Controls.Add(this.btSelXbee); + this.tabPage2.Controls.Add(this.tbBaudPLC); + this.tabPage2.Controls.Add(this.tbBaudXBE); + this.tabPage2.Controls.Add(this.tbPortPLC); + this.tabPage2.Controls.Add(this.tbPortXBE); + this.tabPage2.Controls.Add(this.label7); + this.tabPage2.Controls.Add(this.label5); + this.tabPage2.Controls.Add(this.valIntervalBMS); + this.tabPage2.Controls.Add(this.valueSelect4); + this.tabPage2.Controls.Add(this.valIntervalXBE); + this.tabPage2.Location = new System.Drawing.Point(4, 4); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(1244, 590); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "통신"; + // + // button3 + // + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button3.Location = new System.Drawing.Point(1157, 9); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(79, 38); + this.button3.TabIndex = 34; + this.button3.Text = "TEST"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // label30 + // + this.label30.AutoSize = true; + this.label30.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label30.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label30.Location = new System.Drawing.Point(946, 273); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(49, 24); + this.label30.TabIndex = 33; + this.label30.Text = "sec"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label12.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label12.Location = new System.Drawing.Point(946, 194); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(36, 24); + this.label12.TabIndex = 33; + this.label12.Text = "ms"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label13.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label13.Location = new System.Drawing.Point(946, 114); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(36, 24); + this.label13.TabIndex = 15; + this.label13.Text = "ms"; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(383, 178); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(89, 56); + this.button2.TabIndex = 28; + this.button2.Tag = "BAT"; + this.button2.Text = "..."; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.btSelXbee_Click); + // + // tbBaudBAT + // + this.tbBaudBAT.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbBaudBAT.FormattingEnabled = true; + this.tbBaudBAT.Items.AddRange(new object[] { + "4800", + "9600", + "19200", + "46800", + "115200", + "250000"}); + this.tbBaudBAT.Location = new System.Drawing.Point(478, 181); + this.tbBaudBAT.Name = "tbBaudBAT"; + this.tbBaudBAT.Size = new System.Drawing.Size(217, 51); + this.tbBaudBAT.TabIndex = 27; + this.tbBaudBAT.Tag = "P1"; + // + // tbportBMS + // + this.tbportBMS.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.tbportBMS.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbportBMS.Location = new System.Drawing.Point(161, 178); + this.tbportBMS.Name = "tbportBMS"; + this.tbportBMS.Size = new System.Drawing.Size(216, 56); + this.tbportBMS.TabIndex = 26; + this.tbportBMS.Tag = "P1"; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label27.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label27.Location = new System.Drawing.Point(38, 194); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(114, 24); + this.label27.TabIndex = 25; + this.label27.Text = "BAT PORT"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(383, 18); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(89, 56); + this.button1.TabIndex = 24; + this.button1.Tag = "AGV"; + this.button1.Text = "..."; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.btSelXbee_Click); + // + // tbBaudAGV + // + this.tbBaudAGV.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbBaudAGV.FormattingEnabled = true; + this.tbBaudAGV.Items.AddRange(new object[] { + "4800", + "9600", + "19200", + "46800", + "115200", + "250000"}); + this.tbBaudAGV.Location = new System.Drawing.Point(478, 21); + this.tbBaudAGV.Name = "tbBaudAGV"; + this.tbBaudAGV.Size = new System.Drawing.Size(217, 51); + this.tbBaudAGV.TabIndex = 23; + this.tbBaudAGV.Tag = "P1"; + // + // tbPortAGV + // + this.tbPortAGV.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.tbPortAGV.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbPortAGV.Location = new System.Drawing.Point(161, 18); + this.tbPortAGV.Name = "tbPortAGV"; + this.tbPortAGV.Size = new System.Drawing.Size(216, 56); + this.tbPortAGV.TabIndex = 22; + this.tbPortAGV.Tag = "P1"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label6.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label6.Location = new System.Drawing.Point(38, 34); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(114, 24); + this.label6.TabIndex = 21; + this.label6.Text = "AGV PORT"; + // + // btSelPlc1 + // + this.btSelPlc1.Location = new System.Drawing.Point(383, 98); + this.btSelPlc1.Name = "btSelPlc1"; + this.btSelPlc1.Size = new System.Drawing.Size(89, 56); + this.btSelPlc1.TabIndex = 15; + this.btSelPlc1.Tag = "PLC"; + this.btSelPlc1.Text = "..."; + this.btSelPlc1.UseVisualStyleBackColor = true; + this.btSelPlc1.Click += new System.EventHandler(this.btSelXbee_Click); + // + // btSelXbee + // + this.btSelXbee.Location = new System.Drawing.Point(383, 257); + this.btSelXbee.Name = "btSelXbee"; + this.btSelXbee.Size = new System.Drawing.Size(89, 56); + this.btSelXbee.TabIndex = 13; + this.btSelXbee.Tag = "XBE"; + this.btSelXbee.Text = "..."; + this.btSelXbee.UseVisualStyleBackColor = true; + this.btSelXbee.Click += new System.EventHandler(this.btSelXbee_Click); + // + // tbBaudPLC + // + this.tbBaudPLC.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbBaudPLC.FormattingEnabled = true; + this.tbBaudPLC.Items.AddRange(new object[] { + "4800", + "9600", + "19200", + "46800", + "115200", + "250000"}); + this.tbBaudPLC.Location = new System.Drawing.Point(478, 101); + this.tbBaudPLC.Name = "tbBaudPLC"; + this.tbBaudPLC.Size = new System.Drawing.Size(217, 51); + this.tbBaudPLC.TabIndex = 10; + this.tbBaudPLC.Tag = "P1"; + // + // tbBaudXBE + // + this.tbBaudXBE.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbBaudXBE.FormattingEnabled = true; + this.tbBaudXBE.Items.AddRange(new object[] { + "4800", + "9600", + "19200", + "46800", + "115200", + "250000"}); + this.tbBaudXBE.Location = new System.Drawing.Point(478, 260); + this.tbBaudXBE.Name = "tbBaudXBE"; + this.tbBaudXBE.Size = new System.Drawing.Size(217, 51); + this.tbBaudXBE.TabIndex = 8; + this.tbBaudXBE.Tag = "XB"; + // + // tbPortPLC + // + this.tbPortPLC.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.tbPortPLC.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbPortPLC.Location = new System.Drawing.Point(161, 98); + this.tbPortPLC.Name = "tbPortPLC"; + this.tbPortPLC.Size = new System.Drawing.Size(216, 56); + this.tbPortPLC.TabIndex = 5; + this.tbPortPLC.Tag = "P1"; + // + // tbPortXBE + // + this.tbPortXBE.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.tbPortXBE.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.tbPortXBE.Location = new System.Drawing.Point(161, 257); + this.tbPortXBE.Name = "tbPortXBE"; + this.tbPortXBE.Size = new System.Drawing.Size(216, 56); + this.tbPortXBE.TabIndex = 3; + this.tbPortXBE.Tag = "XB"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label7.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label7.Location = new System.Drawing.Point(38, 114); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(114, 24); + this.label7.TabIndex = 2; + this.label7.Text = "PLC PORT"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label5.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label5.Location = new System.Drawing.Point(38, 273); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(114, 24); + this.label5.TabIndex = 1; + this.label5.Text = "XBE PORT"; + // + // valIntervalBMS + // + this.valIntervalBMS.BackColorButton = System.Drawing.Color.White; + this.valIntervalBMS.ButtonWidth = "30"; + this.valIntervalBMS.ColorBorder = System.Drawing.Color.White; + this.valIntervalBMS.DecimalPosition = ((ushort)(1)); + this.valIntervalBMS.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.valIntervalBMS.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.valIntervalBMS.ForeColor = System.Drawing.Color.White; + this.valIntervalBMS.ForeColorButton = System.Drawing.Color.Black; + this.valIntervalBMS.Location = new System.Drawing.Point(701, 181); + this.valIntervalBMS.MaxValue = 999999D; + this.valIntervalBMS.MinValue = 0D; + this.valIntervalBMS.Name = "valIntervalBMS"; + this.valIntervalBMS.NullDisplay = "--"; + this.valIntervalBMS.SideButtonClickValue = 0.5D; + this.valIntervalBMS.Size = new System.Drawing.Size(239, 51); + this.valIntervalBMS.TabIndex = 32; + this.valIntervalBMS.Tag = "CL"; + this.valIntervalBMS.Text = "0"; + this.valIntervalBMS.Value = 0D; + this.valIntervalBMS.ButtonClick += new System.EventHandler(this.valIntervalBMS_ButtonClick); + // + // valueSelect4 + // + this.valueSelect4.BackColorButton = System.Drawing.Color.White; + this.valueSelect4.ButtonWidth = "30"; + this.valueSelect4.ColorBorder = System.Drawing.Color.White; + this.valueSelect4.DecimalPosition = ((ushort)(0)); + this.valueSelect4.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.valueSelect4.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.valueSelect4.ForeColor = System.Drawing.Color.White; + this.valueSelect4.ForeColorButton = System.Drawing.Color.Black; + this.valueSelect4.Location = new System.Drawing.Point(701, 101); + this.valueSelect4.MaxValue = 254D; + this.valueSelect4.MinValue = 0D; + this.valueSelect4.Name = "valueSelect4"; + this.valueSelect4.NullDisplay = "--"; + this.valueSelect4.SideButtonClickValue = 20D; + this.valueSelect4.Size = new System.Drawing.Size(239, 51); + this.valueSelect4.TabIndex = 13; + this.valueSelect4.Tag = "SL"; + this.valueSelect4.Text = "1"; + this.valueSelect4.Value = 1D; + this.valueSelect4.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // valIntervalXBE + // + this.valIntervalXBE.BackColorButton = System.Drawing.Color.White; + this.valIntervalXBE.ButtonWidth = "30"; + this.valIntervalXBE.ColorBorder = System.Drawing.Color.White; + this.valIntervalXBE.DecimalPosition = ((ushort)(1)); + this.valIntervalXBE.Font = new System.Drawing.Font("궁서체", 32F, System.Drawing.FontStyle.Bold); + this.valIntervalXBE.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.valIntervalXBE.ForeColor = System.Drawing.Color.White; + this.valIntervalXBE.ForeColorButton = System.Drawing.Color.Black; + this.valIntervalXBE.Location = new System.Drawing.Point(701, 260); + this.valIntervalXBE.MaxValue = 100D; + this.valIntervalXBE.MinValue = 0D; + this.valIntervalXBE.Name = "valIntervalXBE"; + this.valIntervalXBE.NullDisplay = "--"; + this.valIntervalXBE.SideButtonClickValue = 0.5D; + this.valIntervalXBE.Size = new System.Drawing.Size(239, 51); + this.valIntervalXBE.TabIndex = 20; + this.valIntervalXBE.Tag = "CL"; + this.valIntervalXBE.Text = "0"; + this.valIntervalXBE.Value = 0D; + // + // tabPage3 + // + this.tabPage3.BackColor = System.Drawing.Color.DarkSlateBlue; + this.tabPage3.Controls.Add(this.cmbChargerPos); + this.tabPage3.Controls.Add(this.label58); + this.tabPage3.Controls.Add(this.label19); + this.tabPage3.Controls.Add(this.label44); + this.tabPage3.Controls.Add(this.label29); + this.tabPage3.Controls.Add(this.label43); + this.tabPage3.Controls.Add(this.label42); + this.tabPage3.Controls.Add(this.label41); + this.tabPage3.Controls.Add(this.label39); + this.tabPage3.Controls.Add(this.label28); + this.tabPage3.Controls.Add(this.label14); + this.tabPage3.Controls.Add(this.label33); + this.tabPage3.Controls.Add(this.label36); + this.tabPage3.Controls.Add(this.label37); + this.tabPage3.Controls.Add(this.label35); + this.tabPage3.Controls.Add(this.label34); + this.tabPage3.Controls.Add(this.label38); + this.tabPage3.Controls.Add(this.label21); + this.tabPage3.Controls.Add(this.label1); + this.tabPage3.Controls.Add(this.label9); + this.tabPage3.Controls.Add(this.label26); + this.tabPage3.Controls.Add(this.label23); + this.tabPage3.Controls.Add(this.label24); + this.tabPage3.Controls.Add(this.vcChargeStartLevel); + this.tabPage3.Controls.Add(this.vcChargeMaxLevel); + this.tabPage3.Controls.Add(this.vcChargeWaitSec); + this.tabPage3.Controls.Add(this.tbChargerID); + this.tabPage3.Controls.Add(this.vcChargeEmergencyLevel); + this.tabPage3.Controls.Add(this.vcChargeMaxTime); + this.tabPage3.Controls.Add(this.vcChargeRetryTerm); + this.tabPage3.Controls.Add(this.vcChargeSearchTime); + this.tabPage3.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold); + this.tabPage3.Location = new System.Drawing.Point(4, 4); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(1244, 590); + this.tabPage3.TabIndex = 4; + this.tabPage3.Text = "충전"; + // + // cmbChargerPos + // + this.cmbChargerPos.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbChargerPos.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold); + this.cmbChargerPos.FormattingEnabled = true; + this.cmbChargerPos.Items.AddRange(new object[] { + "HOME 아래", + "HOME", + "HOME 위"}); + this.cmbChargerPos.Location = new System.Drawing.Point(1004, 11); + this.cmbChargerPos.Name = "cmbChargerPos"; + this.cmbChargerPos.Size = new System.Drawing.Size(217, 45); + this.cmbChargerPos.TabIndex = 69; + // + // label58 + // + this.label58.AutoSize = true; + this.label58.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label58.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label58.Location = new System.Drawing.Point(863, 21); + this.label58.Name = "label58"; + this.label58.Size = new System.Drawing.Size(135, 24); + this.label58.TabIndex = 68; + this.label58.Text = "충전기위치"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Font = new System.Drawing.Font("궁서체", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label19.ForeColor = System.Drawing.Color.Orange; + this.label19.Location = new System.Drawing.Point(374, 286); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(496, 18); + this.label19.TabIndex = 67; + this.label19.Text = "배터리 레벨이 지정값 아래일 경우 가동이 제한 됩니다"; + // + // label44 + // + this.label44.AutoSize = true; + this.label44.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label44.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label44.Location = new System.Drawing.Point(473, 546); + this.label44.Name = "label44"; + this.label44.Size = new System.Drawing.Size(49, 24); + this.label44.TabIndex = 64; + this.label44.Text = "sec"; + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label29.ForeColor = System.Drawing.Color.SkyBlue; + this.label29.Location = new System.Drawing.Point(51, 546); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(211, 24); + this.label29.TabIndex = 62; + this.label29.Text = "충전기 대기 시간"; + // + // label43 + // + this.label43.AutoSize = true; + this.label43.Font = new System.Drawing.Font("궁서체", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label43.ForeColor = System.Drawing.Color.Orange; + this.label43.Location = new System.Drawing.Point(266, 51); + this.label43.Name = "label43"; + this.label43.Size = new System.Drawing.Size(524, 18); + this.label43.TabIndex = 61; + this.label43.Text = "배터리 레벨이 지정값보다 떨어진다면 충전을 시작 합니다"; + // + // label42 + // + this.label42.AutoSize = true; + this.label42.Font = new System.Drawing.Font("궁서체", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label42.ForeColor = System.Drawing.Color.Orange; + this.label42.Location = new System.Drawing.Point(266, 127); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(506, 18); + this.label42.TabIndex = 61; + this.label42.Text = "배터리 레벨이 지정 값을 초과하면 충전이 해제 됩니다."; + // + // label41 + // + this.label41.AutoSize = true; + this.label41.Font = new System.Drawing.Font("궁서체", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label41.ForeColor = System.Drawing.Color.Orange; + this.label41.Location = new System.Drawing.Point(266, 207); + this.label41.Name = "label41"; + this.label41.Size = new System.Drawing.Size(429, 18); + this.label41.TabIndex = 61; + this.label41.Text = "지정된 시간 이후에는 충전이 자동 해제 됩니다"; + // + // label39 + // + this.label39.AutoSize = true; + this.label39.Font = new System.Drawing.Font("궁서체", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label39.ForeColor = System.Drawing.Color.Orange; + this.label39.Location = new System.Drawing.Point(267, 375); + this.label39.Name = "label39"; + this.label39.Size = new System.Drawing.Size(381, 36); + this.label39.TabIndex = 61; + this.label39.Text = "충전기 얼라인 검색을 수행하는 최대 시간\r\n지정 시간이 넘어가면 충전이 취소 됩니다"; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label28.ForeColor = System.Drawing.Color.SkyBlue; + this.label28.Location = new System.Drawing.Point(138, 503); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(124, 24); + this.label28.TabIndex = 29; + this.label28.Text = "충전기 ID"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("궁서체", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label14.ForeColor = System.Drawing.Color.Orange; + this.label14.Location = new System.Drawing.Point(266, 472); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(496, 18); + this.label14.TabIndex = 61; + this.label14.Text = "배터리 레벨이 지정값 아래일 경우 가동이 제한 됩니다"; + // + // label33 + // + this.label33.AutoSize = true; + this.label33.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label33.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label33.Location = new System.Drawing.Point(473, 17); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(23, 24); + this.label33.TabIndex = 50; + this.label33.Text = "%"; + // + // label36 + // + this.label36.AutoSize = true; + this.label36.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label36.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label36.Location = new System.Drawing.Point(76, 17); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(186, 24); + this.label36.TabIndex = 49; + this.label36.Text = "충전 시작 레벨"; + // + // label37 + // + this.label37.AutoSize = true; + this.label37.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label37.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label37.Location = new System.Drawing.Point(473, 87); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(23, 24); + this.label37.TabIndex = 44; + this.label37.Text = "%"; + // + // label35 + // + this.label35.AutoSize = true; + this.label35.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label35.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label35.Location = new System.Drawing.Point(76, 428); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(186, 24); + this.label35.TabIndex = 46; + this.label35.Text = "가동 제한 레벨"; + // + // label34 + // + this.label34.AutoSize = true; + this.label34.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label34.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label34.Location = new System.Drawing.Point(473, 428); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(23, 24); + this.label34.TabIndex = 47; + this.label34.Text = "%"; + // + // label38 + // + this.label38.AutoSize = true; + this.label38.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label38.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label38.Location = new System.Drawing.Point(76, 87); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(186, 24); + this.label38.TabIndex = 43; + this.label38.Text = "최대 충전 레벨"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label21.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label21.Location = new System.Drawing.Point(473, 337); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(49, 24); + this.label21.TabIndex = 40; + this.label21.Text = "sec"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label1.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label1.Location = new System.Drawing.Point(473, 245); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(49, 24); + this.label1.TabIndex = 34; + this.label1.Text = "sec"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label9.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label9.Location = new System.Drawing.Point(51, 245); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(211, 24); + this.label9.TabIndex = 33; + this.label9.Text = "충전 재시도 간격"; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label26.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label26.Location = new System.Drawing.Point(127, 337); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(135, 24); + this.label26.TabIndex = 39; + this.label26.Text = "충전기검색"; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label23.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label23.Location = new System.Drawing.Point(473, 164); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(49, 24); + this.label23.TabIndex = 31; + this.label23.Text = "sec"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Font = new System.Drawing.Font("궁서체", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label24.ForeColor = System.Drawing.Color.WhiteSmoke; + this.label24.Location = new System.Drawing.Point(76, 164); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(186, 24); + this.label24.TabIndex = 30; + this.label24.Text = "최대 충전 시간"; + // + // vcChargeStartLevel + // + this.vcChargeStartLevel.BackColorButton = System.Drawing.Color.White; + this.vcChargeStartLevel.ButtonWidth = "30"; + this.vcChargeStartLevel.ColorBorder = System.Drawing.Color.White; + this.vcChargeStartLevel.DecimalPosition = ((ushort)(0)); + this.vcChargeStartLevel.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcChargeStartLevel.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcChargeStartLevel.ForeColor = System.Drawing.Color.WhiteSmoke; + this.vcChargeStartLevel.ForeColorButton = System.Drawing.Color.Black; + this.vcChargeStartLevel.Location = new System.Drawing.Point(270, 11); + this.vcChargeStartLevel.MaxValue = 999999D; + this.vcChargeStartLevel.MinValue = 0D; + this.vcChargeStartLevel.Name = "vcChargeStartLevel"; + this.vcChargeStartLevel.NullDisplay = "--"; + this.vcChargeStartLevel.SideButtonClickValue = 30D; + this.vcChargeStartLevel.Size = new System.Drawing.Size(197, 37); + this.vcChargeStartLevel.TabIndex = 65; + this.vcChargeStartLevel.Tag = "SL"; + this.vcChargeStartLevel.Text = "50"; + this.vcChargeStartLevel.Value = 50D; + this.vcChargeStartLevel.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcChargeStartLevel.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcChargeMaxLevel + // + this.vcChargeMaxLevel.BackColorButton = System.Drawing.Color.White; + this.vcChargeMaxLevel.ButtonWidth = "30"; + this.vcChargeMaxLevel.ColorBorder = System.Drawing.Color.White; + this.vcChargeMaxLevel.DecimalPosition = ((ushort)(0)); + this.vcChargeMaxLevel.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcChargeMaxLevel.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcChargeMaxLevel.ForeColor = System.Drawing.Color.WhiteSmoke; + this.vcChargeMaxLevel.ForeColorButton = System.Drawing.Color.Black; + this.vcChargeMaxLevel.Location = new System.Drawing.Point(270, 81); + this.vcChargeMaxLevel.MaxValue = 999999D; + this.vcChargeMaxLevel.MinValue = 0D; + this.vcChargeMaxLevel.Name = "vcChargeMaxLevel"; + this.vcChargeMaxLevel.NullDisplay = "--"; + this.vcChargeMaxLevel.SideButtonClickValue = 30D; + this.vcChargeMaxLevel.Size = new System.Drawing.Size(197, 37); + this.vcChargeMaxLevel.TabIndex = 66; + this.vcChargeMaxLevel.Tag = "SL"; + this.vcChargeMaxLevel.Text = "85"; + this.vcChargeMaxLevel.Value = 85D; + this.vcChargeMaxLevel.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcChargeMaxLevel.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcChargeWaitSec + // + this.vcChargeWaitSec.BackColorButton = System.Drawing.Color.White; + this.vcChargeWaitSec.ButtonWidth = "30"; + this.vcChargeWaitSec.ColorBorder = System.Drawing.Color.White; + this.vcChargeWaitSec.DecimalPosition = ((ushort)(0)); + this.vcChargeWaitSec.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcChargeWaitSec.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcChargeWaitSec.ForeColor = System.Drawing.Color.WhiteSmoke; + this.vcChargeWaitSec.ForeColorButton = System.Drawing.Color.Black; + this.vcChargeWaitSec.Location = new System.Drawing.Point(270, 540); + this.vcChargeWaitSec.MaxValue = 999999D; + this.vcChargeWaitSec.MinValue = 0D; + this.vcChargeWaitSec.Name = "vcChargeWaitSec"; + this.vcChargeWaitSec.NullDisplay = "--"; + this.vcChargeWaitSec.SideButtonClickValue = 30D; + this.vcChargeWaitSec.Size = new System.Drawing.Size(197, 37); + this.vcChargeWaitSec.TabIndex = 63; + this.vcChargeWaitSec.Tag = ""; + this.vcChargeWaitSec.Text = "3"; + this.vcChargeWaitSec.Value = 3D; + this.vcChargeWaitSec.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcChargeWaitSec.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // tbChargerID + // + this.tbChargerID.BackColorButton = System.Drawing.Color.White; + this.tbChargerID.ButtonWidth = "30"; + this.tbChargerID.ColorBorder = System.Drawing.Color.White; + this.tbChargerID.DecimalPosition = ((ushort)(0)); + this.tbChargerID.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.tbChargerID.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbChargerID.ForeColor = System.Drawing.Color.WhiteSmoke; + this.tbChargerID.ForeColorButton = System.Drawing.Color.Black; + this.tbChargerID.Location = new System.Drawing.Point(270, 497); + this.tbChargerID.MaxValue = 999999D; + this.tbChargerID.MinValue = 0D; + this.tbChargerID.Name = "tbChargerID"; + this.tbChargerID.NullDisplay = "--"; + this.tbChargerID.SideButtonClickValue = 30D; + this.tbChargerID.Size = new System.Drawing.Size(197, 37); + this.tbChargerID.TabIndex = 57; + this.tbChargerID.Tag = ""; + this.tbChargerID.Text = "30"; + this.tbChargerID.Value = 30D; + this.tbChargerID.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.tbChargerID.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcChargeEmergencyLevel + // + this.vcChargeEmergencyLevel.BackColorButton = System.Drawing.Color.White; + this.vcChargeEmergencyLevel.ButtonWidth = "30"; + this.vcChargeEmergencyLevel.ColorBorder = System.Drawing.Color.White; + this.vcChargeEmergencyLevel.DecimalPosition = ((ushort)(0)); + this.vcChargeEmergencyLevel.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcChargeEmergencyLevel.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcChargeEmergencyLevel.ForeColor = System.Drawing.Color.WhiteSmoke; + this.vcChargeEmergencyLevel.ForeColorButton = System.Drawing.Color.Black; + this.vcChargeEmergencyLevel.Location = new System.Drawing.Point(270, 422); + this.vcChargeEmergencyLevel.MaxValue = 999999D; + this.vcChargeEmergencyLevel.MinValue = 0D; + this.vcChargeEmergencyLevel.Name = "vcChargeEmergencyLevel"; + this.vcChargeEmergencyLevel.NullDisplay = "--"; + this.vcChargeEmergencyLevel.SideButtonClickValue = 30D; + this.vcChargeEmergencyLevel.Size = new System.Drawing.Size(197, 37); + this.vcChargeEmergencyLevel.TabIndex = 57; + this.vcChargeEmergencyLevel.Tag = ""; + this.vcChargeEmergencyLevel.Text = "30"; + this.vcChargeEmergencyLevel.Value = 30D; + this.vcChargeEmergencyLevel.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcChargeEmergencyLevel.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcChargeMaxTime + // + this.vcChargeMaxTime.BackColorButton = System.Drawing.Color.White; + this.vcChargeMaxTime.ButtonWidth = "30"; + this.vcChargeMaxTime.ColorBorder = System.Drawing.Color.White; + this.vcChargeMaxTime.DecimalPosition = ((ushort)(0)); + this.vcChargeMaxTime.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcChargeMaxTime.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcChargeMaxTime.ForeColor = System.Drawing.Color.WhiteSmoke; + this.vcChargeMaxTime.ForeColorButton = System.Drawing.Color.Black; + this.vcChargeMaxTime.Location = new System.Drawing.Point(270, 158); + this.vcChargeMaxTime.MaxValue = 999999D; + this.vcChargeMaxTime.MinValue = 0D; + this.vcChargeMaxTime.Name = "vcChargeMaxTime"; + this.vcChargeMaxTime.NullDisplay = "--"; + this.vcChargeMaxTime.SideButtonClickValue = 30D; + this.vcChargeMaxTime.Size = new System.Drawing.Size(197, 37); + this.vcChargeMaxTime.TabIndex = 29; + this.vcChargeMaxTime.Tag = "SL"; + this.vcChargeMaxTime.Text = "3600"; + this.vcChargeMaxTime.Value = 3600D; + this.vcChargeMaxTime.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcChargeMaxTime.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcChargeRetryTerm + // + this.vcChargeRetryTerm.BackColorButton = System.Drawing.Color.White; + this.vcChargeRetryTerm.ButtonWidth = "30"; + this.vcChargeRetryTerm.ColorBorder = System.Drawing.Color.White; + this.vcChargeRetryTerm.DecimalPosition = ((ushort)(0)); + this.vcChargeRetryTerm.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcChargeRetryTerm.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcChargeRetryTerm.ForeColor = System.Drawing.Color.WhiteSmoke; + this.vcChargeRetryTerm.ForeColorButton = System.Drawing.Color.Black; + this.vcChargeRetryTerm.Location = new System.Drawing.Point(270, 239); + this.vcChargeRetryTerm.MaxValue = 999999D; + this.vcChargeRetryTerm.MinValue = 0D; + this.vcChargeRetryTerm.Name = "vcChargeRetryTerm"; + this.vcChargeRetryTerm.NullDisplay = "--"; + this.vcChargeRetryTerm.SideButtonClickValue = 30D; + this.vcChargeRetryTerm.Size = new System.Drawing.Size(197, 37); + this.vcChargeRetryTerm.TabIndex = 32; + this.vcChargeRetryTerm.Tag = "SL"; + this.vcChargeRetryTerm.Text = "300"; + this.vcChargeRetryTerm.Value = 300D; + this.vcChargeRetryTerm.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + this.vcChargeRetryTerm.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // vcChargeSearchTime + // + this.vcChargeSearchTime.BackColorButton = System.Drawing.Color.White; + this.vcChargeSearchTime.ButtonWidth = "30"; + this.vcChargeSearchTime.ColorBorder = System.Drawing.Color.White; + this.vcChargeSearchTime.DecimalPosition = ((ushort)(0)); + this.vcChargeSearchTime.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.vcChargeSearchTime.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcChargeSearchTime.ForeColor = System.Drawing.Color.WhiteSmoke; + this.vcChargeSearchTime.ForeColorButton = System.Drawing.Color.Black; + this.vcChargeSearchTime.Location = new System.Drawing.Point(270, 331); + this.vcChargeSearchTime.MaxValue = 999999D; + this.vcChargeSearchTime.MinValue = 0D; + this.vcChargeSearchTime.Name = "vcChargeSearchTime"; + this.vcChargeSearchTime.NullDisplay = "--"; + this.vcChargeSearchTime.SideButtonClickValue = 30D; + this.vcChargeSearchTime.Size = new System.Drawing.Size(197, 37); + this.vcChargeSearchTime.TabIndex = 38; + this.vcChargeSearchTime.Tag = "SL"; + this.vcChargeSearchTime.Text = "120"; + this.vcChargeSearchTime.Value = 120D; + this.vcChargeSearchTime.ValueChanged += new System.EventHandler(this.vcChargeLow_ValueChanged); + // + // tabPage5 + // + this.tabPage5.BackColor = System.Drawing.Color.Orange; + this.tabPage5.Controls.Add(this.label54); + this.tabPage5.Controls.Add(this.vcTagF5A); + this.tabPage5.Controls.Add(this.vcTagF5B); + this.tabPage5.Controls.Add(this.vcTagF4F5); + this.tabPage5.Controls.Add(this.vcTagQAA); + this.tabPage5.Controls.Add(this.vcTagQAB); + this.tabPage5.Controls.Add(this.label17); + this.tabPage5.Controls.Add(this.button4); + this.tabPage5.Controls.Add(this.label49); + this.tabPage5.Controls.Add(this.label53); + this.tabPage5.Controls.Add(this.label47); + this.tabPage5.Controls.Add(this.label48); + this.tabPage5.Controls.Add(this.label51); + this.tabPage5.Controls.Add(this.label46); + this.tabPage5.Controls.Add(this.label45); + this.tabPage5.Controls.Add(this.vcTagQAQC); + this.tabPage5.Controls.Add(this.vcTagF3F4); + this.tabPage5.Controls.Add(this.vcTagF2F3); + this.tabPage5.Controls.Add(this.vcTagF1A); + this.tabPage5.Controls.Add(this.vcTagF1B); + this.tabPage5.Controls.Add(this.vcTagF3A); + this.tabPage5.Controls.Add(this.vcTagQCA); + this.tabPage5.Controls.Add(this.vcTagF3B); + this.tabPage5.Controls.Add(this.vcTagF2A); + this.tabPage5.Controls.Add(this.vcTagQCB); + this.tabPage5.Controls.Add(this.vcTagF4A); + this.tabPage5.Controls.Add(this.vcTagF1F2); + this.tabPage5.Controls.Add(this.vcTagF2B); + this.tabPage5.Controls.Add(this.vcTagF4B); + this.tabPage5.Controls.Add(this.vcTagQCF1); + this.tabPage5.Controls.Add(this.vcTagPOT); + this.tabPage5.Controls.Add(this.vcTagNOT); + this.tabPage5.Location = new System.Drawing.Point(4, 4); + this.tabPage5.Name = "tabPage5"; + this.tabPage5.Size = new System.Drawing.Size(1244, 590); + this.tabPage5.TabIndex = 5; + this.tabPage5.Text = "TAG"; + // + // label54 + // + this.label54.AutoSize = true; + this.label54.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label54.ForeColor = System.Drawing.Color.Black; + this.label54.Location = new System.Drawing.Point(220, 535); + this.label54.Name = "label54"; + this.label54.Size = new System.Drawing.Size(102, 27); + this.label54.TabIndex = 80; + this.label54.Text = "FVI #5"; + // + // vcTagF5A + // + this.vcTagF5A.BackColorButton = System.Drawing.Color.White; + this.vcTagF5A.ButtonWidth = "30"; + this.vcTagF5A.ColorBorder = System.Drawing.Color.White; + this.vcTagF5A.DecimalPosition = ((ushort)(0)); + this.vcTagF5A.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF5A.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF5A.ForeColor = System.Drawing.Color.Black; + this.vcTagF5A.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF5A.Location = new System.Drawing.Point(324, 529); + this.vcTagF5A.MaxValue = 99999D; + this.vcTagF5A.MinValue = 0D; + this.vcTagF5A.Name = "vcTagF5A"; + this.vcTagF5A.NullDisplay = "--"; + this.vcTagF5A.SideButtonClickValue = 3D; + this.vcTagF5A.Size = new System.Drawing.Size(197, 37); + this.vcTagF5A.TabIndex = 82; + this.vcTagF5A.Tag = ""; + this.vcTagF5A.Text = "9701"; + this.vcTagF5A.Value = 9701D; + this.vcTagF5A.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF5B + // + this.vcTagF5B.BackColorButton = System.Drawing.Color.White; + this.vcTagF5B.ButtonWidth = "30"; + this.vcTagF5B.ColorBorder = System.Drawing.Color.White; + this.vcTagF5B.DecimalPosition = ((ushort)(0)); + this.vcTagF5B.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF5B.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF5B.ForeColor = System.Drawing.Color.Black; + this.vcTagF5B.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF5B.Location = new System.Drawing.Point(19, 529); + this.vcTagF5B.MaxValue = 99999D; + this.vcTagF5B.MinValue = 0D; + this.vcTagF5B.Name = "vcTagF5B"; + this.vcTagF5B.NullDisplay = "--"; + this.vcTagF5B.SideButtonClickValue = 3D; + this.vcTagF5B.Size = new System.Drawing.Size(197, 37); + this.vcTagF5B.TabIndex = 81; + this.vcTagF5B.Tag = ""; + this.vcTagF5B.Text = "9700"; + this.vcTagF5B.Value = 9700D; + this.vcTagF5B.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF4F5 + // + this.vcTagF4F5.BackColor = System.Drawing.Color.Purple; + this.vcTagF4F5.BackColorButton = System.Drawing.Color.White; + this.vcTagF4F5.ButtonWidth = "30"; + this.vcTagF4F5.ColorBorder = System.Drawing.Color.White; + this.vcTagF4F5.DecimalPosition = ((ushort)(0)); + this.vcTagF4F5.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF4F5.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF4F5.ForeColor = System.Drawing.Color.LightGray; + this.vcTagF4F5.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF4F5.Location = new System.Drawing.Point(19, 485); + this.vcTagF4F5.MaxValue = 99999D; + this.vcTagF4F5.MinValue = 0D; + this.vcTagF4F5.Name = "vcTagF4F5"; + this.vcTagF4F5.NullDisplay = "--"; + this.vcTagF4F5.SideButtonClickValue = 3D; + this.vcTagF4F5.Size = new System.Drawing.Size(502, 37); + this.vcTagF4F5.TabIndex = 79; + this.vcTagF4F5.Tag = ""; + this.vcTagF4F5.Text = "9750"; + this.vcTagF4F5.Value = 9750D; + this.vcTagF4F5.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagQAA + // + this.vcTagQAA.BackColorButton = System.Drawing.Color.White; + this.vcTagQAA.ButtonWidth = "30"; + this.vcTagQAA.ColorBorder = System.Drawing.Color.White; + this.vcTagQAA.DecimalPosition = ((ushort)(0)); + this.vcTagQAA.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagQAA.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagQAA.ForeColor = System.Drawing.Color.Black; + this.vcTagQAA.ForeColorButton = System.Drawing.Color.Black; + this.vcTagQAA.Location = new System.Drawing.Point(324, 21); + this.vcTagQAA.MaxValue = 99999D; + this.vcTagQAA.MinValue = 0D; + this.vcTagQAA.Name = "vcTagQAA"; + this.vcTagQAA.NullDisplay = "--"; + this.vcTagQAA.SideButtonClickValue = 3D; + this.vcTagQAA.Size = new System.Drawing.Size(197, 37); + this.vcTagQAA.TabIndex = 78; + this.vcTagQAA.Tag = ""; + this.vcTagQAA.Text = "9201"; + this.vcTagQAA.Value = 9201D; + this.vcTagQAA.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagQAB + // + this.vcTagQAB.BackColorButton = System.Drawing.Color.White; + this.vcTagQAB.ButtonWidth = "30"; + this.vcTagQAB.ColorBorder = System.Drawing.Color.White; + this.vcTagQAB.DecimalPosition = ((ushort)(0)); + this.vcTagQAB.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagQAB.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagQAB.ForeColor = System.Drawing.Color.Black; + this.vcTagQAB.ForeColorButton = System.Drawing.Color.Black; + this.vcTagQAB.Location = new System.Drawing.Point(19, 21); + this.vcTagQAB.MaxValue = 99999D; + this.vcTagQAB.MinValue = 0D; + this.vcTagQAB.Name = "vcTagQAB"; + this.vcTagQAB.NullDisplay = "--"; + this.vcTagQAB.SideButtonClickValue = 3D; + this.vcTagQAB.Size = new System.Drawing.Size(197, 37); + this.vcTagQAB.TabIndex = 76; + this.vcTagQAB.Tag = ""; + this.vcTagQAB.Text = "9200"; + this.vcTagQAB.Value = 9200D; + this.vcTagQAB.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label17.ForeColor = System.Drawing.Color.Black; + this.label17.Location = new System.Drawing.Point(250, 27); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(42, 27); + this.label17.TabIndex = 75; + this.label17.Text = "QA"; + // + // button4 + // + this.button4.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.button4.Location = new System.Drawing.Point(1043, 6); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(195, 108); + this.button4.TabIndex = 74; + this.button4.Text = "기본값"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // label49 + // + this.label49.AutoSize = true; + this.label49.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label49.ForeColor = System.Drawing.Color.Black; + this.label49.Location = new System.Drawing.Point(220, 197); + this.label49.Name = "label49"; + this.label49.Size = new System.Drawing.Size(102, 27); + this.label49.TabIndex = 67; + this.label49.Text = "FVI #1"; + // + // label53 + // + this.label53.AutoSize = true; + this.label53.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label53.ForeColor = System.Drawing.Color.Black; + this.label53.Location = new System.Drawing.Point(220, 362); + this.label53.Name = "label53"; + this.label53.Size = new System.Drawing.Size(102, 27); + this.label53.TabIndex = 67; + this.label53.Text = "FVI #3"; + // + // label47 + // + this.label47.AutoSize = true; + this.label47.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label47.ForeColor = System.Drawing.Color.Black; + this.label47.Location = new System.Drawing.Point(250, 113); + this.label47.Name = "label47"; + this.label47.Size = new System.Drawing.Size(42, 27); + this.label47.TabIndex = 67; + this.label47.Text = "QC"; + // + // label48 + // + this.label48.AutoSize = true; + this.label48.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label48.ForeColor = System.Drawing.Color.Black; + this.label48.Location = new System.Drawing.Point(220, 277); + this.label48.Name = "label48"; + this.label48.Size = new System.Drawing.Size(102, 27); + this.label48.TabIndex = 67; + this.label48.Text = "FVI #2"; + // + // label51 + // + this.label51.AutoSize = true; + this.label51.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label51.ForeColor = System.Drawing.Color.Black; + this.label51.Location = new System.Drawing.Point(220, 448); + this.label51.Name = "label51"; + this.label51.Size = new System.Drawing.Size(102, 27); + this.label51.TabIndex = 67; + this.label51.Text = "FVI #4"; + // + // label46 + // + this.label46.AutoSize = true; + this.label46.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label46.ForeColor = System.Drawing.Color.Black; + this.label46.Location = new System.Drawing.Point(760, 65); + this.label46.Name = "label46"; + this.label46.Size = new System.Drawing.Size(57, 27); + this.label46.TabIndex = 61; + this.label46.Text = "POT"; + // + // label45 + // + this.label45.AutoSize = true; + this.label45.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.label45.ForeColor = System.Drawing.Color.Black; + this.label45.Location = new System.Drawing.Point(760, 31); + this.label45.Name = "label45"; + this.label45.Size = new System.Drawing.Size(57, 27); + this.label45.TabIndex = 59; + this.label45.Text = "NOT"; + // + // vcTagQAQC + // + this.vcTagQAQC.BackColor = System.Drawing.Color.Purple; + this.vcTagQAQC.BackColorButton = System.Drawing.Color.White; + this.vcTagQAQC.ButtonWidth = "30"; + this.vcTagQAQC.ColorBorder = System.Drawing.Color.White; + this.vcTagQAQC.DecimalPosition = ((ushort)(0)); + this.vcTagQAQC.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagQAQC.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagQAQC.ForeColor = System.Drawing.Color.LightGray; + this.vcTagQAQC.ForeColorButton = System.Drawing.Color.Black; + this.vcTagQAQC.Location = new System.Drawing.Point(19, 64); + this.vcTagQAQC.MaxValue = 99999D; + this.vcTagQAQC.MinValue = 0D; + this.vcTagQAQC.Name = "vcTagQAQC"; + this.vcTagQAQC.NullDisplay = "--"; + this.vcTagQAQC.SideButtonClickValue = 3D; + this.vcTagQAQC.Size = new System.Drawing.Size(502, 37); + this.vcTagQAQC.TabIndex = 77; + this.vcTagQAQC.Tag = ""; + this.vcTagQAQC.Text = "9250"; + this.vcTagQAQC.Value = 9250D; + this.vcTagQAQC.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF3F4 + // + this.vcTagF3F4.BackColor = System.Drawing.Color.Purple; + this.vcTagF3F4.BackColorButton = System.Drawing.Color.White; + this.vcTagF3F4.ButtonWidth = "30"; + this.vcTagF3F4.ColorBorder = System.Drawing.Color.White; + this.vcTagF3F4.DecimalPosition = ((ushort)(0)); + this.vcTagF3F4.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF3F4.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF3F4.ForeColor = System.Drawing.Color.LightGray; + this.vcTagF3F4.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF3F4.Location = new System.Drawing.Point(19, 399); + this.vcTagF3F4.MaxValue = 99999D; + this.vcTagF3F4.MinValue = 0D; + this.vcTagF3F4.Name = "vcTagF3F4"; + this.vcTagF3F4.NullDisplay = "--"; + this.vcTagF3F4.SideButtonClickValue = 3D; + this.vcTagF3F4.Size = new System.Drawing.Size(502, 37); + this.vcTagF3F4.TabIndex = 73; + this.vcTagF3F4.Tag = ""; + this.vcTagF3F4.Text = "9650"; + this.vcTagF3F4.Value = 9650D; + this.vcTagF3F4.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF2F3 + // + this.vcTagF2F3.BackColor = System.Drawing.Color.Purple; + this.vcTagF2F3.BackColorButton = System.Drawing.Color.White; + this.vcTagF2F3.ButtonWidth = "30"; + this.vcTagF2F3.ColorBorder = System.Drawing.Color.White; + this.vcTagF2F3.DecimalPosition = ((ushort)(0)); + this.vcTagF2F3.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF2F3.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF2F3.ForeColor = System.Drawing.Color.LightGray; + this.vcTagF2F3.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF2F3.Location = new System.Drawing.Point(19, 313); + this.vcTagF2F3.MaxValue = 99999D; + this.vcTagF2F3.MinValue = 0D; + this.vcTagF2F3.Name = "vcTagF2F3"; + this.vcTagF2F3.NullDisplay = "--"; + this.vcTagF2F3.SideButtonClickValue = 3D; + this.vcTagF2F3.Size = new System.Drawing.Size(502, 37); + this.vcTagF2F3.TabIndex = 72; + this.vcTagF2F3.Tag = ""; + this.vcTagF2F3.Text = "9550"; + this.vcTagF2F3.Value = 9550D; + this.vcTagF2F3.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF1A + // + this.vcTagF1A.BackColorButton = System.Drawing.Color.White; + this.vcTagF1A.ButtonWidth = "30"; + this.vcTagF1A.ColorBorder = System.Drawing.Color.White; + this.vcTagF1A.DecimalPosition = ((ushort)(0)); + this.vcTagF1A.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF1A.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF1A.ForeColor = System.Drawing.Color.Black; + this.vcTagF1A.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF1A.Location = new System.Drawing.Point(324, 191); + this.vcTagF1A.MaxValue = 99999D; + this.vcTagF1A.MinValue = 0D; + this.vcTagF1A.Name = "vcTagF1A"; + this.vcTagF1A.NullDisplay = "--"; + this.vcTagF1A.SideButtonClickValue = 3D; + this.vcTagF1A.Size = new System.Drawing.Size(197, 37); + this.vcTagF1A.TabIndex = 70; + this.vcTagF1A.Tag = ""; + this.vcTagF1A.Text = "9401"; + this.vcTagF1A.Value = 9401D; + this.vcTagF1A.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF1B + // + this.vcTagF1B.BackColorButton = System.Drawing.Color.White; + this.vcTagF1B.ButtonWidth = "30"; + this.vcTagF1B.ColorBorder = System.Drawing.Color.White; + this.vcTagF1B.DecimalPosition = ((ushort)(0)); + this.vcTagF1B.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF1B.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF1B.ForeColor = System.Drawing.Color.Black; + this.vcTagF1B.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF1B.Location = new System.Drawing.Point(19, 191); + this.vcTagF1B.MaxValue = 99999D; + this.vcTagF1B.MinValue = 0D; + this.vcTagF1B.Name = "vcTagF1B"; + this.vcTagF1B.NullDisplay = "--"; + this.vcTagF1B.SideButtonClickValue = 3D; + this.vcTagF1B.Size = new System.Drawing.Size(197, 37); + this.vcTagF1B.TabIndex = 68; + this.vcTagF1B.Tag = ""; + this.vcTagF1B.Text = "9400"; + this.vcTagF1B.Value = 9400D; + this.vcTagF1B.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF3A + // + this.vcTagF3A.BackColorButton = System.Drawing.Color.White; + this.vcTagF3A.ButtonWidth = "30"; + this.vcTagF3A.ColorBorder = System.Drawing.Color.White; + this.vcTagF3A.DecimalPosition = ((ushort)(0)); + this.vcTagF3A.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF3A.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF3A.ForeColor = System.Drawing.Color.Black; + this.vcTagF3A.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF3A.Location = new System.Drawing.Point(324, 356); + this.vcTagF3A.MaxValue = 99999D; + this.vcTagF3A.MinValue = 0D; + this.vcTagF3A.Name = "vcTagF3A"; + this.vcTagF3A.NullDisplay = "--"; + this.vcTagF3A.SideButtonClickValue = 3D; + this.vcTagF3A.Size = new System.Drawing.Size(197, 37); + this.vcTagF3A.TabIndex = 70; + this.vcTagF3A.Tag = ""; + this.vcTagF3A.Text = "9601"; + this.vcTagF3A.Value = 9601D; + this.vcTagF3A.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagQCA + // + this.vcTagQCA.BackColorButton = System.Drawing.Color.White; + this.vcTagQCA.ButtonWidth = "30"; + this.vcTagQCA.ColorBorder = System.Drawing.Color.White; + this.vcTagQCA.DecimalPosition = ((ushort)(0)); + this.vcTagQCA.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagQCA.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagQCA.ForeColor = System.Drawing.Color.Black; + this.vcTagQCA.ForeColorButton = System.Drawing.Color.Black; + this.vcTagQCA.Location = new System.Drawing.Point(324, 107); + this.vcTagQCA.MaxValue = 99999D; + this.vcTagQCA.MinValue = 0D; + this.vcTagQCA.Name = "vcTagQCA"; + this.vcTagQCA.NullDisplay = "--"; + this.vcTagQCA.SideButtonClickValue = 3D; + this.vcTagQCA.Size = new System.Drawing.Size(197, 37); + this.vcTagQCA.TabIndex = 70; + this.vcTagQCA.Tag = ""; + this.vcTagQCA.Text = "9301"; + this.vcTagQCA.Value = 9301D; + this.vcTagQCA.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF3B + // + this.vcTagF3B.BackColorButton = System.Drawing.Color.White; + this.vcTagF3B.ButtonWidth = "30"; + this.vcTagF3B.ColorBorder = System.Drawing.Color.White; + this.vcTagF3B.DecimalPosition = ((ushort)(0)); + this.vcTagF3B.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF3B.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF3B.ForeColor = System.Drawing.Color.Black; + this.vcTagF3B.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF3B.Location = new System.Drawing.Point(19, 356); + this.vcTagF3B.MaxValue = 99999D; + this.vcTagF3B.MinValue = 0D; + this.vcTagF3B.Name = "vcTagF3B"; + this.vcTagF3B.NullDisplay = "--"; + this.vcTagF3B.SideButtonClickValue = 3D; + this.vcTagF3B.Size = new System.Drawing.Size(197, 37); + this.vcTagF3B.TabIndex = 68; + this.vcTagF3B.Tag = ""; + this.vcTagF3B.Text = "9600"; + this.vcTagF3B.Value = 9600D; + this.vcTagF3B.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF2A + // + this.vcTagF2A.BackColorButton = System.Drawing.Color.White; + this.vcTagF2A.ButtonWidth = "30"; + this.vcTagF2A.ColorBorder = System.Drawing.Color.White; + this.vcTagF2A.DecimalPosition = ((ushort)(0)); + this.vcTagF2A.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF2A.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF2A.ForeColor = System.Drawing.Color.Black; + this.vcTagF2A.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF2A.Location = new System.Drawing.Point(324, 271); + this.vcTagF2A.MaxValue = 99999D; + this.vcTagF2A.MinValue = 0D; + this.vcTagF2A.Name = "vcTagF2A"; + this.vcTagF2A.NullDisplay = "--"; + this.vcTagF2A.SideButtonClickValue = 3D; + this.vcTagF2A.Size = new System.Drawing.Size(197, 37); + this.vcTagF2A.TabIndex = 70; + this.vcTagF2A.Tag = ""; + this.vcTagF2A.Text = "9501"; + this.vcTagF2A.Value = 9501D; + this.vcTagF2A.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagQCB + // + this.vcTagQCB.BackColorButton = System.Drawing.Color.White; + this.vcTagQCB.ButtonWidth = "30"; + this.vcTagQCB.ColorBorder = System.Drawing.Color.White; + this.vcTagQCB.DecimalPosition = ((ushort)(0)); + this.vcTagQCB.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagQCB.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagQCB.ForeColor = System.Drawing.Color.Black; + this.vcTagQCB.ForeColorButton = System.Drawing.Color.Black; + this.vcTagQCB.Location = new System.Drawing.Point(19, 107); + this.vcTagQCB.MaxValue = 99999D; + this.vcTagQCB.MinValue = 0D; + this.vcTagQCB.Name = "vcTagQCB"; + this.vcTagQCB.NullDisplay = "--"; + this.vcTagQCB.SideButtonClickValue = 3D; + this.vcTagQCB.Size = new System.Drawing.Size(197, 37); + this.vcTagQCB.TabIndex = 68; + this.vcTagQCB.Tag = ""; + this.vcTagQCB.Text = "9300"; + this.vcTagQCB.Value = 9300D; + this.vcTagQCB.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF4A + // + this.vcTagF4A.BackColorButton = System.Drawing.Color.White; + this.vcTagF4A.ButtonWidth = "30"; + this.vcTagF4A.ColorBorder = System.Drawing.Color.White; + this.vcTagF4A.DecimalPosition = ((ushort)(0)); + this.vcTagF4A.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF4A.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF4A.ForeColor = System.Drawing.Color.Black; + this.vcTagF4A.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF4A.Location = new System.Drawing.Point(324, 442); + this.vcTagF4A.MaxValue = 99999D; + this.vcTagF4A.MinValue = 0D; + this.vcTagF4A.Name = "vcTagF4A"; + this.vcTagF4A.NullDisplay = "--"; + this.vcTagF4A.SideButtonClickValue = 3D; + this.vcTagF4A.Size = new System.Drawing.Size(197, 37); + this.vcTagF4A.TabIndex = 70; + this.vcTagF4A.Tag = ""; + this.vcTagF4A.Text = "9701"; + this.vcTagF4A.Value = 9701D; + this.vcTagF4A.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF1F2 + // + this.vcTagF1F2.BackColor = System.Drawing.Color.Purple; + this.vcTagF1F2.BackColorButton = System.Drawing.Color.White; + this.vcTagF1F2.ButtonWidth = "30"; + this.vcTagF1F2.ColorBorder = System.Drawing.Color.White; + this.vcTagF1F2.DecimalPosition = ((ushort)(0)); + this.vcTagF1F2.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF1F2.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF1F2.ForeColor = System.Drawing.Color.LightGray; + this.vcTagF1F2.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF1F2.Location = new System.Drawing.Point(19, 231); + this.vcTagF1F2.MaxValue = 99999D; + this.vcTagF1F2.MinValue = 0D; + this.vcTagF1F2.Name = "vcTagF1F2"; + this.vcTagF1F2.NullDisplay = "--"; + this.vcTagF1F2.SideButtonClickValue = 3D; + this.vcTagF1F2.Size = new System.Drawing.Size(502, 37); + this.vcTagF1F2.TabIndex = 70; + this.vcTagF1F2.Tag = ""; + this.vcTagF1F2.Text = "9450"; + this.vcTagF1F2.Value = 9450D; + this.vcTagF1F2.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF2B + // + this.vcTagF2B.BackColorButton = System.Drawing.Color.White; + this.vcTagF2B.ButtonWidth = "30"; + this.vcTagF2B.ColorBorder = System.Drawing.Color.White; + this.vcTagF2B.DecimalPosition = ((ushort)(0)); + this.vcTagF2B.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF2B.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF2B.ForeColor = System.Drawing.Color.Black; + this.vcTagF2B.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF2B.Location = new System.Drawing.Point(19, 271); + this.vcTagF2B.MaxValue = 99999D; + this.vcTagF2B.MinValue = 0D; + this.vcTagF2B.Name = "vcTagF2B"; + this.vcTagF2B.NullDisplay = "--"; + this.vcTagF2B.SideButtonClickValue = 3D; + this.vcTagF2B.Size = new System.Drawing.Size(197, 37); + this.vcTagF2B.TabIndex = 68; + this.vcTagF2B.Tag = ""; + this.vcTagF2B.Text = "9500"; + this.vcTagF2B.Value = 9500D; + this.vcTagF2B.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagF4B + // + this.vcTagF4B.BackColorButton = System.Drawing.Color.White; + this.vcTagF4B.ButtonWidth = "30"; + this.vcTagF4B.ColorBorder = System.Drawing.Color.White; + this.vcTagF4B.DecimalPosition = ((ushort)(0)); + this.vcTagF4B.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagF4B.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagF4B.ForeColor = System.Drawing.Color.Black; + this.vcTagF4B.ForeColorButton = System.Drawing.Color.Black; + this.vcTagF4B.Location = new System.Drawing.Point(19, 442); + this.vcTagF4B.MaxValue = 99999D; + this.vcTagF4B.MinValue = 0D; + this.vcTagF4B.Name = "vcTagF4B"; + this.vcTagF4B.NullDisplay = "--"; + this.vcTagF4B.SideButtonClickValue = 3D; + this.vcTagF4B.Size = new System.Drawing.Size(197, 37); + this.vcTagF4B.TabIndex = 68; + this.vcTagF4B.Tag = ""; + this.vcTagF4B.Text = "9700"; + this.vcTagF4B.Value = 9700D; + this.vcTagF4B.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagQCF1 + // + this.vcTagQCF1.BackColor = System.Drawing.Color.Purple; + this.vcTagQCF1.BackColorButton = System.Drawing.Color.White; + this.vcTagQCF1.ButtonWidth = "30"; + this.vcTagQCF1.ColorBorder = System.Drawing.Color.White; + this.vcTagQCF1.DecimalPosition = ((ushort)(0)); + this.vcTagQCF1.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagQCF1.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagQCF1.ForeColor = System.Drawing.Color.LightGray; + this.vcTagQCF1.ForeColorButton = System.Drawing.Color.Black; + this.vcTagQCF1.Location = new System.Drawing.Point(19, 150); + this.vcTagQCF1.MaxValue = 99999D; + this.vcTagQCF1.MinValue = 0D; + this.vcTagQCF1.Name = "vcTagQCF1"; + this.vcTagQCF1.NullDisplay = "--"; + this.vcTagQCF1.SideButtonClickValue = 3D; + this.vcTagQCF1.Size = new System.Drawing.Size(502, 37); + this.vcTagQCF1.TabIndex = 68; + this.vcTagQCF1.Tag = ""; + this.vcTagQCF1.Text = "9350"; + this.vcTagQCF1.Value = 9350D; + this.vcTagQCF1.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagPOT + // + this.vcTagPOT.BackColor = System.Drawing.Color.Tomato; + this.vcTagPOT.BackColorButton = System.Drawing.Color.White; + this.vcTagPOT.ButtonWidth = "30"; + this.vcTagPOT.ColorBorder = System.Drawing.Color.White; + this.vcTagPOT.DecimalPosition = ((ushort)(0)); + this.vcTagPOT.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagPOT.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagPOT.ForeColor = System.Drawing.Color.Black; + this.vcTagPOT.ForeColorButton = System.Drawing.Color.Black; + this.vcTagPOT.Location = new System.Drawing.Point(549, 64); + this.vcTagPOT.MaxValue = 99999D; + this.vcTagPOT.MinValue = 0D; + this.vcTagPOT.Name = "vcTagPOT"; + this.vcTagPOT.NullDisplay = "--"; + this.vcTagPOT.SideButtonClickValue = 3D; + this.vcTagPOT.Size = new System.Drawing.Size(197, 37); + this.vcTagPOT.TabIndex = 62; + this.vcTagPOT.Tag = ""; + this.vcTagPOT.Text = "9900"; + this.vcTagPOT.Value = 9900D; + this.vcTagPOT.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // vcTagNOT + // + this.vcTagNOT.BackColor = System.Drawing.Color.Tomato; + this.vcTagNOT.BackColorButton = System.Drawing.Color.White; + this.vcTagNOT.ButtonWidth = "30"; + this.vcTagNOT.ColorBorder = System.Drawing.Color.White; + this.vcTagNOT.DecimalPosition = ((ushort)(0)); + this.vcTagNOT.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.vcTagNOT.FontSideButton = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.vcTagNOT.ForeColor = System.Drawing.Color.Black; + this.vcTagNOT.ForeColorButton = System.Drawing.Color.Black; + this.vcTagNOT.Location = new System.Drawing.Point(549, 21); + this.vcTagNOT.MaxValue = 99999D; + this.vcTagNOT.MinValue = 0D; + this.vcTagNOT.Name = "vcTagNOT"; + this.vcTagNOT.NullDisplay = "--"; + this.vcTagNOT.SideButtonClickValue = 3D; + this.vcTagNOT.Size = new System.Drawing.Size(197, 37); + this.vcTagNOT.TabIndex = 60; + this.vcTagNOT.Tag = ""; + this.vcTagNOT.Text = "9000"; + this.vcTagNOT.Value = 9000D; + this.vcTagNOT.ButtonClick += new System.EventHandler(this.vcChargeLow_ButtonClick); + // + // tabPage4 + // + this.tabPage4.Controls.Add(this.groupBox3); + this.tabPage4.Controls.Add(this.panel6); + this.tabPage4.Location = new System.Drawing.Point(4, 4); + this.tabPage4.Name = "tabPage4"; + this.tabPage4.Padding = new System.Windows.Forms.Padding(0, 5, 0, 2); + this.tabPage4.Size = new System.Drawing.Size(1244, 590); + this.tabPage4.TabIndex = 3; + this.tabPage4.Text = "Advance"; + this.tabPage4.UseVisualStyleBackColor = true; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.chkClearPos); + this.groupBox3.Controls.Add(this.propertyGrid1); + this.groupBox3.Controls.Add(this.groupBox1); + this.groupBox3.Controls.Add(this.chkDetectManualCharge); + this.groupBox3.Controls.Add(this.chkAGVDirBack); + this.groupBox3.Controls.Add(this.chkFullScreen); + this.groupBox3.Controls.Add(this.nudMusicVol); + this.groupBox3.Controls.Add(this.label22); + this.groupBox3.Controls.Add(this.linkLabel5); + this.groupBox3.Controls.Add(this.linkLabel4); + this.groupBox3.Controls.Add(this.linkLabel3); + this.groupBox3.Controls.Add(this.tbMusic); + this.groupBox3.Controls.Add(this.label16); + this.groupBox3.Controls.Add(this.nudDoorSoundTerm); + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Controls.Add(this.groupBox4); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox3.Location = new System.Drawing.Point(5, 5); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(1239, 583); + this.groupBox3.TabIndex = 32; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "일반 설정"; + // + // propertyGrid1 + // + this.propertyGrid1.Font = new System.Drawing.Font("맑은 고딕", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.propertyGrid1.Location = new System.Drawing.Point(678, 109); + this.propertyGrid1.Name = "propertyGrid1"; + this.propertyGrid1.Size = new System.Drawing.Size(538, 448); + this.propertyGrid1.TabIndex = 11; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.tbMCID); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Location = new System.Drawing.Point(333, 119); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(324, 113); + this.groupBox1.TabIndex = 10; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "EE Monitoring"; + // + // tbMCID + // + this.tbMCID.Location = new System.Drawing.Point(79, 38); + this.tbMCID.Name = "tbMCID"; + this.tbMCID.Size = new System.Drawing.Size(196, 21); + this.tbMCID.TabIndex = 4; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(16, 41); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(36, 12); + this.label4.TabIndex = 6; + this.label4.Text = "MCID"; + // + // chkDetectManualCharge + // + this.chkDetectManualCharge.AutoSize = true; + this.chkDetectManualCharge.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.chkDetectManualCharge.Location = new System.Drawing.Point(678, 72); + this.chkDetectManualCharge.Name = "chkDetectManualCharge"; + this.chkDetectManualCharge.Size = new System.Drawing.Size(235, 31); + this.chkDetectManualCharge.TabIndex = 9; + this.chkDetectManualCharge.Text = "수동 충전 감지"; + this.chkDetectManualCharge.UseVisualStyleBackColor = true; + // + // chkAGVDirBack + // + this.chkAGVDirBack.AutoSize = true; + this.chkAGVDirBack.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.chkAGVDirBack.ForeColor = System.Drawing.Color.Red; + this.chkAGVDirBack.Location = new System.Drawing.Point(27, 72); + this.chkAGVDirBack.Name = "chkAGVDirBack"; + this.chkAGVDirBack.Size = new System.Drawing.Size(619, 31); + this.chkAGVDirBack.TabIndex = 8; + this.chkAGVDirBack.Text = "FVI 이동시 Backward 방향으로 이동 합니다"; + this.chkAGVDirBack.UseVisualStyleBackColor = true; + // + // chkFullScreen + // + this.chkFullScreen.AutoSize = true; + this.chkFullScreen.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.chkFullScreen.Location = new System.Drawing.Point(27, 30); + this.chkFullScreen.Name = "chkFullScreen"; + this.chkFullScreen.Size = new System.Drawing.Size(453, 31); + this.chkFullScreen.TabIndex = 3; + this.chkFullScreen.Text = "프로그램 시작시 전체화면 사용"; + this.chkFullScreen.UseVisualStyleBackColor = true; + // + // nudMusicVol + // + this.nudMusicVol.Font = new System.Drawing.Font("맑은 고딕", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.nudMusicVol.Location = new System.Drawing.Point(179, 309); + this.nudMusicVol.Name = "nudMusicVol"; + this.nudMusicVol.Size = new System.Drawing.Size(102, 35); + this.nudMusicVol.TabIndex = 7; + this.nudMusicVol.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(109, 326); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(57, 12); + this.label22.TabIndex = 6; + this.label22.Text = "음악 볼륨"; + // + // linkLabel5 + // + this.linkLabel5.AutoSize = true; + this.linkLabel5.Location = new System.Drawing.Point(387, 302); + this.linkLabel5.Name = "linkLabel5"; + this.linkLabel5.Size = new System.Drawing.Size(29, 12); + this.linkLabel5.TabIndex = 5; + this.linkLabel5.TabStop = true; + this.linkLabel5.Text = "멈춤"; + this.linkLabel5.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel5_LinkClicked); + // + // linkLabel4 + // + this.linkLabel4.AutoSize = true; + this.linkLabel4.Location = new System.Drawing.Point(387, 282); + this.linkLabel4.Name = "linkLabel4"; + this.linkLabel4.Size = new System.Drawing.Size(29, 12); + this.linkLabel4.TabIndex = 5; + this.linkLabel4.TabStop = true; + this.linkLabel4.Text = "재생"; + this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked); + // + // linkLabel3 + // + this.linkLabel3.AutoSize = true; + this.linkLabel3.Location = new System.Drawing.Point(43, 292); + this.linkLabel3.Name = "linkLabel3"; + this.linkLabel3.Size = new System.Drawing.Size(65, 12); + this.linkLabel3.TabIndex = 5; + this.linkLabel3.TabStop = true; + this.linkLabel3.Text = "이동시음악"; + this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked); + // + // tbMusic + // + this.tbMusic.Location = new System.Drawing.Point(114, 282); + this.tbMusic.Name = "tbMusic"; + this.tbMusic.Size = new System.Drawing.Size(267, 21); + this.tbMusic.TabIndex = 4; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(288, 244); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(17, 12); + this.label16.TabIndex = 3; + this.label16.Text = "초"; + // + // nudDoorSoundTerm + // + this.nudDoorSoundTerm.Font = new System.Drawing.Font("맑은 고딕", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.nudDoorSoundTerm.Location = new System.Drawing.Point(181, 227); + this.nudDoorSoundTerm.Name = "nudDoorSoundTerm"; + this.nudDoorSoundTerm.Size = new System.Drawing.Size(102, 35); + this.nudDoorSoundTerm.TabIndex = 2; + this.nudDoorSoundTerm.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(43, 240); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(131, 12); + this.label3.TabIndex = 1; + this.label3.Text = "도어 업/다운 알림 간격"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.cleartime2); + this.groupBox4.Controls.Add(this.cleartime1); + this.groupBox4.Controls.Add(this.chkClear2); + this.groupBox4.Controls.Add(this.chkClear1); + this.groupBox4.Location = new System.Drawing.Point(27, 119); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(236, 88); + this.groupBox4.TabIndex = 0; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Count Reset"; + // + // cleartime2 + // + this.cleartime2.CustomFormat = "HH:mm"; + this.cleartime2.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.cleartime2.Location = new System.Drawing.Point(145, 59); + this.cleartime2.Name = "cleartime2"; + this.cleartime2.Size = new System.Drawing.Size(76, 21); + this.cleartime2.TabIndex = 2; + // + // cleartime1 + // + this.cleartime1.CustomFormat = "HH:mm"; + this.cleartime1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.cleartime1.Location = new System.Drawing.Point(145, 27); + this.cleartime1.Name = "cleartime1"; + this.cleartime1.Size = new System.Drawing.Size(76, 21); + this.cleartime1.TabIndex = 2; + // + // chkClear2 + // + this.chkClear2.AutoSize = true; + this.chkClear2.Location = new System.Drawing.Point(23, 61); + this.chkClear2.Name = "chkClear2"; + this.chkClear2.Size = new System.Drawing.Size(116, 16); + this.chkClear2.TabIndex = 1; + this.chkClear2.Text = "오후 시간 초기화"; + this.chkClear2.UseVisualStyleBackColor = true; + // + // chkClear1 + // + this.chkClear1.AutoSize = true; + this.chkClear1.Location = new System.Drawing.Point(23, 29); + this.chkClear1.Name = "chkClear1"; + this.chkClear1.Size = new System.Drawing.Size(116, 16); + this.chkClear1.TabIndex = 0; + this.chkClear1.Text = "오전 시간 초기화"; + this.chkClear1.UseVisualStyleBackColor = true; + // + // panel6 + // + this.panel6.Dock = System.Windows.Forms.DockStyle.Left; + this.panel6.Location = new System.Drawing.Point(0, 5); + this.panel6.Name = "panel6"; + this.panel6.Size = new System.Drawing.Size(5, 583); + this.panel6.TabIndex = 30; + // + // panTopMenu + // + this.panTopMenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.panTopMenu.Controls.Add(this.label10); + this.panTopMenu.Controls.Add(this.btClose); + this.panTopMenu.Controls.Add(this.pictureBox1); + this.panTopMenu.Dock = System.Windows.Forms.DockStyle.Top; + this.panTopMenu.Location = new System.Drawing.Point(5, 5); + this.panTopMenu.Name = "panTopMenu"; + this.panTopMenu.Size = new System.Drawing.Size(1270, 50); + this.panTopMenu.TabIndex = 135; + // + // label10 + // + this.label10.Dock = System.Windows.Forms.DockStyle.Left; + this.label10.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label10.ForeColor = System.Drawing.Color.LightGray; + this.label10.Location = new System.Drawing.Point(49, 0); + this.label10.Name = "label10"; + this.label10.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.label10.Size = new System.Drawing.Size(236, 50); + this.label10.TabIndex = 8; + this.label10.Text = "환경 설정"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // btClose + // + this.btClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btClose.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.btClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btClose.BackgroundImage"))); + this.btClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.btClose.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btClose.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.btClose.BorderColorOver = System.Drawing.Color.SkyBlue; + this.btClose.BorderSize = new System.Windows.Forms.Padding(0, 0, 0, 4); + this.btClose.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btClose.Cursor = System.Windows.Forms.Cursors.Hand; + this.btClose.Dock = System.Windows.Forms.DockStyle.Right; + this.btClose.Font = new System.Drawing.Font("맑은 고딕", 12F); + this.btClose.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); + this.btClose.GradientEnable = false; + this.btClose.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btClose.GradientRepeatBG = false; + this.btClose.isButton = true; + this.btClose.Location = new System.Drawing.Point(1220, 0); + this.btClose.Margin = new System.Windows.Forms.Padding(0); + this.btClose.MouseDownColor = System.Drawing.Color.Yellow; + this.btClose.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btClose.msg = null; + this.btClose.Name = "btClose"; + this.btClose.ProgressBorderColor = System.Drawing.Color.Black; + this.btClose.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btClose.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btClose.ProgressEnable = false; + this.btClose.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btClose.ProgressForeColor = System.Drawing.Color.Black; + this.btClose.ProgressMax = 100F; + this.btClose.ProgressMin = 0F; + this.btClose.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btClose.ProgressValue = 0F; + this.btClose.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btClose.Sign = ""; + this.btClose.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btClose.SignColor = System.Drawing.Color.Yellow; + this.btClose.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btClose.Size = new System.Drawing.Size(50, 50); + this.btClose.TabIndex = 7; + this.btClose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btClose.TextShadow = true; + this.btClose.TextVisible = true; + this.btClose.Click += new System.EventHandler(this.btClose_Click); + // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(0, 0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(49, 50); + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // timer1 + // + this.timer1.Interval = 200; + // + // label8 + // + this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); + this.label8.Dock = System.Windows.Forms.DockStyle.Top; + this.label8.ForeColor = System.Drawing.Color.White; + this.label8.Location = new System.Drawing.Point(5, 55); + this.label8.Name = "label8"; + this.label8.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.label8.Size = new System.Drawing.Size(1270, 23); + this.label8.TabIndex = 136; + this.label8.Text = "label8"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // panel2 + // + this.panel2.Controls.Add(this.bt5); + this.panel2.Controls.Add(this.bt4); + this.panel2.Controls.Add(this.bt3); + this.panel2.Controls.Add(this.bt2); + this.panel2.Controls.Add(this.bt1); + this.panel2.Controls.Add(this.bt0); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(5, 78); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(1270, 64); + this.panel2.TabIndex = 137; + // + // bt5 + // + this.bt5.BackColor = System.Drawing.Color.DimGray; + this.bt5.BackColor2 = System.Drawing.Color.Gray; + this.bt5.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.bt5.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.bt5.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.bt5.BorderSize = new System.Windows.Forms.Padding(2); + this.bt5.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.bt5.Cursor = System.Windows.Forms.Cursors.Hand; + this.bt5.Dock = System.Windows.Forms.DockStyle.Left; + this.bt5.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.bt5.ForeColor = System.Drawing.Color.White; + this.bt5.GradientEnable = true; + this.bt5.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.bt5.GradientRepeatBG = false; + this.bt5.isButton = true; + this.bt5.Location = new System.Drawing.Point(765, 0); + this.bt5.MouseDownColor = System.Drawing.Color.Yellow; + this.bt5.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.bt5.msg = null; + this.bt5.Name = "bt5"; + this.bt5.ProgressBorderColor = System.Drawing.Color.Black; + this.bt5.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.bt5.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.bt5.ProgressEnable = false; + this.bt5.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.bt5.ProgressForeColor = System.Drawing.Color.Black; + this.bt5.ProgressMax = 100F; + this.bt5.ProgressMin = 0F; + this.bt5.ProgressPadding = new System.Windows.Forms.Padding(0); + this.bt5.ProgressValue = 0F; + this.bt5.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.bt5.Sign = ""; + this.bt5.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.bt5.SignColor = System.Drawing.Color.Yellow; + this.bt5.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.bt5.Size = new System.Drawing.Size(153, 64); + this.bt5.TabIndex = 29; + this.bt5.Tag = "5"; + this.bt5.Text = "상세"; + this.bt5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.bt5.TextShadow = true; + this.bt5.TextVisible = true; + this.bt5.Click += new System.EventHandler(this.arLabel1_Click); + // + // bt4 + // + this.bt4.BackColor = System.Drawing.Color.DimGray; + this.bt4.BackColor2 = System.Drawing.Color.Gray; + this.bt4.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.bt4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.bt4.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.bt4.BorderSize = new System.Windows.Forms.Padding(2); + this.bt4.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.bt4.Cursor = System.Windows.Forms.Cursors.Hand; + this.bt4.Dock = System.Windows.Forms.DockStyle.Left; + this.bt4.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.bt4.ForeColor = System.Drawing.Color.White; + this.bt4.GradientEnable = true; + this.bt4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.bt4.GradientRepeatBG = false; + this.bt4.isButton = true; + this.bt4.Location = new System.Drawing.Point(612, 0); + this.bt4.MouseDownColor = System.Drawing.Color.Yellow; + this.bt4.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.bt4.msg = null; + this.bt4.Name = "bt4"; + this.bt4.ProgressBorderColor = System.Drawing.Color.Black; + this.bt4.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.bt4.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.bt4.ProgressEnable = false; + this.bt4.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.bt4.ProgressForeColor = System.Drawing.Color.Black; + this.bt4.ProgressMax = 100F; + this.bt4.ProgressMin = 0F; + this.bt4.ProgressPadding = new System.Windows.Forms.Padding(0); + this.bt4.ProgressValue = 0F; + this.bt4.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.bt4.Sign = ""; + this.bt4.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.bt4.SignColor = System.Drawing.Color.Yellow; + this.bt4.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.bt4.Size = new System.Drawing.Size(153, 64); + this.bt4.TabIndex = 28; + this.bt4.Tag = "4"; + this.bt4.Text = "TAG"; + this.bt4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.bt4.TextShadow = true; + this.bt4.TextVisible = true; + this.bt4.Click += new System.EventHandler(this.arLabel1_Click); + // + // bt3 + // + this.bt3.BackColor = System.Drawing.Color.DimGray; + this.bt3.BackColor2 = System.Drawing.Color.Gray; + this.bt3.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.bt3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.bt3.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.bt3.BorderSize = new System.Windows.Forms.Padding(2); + this.bt3.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.bt3.Cursor = System.Windows.Forms.Cursors.Hand; + this.bt3.Dock = System.Windows.Forms.DockStyle.Left; + this.bt3.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.bt3.ForeColor = System.Drawing.Color.White; + this.bt3.GradientEnable = true; + this.bt3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.bt3.GradientRepeatBG = false; + this.bt3.isButton = true; + this.bt3.Location = new System.Drawing.Point(459, 0); + this.bt3.MouseDownColor = System.Drawing.Color.Yellow; + this.bt3.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.bt3.msg = null; + this.bt3.Name = "bt3"; + this.bt3.ProgressBorderColor = System.Drawing.Color.Black; + this.bt3.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.bt3.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.bt3.ProgressEnable = false; + this.bt3.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.bt3.ProgressForeColor = System.Drawing.Color.Black; + this.bt3.ProgressMax = 100F; + this.bt3.ProgressMin = 0F; + this.bt3.ProgressPadding = new System.Windows.Forms.Padding(0); + this.bt3.ProgressValue = 0F; + this.bt3.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.bt3.Sign = ""; + this.bt3.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.bt3.SignColor = System.Drawing.Color.Yellow; + this.bt3.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.bt3.Size = new System.Drawing.Size(153, 64); + this.bt3.TabIndex = 27; + this.bt3.Tag = "3"; + this.bt3.Text = "충전"; + this.bt3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.bt3.TextShadow = true; + this.bt3.TextVisible = true; + this.bt3.Click += new System.EventHandler(this.arLabel1_Click); + // + // bt2 + // + this.bt2.BackColor = System.Drawing.Color.DimGray; + this.bt2.BackColor2 = System.Drawing.Color.Gray; + this.bt2.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.bt2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.bt2.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.bt2.BorderSize = new System.Windows.Forms.Padding(2); + this.bt2.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.bt2.Cursor = System.Windows.Forms.Cursors.Hand; + this.bt2.Dock = System.Windows.Forms.DockStyle.Left; + this.bt2.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.bt2.ForeColor = System.Drawing.Color.White; + this.bt2.GradientEnable = true; + this.bt2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.bt2.GradientRepeatBG = false; + this.bt2.isButton = true; + this.bt2.Location = new System.Drawing.Point(306, 0); + this.bt2.MouseDownColor = System.Drawing.Color.Yellow; + this.bt2.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.bt2.msg = null; + this.bt2.Name = "bt2"; + this.bt2.ProgressBorderColor = System.Drawing.Color.Black; + this.bt2.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.bt2.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.bt2.ProgressEnable = false; + this.bt2.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.bt2.ProgressForeColor = System.Drawing.Color.Black; + this.bt2.ProgressMax = 100F; + this.bt2.ProgressMin = 0F; + this.bt2.ProgressPadding = new System.Windows.Forms.Padding(0); + this.bt2.ProgressValue = 0F; + this.bt2.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.bt2.Sign = ""; + this.bt2.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.bt2.SignColor = System.Drawing.Color.Yellow; + this.bt2.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.bt2.Size = new System.Drawing.Size(153, 64); + this.bt2.TabIndex = 26; + this.bt2.Tag = "2"; + this.bt2.Text = "통신"; + this.bt2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.bt2.TextShadow = true; + this.bt2.TextVisible = true; + this.bt2.Click += new System.EventHandler(this.arLabel1_Click); + // + // bt1 + // + this.bt1.BackColor = System.Drawing.Color.DimGray; + this.bt1.BackColor2 = System.Drawing.Color.Gray; + this.bt1.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.bt1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.bt1.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.bt1.BorderSize = new System.Windows.Forms.Padding(2); + this.bt1.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.bt1.Cursor = System.Windows.Forms.Cursors.Hand; + this.bt1.Dock = System.Windows.Forms.DockStyle.Left; + this.bt1.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.bt1.ForeColor = System.Drawing.Color.White; + this.bt1.GradientEnable = true; + this.bt1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.bt1.GradientRepeatBG = false; + this.bt1.isButton = true; + this.bt1.Location = new System.Drawing.Point(153, 0); + this.bt1.MouseDownColor = System.Drawing.Color.Yellow; + this.bt1.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.bt1.msg = null; + this.bt1.Name = "bt1"; + this.bt1.ProgressBorderColor = System.Drawing.Color.Black; + this.bt1.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.bt1.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.bt1.ProgressEnable = false; + this.bt1.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.bt1.ProgressForeColor = System.Drawing.Color.Black; + this.bt1.ProgressMax = 100F; + this.bt1.ProgressMin = 0F; + this.bt1.ProgressPadding = new System.Windows.Forms.Padding(0); + this.bt1.ProgressValue = 0F; + this.bt1.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.bt1.Sign = ""; + this.bt1.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.bt1.SignColor = System.Drawing.Color.Yellow; + this.bt1.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.bt1.Size = new System.Drawing.Size(153, 64); + this.bt1.TabIndex = 25; + this.bt1.Tag = "1"; + this.bt1.Text = "AGV"; + this.bt1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.bt1.TextShadow = true; + this.bt1.TextVisible = true; + this.bt1.Click += new System.EventHandler(this.arLabel1_Click); + // + // bt0 + // + this.bt0.BackColor = System.Drawing.Color.Lime; + this.bt0.BackColor2 = System.Drawing.Color.Green; + this.bt0.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.bt0.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.bt0.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.bt0.BorderSize = new System.Windows.Forms.Padding(2); + this.bt0.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.bt0.Cursor = System.Windows.Forms.Cursors.Hand; + this.bt0.Dock = System.Windows.Forms.DockStyle.Left; + this.bt0.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.bt0.ForeColor = System.Drawing.Color.White; + this.bt0.GradientEnable = true; + this.bt0.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + this.bt0.GradientRepeatBG = false; + this.bt0.isButton = true; + this.bt0.Location = new System.Drawing.Point(0, 0); + this.bt0.MouseDownColor = System.Drawing.Color.Yellow; + this.bt0.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.bt0.msg = null; + this.bt0.Name = "bt0"; + this.bt0.ProgressBorderColor = System.Drawing.Color.Black; + this.bt0.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.bt0.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.bt0.ProgressEnable = false; + this.bt0.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.bt0.ProgressForeColor = System.Drawing.Color.Black; + this.bt0.ProgressMax = 100F; + this.bt0.ProgressMin = 0F; + this.bt0.ProgressPadding = new System.Windows.Forms.Padding(0); + this.bt0.ProgressValue = 0F; + this.bt0.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.bt0.Sign = ""; + this.bt0.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.bt0.SignColor = System.Drawing.Color.Yellow; + this.bt0.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.bt0.Size = new System.Drawing.Size(153, 64); + this.bt0.TabIndex = 24; + this.bt0.Tag = "0"; + this.bt0.Text = "일반설정"; + this.bt0.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.bt0.TextShadow = true; + this.bt0.TextVisible = true; + this.bt0.Click += new System.EventHandler(this.arLabel1_Click); + // + // btSave + // + this.btSave.BackColor = System.Drawing.Color.Gray; + this.btSave.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.btSave.BackgroundImagePadding = new System.Windows.Forms.Padding(0); + this.btSave.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); + this.btSave.BorderColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(152)))), ((int)(((byte)(150)))), ((int)(((byte)(152))))); + this.btSave.BorderSize = new System.Windows.Forms.Padding(2); + this.btSave.ColorTheme = arCtl.arLabel.eColorTheme.Custom; + this.btSave.Cursor = System.Windows.Forms.Cursors.Hand; + this.btSave.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btSave.Font = new System.Drawing.Font("궁서체", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btSave.ForeColor = System.Drawing.Color.White; + this.btSave.GradientEnable = true; + this.btSave.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; + this.btSave.GradientRepeatBG = false; + this.btSave.isButton = true; + this.btSave.Location = new System.Drawing.Point(5, 740); + this.btSave.MouseDownColor = System.Drawing.Color.Yellow; + this.btSave.MouseOverColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.btSave.msg = null; + this.btSave.Name = "btSave"; + this.btSave.ProgressBorderColor = System.Drawing.Color.Black; + this.btSave.ProgressColor1 = System.Drawing.Color.LightSkyBlue; + this.btSave.ProgressColor2 = System.Drawing.Color.DeepSkyBlue; + this.btSave.ProgressEnable = false; + this.btSave.ProgressFont = new System.Drawing.Font("Consolas", 10F); + this.btSave.ProgressForeColor = System.Drawing.Color.Black; + this.btSave.ProgressMax = 100F; + this.btSave.ProgressMin = 0F; + this.btSave.ProgressPadding = new System.Windows.Forms.Padding(0); + this.btSave.ProgressValue = 0F; + this.btSave.ShadowColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); + this.btSave.Sign = ""; + this.btSave.SignAlign = System.Drawing.ContentAlignment.BottomRight; + this.btSave.SignColor = System.Drawing.Color.Yellow; + this.btSave.SignFont = new System.Drawing.Font("Consolas", 7F, System.Drawing.FontStyle.Italic); + this.btSave.Size = new System.Drawing.Size(1270, 55); + this.btSave.TabIndex = 8; + this.btSave.Text = "저장"; + this.btSave.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btSave.TextShadow = true; + this.btSave.TextVisible = true; + this.btSave.Click += new System.EventHandler(this.btSave_Click); + // + // chkClearPos + // + this.chkClearPos.AutoSize = true; + this.chkClearPos.Font = new System.Drawing.Font("궁서체", 20F, System.Drawing.FontStyle.Bold); + this.chkClearPos.Location = new System.Drawing.Point(27, 371); + this.chkClearPos.Name = "chkClearPos"; + this.chkClearPos.Size = new System.Drawing.Size(468, 31); + this.chkClearPos.TabIndex = 12; + this.chkClearPos.Text = "자동모드 해제 시 위치정보 삭제"; + this.chkClearPos.UseVisualStyleBackColor = true; + // + // fSetup + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15))))); + this.ClientSize = new System.Drawing.Size(1280, 800); + this.Controls.Add(this.tabControl1); + this.Controls.Add(this.panel2); + this.Controls.Add(this.label8); + this.Controls.Add(this.panTopMenu); + this.Controls.Add(this.btSave); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "fSetup"; + this.Padding = new System.Windows.Forms.Padding(5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Setup"; + this.Load += new System.EventHandler(this.fSetup_Load); + this.tabControl1.ResumeLayout(false); + this.tabPage6.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.tabPage2.ResumeLayout(false); + this.tabPage2.PerformLayout(); + this.tabPage3.ResumeLayout(false); + this.tabPage3.PerformLayout(); + this.tabPage5.ResumeLayout(false); + this.tabPage5.PerformLayout(); + this.tabPage4.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudMusicVol)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDoorSoundTerm)).EndInit(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.panTopMenu.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.panel2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private AGVControl.ValueSelect vcSpeedL; + private AGVControl.ValueSelect vcSpeedM; + private System.Windows.Forms.Label label2; + private arCtl.arLabel btSave; + private arCtl.arLabel btSpeaker; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox tbPortXBE; + private System.Windows.Forms.TextBox tbPortPLC; + private System.Windows.Forms.ComboBox tbBaudXBE; + private System.Windows.Forms.ComboBox tbBaudPLC; + private System.Windows.Forms.Button btSelXbee; + private System.Windows.Forms.Button btSelPlc1; + private System.Windows.Forms.Panel panTopMenu; + private arCtl.arLabel btClose; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label label10; + private AGVControl.ValueSelect valIntervalXBE; + private AGVControl.ValueSelect valueSelect4; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TabPage tabPage4; + private System.Windows.Forms.Label label23; + private AGVControl.ValueSelect vcChargeMaxTime; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Panel panel6; + private System.Windows.Forms.Label label1; + private AGVControl.ValueSelect vcChargeRetryTerm; + private System.Windows.Forms.Label label9; + private AGVControl.ValueSelect vcSpeedS; + private System.Windows.Forms.Label label25; + private AGVControl.ValueSelect vcChargeSearchTime; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.ComboBox tbBaudBAT; + private System.Windows.Forms.TextBox tbportBMS; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.ComboBox tbBaudAGV; + private System.Windows.Forms.TextBox tbPortAGV; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label28; + private AGVControl.ValueSelect valIntervalBMS; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.Button button3; + private AGVControl.ValueSelect vcSpeedH; + private AGVControl.ValueSelect vcSpeedR; + private AGVControl.ValueSelect vcpidPL; + private AGVControl.ValueSelect vcpidPH; + private AGVControl.ValueSelect vcpidPM; + private System.Windows.Forms.Label label15; + private AGVControl.ValueSelect vcpidDL; + private AGVControl.ValueSelect vcpidDH; + private AGVControl.ValueSelect vcpidDM; + private System.Windows.Forms.Label label32; + private AGVControl.ValueSelect vcpidIL; + private AGVControl.ValueSelect vcpidIH; + private AGVControl.ValueSelect vcpidIM; + private System.Windows.Forms.Label label31; + private AGVControl.ValueSelect vcpidDS; + private AGVControl.ValueSelect vcpidPS; + private AGVControl.ValueSelect vcpidIS; + private AGVControl.ValueSelect vcChargeEmergencyLevel; + private arCtl.arLabel btAutoCharge; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.Label label34; + private System.Windows.Forms.Label label35; + private System.Windows.Forms.Label label36; + private System.Windows.Forms.Label label37; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label39; + private System.Windows.Forms.Label label41; + private System.Windows.Forms.Label label42; + private System.Windows.Forms.Label label43; + private AGVControl.ValueSelect tbChargerID; + private System.Windows.Forms.TabPage tabPage5; + private AGVControl.ValueSelect vcChargeWaitSec; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.Label label44; + private System.Windows.Forms.Label label45; + private System.Windows.Forms.Label label46; + private AGVControl.ValueSelect vcTagF1F2; + private AGVControl.ValueSelect vcTagQCF1; + private AGVControl.ValueSelect vcTagF1A; + private AGVControl.ValueSelect vcTagF1B; + private AGVControl.ValueSelect vcTagQCA; + private AGVControl.ValueSelect vcTagF2A; + private AGVControl.ValueSelect vcTagQCB; + private System.Windows.Forms.Label label49; + private AGVControl.ValueSelect vcTagF2B; + private System.Windows.Forms.Label label47; + private System.Windows.Forms.Label label48; + private AGVControl.ValueSelect vcTagF3A; + private AGVControl.ValueSelect vcTagF3B; + private AGVControl.ValueSelect vcTagF4A; + private System.Windows.Forms.Label label53; + private AGVControl.ValueSelect vcTagF4B; + private System.Windows.Forms.Label label51; + private AGVControl.ValueSelect vcTagF3F4; + private AGVControl.ValueSelect vcTagF2F3; + private System.Windows.Forms.Button button4; + private AGVControl.ValueSelect vcSCK; + private System.Windows.Forms.Label label55; + private AGVControl.ValueSelect vcSSK; + private System.Windows.Forms.Label label56; + private AGVControl.ValueSelect vcSTT; + private System.Windows.Forms.Label label57; + private AGVControl.ValueSelect vcTagNOT; + private AGVControl.ValueSelect vcTagPOT; + private AGVControl.ValueSelect vcChargeStartLevel; + private AGVControl.ValueSelect vcChargeMaxLevel; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.CheckBox chkAGVDirBack; + private System.Windows.Forms.CheckBox chkFullScreen; + private System.Windows.Forms.NumericUpDown nudMusicVol; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.LinkLabel linkLabel5; + private System.Windows.Forms.LinkLabel linkLabel4; + private System.Windows.Forms.LinkLabel linkLabel3; + private System.Windows.Forms.TextBox tbMusic; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.NumericUpDown nudDoorSoundTerm; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.DateTimePicker cleartime2; + private System.Windows.Forms.DateTimePicker cleartime1; + private System.Windows.Forms.CheckBox chkClear2; + private System.Windows.Forms.CheckBox chkClear1; + private arCtl.arLabel btMusic; + private System.Windows.Forms.TabPage tabPage6; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.CheckBox chkDetectManualCharge; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox tbMCID; + private System.Windows.Forms.GroupBox groupBox1; + private AGVControl.ValueSelect vcTagQAA; + private AGVControl.ValueSelect vcTagQAB; + private System.Windows.Forms.Label label17; + private AGVControl.ValueSelect vcTagQAQC; + private System.Windows.Forms.PropertyGrid propertyGrid1; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Panel panel2; + private arCtl.arLabel bt5; + private arCtl.arLabel bt4; + private arCtl.arLabel bt3; + private arCtl.arLabel bt2; + private arCtl.arLabel bt1; + private arCtl.arLabel bt0; + private System.Windows.Forms.Label label11; + private AGVControl.ValueSelect vcSpeedDrive; + private System.Windows.Forms.Label label19; + private AGVControl.ValueSelect vcSAD; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.Label label50; + private System.Windows.Forms.Label label40; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Label label52; + private System.Windows.Forms.TextBox tbagvchannel; + private System.Windows.Forms.TextBox tbagvpanid; + private System.Windows.Forms.TextBox tbagvaddr; + private System.Windows.Forms.Label label54; + private AGVControl.ValueSelect vcTagF5A; + private AGVControl.ValueSelect vcTagF5B; + private AGVControl.ValueSelect vcTagF4F5; + private System.Windows.Forms.Label label58; + private System.Windows.Forms.ComboBox cmbChargerPos; + private System.Windows.Forms.CheckBox chkClearPos; + } +} \ No newline at end of file diff --git a/Cs_HMI/Project/fSetup.cs b/Cs_HMI/Project/fSetup.cs new file mode 100644 index 0000000..0381f58 --- /dev/null +++ b/Cs_HMI/Project/fSetup.cs @@ -0,0 +1,665 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using AR; + + +namespace Project +{ + public partial class fSetup : Form + { + readonly System.Windows.Forms.Timer tmDisplay; + public fSetup() + { + InitializeComponent(); + tmDisplay = new Timer + { + Interval = 200 + }; + tmDisplay.Tick += TmDisplay_Tick; + this.VisibleChanged += FSetup_VisibleChanged; + this.FormClosed += FSetup_FormClosed; + this.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Escape) this.Close(); }; + + this.panTopMenu.MouseMove += LbTitle_MouseMove; + this.panTopMenu.MouseUp += LbTitle_MouseUp; + this.panTopMenu.MouseDown += LbTitle_MouseDown; + this.panTopMenu.DoubleClick += LbTitle_DoubleClick; + + this.propertyGrid1.SelectedObject = PUB.setting; + } + + private void FSetup_FormClosed(object sender, FormClosedEventArgs e) + { + this.timer1.Stop(); + this.timer1.Enabled = false; + } + + private void FSetup_VisibleChanged(object sender, EventArgs e) + { + PUB.log.Add("setup screen show : " + this.Visible.ToString()); + if (this.Visible) tmDisplay.Start(); + else tmDisplay.Stop(); + } + + private void fSetup_Load(object sender, EventArgs e) + { + + //통신값 표시 + //tbPortBMS.Text = Pub.setting.Port_BMS; + tbPortPLC.Text = PUB.setting.Port_PLC; + tbPortAGV.Text = PUB.setting.Port_AGV; + tbPortXBE.Text = PUB.setting.Port_XBE; + tbportBMS.Text = PUB.setting.Port_BAT; + + tbBaudPLC.Text = PUB.setting.Baud_PLC.ToString(); + tbBaudAGV.Text = PUB.setting.Baud_AGV.ToString(); + tbBaudXBE.Text = PUB.setting.Baud_XBE.ToString(); + tbBaudBAT.Text = PUB.setting.Baud_BAT.ToString(); + + //valueSelect1.Value = Pub.setting.interval_bms; + valIntervalXBE.Value = PUB.setting.interval_xbe; + vcpidDS.Value = PUB.setting.ZSpeed; + valueSelect4.Value = PUB.setting.interval_iostate; + valIntervalBMS.Value = PUB.setting.interval_bms; + tbChargerID.Value = PUB.setting.ChargerID; + + cmbChargerPos.SelectedIndex = PUB.setting.chargerpos; + + vcSCK.Value = PUB.setting.SCK; + vcSSK.Value = PUB.setting.SSK; + vcSTT.Value = PUB.setting.STT; + vcSAD.Value = PUB.setting.SAD; + + tbagvaddr.Text = PUB.setting.AGV_ADDRESS; + tbagvpanid.Text = PUB.setting.AGV_PANID; + tbagvchannel.Text = PUB.setting.AGV_CHANNEL; + + //속도 저/중/고 + vcSpeedL.Value = PUB.setting.SPD_L; + vcSpeedM.Value = PUB.setting.SPD_M; + vcSpeedH.Value = PUB.setting.SPD_H; + vcSpeedDrive.Value = PUB.setting.SPD_DRIVE; + + //속도 정지/회전 + vcSpeedS.Value = PUB.setting.SPD_S; + vcSpeedR.Value = PUB.setting.SPD_R; + + //PID-P + vcpidPH.Value = PUB.setting.PID_PH; + vcpidPM.Value = PUB.setting.PID_PM; + vcpidPL.Value = PUB.setting.PID_PL; + + //PID-I + vcpidIH.Value = PUB.setting.PID_IH; + vcpidIM.Value = PUB.setting.PID_IM; + vcpidIL.Value = PUB.setting.PID_IL; + + //PID-D + vcpidDH.Value = PUB.setting.PID_DH; + vcpidDM.Value = PUB.setting.PID_DM; + vcpidDL.Value = PUB.setting.PID_DL; + + //정지상수 + vcpidPS.Value = PUB.setting.PID_PS; + vcpidIS.Value = PUB.setting.PID_IS; + vcpidDS.Value = PUB.setting.PID_DS; + + SetColorValue(btSpeaker, PUB.setting.Enable_Speak); + SetColorValue(btAutoCharge, PUB.setting.Enable_AutoCharge); + SetColorValue(btMusic, PUB.setting.Enable_Music); + + nudDoorSoundTerm.Value = PUB.setting.doorSoundTerm; + chkAGVDirBack.Checked = PUB.setting.AGV_Direction_FVI_Backward; + + chkClear1.Checked = PUB.setting.datetime_Check_1; + chkClear2.Checked = PUB.setting.datetime_Check_2; + cleartime1.Value = DateTime.Parse("1982-11-23 " + PUB.setting.datetime_Reset_1 + ":00"); + cleartime2.Value = DateTime.Parse("1982-11-23 " + PUB.setting.datetime_Reset_2 + ":00"); + chkClearPos.Checked = PUB.setting.AutoModeOffAndClearPosition; + + //PLC옵션 + nudMusicVol.Value = (int)(PUB.mplayer.Volume * 100.0); + tbMusic.Text = PUB.setting.musicfile; + this.chkFullScreen.Checked = PUB.setting.FullScreen; + this.chkDetectManualCharge.Checked = PUB.setting.DetectManualCharge; + + //충전 + // chkAutoCharge.Checked = PUB.setting.Enable_AutoCharge; + vcChargeStartLevel.Value = PUB.setting.ChargeStartLevel; + vcChargeMaxLevel.Value = PUB.setting.ChargeMaxLevel; + vcChargeMaxTime.Value = PUB.setting.ChargeMaxTime; + vcChargeRetryTerm.Value = PUB.setting.ChargeRetryTerm; + vcChargeSearchTime.Value = PUB.setting.ChargeSearchTime; + vcChargeEmergencyLevel.Value = PUB.setting.ChargeEmergencyLevel; + vcChargeWaitSec.Value = PUB.setting.ChargetWaitSec; + // chkAutoCharge_CheckedChanged(chkAutoCharge, null); + + //태그 + vcTagPOT.Value = PUB.setting.TAGPOT; + vcTagNOT.Value = PUB.setting.TAGNOT; + + vcTagQAQC.Value = PUB.setting.TAG_QA_QC; + vcTagQCF1.Value = PUB.setting.TAG_QC_F1; + vcTagF1F2.Value = PUB.setting.TAG_F1_F2; + vcTagF2F3.Value = PUB.setting.TAG_F2_F3; + vcTagF3F4.Value = PUB.setting.TAG_F3_F4; + vcTagF4F5.Value = PUB.setting.TAG_F4_F5; + + vcTagQAA.Value = PUB.setting.TAGQAA; + vcTagQCA.Value = PUB.setting.TAGQCA; + vcTagF1A.Value = PUB.setting.TAGF1A; + vcTagF2A.Value = PUB.setting.TAGF2A; + vcTagF3A.Value = PUB.setting.TAGF3A; + vcTagF4A.Value = PUB.setting.TAGF4A; + vcTagF5A.Value = PUB.setting.TAGF5A; + + vcTagQAB.Value = PUB.setting.TAGQAB; + vcTagQCB.Value = PUB.setting.TAGQCB; + vcTagF1B.Value = PUB.setting.TAGF1B; + vcTagF2B.Value = PUB.setting.TAGF2B; + vcTagF3B.Value = PUB.setting.TAGF3B; + vcTagF4B.Value = PUB.setting.TAGF4B; + vcTagF5B.Value = PUB.setting.TAGF5B; + + tbMCID.Text = PUB.setting.MCID; + + timer1.Start(); + } + + + #region "Mouse Form Move" + + private Boolean fMove = false; + private Point MDownPos; + + private void LbTitle_DoubleClick(object sender, EventArgs e) + { + if (this.WindowState == FormWindowState.Maximized) this.WindowState = FormWindowState.Normal; + else this.WindowState = FormWindowState.Maximized; + } + private void LbTitle_MouseMove(object sender, MouseEventArgs e) + { + if (fMove) + { + Point offset = new Point(e.X - MDownPos.X, e.Y - MDownPos.Y); + this.Left += offset.X; + this.Top += offset.Y; + //offset = new Point(0, 0); + } + } + private void LbTitle_MouseUp(object sender, MouseEventArgs e) + { + fMove = false; + } + private void LbTitle_MouseDown(object sender, MouseEventArgs e) + { + MDownPos = new Point(e.X, e.Y); + fMove = true; + } + + #endregion + + + private void btSave_Click(object sender, EventArgs e) + { + if (PUB.CheckPassword() == false) + { + Util.MsgE("암호가 일치하지 않습니다"); + return; + } + + this.Validate(); + propertyGrid1.Invalidate(); + + //통신정보저장 + // Pub.setting.Port_BMS = tbPortBMS.Text; + PUB.setting.Port_XBE = tbPortXBE.Text; + PUB.setting.Port_PLC = tbPortPLC.Text; + PUB.setting.Port_AGV = tbPortAGV.Text; + PUB.setting.Port_BAT = tbportBMS.Text; + + // Pub.setting.Baud_bms = int.Parse(tbBaudBms.Text); + PUB.setting.Baud_XBE = int.Parse(tbBaudXBE.Text); + PUB.setting.Baud_PLC = int.Parse(tbBaudPLC.Text); + PUB.setting.Baud_AGV = int.Parse(tbBaudAGV.Text); + PUB.setting.Baud_BAT = int.Parse(tbBaudBAT.Text); + + PUB.setting.ChargerID = (int)(tbChargerID.Value); + + //Pub.setting.interval_bms = (float)valueSelect1.Value; + PUB.setting.interval_bms = (int)valIntervalBMS.Value; + PUB.setting.interval_xbe = (float)valIntervalXBE.Value; + PUB.setting.ZSpeed = (byte)vcpidDS.Value; + PUB.setting.interval_iostate = (byte)valueSelect4.Value; + PUB.setting.chargerpos = this.cmbChargerPos.SelectedIndex; + PUB.setting.AutoModeOffAndClearPosition = this.chkClearPos.Checked; + //PUB.setting.MotorUpTime = (byte)valueSelect5.Value; + + //AGV정보 저장 + PUB.setting.Enable_Speak = this.btSpeaker.ProgressValue != 0; + PUB.setting.Enable_Music = this.btMusic.ProgressValue != 0; + PUB.setting.Enable_AutoCharge = this.btAutoCharge.ProgressValue != 0; + + //충전 + PUB.setting.ChargeStartLevel = (int)vcChargeStartLevel.Value; + PUB.setting.ChargeMaxLevel = (int)vcChargeMaxLevel.Value; + PUB.setting.ChargeMaxTime = (int)vcChargeMaxTime.Value; + PUB.setting.ChargeRetryTerm = (int)vcChargeRetryTerm.Value; + PUB.setting.ChargeSearchTime = (int)vcChargeSearchTime.Value; + PUB.setting.ChargeEmergencyLevel = (int)vcChargeEmergencyLevel.Value; + PUB.setting.ChargetWaitSec = (int)vcChargeWaitSec.Value; + + PUB.setting.SCK = (int)vcSCK.Value; + PUB.setting.SSK = (int)vcSSK.Value; + PUB.setting.STT = (int)vcSTT.Value; + PUB.setting.SAD = (int)vcSAD.Value; + + //속도 저/중/고 + PUB.setting.SPD_L = (int)vcSpeedL.Value; + PUB.setting.SPD_M = (int)vcSpeedM.Value; + PUB.setting.SPD_H = (int)vcSpeedH.Value; + PUB.setting.SPD_DRIVE = (int)vcSpeedDrive.Value; + + //속도 정지/회전 + PUB.setting.SPD_S = (int)vcSpeedS.Value; + PUB.setting.SPD_R = (int)vcSpeedR.Value; + + //PID-P + PUB.setting.PID_PH = (int)vcpidPH.Value; + PUB.setting.PID_PM = (int)vcpidPM.Value; + PUB.setting.PID_PL = (int)vcpidPL.Value; + + //PID-I ; + PUB.setting.PID_IH = (int)vcpidIH.Value; + PUB.setting.PID_IM = (int)vcpidIM.Value; + PUB.setting.PID_IL = (int)vcpidIL.Value; + + //PID-D ; + PUB.setting.PID_DH = (int)vcpidDH.Value; + PUB.setting.PID_DM = (int)vcpidDM.Value; + PUB.setting.PID_DL = (int)vcpidDL.Value; + + //정지상수 ; + PUB.setting.PID_PS = (int)vcpidPS.Value; + PUB.setting.PID_IS = (int)vcpidIS.Value; + PUB.setting.PID_DS = (int)vcpidDS.Value; + + //시스템옵션 + PUB.setting.ChargeMaxTime = (int)vcChargeMaxTime.Value; + //Pub.setting.ChargeIdleInterval = (int)nudChargeIdleInterval.Value; + PUB.setting.ChargeRetryTerm = (int)vcChargeRetryTerm.Value; + PUB.setting.AGV_Direction_FVI_Backward = chkAGVDirBack.Checked; + + //초기화시간 + PUB.setting.datetime_Check_1 = chkClear1.Checked; + PUB.setting.datetime_Check_2 = chkClear2.Checked; + PUB.setting.datetime_Reset_1 = cleartime1.Value.ToString("HH:mm"); + PUB.setting.datetime_Reset_2 = cleartime2.Value.ToString("HH:mm"); + + + //태그 + PUB.setting.TAGPOT = (int)vcTagPOT.Value; + PUB.setting.TAGNOT = (int)vcTagNOT.Value; + + PUB.setting.TAG_QA_QC = (int)vcTagQAQC.Value; + PUB.setting.TAG_QC_F1 = (int)vcTagQCF1.Value; + PUB.setting.TAG_F1_F2 = (int)vcTagF1F2.Value; + PUB.setting.TAG_F2_F3 = (int)vcTagF2F3.Value; + PUB.setting.TAG_F3_F4 = (int)vcTagF3F4.Value; + PUB.setting.TAG_F4_F5 = (int)vcTagF4F5.Value; + + PUB.setting.TAGQAA = (int)vcTagQAA.Value; + PUB.setting.TAGQCA = (int)vcTagQCA.Value; + PUB.setting.TAGF1A = (int)vcTagF1A.Value; + PUB.setting.TAGF2A = (int)vcTagF2A.Value; + PUB.setting.TAGF3A = (int)vcTagF3A.Value; + PUB.setting.TAGF4A = (int)vcTagF4A.Value; + PUB.setting.TAGF5A = (int)vcTagF5A.Value; + + PUB.setting.TAGQAB = (int)vcTagQAB.Value; + PUB.setting.TAGQCB = (int)vcTagQCB.Value; + PUB.setting.TAGF1B = (int)vcTagF1B.Value; + PUB.setting.TAGF2B = (int)vcTagF2B.Value; + PUB.setting.TAGF3B = (int)vcTagF3B.Value; + PUB.setting.TAGF4B = (int)vcTagF4B.Value; + PUB.setting.TAGF5B = (int)vcTagF5B.Value; + + //PLC옵션 + PUB.setting.musicvol = (int)nudMusicVol.Value; + PUB.setting.ChargeSearchTime = (int)vcChargeSearchTime.Value; + + PUB.setting.doorSoundTerm = (int)nudDoorSoundTerm.Value; + if (PUB.setting.doorSoundTerm < 1) PUB.setting.doorSoundTerm = 15; //기본값 15초 + + ////핀설정 + //var baL = new System.Collections.BitArray(new byte[] { PUB.setting.PinReverse_DI_Low }); + //var baH = new System.Collections.BitArray(new byte[] { PUB.setting.PInReverse_DI_High }); + //baL[0] = chkdi0.Checked; + //baL[1] = chkdi1.Checked; + //baL[2] = chkdi2.Checked; + //baL[3] = chkdi3.Checked; + //baL[4] = chkdi4.Checked; + //baL[5] = chkdi5.Checked; + //baL[6] = chkdi6.Checked; + //baL[7] = chkdi7.Checked; + + //baH[0] = chkdi8.Checked; + //baH[1] = chkdi9.Checked; + //baH[2] = chkdi10.Checked; + //baH[3] = chkdi11.Checked; + //baH[4] = chkdi12.Checked; + //baH[5] = chkdi13.Checked; + //baH[6] = chkdi14.Checked; + //baH[7] = chkdi15.Checked; + + //byte[] dataL = new byte[] { 0 }; + //byte[] dataH = new byte[] { 0 }; + //baL.CopyTo(dataL, 0); + //baH.CopyTo(dataH, 0); + + //PUB.setting.PinReverse_DI_Low = dataL[0]; + //PUB.setting.PInReverse_DI_High = dataH[0]; + PUB.setting.musicfile = tbMusic.Text.Trim(); + PUB.setting.FullScreen = this.chkFullScreen.Checked; + PUB.setting.ChargeEmergencyLevel = (int)this.vcChargeEmergencyLevel.Value; + PUB.setting.ChargeStartLevel = (int)this.vcChargeStartLevel.Value; + PUB.setting.ChargeMaxLevel = (int)this.vcChargeMaxLevel.Value; + + PUB.setting.DetectManualCharge = this.chkDetectManualCharge.Checked; + PUB.setting.MCID = tbMCID.Text.Trim(); + + PUB.setting.Save(); + + PUB.log.AddAT("환경설정:저장완료"); + + + //plc에 정보를 전송하고 그 값의 회신을 체크한다 + DialogResult = DialogResult.OK; + } + + void SetColorValue(arCtl.arLabel ctl, Boolean value) + { + if (value) + { + ctl.BackColor = Color.Green; + ctl.BackColor2 = Color.Lime; + ctl.ProgressValue = 1; + } + else + { + ctl.BackColor = Color.FromArgb(50, 50, 50); + ctl.BackColor2 = Color.Gray; + ctl.ProgressValue = 0; + } + } + + private void TmDisplay_Tick(object sender, EventArgs e) + { + //Pub.log.Add("timer run"); + } + + private void vcChargeLow_ButtonClick(object sender, AGVControl.ValueSelect.ButtonClickEventArgs e) + { + //버튼이클릭되엇다 각 버튼은 tag값으로 처히 + var button = sender as AGVControl.ValueSelect; + var tagStr = button.Tag.ToString(); + PUB.log.Add("Setup:Click:" + tagStr + ":" + e.Button.ToString()); + if (e.Button == MouseButtons.Middle) + { + //중앙부 숫자를 클릭했다 + var f = AR.UTIL.InputBox("input", button.Value.ToString());// new Dialog.fInput(button.Value.ToString()); + if (f.Item1) + { + Console.WriteLine("value change : " + f.Item2);// ; + button.Value = double.Parse(f.Item2); + } + } + } + + + private void vcChargeLow_ValueChanged(object sender, EventArgs e) + { + //버튼이클릭되엇다 각 버튼은 tag값으로 처히 + var button = sender as AGVControl.ValueSelect; + var tagStr = button.Tag.ToString(); + PUB.log.Add("Setup:ValueChange:" + tagStr + ":" + button.Name); + + //if (tagStr == "SH" && PUB.setting.WheelSpeedHigh != button.Value) + // button.BackColor = Color.Tomato; + //else if (tagStr == "SL" && PUB.setting.WheelSpeedLow != button.Value) + // button.BackColor = Color.Tomato; + //else if (tagStr == "SC" && PUB.setting.WheelSpeedCharge != button.Value) + // button.BackColor = Color.Tomato; + ////else if (tagStr == "MT" && Pub.setting.MoveThreshold != button.Value) + //// button.BackColor = Color.Tomato; + //else if (tagStr == "ST" && PUB.setting.MarkSensorThreshold != button.Value) + // button.BackColor = Color.Tomato; + //else if (tagStr == "BL" && PUB.setting.BalanceThreshold != button.Value) + // button.BackColor = Color.Tomato; + //else if (tagStr == "BU" && PUB.setting.BalanceThresholdUp != button.Value) + // button.BackColor = Color.Tomato; + //else button.BackColor = Color.Navy; + + } + + private void btMagnet_Click(object sender, EventArgs e) + { + //버튼이클릭되엇다 각 버튼은 tag값으로 처히 + var button = sender as arCtl.arLabel; + + var tagStr = button.Tag.ToString(); + PUB.log.Add("Setup:ButtonClick:" + tagStr + ":" + button.Name); + + if (button.ProgressValue == 0) + { + //메세지로 사용여부를 확인한다. + var msg = "다음 기능을 사용하시겠습니까?\n"; + if (tagStr == "0") msg += "[음성지원]\n" + + " * 동작 상태를 음성으로 지원 합니다"; + else if (tagStr == "1") msg += "[자동충전]\n" + + " * 자동으로 충전을 진행 합니다\n" + + " * [충전] 탭에서 설정값을 확인할 수 있습니다"; + else if (tagStr == "2") msg += "[배경음악]\n" + + " * 이동시 음악을 플레이 합니다"; + var dlg = Util.MsgQ(msg); + if (dlg == DialogResult.Yes) + { + SetColorValue(button, true); + } + } + else SetColorValue(button, false); + } + + private void btSelXbee_Click(object sender, EventArgs e) + { + //포트를 선택한 후 표시해준다. + var but = sender as Button; + var tagStr = but.Tag.ToString(); + var newPort = Util.SelectSerialPort(); + if (newPort.isEmpty()) return; + + if (tagStr == "XBE") tbPortXBE.Text = newPort; + else if (tagStr == "AGV") tbPortAGV.Text = newPort; + else if (tagStr == "PLC") tbPortPLC.Text = newPort; + else if (tagStr == "BAT") tbportBMS.Text = newPort; + + } + + private void btClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + + private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + using (var od = new OpenFileDialog()) + { + if (tbMusic.Text.isEmpty() == false) + { + var fi = new System.IO.FileInfo(tbMusic.Text); + od.FileName = fi.Name; + od.InitialDirectory = fi.Directory.FullName; + } + + if (od.ShowDialog() == DialogResult.OK) + { + tbMusic.Text = od.FileName; + } + } + + + } + + private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + if (System.IO.File.Exists(tbMusic.Text) == false) + { + Util.MsgE("파일이 없습니다"); + return; + } + try + { + if (PUB.mplayer.HasAudio) PUB.mplayer.Stop(); + PUB.mplayer.Open(new Uri(tbMusic.Text)); + PUB.mplayer.Play(); + PUB.bPlayMusic = true; + } + catch (Exception ex) + { + Util.MsgE("music open error\n\n" + ex.Message); + } + + } + + private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + PUB.mplayer.Stop(); + PUB.bPlayMusic = false; + } + + + private void button3_Click(object sender, EventArgs e) + { + if (this.tbPortAGV.Text == "COM21") + { + this.tbPortAGV.Text = "COM11"; + this.tbPortPLC.Text = "COM6"; + this.tbportBMS.Text = "COM15"; + this.tbPortXBE.Text = "COM18"; + } + else + { + this.tbPortAGV.Text = "COM21"; + this.tbPortPLC.Text = "COM31"; + this.tbportBMS.Text = "COM41"; + this.tbPortXBE.Text = "COM51"; + } + + } + + private void valIntervalBMS_ButtonClick(object sender, AGVControl.ValueSelect.ButtonClickEventArgs e) + { + //버튼이클릭되엇다 각 버튼은 tag값으로 처히 + var button = sender as AGVControl.ValueSelect; + var tagStr = button.Tag.ToString(); + PUB.log.Add("Setup:Click:" + tagStr + ":" + e.Button.ToString()); + if (e.Button == MouseButtons.Middle) + { + //중앙부 숫자를 클릭했다 + var f = AR.UTIL.InputBox("input", button.Value.ToString());// new Dialog.fInput(button.Value.ToString()); + if (f.Item1) + { + Console.WriteLine("value change : " + f.Item2); + button.Value = double.Parse(f.Item2); + } + } + } + + private void button4_Click(object sender, EventArgs e) + { + vcTagNOT.Value = 9000; + + vcTagQAQC.Value = 9250; + vcTagQCF1.Value = 9350; + vcTagF1F2.Value = 9450; + vcTagF2F3.Value = 9550; + vcTagF3F4.Value = 9650; + vcTagF4F5.Value = 9750; + + vcTagQAB.Value = 9200; + vcTagQCB.Value = 9300; + vcTagF1B.Value = 9400; + vcTagF2B.Value = 9500; + vcTagF3B.Value = 9600; + vcTagF4B.Value = 9700; + vcTagF5B.Value = 9800; + + vcTagQAA.Value = 9201; + vcTagQCA.Value = 9301; + vcTagF1A.Value = 9401; + vcTagF2A.Value = 9501; + vcTagF3A.Value = 9601; + vcTagF4A.Value = 9701; + vcTagF5A.Value = 9801; + + vcTagPOT.Value = 9900; + } + + private void arLabel1_Click(object sender, EventArgs e) + { + var buts = new arCtl.arLabel[] { bt0, bt1, bt2, bt3, bt4, bt5 }; + foreach (var lb in buts) + { + lb.BackColor = Color.DimGray; + lb.BackColor2 = Color.Gray; + } + var bt = sender as arCtl.arLabel; + bt.BackColor = Color.Lime; + bt.BackColor2 = Color.Green; + var index = int.Parse(bt.Tag.ToString()); + this.tabControl1.SelectedIndex = index; + } + + private void button7_Click(object sender, EventArgs e) + { + var value = tbagvaddr.Text.PadLeft(4, '0'); + if (PUB.AGV.AGVCommand("SAD", value)) + { + PUB.setting.AGV_ADDRESS = value; + PUB.setting.Save(); + } + + } + + private void button5_Click(object sender, EventArgs e) + { + var value = tbagvpanid.Text.PadLeft(4, '0'); + if (PUB.AGV.AGVCommand("SPN", value)) + { + PUB.setting.AGV_PANID = value; + PUB.setting.Save(); + } + + } + + private void button6_Click(object sender, EventArgs e) + { + var value = tbagvchannel.Text.PadLeft(4, '0'); + if (PUB.AGV.AGVCommand("SCH", value)) + { + PUB.setting.AGV_CHANNEL = value; + PUB.setting.Save(); + } + + + } + } +} diff --git a/Cs_HMI/Project/fSetup.resx b/Cs_HMI/Project/fSetup.resx new file mode 100644 index 0000000..d7f6461 --- /dev/null +++ b/Cs_HMI/Project/fSetup.resx @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAsRJREFUWEft + lz9TU0EUxdOovWKv9Golo59AsRMr0ELQRjsHO4n4CWD8A/oNUD9IZpKQxCYVIg1gKTYChejvvDmbbN57 + IS8gY8OZOZPHuefe3b27+xJKpzgKqtXqhdXV1Sv1ev0OHNezNIdPBgw0Cl8xWAv+6cNmo9GYZzKXnXZ8 + NJvNixR+A/ejgQZR3tdwxGWOBlZzgyLbLhq4g77C5xyfD0U/S9uxJ3Cbro253HAg8R4FdqNiX9Em+Txj + SwaKwSm4DkPeLpObsKUYSNDKO4Mz8Lt2u33W4YGQl7ylkA93C3fCe/49JJP4zKGhQf5sqAO3Ct0UjDpw + SRKdeGs5QZECaQ91lkM9FrNoOR8YRjGG074et53O3ETTIXtsKQPF5JHXUmltbe0c2jeomvuHXlEmoHse + ZjtpWYVHYDjhv2FmEtIck0fezhWkkw+siy8tZ0Hwi0076UPHhGbQwwAH8KlDebEnDiXgb92OH443LPdC + e2eD9n7Fcg+IxatMOpGn2d4D9E/2HFQqlfOWu2Dfrtmg9r+wnAHx9IADBxeIzdmnBV613AWD6kslGKYt + 5yLVcjHT9jScE+rfttyFxGCQ2XIu+kygcybyQM6j4GesW5a7+O9bEB9CJvDRcg+IHecQfrYn/xAKBJs2 + FbmGnT3PifVsh19GPxXHW7ecBa2ZdxFxyrIm9i9fRGXLWeg1ieEkXsUbUDX3Wq3WJYfygUm/ZMJslywn + SH/R5CHtocb7UI9OLFjuD4xqd/wraNahoUHu86jOZpEFJOCcjJEQ/xpaVisdHgh5We2HKP9XrVa77nAx + UGCCxHgSG2j307cjhmI+cGHPk8HR7toyHNyJraiYqOukL5YyhadFPVtLrlrEzaFXnob2jYksUmyYn+V7 + TGyh8J4XAcV0RbXSRjRQmoqVB16140KvUgbSv2bjop77vl5PcShKpb/SGsNeH5IytgAAAABJRU5ErkJg + gg== + + + + + iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAA5hJREFUaEPt + mvtTElEUx/3v+lea6X9oppnGV5LV+EABUSRG8f3gvaZGagaakuIDFdPR0nykaZqv0/1eASmuAstursbX + +fyye45zvnDv2XN3KMhLq3poefzgke2J/i6BmmPlXwk3rBNt1DHbeydArag5Vv6VcBEB3uW+OwFqzRvR + EnkjWiNvRA0axuxUM9x4I9aJVmGuZow4FjxU5jXS1Nr8jZR4aoT5mjFSNWSh8NoCpZPmjRS59HTB/qC1 + 3Q3htwE0beQ1Gy96Q/3cBMw8dVQJ9wfQ9B4p9dbSwfEhNxJanWUFW4VxN3HrRrrnXaQftHET0AupnpyL + HmHsTdy6kQp/Ay1sfuYmdg/3SddnFMal41aNeJYlKnbXcBNQc8BB9qkuYWw6ZBkxjNqoTDKk8Ixhn868 + EAt7APrCQ9zE2fk5M6UXxmWCLCNogSLtHx2wpWEQ5ogo9lTT0ckxzw1EQ2RiH5AoLhMUNQJV9lupJ+IW + 5iXTOesg07uWWBaRzmci15JPGJsJsowUsSXQNu5O0D7u4d8GNL8RpUq2gUV5ybwcMNPqzhees7G3ReVv + TMK4TJFlpCfiovaZ3gT1Y83UEnTzoqASdy15o6l5cdxLEpV6DLFoosaRTmoL9whjM0WWERGFrmq2Yc94 + Yf2zo9QQtAvjQF2gifyRII89ZTnXjR3ZoJgRI9uoI4sfL4s7O2Wf+PXFFTPTJywG8kcCZA42CeOyQTEj + 7qiPdGwMj8v6vpNaw90pcVhCFraU4sISQ+7fcdmimBGADbyyvc4L3PqxK9zAuPZ17xuPwZT7atCcEiMH + RY10zTnJ4LfzIqFyyfzH3ORm7fW5VBe7S7z9og0n/w+5KGoEYOMeHP/khYZW50ifNMliIvjAHnzQ8ekv + KvHmvsnjKG4k+WwBYZbCTIV7ha6qRGeTZobZiNKSki8XxY0AtOKLi8vTnvPTID8MYQbDUBhXumdNtqhi + BCe5yZUZXjBmKRycdJKRdg6/82uLmytU8Tb90z8bVDHiXPSyA5KZFw1hU+PAFJd+wManA1GuXFQxAtBm + N/e3eeFoszjCQmgEpT62rAQ5uaCakcsHXwcvPlloBGgIopxcUM0IwEEJbTZZmJzjXUxJVDWCV6BS7AQI + Ta9HqHoo+zckmaCqEbTXIqc+8XJN5zXxV6PC2BxR1wjDNtmWeLmGb0gUowSqG/lX5I1ojbwRrfF/GLkX + P+G4Nz+qyUsTKij4DaqNxnRXLBhpAAAAAElFTkSuQmCC + + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/Project/icons8-layers-30.ico b/Cs_HMI/Project/icons8-layers-30.ico new file mode 100644 index 0000000..058c52e Binary files /dev/null and b/Cs_HMI/Project/icons8-layers-30.ico differ diff --git a/Cs_HMI/Project/icons8-split-64.ico b/Cs_HMI/Project/icons8-split-64.ico new file mode 100644 index 0000000..4bd26bf Binary files /dev/null and b/Cs_HMI/Project/icons8-split-64.ico differ diff --git a/Cs_HMI/Project/packages.config b/Cs_HMI/Project/packages.config new file mode 100644 index 0000000..5712595 --- /dev/null +++ b/Cs_HMI/Project/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Cs_HMI/StateMachine/DisplayTextHandler.cs b/Cs_HMI/StateMachine/DisplayTextHandler.cs new file mode 100644 index 0000000..79d32a2 --- /dev/null +++ b/Cs_HMI/StateMachine/DisplayTextHandler.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Windows.Forms; + +namespace Project +{ + public partial class fMain + { + delegate void ShowLotTextHandler(string value); + + delegate void UpdateDMTextHandler(string value1); + + void UpdateResultText(string value1) + { + + } + + delegate void UpdateLabelTextHandler(Control ctl, string value); + void UpdateLabelText(Control ctl, string value) + { + if (ctl.InvokeRequired) + { + ctl.BeginInvoke(new UpdateLabelTextHandler(UpdateLabelText), new object[] { ctl, value }); + } + else + { + ctl.Text = value; + } + } + } +} diff --git a/Cs_HMI/StateMachine/EnumStruct.cs b/Cs_HMI/StateMachine/EnumStruct.cs new file mode 100644 index 0000000..baedc6f --- /dev/null +++ b/Cs_HMI/StateMachine/EnumStruct.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class StateMachine + { + public enum eGoDir + { + Up, + Down, + } + public enum EMsgOpt : byte + { + NORMAL, + STEPCHANGE, + ERROR, + } + /// + /// 000~020 : System Define + /// 020~255 : User Define + /// + public enum eSMStep : byte + { + NOTSET = 0, + INIT, + SYNC, + IDLE, + RUN, + FINISH, + PAUSE, + ERROR, + RESET, + EMERGENCY, + CLEAR, + CLOSING, + CLOSEWAIT, + CLOSED, + } + + /// + /// RUN중일 때 사용되는 세부 시퀀스 + /// + public enum ERunStep : byte + { + + /// + /// 자동모드 대기상태 + /// + READY=0, + + /// + /// 홈(QC)로 이동합니다 + /// + GOHOME, + + /// + /// 충전을 해제 함 + /// + CHARGEOFF, + + /// + /// 충전이동 + /// + GOCHARGE, + + + /// + /// 충전중 + /// + CHARGECHECK =50, + + /// + /// 상차이동 + /// + GOUP, + + + /// + /// 하차이동 + /// + GODOWN, + + } + + + } + + +} diff --git a/Cs_HMI/StateMachine/EventArgs.cs b/Cs_HMI/StateMachine/EventArgs.cs new file mode 100644 index 0000000..b70ea06 --- /dev/null +++ b/Cs_HMI/StateMachine/EventArgs.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class StateMachine + { + public class StateMachineMessageEventArgs : EventArgs + { + public string Header { get; set; } + public string Message { get; set; } + public StateMachineMessageEventArgs(string header_, string message_) + { + this.Message = message_; + this.Header = header_; + } + } + public event EventHandler Message; + void RaiseMessage(string header, string msg) + { + if (Message != null) Message(this, new StateMachineMessageEventArgs(header, msg)); + } + + public class StepChangeEventArgs : EventArgs + { + public eSMStep Old { get; set; } + public eSMStep New { get; set; } + public StepChangeEventArgs(eSMStep old_,eSMStep new_) + { + this.Old = old_; + this.New = new_; + } + } + public class RunningEventArgs : EventArgs { + public Boolean isFirst { get; set; } + public eSMStep Step { get; set; } + public TimeSpan StepTime { get; set; } + public object Data { get; set; } + public RunningEventArgs( eSMStep step_, Boolean isfirst_,TimeSpan steptime_,object data = null) + { + this.isFirst = isfirst_; + this.Step = step_; + StepTime = steptime_; + this.Data = data; + } + } + public event EventHandler StepChanged; + public event EventHandler SPS; + public event EventHandler Running; + } + + +} diff --git a/Cs_HMI/StateMachine/Properties/AssemblyInfo.cs b/Cs_HMI/StateMachine/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cf59347 --- /dev/null +++ b/Cs_HMI/StateMachine/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("StateMachine")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("StateMachine")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("bbc9bccf-6262-4355-9cc2-37ff678ac499")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 +// 기본값으로 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/StateMachine/StateMachine.cs b/Cs_HMI/StateMachine/StateMachine.cs new file mode 100644 index 0000000..07beaf2 --- /dev/null +++ b/Cs_HMI/StateMachine/StateMachine.cs @@ -0,0 +1,334 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class StateMachine : IDisposable + { + public DateTime UpdateTime; + public TimeSpan RunSpeed = new TimeSpan(0); + private Boolean bLoop = true; + private DateTime StepStartTime; + private byte _messageOption; + + private System.Threading.Thread worker; + private Boolean firstRun = false; + + public Boolean WaitFirstRun = false; + + + + public StateMachine() + { + WaitFirstRun = false; + UpdateTime = DateTime.Now; + _messageOption = 0xFF; //모든메세지가 오도록 한다. + worker = new System.Threading.Thread(new System.Threading.ThreadStart(Loop)) + { + IsBackground = false + }; + StepStartTime = DateTime.Parse("1982-11-23"); + } + + ~StateMachine() + { + Dispose(false); + } + + #region "Dispose" + + private bool disposed = false; + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + protected virtual void Dispose(bool disposing) + { + // Check to see if Dispose has already been called. + if (!this.disposed) + { + if (disposing) + { + // Dispose managed resources. + } + + Stop(); + // unmanaged resources here. + // If disposing is false, + // only the following code is executed. + disposed = true; + } + } + + #endregion + + public void Stop() + { + bLoop = false; + //if (worker.IsAlive) + // if (worker.Join(1000) == false) + // worker.Abort(); + } + public void Start() + { + if (worker.ThreadState == System.Threading.ThreadState.Stopped) + { + worker = new System.Threading.Thread(new System.Threading.ThreadStart(Loop)) + { + IsBackground = false + }; + } + bLoop = true; + worker.Start(); + } + + private Boolean _isthreadrun; + public Boolean IsThreadRun { get { return _isthreadrun; } } + + void Loop() + { + _isthreadrun = true; + if (GetMsgOpt(EMsgOpt.NORMAL)) RaiseMessage("SM", "Start"); + while (bLoop) + { + RunSpeed = DateTime.Now - UpdateTime; //이전업데이트에서 현재 시간의 오차 한바퀴 시간이 표시됨 + UpdateTime = DateTime.Now; + + //항상 작동하는 경우 + SPS?.Invoke(this, new EventArgs()); + + //작동스텝이 변경되었다면 그것을 알림 처리한다. + if (GetNewStep != Step) + { + if (GetMsgOpt(EMsgOpt.STEPCHANGE)) + RaiseMessage("SM-STEP", string.Format("Step Changed {0} >> {1}", Step, GetNewStep)); + + StepApply(); + firstRun = true; + StepStartTime = DateTime.Now; + } + else + { + //팝업메세지의 종료를 기다리는 식에서 문제가 생긴다 + firstRun = WaitFirstRun; + } + + + //동작중에 발생하는 이벤트 + if (Running != null) + { + try + { + Running(this, new RunningEventArgs(Step, firstRun, StepRunTime)); + } + catch (Exception ex) + { + RaiseMessage("SM-ERROR", ex.Message); + } + } + + System.Threading.Thread.Sleep(1); + } + _isthreadrun = false; + if (GetMsgOpt(EMsgOpt.NORMAL)) RaiseMessage("SM", "Stop"); + } + + + /// + /// 상태머신의 작동상태 + /// + public eSMStep Step { get { return _step; } } + + /// + /// 상태머신값을 숫자로 반환 합니다. (20이하는 시스템상태이고 그 이상은 사용자 상태) + /// + public byte StepValue + { + get + { + return (byte)this._step; + } + } + + /// + /// 현재 진행 스텝을 강제로 변경합니다. + /// 일반적인 상태변화는 setNewStep 을 사용하세요. + /// + /// + public void SetCurrentStep(ERunStep step) + { + RaiseMessage("SM-STEP", string.Format("강제 스텝 변경 {0}->{1}", _runstepo, step)); + _runstepo = step; + _runstepn = step; + } + + public void SetNewStep(eSMStep newstep_, bool force = false) + { + if (Step != newstep_) + { + if(force) + { + RaiseMessage("SM-STEP", string.Format("강제스텝전환 {0} -> {1}", Step, _newstep)); + OldStep = _step; + _step = newstep_; + _newstep = newstep_; + StepChanged?.Invoke(this, new StepChangeEventArgs(OldStep, newstep_)); + } + else + { + if (_newstep != newstep_) + { + //바뀌도록 예약을 한다. + _newstep = newstep_; + if (GetMsgOpt(EMsgOpt.STEPCHANGE)) + RaiseMessage("SM-STEP", string.Format("Step Reserve {0} -> {1}", Step, _newstep)); + } + else + { + //예약은 되어있는데 아직 바뀐것은 아니다. + if (GetMsgOpt(EMsgOpt.STEPCHANGE)) + RaiseMessage("SM-STEP", string.Format("Step Already Reserve {0} -> {1}", Step, _newstep)); + } + } + + } + } + + #region "runstep" + private int _runStepSeq = 0; + public int RunStepSeq { get { return _runStepSeq; } } + + private DateTime runStepStartTime = DateTime.Parse("1982-11-23"); + private ERunStep _runstepn = ERunStep.READY; + private ERunStep _runstepo = ERunStep.READY; + public ERunStep RunStep { get { return _runstepo; } } + public ERunStep RunStepNew { get { return _runstepn; } } + public void SetNewRunStep(ERunStep newStep) + { + if (_runstepn != newStep) + { + // Pub.log.Add(string.Format("set new run step {0}->{1}", _runstepn, newStep)); + _runstepn = newStep; + } + } + public void ApplyRunStep() + { + if (_runstepn != _runstepo) + { + //Pub.log.Add(string.Format("apply new run step {0}->{1}", _runstepo, _runstepn)); + _runStepSeq = 0; + _runstepo = _runstepn; + UpdateRunStepSeq();// runStepStartTime = DateTime.Now; + } + } + public TimeSpan GetRunSteptime { get { return DateTime.Now - runStepStartTime; } } + public void SetStepSeq(byte value) + { + _runStepSeq = value; + if (GetMsgOpt(EMsgOpt.NORMAL)) + { + if (_runStepSeq != value) //변화가잇는겨웅에만 처리 220628 + RaiseMessage("STEPSEQ", string.Format("Step Sequence Jump {0} to {1}", _runStepSeq, value)); + } + + } + public void UpdateRunStepStartTime() + { + runStepStartTime = DateTime.Now; + // Pub.log.Add("Update RunStep Start Time"); + } + public void UpdateRunStepSeq(int incvalue = 1) + { + _runStepSeq += incvalue; + UpdateRunStepStartTime(); + // Pub.log.Add(string.Format("스텝({0}) 시퀀스증가 신규값={1}", runStep, _runStepSeq)); + } + public void ResetRunStepSeq() + { + _runStepSeq = 1; + UpdateRunStepStartTime(); + } + + /// + /// runstep 시퀀스값을 1로 설정하고 시작시간도 업데이트 합니다 + /// 기본 스텝상태를 READY로 변경 합니다 + /// + public void ClearRunStep() + { + _runStepSeq = 1; + runStepStartTime = DateTime.Now; + _runstepn = ERunStep.READY; + _runstepo = ERunStep.READY; + } + #endregion + + + public eSMStep GetNewStep + { + get + { + return _newstep; + } + } + private eSMStep _newstep = eSMStep.NOTSET; + public eSMStep OldStep = eSMStep.NOTSET; //171214 + private eSMStep _step; + + /// + /// newstep 의 값을 step 에 적용합니다. + /// + private void StepApply() + { + var ostep = _step; + OldStep = _step; _step = _newstep; + StepChanged?.Invoke(this, new StepChangeEventArgs(ostep, _step)); + } //171214 + + /// + /// 메세지 출력옵션을 변경 합니다. + /// + /// + /// + public void SetMsgOpt(EMsgOpt opt, Boolean value) + { + byte pos = (byte)opt; + if (value) + _messageOption = (byte)(_messageOption | (1 << pos)); + else + _messageOption = (byte)(_messageOption & ~(1 << pos)); + } + public void SetMegOptOn() { _messageOption = 0xFF; } + public void SetMsgOptOff() { _messageOption = 0; } + public Boolean GetMsgOpt(EMsgOpt opt) + { + byte pos = (byte)opt; + return (_messageOption & (1 << pos)) > 0; + } + public TimeSpan StepRunTime + { + get + { + if (IsThreadRun == false || bLoop == false || StepStartTime.Year == 1982) return new TimeSpan(0); + else return DateTime.Now - StepStartTime; + } + } + + public Boolean bPause = false; + + /// + /// 상태머신이 실제 동작중인지 확인합니다. + /// 검사상태 : Step = Run, IsThreadRun, bPause = false + /// + public Boolean IsRun + { + get + { + if (Step == eSMStep.RUN && _isthreadrun && bPause == false) return true; + else return false; + } + } + } +} diff --git a/Cs_HMI/StateMachine/StateMachine.csproj b/Cs_HMI/StateMachine/StateMachine.csproj new file mode 100644 index 0000000..78843e6 --- /dev/null +++ b/Cs_HMI/StateMachine/StateMachine.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + {BBC9BCCF-6262-4355-9CC2-37FF678AC499} + Library + Properties + StateMachine + StateMachine + v4.8 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Cs_HMI/StateMachine/_Close.cs b/Cs_HMI/StateMachine/_Close.cs new file mode 100644 index 0000000..3c69eff --- /dev/null +++ b/Cs_HMI/StateMachine/_Close.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class fMain + { + /// + /// 프로그램을 닫을때 1회 실행되는 함수 + /// + private void _Close_Start() + { + if (Pub.plc1 != null) Pub.plc1.Dispose(); + + Pub.log.Add("Program Close"); + Pub.log.Flush(); + Pub.sm.Stop(); + + } + + /// + /// 프로그램종료시 특정상황에 따른 무기한 대기 루틴 이 작업은 close_start 이후에 반복됩니다. + /// 모든 조건이 일치하게되면 closed 상태로 호출되어 프로그램이 종료됩니다. + /// + //private void _Close_Wait() + //{ + // if (!Pub.dio.isRunIOMonitor && !Pub.mot.isRunIOMonitor) + // Pub.sm.setNewStep(eSystemStep.CLOSED); + // else if (!Pub.dio.isDisposed) Pub.dio.Dispose(); + // else if (!Pub.mot.isDisposed) Pub.mot.Dispose(); //181206 + //} + } +} diff --git a/Cs_HMI/StateMachine/_Flag.cs b/Cs_HMI/StateMachine/_Flag.cs new file mode 100644 index 0000000..1fa913e --- /dev/null +++ b/Cs_HMI/StateMachine/_Flag.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; + +namespace Project +{ + public partial class fMain + { + void gridView2_ItemClick(object sender, arFrame.Control.GridView.ItemClickEventArgs e) + { + //메인화면 하단의 플래그 상태창에서 클릭된 경우 + var gv = sender as arFrame.Control.GridView; + //var flagIndex = gv.getNameItem(e.idx); + //if(flagIndex != "") + //{ + // var fidx = int.Parse(flagIndex); + // var flag = (eFlag)fidx; + // var curValue = Pub.flag.get(flag); + // Pub.flag.set(flag, !curValue); + //} + } + + + void flag_ValueChanged(object sender, Device.Flag.ValueEventArgs e) + { + var flag = (eFlag)e.ArrIDX; + if (e.ArrIDX >= FlagMapValue.Length) return; + var gridItemIndex = FlagMapValue[e.ArrIDX]; + Pub.log.Add(string.Format("Flag:{0}({2}) Changed = {1}", flag, e.NewValue,e.ArrIDX)); + if(gridItemIndex != -1) + { + this.IOState.setValue(gridItemIndex, e.NewValue); + this.IOState.Invalidate(); + } + } + + void dio_Message(object sender, arDev.ProPLC.MemoryAccess.MessageEventArgs e) + { + if(e.IsError) + { + Pub.log.Add("ERROR-DIO", e.Message); + } + else Pub.log.Add("DIO", e.Message); + } + + private void Dio_ValueChanged(object sender, arDev.ProPLC.MemoryAccess.IOValueEventArgs e) + { + var diName = (eDIName)e.ArrIDX; + + if(diName == eDIName.MC_START) + { + if(e.NewValue ==true) + { + func_sw_start(); + } + } + else if(diName == eDIName.MC_LOTEND) + { + //lot가 활성화된 경우 + if(e.NewValue == true) + { + + } + + } + //throw new NotImplementedException(); + Console.WriteLine(string.Format("[{1}]{0}=>{2}", diName,e.ArrIDX,e.NewValue)); + } + + void dio_Message2(object sender, arDev.ProPLC.MemoryAccess.MessageEventArgs e) + { + if (e.IsError) + { + Pub.log.Add("ERROR-DIO", e.Message); + } + else Pub.log.Add("DIO", e.Message); + } + + private void Dio_ValueChanged2(object sender, arDev.ProPLC.MemoryAccess.IOValueEventArgs e) + { + var diName = (eDIName)e.ArrIDX; + + if (diName == eDIName.MC_START) + { + if (e.NewValue == true) + { + func_sw_start(); + } + } + else if (diName == eDIName.MC_LOTEND) + { + //lot가 활성화된 경우 + if (e.NewValue == true) + { + + } + + } + //throw new NotImplementedException(); + Console.WriteLine(string.Format("[{1}]{0}=>{2}", diName, e.ArrIDX, e.NewValue)); + } + + } +} diff --git a/Cs_HMI/StateMachine/_Loop.cs b/Cs_HMI/StateMachine/_Loop.cs new file mode 100644 index 0000000..9c40d16 --- /dev/null +++ b/Cs_HMI/StateMachine/_Loop.cs @@ -0,0 +1,323 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using arCtl; +using Euresys.Open_eVision_2_11; +using static Project.StateMachine; + +namespace Project +{ + + public partial class fMain + { + void sm_SPS(object sender, EventArgs e) + { + //always run + _SPS(); + } + + DateTime lastDeleteTime = DateTime.Now; + + enum EScreen + { + Auto=0, + Manual, + IO, + Flag + } + void SetScreen( System.Windows.Forms.Form newscreen) + { + if(this.InvokeRequired) + { + this.BeginInvoke(new Action(() => { + SetScreen(newscreen); + })); + } + else + { + if(panDlg.Controls.Count > 0) + { + var f = panDlg.Controls[0] as System.Windows.Forms.Form; + if (f.GetType() == newscreen.GetType()) return; + } + panDlg.Controls.Clear(); + panDlg.Controls.Add(newscreen); + newscreen.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + newscreen.WindowState = System.Windows.Forms.FormWindowState.Maximized; + newscreen.Show(); + } + } + + + + void sm_Running(object sender, StateMachine.RunningEventArgs e) + { + + //main loop + switch (e.Step) + { + case eSMStep.NOTSET: + Pub.log.Add("S/M Initialize Start"); + Pub.sm.setNewStep(eSMStep.INIT); + break; + + case eSMStep.INIT: //최초실행이다. + if (_SM_RUN_INIT(e.isFirst, Pub.sm.StepRunTime)) + { + //메인화면을 설정한다 + form_auto = new ViewForm.fAuto(); + form_manu = new ViewForm.fManual(); + form_io = new ViewForm.fIO(); + form_flag = new ViewForm.fFlag(); + + form_auto.TopLevel = false; + form_manu.TopLevel = false; + form_io.TopLevel = false; + form_flag.TopLevel = false; + form_auto.Dock = System.Windows.Forms.DockStyle.Fill; + form_manu.Dock = System.Windows.Forms.DockStyle.Fill; + form_io.Dock = System.Windows.Forms.DockStyle.Fill; + form_flag.Dock = System.Windows.Forms.DockStyle.Fill; + + SetScreen(form_auto); + Pub.sm.setNewStep(eSMStep.IDLE); + } + break; + + case eSMStep.IDLE: + + //창을 닫아야하는 상황에는 처리하지 않는다. + if (Pub.popup.needClose) + { + System.Threading.Thread.Sleep(10); //팝업이 닫힐때까지 기다린다. + Pub.sm.WaitFirstRun = true; + return; + } + else Pub.sm.WaitFirstRun = false; + + + if(e.isFirst) + { + Pub.sm.bPause = false; + Pub.flag.set(eFlag.UserStepCheck, false); + Pub.sm.ClearRunStep(); + // Util_DO.SetMGZMotor(false); + lbMsg.ProgressEnable = false; + // Pub.popup.needClose = true; + } + + //자동소거기능 + if(Pub.setting.AutoDeleteDay > 0) + { + if(Pub.flag.get(eFlag.MINSPACE)==true) + { + var ts = DateTime.Now - lastDeleteTime; + if(ts.TotalSeconds > 1) + { + //파일을 찾아서 소거한다. + if (System.IO.Directory.Exists(Pub.path.FullName)) + DeleteFile(Pub.path.FullName); + + + lastDeleteTime = DateTime.Now; + } + + } + } + break; + + case eSMStep.RUN: + + //창을 닫아야하는 상황에는 처리하지 않는다. + if (Pub.popup.needClose) + { + System.Threading.Thread.Sleep(10); //팝업이 닫힐때까지 기다린다. + Pub.sm.WaitFirstRun = true; + return; + } + else Pub.sm.WaitFirstRun = false; + + _SM_RUN(e.isFirst, e.StepTime); + break; + + case eSMStep.PAUSE: + case eSMStep.EMERGENCY: + case eSMStep.ERROR: + + + //창을 닫아야하는 상황에는 처리하지 않는다. + if (Pub.popup.needClose) + { + System.Threading.Thread.Sleep(10); //팝업이 닫힐때까지 기다린다. + Pub.sm.WaitFirstRun = true; + return; + } + else Pub.sm.WaitFirstRun = false; + + if (e.isFirst) + { + + if (Pub.Result.ResultCode != eResult.NoError) + { + //에러메세지가 있는 경우에만 표시함 + if (Pub.Result.ResultMessage != "") + Pub.popup.setMessage(Pub.Result.ResultMessage); + } + if (e.Step == eSMStep.EMERGENCY) Pub.log.AddE("Enter Emergency Step"); + else if (e.Step == eSMStep.PAUSE) Pub.log.AddE("Enter Pause Step : " + Pub.Result.ResultMessage); + else Pub.log.AddE(string.Format("Enter Error Step : {0}", Pub.Result.ResultMessage)); + Pub.sm.bPause = false; + Pub.sm.setNewStep(eSMStep.IDLE); + } + break; + + case eSMStep.RESET: + + //창을 닫아야하는 상황에는 처리하지 않는다. + if (Pub.popup.needClose) + { + System.Threading.Thread.Sleep(10); //팝업이 닫힐때까지 기다린다. + Pub.sm.WaitFirstRun = true; + return; + } + else Pub.sm.WaitFirstRun = false; + + if (e.isFirst) + { + ClearBarcode(); + Pub.sm.bPause = false; + } + break; + } + } + + void DeleteFile(string path) + { + var basetime = DateTime.Now.AddDays(-1 * Pub.setting.AutoDeleteDay); + var di = new System.IO.DirectoryInfo(path); + if (di.Exists) + { + var dirYear = di.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirYear != null) + { + var dirMon = dirYear.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirMon != null) + { + var dirDay = dirMon.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirDay != null) + { + var curDay = DateTime.Parse(string.Format("{0}-{1}-{2} 00:00:00", dirYear.ToString(), dirMon.ToString(), dirDay.ToString())); + if (curDay < basetime) + { + var dirLot = dirDay.GetDirectories().OrderBy(t => t.Name).FirstOrDefault(); + if (dirLot != null) + { + var delfile = dirLot.GetFiles().FirstOrDefault(); + if (delfile != null) + { + try + { + Pub.log.AddI("Remove Fle : " + delfile.FullName + ",time=" + delfile.LastWriteTime.ToString()); + delfile.Delete(); + } + catch (Exception ex) + { + Pub.log.AddE("deleete error : " + ex.Message); + } + } + else + { + string delpath = dirLot.FullName; + try + { + dirLot.Delete(true); + } + catch (Exception ex) + { + Pub.log.AddE("remove dir" + ex.Message + "," + delpath); + } + + } + } + else + { + //이 폴더아래에 다른 폴더가 하나도 없다 즉 비어 있따. + string delpath = dirDay.FullName; + try + { + dirDay.Delete(true); + } + catch (Exception ex) + { + Pub.log.AddE("remove dir" + ex.Message + "," + delpath); + } + } + } + + } + else + { + //날짜에 해당하는 폴더가 하나도 없다. 월 폴더를 제거한다. + string delpath = dirMon.FullName; + try + { + dirMon.Delete(true); + } + catch (Exception ex) + { + Pub.log.AddE("remove dir" + ex.Message + "," + delpath); + } + } + } + else + { + //이 달에 해당하는 데이터가 없다. 이 년도를 삭제한다. + string delpath = dirYear.FullName; + try + { + dirYear.Delete(true); + } + catch (Exception ex) + { + Pub.log.AddE("remove dir" + ex.Message + "," + delpath); + } + } + } + //년도별폴더목록을 정리함 + //가장작은 년도를 기준으로 파일을 검색해서 1개씩 삭제함 + } + } + + void sm_Message(object sender, StateMachine.StateMachineMessageEventArgs e) + { + //상태머신에서 발생한 메세지 + Pub.log.Add(e.Header, e.Message); + } + + + void sm_StepChanged(object sender, StateMachine.StepChangeEventArgs e) + { + //상태머신의 스텝이 변경될때 발생함 + //Pub.log.Add(string.Format("SM:Step Changed {0} to {1}",e.Old,e.New)); + } + + //void uploadForm_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) + //{ + // //이벤트 해제 + // if (uploadForm != null) + // uploadForm.FormClosed -= uploadForm_FormClosed; + + // //업로드 창이 닫히면 그 결과를 화면에 표시 해준다. + // //foreach (System.Windows.Forms.ListViewItem lv in uploadForm.listView1.Items) + // //{ + // // string slot = lv.SubItems[0].Text; + // // string wafer = lv.SubItems[2].Text; + // // string state = lv.SubItems[3].Text; + + // //} + //} + } +} diff --git a/Cs_HMI/StateMachine/_TMDisplay.cs b/Cs_HMI/StateMachine/_TMDisplay.cs new file mode 100644 index 0000000..d2c8e9a --- /dev/null +++ b/Cs_HMI/StateMachine/_TMDisplay.cs @@ -0,0 +1,353 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using static Project.StateMachine; + +namespace Project +{ + public partial class fMain + { + private void ColorChangeMotionST(arCtl.arLabel ctl, Color c, Boolean isvalue) + { + if (isvalue) + { + int r = c.R + 100; + int g = c.G + 100; + int b = c.B + 100; + if (r > 255) r = 255; + if (g > 255) g = 255; + if (b > 255) b = 255; + if (r < 0) r = 0; + if (g < 0) g = 0; + if (b < 0) b = 0; + ctl.BackColor = Color.FromArgb(r, g, b); + ctl.BackColor2 = c; + } + else + { + ctl.BackColor = Color.FromArgb(100, 100, 100); + ctl.BackColor2 = Color.FromArgb(90, 90, 90); + } + } + + private void BCDHWStatus(Boolean enable, arCtl.arLabel ctl, bool isReady) + { + if (enable == false) + { + ctl.BackColor2 = Color.Gray; + } + else + { + if (isReady) + { + ctl.BackColor2 = Color.SeaGreen; + } + else + { + if (ctl.BackColor2 == Color.Tomato) + { + ctl.BackColor2 = Color.Gray; + } + else + { + ctl.BackColor2 = Color.Tomato; + } + } + } + } + + + void BlinkHwstatus(int row, int col, int value1, int value2) + { + var curValue = HWState.getValue(row, col); + HWState.setValue(row, col, (byte)(curValue == value1 ? value2 : value1)); // + } + + Boolean displayOn = false; + private void tmDisplay_Tick(object sender, EventArgs e) + { + if (displayOn == false) displayOn = true; + else + { + Pub.log.AddAT("Display Timer Overlab");// Console.WriteLine("display overlab"); + return; + } + + if (Pub.sm.Step > eSMStep.INIT && + panTopMenu.Enabled == false) panTopMenu.Enabled = true; + + + //쓰레드로인해서 메인에서 진행하게한다. SPS는 메인쓰레드에서 진행 됨 + //팝을 제거 혹은 표시하는 기능 + if (Pub.popup.needShow) Pub.popup.showMessage(); + else if (Pub.popup.needClose) Pub.popup.Visible = false; // .setVision(false)(); + + lbTime.Text = Pub.sm.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss"); + + //상태 표시 + Update_SSStatus(); + + //H/W 상태표시 + Update_HWStatus(); + + //IO상태(상단줄) 표시 + Update_IOStatus(); + + //display mesasge + UpdateResultMessage(); + + + //메세지창이 깜박거려야하는 상황 체크 + if (lbMsg.Tag != null) + { + var bg1 = lbMsg.BackColor; + var bg2 = lbMsg.BackColor2; + lbMsg.BackColor = bg2; + lbMsg.BackColor2 = bg1; + lbMsg.Invalidate(); + } + + + + + HWState.Invalidate(); + SSInfo.Invalidate(); + IOState.Invalidate(); + + #region retgion"1분 time 루틴" + var ts = DateTime.Now - tm1minute; + if (ts.TotalMinutes >= 1) + { + //리셋카운트 + _AutoResetCount(); + tm1minute = DateTime.Now; + } + #endregion + + #region retgion"5분 time 루틴" + ts = DateTime.Now - tm5minute; + if (ts.TotalMinutes >= 5) + { + //남은디스크확인 + CheckFreeSpace(); + tm5minute = DateTime.Now; + } + #endregion + + //wat.Stop(); + //Console.WriteLine("disp time : " + wat.ElapsedMilliseconds.ToString() + "ms"); + displayOn = false; + } + + void Update_IOStatus() + { + int inputrow = 1; + int inputcol = 0; + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.VS_READY) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.VS_OK) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.VS_ERR) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.VS_COMPLETE) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.VS_LOTEND) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + + var numver_mz = Pub.plc1.getValue(7902); + var numver_sn = Pub.plc1.getValue(7903); + var bin_mz = Convert.ToString(numver_mz, 2).PadLeft(16,'0'); + var bin_sn = Convert.ToString(numver_sn, 2).PadLeft(16, '0'); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + + inputrow = 0; + inputcol = 0; + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.MC_START) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.MC_CONFIRM) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, (ushort)(Pub.plc1.getValue(7900, (int)eDIName.MC_LOTEND) ? 1 : 0)); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + IOState.setTitle(inputrow, inputcol, "--"); IOState.setValue(inputrow, inputcol++, 0); + + //IOState.setTitle(0, inputcol, "DOOR"); IOState.setValue(0, inputcol++, (ushort)(Util_DO.CheckDoorSafty() ? 1 : 2)); + //IOState.setTitle(0, inputcol, "SAFTY"); IOState.setValue(0, inputcol++, (ushort)(Pub.flag.get(eFlag.MGZSafty1) && Pub.flag.get(eFlag.MGZSafty2) ? 1 : 2)); + //IOState.setTitle(0, inputcol, "FULL"); IOState.setValue(0, inputcol++, (ushort)(Util_DO.GetIOInput(eDIName.UD_FULL) ? 2 : 0)); + + //IOState.setTitle(0, inputcol, "A/B\nDETECT"); IOState.setValue(0, inputcol++, (ushort)(Util_DO.GetIOInput(eDIName.AB_DETECT) ? 1 : 0)); + + } + void Update_SSStatus() + { + SSInfo.setTitle(0, 0, Pub.sm.Step.ToString()); + SSInfo.setTitle(1, 0, Pub.sm.runStep.ToString()); + if (Pub.sm.Step == eSMStep.RUN) + SSInfo.setTitle(1, 1, string.Format("{0:N1} sec", Pub.sm.getRunSteptime.TotalSeconds)); + else + SSInfo.setTitle(1, 1, "--"); + + } + void Update_HWStatus() + { + var rownum = 1; + var colIdx = 0; + //if (Pub.light.IsInit == false) BlinkHwstatus(rownum, colIdx++, 3, 4); + //else HWState.setValue(rownum, colIdx++, (byte)(Pub.light.IsInit ? 2 : 3)); // + + if (Pub.plc1.IsValid == false) BlinkHwstatus(rownum, colIdx++, 3, 4); + else HWState.setValue(rownum, colIdx++, (byte)(Pub.plc1.IsValid ? 2 : 3)); //PLC + + if (Pub.Xbee.IsInit == false) BlinkHwstatus(rownum, colIdx++, 3, 4); + else HWState.setValue(rownum, colIdx++, (byte)(Pub.Xbee.IsInit ? 2 : 3)); // + + //if (Pub.camera.IsInit == false) BlinkHwstatus(rownum, colIdx++, 3, 4); + //else HWState.setValue(rownum, colIdx++, (byte)(Pub.camera.IsInit ? 2 : 3)); // + + //if (Pub.bVisionLicense == false) BlinkHwstatus(rownum, colIdx++, 3, 4); + //else HWState.setValue(rownum, colIdx++, (byte)(Pub.bVisionLicense ? 2 : 3)); // + + } + + /// + /// 환경설정에따른 카운트를 리셋처리한다. 171128 + /// + void _AutoResetCount() + { + if (Pub.setting.datetime_Check_1 && Pub.setting.datetime_Reset_1 != "") //오전 + { + try + { + DateTime SetTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " " + Pub.setting.datetime_Reset_1 + ":00"); + DateTime LastClearTime = Pub.counter.CountReset; + + //현재 시간이 클리어대상 시간보다 크고, 마지막으로 클리어한 시간이 지정시간보다 작아야함 + if (DateTime.Now > SetTime && LastClearTime < SetTime) + { + Pub.log.AddI("Count Reset #1"); + Pub.counter.CountClear(); + } + } + catch { } + } + + if (Pub.setting.datetime_Check_2 && Pub.setting.datetime_Reset_2 != "") //오후 + { + try + { + DateTime SetTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " " + Pub.setting.datetime_Reset_2 + ":00"); + DateTime LastClearTime = Pub.counter.CountReset; + + //현재 시간이 클리어대상 시간보다 크고, 마지막으로 클리어한 시간이 지정시간보다 작아야함 + if (DateTime.Now > SetTime && LastClearTime < SetTime) + { + Pub.log.AddI("Count Reset #2"); + Pub.counter.CountClear(); + } + } + catch { } + } + } + + DateTime tm1minute = DateTime.Now.AddDays(-1); + DateTime tm5minute = DateTime.Now; + + void UpdateProgressStatus(string title, double value, double max) + { + UpdateProgressStatus((float)value, (float)max, title); + } + + void UpdateProgressStatus(float value, float max, string title) + { + if (lbMsg.ProgressEnable == false) lbMsg.ProgressEnable = true; + if (lbMsg.ProgressMax != max) lbMsg.ProgressMax = max; + if (lbMsg.ProgressValue != value) lbMsg.ProgressValue = value; + if (lbMsg.ProgressForeColor != Color.FromArgb(40, 40, 40)) + lbMsg.ProgressForeColor = Color.FromArgb(40, 40, 40); + if (lbMsg.Text != title) lbMsg.Text = title; + } + + void UpdateStatusMessage(string dispmsg, Color fcolor, Color shadow) + { + UpdateStatusMessage(dispmsg, Color.DimGray, Color.Gray, fcolor, shadow); + } + + void UpdateStatusMessage(string dispmsg, Color bColor, Color bColor2, Color fcolor, Color shadow, Boolean blank = false) + { + + //if (lbMsg.ProgressEnable == true) lbMsg.ProgressEnable = false; + if (dispmsg != lbMsg.Text || lbMsg.ForeColor != fcolor || lbMsg.ShadowColor != shadow || (lbMsg.BackColor != bColor && lbMsg.BackColor2 != bColor)) + { + lbMsg.BackColor = bColor; + lbMsg.BackColor2 = bColor2; + lbMsg.ForeColor = fcolor; + lbMsg.ShadowColor = shadow; + lbMsg.Text = dispmsg; + if (blank) lbMsg.Tag = "BLANK"; + else lbMsg.Tag = null; + } + } + + + void UpdateResultMessage() + { + //모션을 사용한다면 홈 검색여부를 확인한다. + + //var inspresult = ""; + //if (Pub.Result == null || Pub.Result.Result == CResult.eInspectResult.NOTSET) + // inspresult = "--"; + //else if (Pub.Result.Result == CResult.eInspectResult.OK) + // inspresult = "MATCH"; + //else if (Pub.Result.Result == CResult.eInspectResult.NG) + // inspresult = "MISMATCH"; + + + //최우선 점검 사항 표시 + if (Pub.sm.Step > eSMStep.INIT) + { + if (Pub.flag.get(eFlag.DemoRun)) + { + UpdateStatusMessage("DEMO RUN", Color.Gold, Color.Yellow, Color.Black, Color.WhiteSmoke, true); + } + + + else if (Pub.flag.get(eFlag.START) == true) + { + UpdateStatusMessage("매거진투입구 안전센서 감지", Color.Tomato, Color.Black); + } + else if (Pub.Result.Model.Title == "") + { + UpdateStatusMessage("비젼모델 선택이 필요함", Color.Tomato, Color.Black); + } + + if (Pub.sm.Step == eSMStep.IDLE) + { + UpdateStatusMessage("준비완료", Color.Lime, Color.Black); + } + else if (Pub.sm.Step == eSMStep.ERROR) + { + UpdateStatusMessage("오류 발생", Color.Red, Color.Black); + } + else if (Pub.sm.Step == eSMStep.PAUSE) + { + UpdateStatusMessage("정지 됨", Color.Tomato, Color.Black); + } + else if (Pub.sm.Step == eSMStep.FINISH) + UpdateStatusMessage("작업 완료", Color.Lime, Color.Black); + else if (Pub.sm.bPause == true) + { + UpdateStatusMessage("[START]를 누르면 시작 됩니다", Color.Yellow, Color.Black); + } + else if (Pub.flag.get(eFlag.TestRun)) + { + UpdateStatusMessage("TEST RUN", Color.DeepSkyBlue, Color.LightSkyBlue, Color.Blue, Color.WhiteSmoke, true); + } + else + { + + string msg = "진행중"; + UpdateStatusMessage(msg, Color.Lime, Color.Black); + } + } + } + } +} diff --git a/Cs_HMI/SubProject/AGV/Command.cs b/Cs_HMI/SubProject/AGV/Command.cs new file mode 100644 index 0000000..c94ef1c --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Command.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using System.Collections; +using COMM; +using System.Security.Cryptography.X509Certificates; + +namespace arDev +{ + public partial class Narumi : arRS232 + { + + public bool AGVMoveSet(BunkiData opt) + { + return AddCommand(eAgvCmd.MoveSet, opt.ToString()); + } + + public bool AGVMoveManual(ManulOpt opt, Speed spd, Sensor ss) + { + var param = opt.ToString() + spd.ToString()[0] + ((int)ss).ToString(); + return AddCommand(eAgvCmd.ManualMove, param); + } + public bool AGVMoveRun(eRunOpt opt = eRunOpt.NotSet) + { + System.Text.StringBuilder sb = new StringBuilder(); + if (opt == eRunOpt.Backward) sb.Append("B"); + else if (opt == eRunOpt.Forward) sb.Append("F"); + else sb.Append("0"); + sb.Append("000"); + return AddCommand(eAgvCmd.MoveStart, sb.ToString()); + } + + public bool AGVSetSpeed(eSetSpeed item, int speed) + { + string cmd = "SS"; + if (item == eSetSpeed.Rotation) cmd = "SRS"; + else cmd += item.ToString()[0]; + cmd += speed.ToString("0000"); + return AddCommand(cmd); + + } + public bool AGVMoveStop(string Reason, eStopOpt opt = eStopOpt.Stop) + { + System.Text.StringBuilder sb = new StringBuilder(); + if (opt == eStopOpt.MarkStop) sb.Append("MS"); + else if (opt == eStopOpt.MarkRotateLeft) sb.Append("TL"); + else if (opt == eStopOpt.MarkRotateRight) sb.Append("TR"); + else if (opt == eStopOpt.MarkChangeDirection) sb.Append("BS"); + else sb.Append("0S"); + sb.Append("00"); + sb.Append("0000"); //재기동시간 + if (opt == eStopOpt.MarkStop) + VAR.BOOL[eVarBool.NEXTSTOP_MARK] = true; + + //동작중이면 이 멈춤 명령을 기록으로 남긴다 230116 + if (this.system1.agv_run) + RaiseMessage(MessageType.Normal, $"stop command from {Reason}"); + return AddCommand(eAgvCmd.MoveStop, sb.ToString()); + } + public bool AGVCommand(string cmd, string data) + { + return AddCommand(cmd + data); + } + + public bool LiftControl(LiftCommand cmd) + { + return AddCommand(eAgvCmd.LiftControl, cmd.ToString()); + } + public bool AGVCharge(int chargetID, bool on, int waittime = 3) + { + if (on) + return AddCommand(eAgvCmd.ChargeOn, chargetID.ToString("0000")); + else + return AddCommand(eAgvCmd.ChargeOf, chargetID.ToString("0000")); + } + + public bool AGVErrorReset() + { + return AddCommand(eAgvCmd.ErrorReset, "FFFF"); + } + public bool AGVTowerLamp(bool on) + { + return AddCommand(eAgvCmd.TowerLamp, (on ? "I" : "O")); + } + public bool AGVSetAddress(int value) + { + return AddCommand($"SAD{value:0000}"); + } + public bool AGVSetPanID(string value) + { + value = value.PadLeft(4, '0'); + return AddCommand($"SPN{value}"); + } + public bool AGVSetChannel(string value) + { + value = value.PadLeft(4, '0'); + return AddCommand($"SCH{value}"); + } + public bool AGVGateOutTimer(int value) + { + return AddCommand($"SGT{value:0000}"); + } + /// + /// 정지감속주기 및 상수 + /// + /// + public bool AGVSetStopAcc(int interval, int value) + { + var cmds = new string[] { + $"SSK{interval:0000}", + $"SCK{value:0000}" + }; + return AddCommand(cmds); + } + + public bool AGVSetTagReinputTime(int value) + { + return AddCommand($"STT{value:0000}"); + } + public bool AGVSetPID(eSetPIDSpeed speed, int P, int I, int D) + { + var cmd = "S"; + var cmd2 = ""; + if (speed == eSetPIDSpeed.High) cmd2 = "K"; + else if (speed == eSetPIDSpeed.Middle) cmd2 = "M"; + else if (speed == eSetPIDSpeed.Low) cmd2 = "L"; + else if (speed == eSetPIDSpeed.Stop) cmd2 = "S"; + + var cmds = new string[] { + $"{cmd}P{cmd2}{P:0000}", + $"{cmd}I{cmd2}{I:0000}", + $"{cmd}D{cmd2}{D:0000}", + }; + return AddCommand(cmds); + } + protected bool AddCommand(params string[] cmds) + { + bool ret = true; + ACKData = string.Empty; //회신값 제거 + foreach (var cmdline in cmds) + { + var fullcmd = MakeCheckSum(cmdline); + //commandQueue.Enqueue(fullcmd); + if (WriteData(fullcmd) == false) ret = false; + System.Threading.Thread.Sleep(1); + } + return ret; + } + + + protected bool AddCommand(eAgvCmd command, BunkiData param) + { + return AddCommand(command, param.ToString()); + } + + /// + /// CBR커맨드를 사용하여 옵션값을 전송 합니다 + /// 11.분기명령 = CBR + /// + /// + /// + protected bool AddCommand(BunkiData param) + { + return AddCommand(eAgvCmd.MoveSet, param.ToString()); + } + + protected bool AddCommand(eAgvCmd command, string param = "") + { + string cmdString; + bool retval = false; + switch (command) + { + case eAgvCmd.ErrorReset: + cmdString = $"SFR{param}"; + retval = AddCommand(cmdString); + break; + case eAgvCmd.TowerLamp: + cmdString = $"CBZ" + $"0299{param}0000"; + retval = AddCommand(cmdString); + break; + case eAgvCmd.MoveStop: + cmdString = $"CST{param}"; + system1.agv_run_manual = false; + retval = AddCommand(cmdString); + break; + case eAgvCmd.MoveStart: + cmdString = $"CRN{param}"; + retval = AddCommand(cmdString); + break; + + case eAgvCmd.ChargeOf: + cmdString = $"CBT{param}O0003"; ///0003=충전대기시간 + retval = AddCommand(cmdString); + RaiseMessage(arRS232.MessageType.Normal, "충전취소전송"); + break; + case eAgvCmd.ChargeOn: + cmdString = $"CBT{param}I0003"; ///0003=충전대기시간 + retval = AddCommand(cmdString); + RaiseMessage(arRS232.MessageType.Normal, "충전명령전송"); + break; + + case eAgvCmd.GoTurnLeft: + cmdString = $"CTL0000"; + retval = AddCommand(cmdString); + break; + case eAgvCmd.GoTurnRight: + cmdString = $"CTR0000"; + retval = AddCommand(cmdString); + break; + case eAgvCmd.goTurnBack: + cmdString = $"CTB0000"; + retval = AddCommand(cmdString); + break; + case eAgvCmd.CallCancle: + cmdString = $"CCL0{param}010000"; + retval = AddCommand(cmdString); + break; + + + case eAgvCmd.MoveSet: + cmdString = $"CBR{param}"; + retval = AddCommand(cmdString); + break; + case eAgvCmd.ManualMove: + system1.agv_run_manual = true; + cmdString = $"CRT{param}"; + retval = AddCommand(cmdString); + break; + + case eAgvCmd.LiftControl: + cmdString = "CLF" + param.PadRight(6, '0'); + retval = AddCommand(cmdString); + break; + + } + return retval; + } + + } + + +} diff --git a/Cs_HMI/SubProject/AGV/DataEventArgs.cs b/Cs_HMI/SubProject/AGV/DataEventArgs.cs new file mode 100644 index 0000000..2ac94f0 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/DataEventArgs.cs @@ -0,0 +1,19 @@ +using System; + +namespace arDev +{ + public partial class Narumi + { + public class DataEventArgs : EventArgs + { + public DataType DataType { get; set; } + + public DataEventArgs(DataType type) + { + DataType = type; + } + } + } + + +} diff --git a/Cs_HMI/SubProject/AGV/EnumData.cs b/Cs_HMI/SubProject/AGV/EnumData.cs new file mode 100644 index 0000000..4d9dd50 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/EnumData.cs @@ -0,0 +1,213 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace arDev +{ + public partial class Narumi + { + public enum eMoveDir + { + Forward, + Backward, + } + public enum eMoveSpd + { + High, + Middle, + Low, + } + public enum eSetPIDSpeed + { + High, + Middle, + Low, + Stop, + } + public enum eSetSpeed + { + High, + Middle, + Low, + Stop, + Rotation, + } + public enum eBunki + { + Right, + Strate, + Left, + } + + public enum Messagetype + { + Normal, + Error, + Send, + Recv, + } + public enum DataType + { + UNKNOWN, + TAG, + CALL, + STS, + ACK, + NAK, + CCA, + } + public class BunkiData + { + public BunkiData() + { + + } + public BunkiData(char dir, char bunki, char speed) + { + if (dir == 'F') Direction = eMoveDir.Forward; + else if (dir == 'B') Direction = eMoveDir.Backward; + + if (bunki == 'S') Bunki = eBunki.Strate; + else if (bunki == 'L') Bunki = eBunki.Left; + else if (bunki == 'R') Bunki = eBunki.Right; + + if (speed == 'H') this.Speed = eMoveSpd.High; + else if (speed == 'M') this.Speed = eMoveSpd.Middle; + else if (speed == 'L') this.Speed = eMoveSpd.Low; + } + public eMoveDir Direction { get; set; } = eMoveDir.Forward; + public eBunki Bunki { get; set; } = eBunki.Strate; + public eMoveSpd Speed { get; set; } = eMoveSpd.Middle; + public int PBSSensor { get; set; } = 1; + public override string ToString() + { + System.Text.StringBuilder sb = new StringBuilder(); + sb.Append(Direction.ToString()[0]); + sb.Append(Bunki.ToString()[0]); + sb.Append(Speed.ToString()[0]); + sb.Append(PBSSensor.ToString()[0]); + + return sb.ToString(); + } + } + public enum eAgvCmd + { + /// + /// 충전시작 + /// CMD : CBT02{nBatteryNo}I0103 + /// + ChargeOn, + + /// + /// 충전취소 + /// CMD : CBT02{nBatteryNo}O0103 + /// + ChargeOf, + + /// + /// 이동명령(파라미터필요) + /// 이동대상,속도(H,M,L),센서사용여부(1,0) + /// ex) BSLTH0 + /// CMD : CRT{param} + /// + ManualMove, + + /// + /// 기동명령 + /// CMD : CRN0000 + /// + MoveStart, + + /// + /// 분기명령 + /// CMD : CBR{param} + /// + MoveSet, + + /// + /// 정지 명령 + /// CMD : CST0S000000 + /// + MoveStop, + + /// + /// 콜 취소, + /// Param : 번호 char(1) + /// CMD : CCL0{param}010000 + /// + CallCancle, + + /// + /// CMD : CTL0000 + /// + GoTurnLeft, + + /// + /// CMD : CTR0000 + /// + GoTurnRight, + + /// + /// CMD : CTB0000 + /// + goTurnBack, + + /// + /// CMD : CBZ + /// + TowerLamp, + + /// + /// CMD : SFR + /// + ErrorReset, + + /// + /// CMD : CLF + /// + LiftControl, + + /// + /// SS(H/M/L/S) + /// SRS + /// + SetSpeed, + } + public enum eForm + { + DriveControl, + ManualControl, + RouteSelect, + Setting, + ModeChange, + } + public enum eNotify + { + ReadTag, + IpAddresschanged, + NameChanged, + ReadViewStep, + ReadViewCall, + WatchError, + + /// + /// 통신에서받은 AGV의 상태값이며, 속도 진행 방향을 가지고 있음 + /// Dashboardform 하단에 상태 표시 함 + /// + StatusDisplay, + StatusComm, + StatusRiv, + StatusETC, + + ChangeMode, + /// + /// 편집대상경로는 아래 변수에 저장되어잇음 + /// datamanager.sEditrRoute + /// + EditRoute, + } + + + } +} diff --git a/Cs_HMI/SubProject/AGV/NARUMI.csproj b/Cs_HMI/SubProject/AGV/NARUMI.csproj new file mode 100644 index 0000000..4398b20 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/NARUMI.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7} + Library + Properties + arDevice + Narumi + v4.8 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + + + + {14e8c9a5-013e-49ba-b435-efefc77dd623} + CommData + + + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/AGV/Narumi.cs b/Cs_HMI/SubProject/AGV/Narumi.cs new file mode 100644 index 0000000..a7604f3 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Narumi.cs @@ -0,0 +1,586 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using System.Collections; +using COMM; +using System.Security.Cryptography.X509Certificates; + +namespace arDev +{ + public partial class Narumi : arRS232 + { + Hashtable SystemCheck, ErrorCheck; + private Queue Errlog; // 에러발생시 코드 임시 저장용(쓰레드 동기화용) + + + public int nBatteryNo { get; set; } = 0; + + + public Narumi() + { + SystemCheck = new Hashtable(); + SystemCheck.Add(15, "100"); + SystemCheck.Add(14, "9"); + SystemCheck.Add(13, "8"); + SystemCheck.Add(12, "53"); + SystemCheck.Add(11, "3"); + //SystemCheck.Add(10, "66"); + //SystemCheck.Add(9, "56"); + SystemCheck.Add(8, "6"); + SystemCheck.Add(7, "5"); + SystemCheck.Add(6, "60"); + SystemCheck.Add(5, "1"); + SystemCheck.Add(4, "2"); + //SystemCheck.Add(3, "65"); + //SystemCheck.Add(2, "55"); + //SystemCheck.Add(1, "11"); + //SystemCheck.Add(0, "22"); + + ErrorCheck = new Hashtable(); + ErrorCheck.Add(15, "17"); + ErrorCheck.Add(14, "15"); + ErrorCheck.Add(13, "18"); + ErrorCheck.Add(12, "19"); + //ErrorCheck.Add(11, "300"); + ErrorCheck.Add(10, "299"); + ErrorCheck.Add(9, "298"); + ErrorCheck.Add(8, "297"); + ErrorCheck.Add(7, "296"); + //ErrorCheck.Add(6,""); + ErrorCheck.Add(5, "12"); + ErrorCheck.Add(4, "13"); + ErrorCheck.Add(3, "14"); + ErrorCheck.Add(2, "16"); + ErrorCheck.Add(1, "11"); + ErrorCheck.Add(0, "10"); + + Errlog = new Queue(); + MinRecvLength = 4; + + COMM.VAR.Init(128); + } + + + + #region "External Events" + + + /// + /// 분석완료된 데이터 이벤트 + /// + public event EventHandler DataReceive; + + + #endregion + + + protected override bool CustomParser(byte[] buf, out byte[] remainBuffer) + { + List remain = new List(); + + //데이터는 총 34byt 이며 , DD~77로 구성됨 + Boolean bComplete = false; + for (int i = 0; i < buf.Length; i++) + { + var incomByte = buf[i]; + if (bComplete == true) + { + remain.Add(incomByte); + } + else + { + if (incomByte == 0x02) + { + findSTX = true; + tempBuffer.Clear(); + tempBuffer.Add(incomByte); + } + else if (incomByte == 0x03) + { + //데이터가 맞게 수신됨 + //tempBuffer.Add(incomByte); + tempBuffer.Add(incomByte); + findSTX = false; + bComplete = true; + } + else + { + tempBuffer.Add(incomByte); + if (tempBuffer.Count == 150) //data overload + { + findSTX = false; + tempBuffer.Clear(); + bComplete = false; + RaiseMessage(MessageType.Error, "Buffer Over"); + } + } + } + } + + remainBuffer = remain.ToArray(); + return bComplete; + } + + public class Dataframe + { + public byte STX { get; private set; } + public byte ETX { get; private set; } + public byte[] Data { get; private set; } + public string DataString { get; private set; } + public byte[] checksum { get; private set; } = new byte[2]; + public bool Valid { get; private set; } = false; + public string Message { get; private set; } = string.Empty; + public byte[] Buffer { get; private set; } + public string Cmd { get; private set; } = string.Empty; + + public bool Parse(byte[] data, int MinRecvLength = 0) + { + if (data == null || data.Any() == false) + { + this.Message = string.Format("수신 데이터가 없습니다"); + return false; + } + else if (data.Length < 5) + { + this.Message = $"데이터의 길이가 5보다 작습니다 길이={data.Length}"; + return false; + } + else if (MinRecvLength > 0 && data.Length < MinRecvLength) + { + this.Message = $"데이터의 길이가 {MinRecvLength}보다 작습니다 길이={data.Length}"; + return false; + } + else if (data[0] != 0x02 || data[data.Length - 1] != 0x03) + { + this.Message = $"STX/ETX Error"; + return false; + } + Buffer = new byte[data.Length]; + Array.Copy(data, Buffer, data.Length); + STX = data[0]; + ETX = data[data.Length - 1]; + Array.Copy(data, data.Length - 3, checksum, 0, 2); + + Data = new byte[data.Length - 4]; + Array.Copy(data, 1, Data, 0, data.Length - 4); + + if (data.Length > 2) Cmd = System.Text.Encoding.Default.GetString(Data, 0, 3); + + this.DataString = System.Text.Encoding.Default.GetString(Data); + + + Valid = true; + return true; + } + public Dataframe(byte[] buffer = null, int minlen = 0) + { + if (buffer != null) Parse(buffer); + } + } + + public override bool ProcessRecvData(byte[] data) + { + //LastReceiveBuffer + var frame = new Dataframe(data, MinRecvLength); + if (frame.Valid == false) + { + RaiseMessage(arRS232.MessageType.Error, frame.Message); + return false; + } + else if (frame.DataString.StartsWith("$") == false && CheckSum(data) == false) + { + RaiseMessage(arRS232.MessageType.Error, "Checksum Error MSG=" + frame.DataString); + return false; + } + + var retval = true; + + /////////////////////////////////////////////////////////////////////////////// + if (frame.Cmd.Equals("ACK") || frame.Cmd.Equals("NAK")) + { // 응답확인값 수신 : Header(ACX), Length(9), CheckSum 확인 + RevACK(frame); + } + /////////////////////////////////////////////////////////////////////////////// + else if (frame.Cmd.Equals("STS")) + { // AGV 상태 정보 : Header(STS), Length(30), CheckSum 확인 + RevSTS(frame); + } + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + else if ((frame.Cmd.Equals("TAG") || frame.Cmd.Equals("CAL") || frame.Cmd.Equals("CCA"))) + { // TAG ID 정보 : Header(STX), Length(13), CheckSum 확인 + RevTAG(frame); + } + else if (frame.DataString.StartsWith("$")) + { + // $로 시작되는 AGV 상태 표시 + //var text_Sts_Etc = Encoding.Default.GetString(bRcvData, 3, bRcvData.Length - 2).TrimStart(' '); //20210311 김정만 - SmartX FrameWork 사용 안함으로 주석처리 + //var sMessageOther = Encoding.Default.GetString(bRcvData, 3, bRcvData.Length - 2).TrimStart(' '); + RaiseMessage(arRS232.MessageType.Normal, "$메세지수신:" + frame.DataString); + } + else + { + try + { + DataReceive?.Invoke(this, new DataEventArgs(DataType.UNKNOWN)); + } + catch (Exception ex) + { + RaiseMessage(arRS232.MessageType.Error, ex.Message); + retval = false; + } + } + return retval; + + + } + + #region [수신] ACK(응답확인값) 분석 + + public string ACKData { get; set; } = string.Empty; + public DateTime ACKtime { get; set; } = DateTime.Now; + private void RevACK(Dataframe frame) + { + //ACKSADA7 + var rcvdNow = frame.DataString; + var bRcvData = frame.Buffer; + + ACKData = rcvdNow.Substring(3); + ACKtime = DateTime.Now; + + if (rcvdNow.StartsWith("ACK")) + { + //RaiseMessage("get ack"); + DataReceive?.Invoke(this, new DataEventArgs(DataType.ACK)); + //if (datamanager.commandQueue.Count != 0) + //{ + // byte[] bCmdData = encoding.GetBytes((String)datamanager.commandQueue.Peek()); + // if (bCmdData[1] == bRcvData[4] && bCmdData[2] == bRcvData[5] && bCmdData[3] == bRcvData[6]) //보낸값이 맞는지 확인후 Dequeue + // { + // nSendCount = 0; + // datamanager.commandQueue.Dequeue(); + // sSendCommandString = ""; + // } + //} + } + else if (rcvdNow.StartsWith("NAK")) + { + //RaiseMessage("get nak"); + DataReceive?.Invoke(this, new DataEventArgs(DataType.NAK)); + //nSendCount = 0; //NAK - 재전송이 날아왔을때 nSendCommandCounter 초기화 + } + } + + #endregion + + public SystemFlag0 system0 = new SystemFlag0(); + public SystemFlag1 system1 = new SystemFlag1(); + public ErrorFlag error = new ErrorFlag(); + public AgvData data = new AgvData(); + public Signal signal = new Signal(); + + #region [수신] STS(AGV상태정보) 분석 + public string LastSTS { get; set; } = string.Empty; + private void RevSTS(Dataframe frame) + { + LastSTS = frame.DataString; + string rcvdNow = frame.DataString; + byte[] bRcvData = frame.Buffer; + var encoding = System.Text.Encoding.Default; + try + { + + // AGV 베터리 잔량 표시 flag (4~6) ///////////////////////////////////////////////////////////////////////////////////////////////////////////// + var idx = 3; + var battery = int.Parse(rcvdNow.Substring(idx, 3)) / 10f;// Convert.ToDouble(encoding.GetString(rcvdNow, 3, 3)) / 10; + idx += 3; + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // AGV 장치연결상태 flag (7~10) //////////////////////////////////////////////////////////////////////////////////////////////////////////// + var nDataTemp = Convert.ToInt16(rcvdNow.Substring(idx, 4), 16); + system0.SetValue(nDataTemp); + idx += 4; + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // AGV Sts(현재 상태) flag (11~14) //////////////////////////////////////////////////////////////////////////////////////////////////////////// + nDataTemp = Convert.ToInt16(rcvdNow.Substring(idx, 4), 16); + system1.SetValue(nDataTemp); + idx += 4; + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // AGV Error flag (15~18)//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + nDataTemp = Convert.ToInt16(rcvdNow.Substring(idx, 4), 16); + error.SetValue(nDataTemp); + idx += 4; + + + data.Speed = rcvdNow.Substring(idx, 1)[0]; idx += 1; //L,M.H + data.Sts = rcvdNow.Substring(idx, 1)[0]; idx += 1; //S(직진),L(좌분기),R(우분기) + data.Direction = rcvdNow.Substring(idx, 1)[0]; idx += 1; //F,B,L,R + data.guidesensor = int.Parse(rcvdNow.Substring(idx, 1)); idx += 1; //가이드 좌측부터 1~9 + + nDataTemp = Convert.ToByte(rcvdNow.Substring(idx, 2), 16); + signal.SetValue(nDataTemp); + + //data.Sts = encoding.GetString(bRcvData, 19, 3); //20210311 김정만 - SmartX FrameWork 사용 안함으로 주석처리 + + //var Sts_cSpeed = encoding.GetString(bRcvData, 19, 1)[0]; + //var Sts_cDirection = encoding.GetString(bRcvData, 20, 1)[0]; + //var Sts_cFB = encoding.GetString(bRcvData, 21, 1)[0]; + + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ////가이드센서 정보 (22)////////////////////////////////////////////////////////////////////////////////////////////////////////// + //var Sts_nGuide = 0; + //if (bRcvData[22] > 47 && bRcvData[22] < 58) { Sts_nGuide = Convert.ToInt32(encoding.GetString(bRcvData, 22, 1)); } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ////마크센서 & 포토센서 정보 (23~24)//////////////////////////////////////////////////////////////////////////////////////////////////// + //nDataTemp = Convert.ToInt32(encoding.GetString(bRcvData, 23, 2), 16); + + //data.Sts_bMark1 = Convert.ToBoolean(nDataTemp & 0x4); + //data.Sts_bMark2 = Convert.ToBoolean(nDataTemp & 0x8); + //data.Sts_bCargo = Convert.ToBoolean(nDataTemp & 0x10); + + ////포토센서 + //if (Sts_cFB == 'F') + //{ + // system.Sts_nSenser = Convert.ToInt32(encoding.GetString(bRcvData, 26, 1)); + //} + //else if (Sts_cFB == 'B') + //{ + // system.Sts_nSenser = Convert.ToInt32(encoding.GetString(bRcvData, 27, 1)); + //} + + + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + //AGV 속도/분기/방향 (19~21)////////////////////////////////////////////////////////////////////////////////////////////////////////// + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + DataReceive?.Invoke(this, new DataEventArgs(DataType.STS)); + + } + catch (Exception ex) + { + RaiseMessage(MessageType.Error, $"Parse Error(STS) = {ex.Message}"); + } + } + + #endregion + + + + + + + #region [수신] TAG(태그정보) 분석 + + System.Text.Encoding encoding = System.Text.Encoding.Default; + string old_TagString = string.Empty; + string old_CALString = string.Empty; + string old_CCAString = string.Empty; + private void RevTAG(Dataframe frame) + { + string rcvdNow = frame.DataString; + byte[] bRcvData = frame.Buffer; + if (rcvdNow.StartsWith("TAG")) + { + //221123 chi 숫자로변경 + var tagnostr = rcvdNow.Substring(3); + if (int.TryParse(tagnostr, out int tagnoint)) + { + var Changed = !old_TagString.Equals(tagnostr); + data.TagString = tagnostr; + data.TagNo = tagnoint; + old_TagString = tagnostr; + DataReceive?.Invoke(this, new DataEventArgs(DataType.TAG)); + } + + WriteData(MakeCheckSum("ACKTAG")); + + } + else if (rcvdNow.StartsWith("CAL")) + { + + var tagnostr = encoding.GetString(bRcvData, 4, 4); + if (int.TryParse(tagnostr, out int tagnoint)) + { + var Changed = !old_CALString.Equals(tagnostr); + data.CallString = tagnostr; + data.CallNo = tagnoint; + old_CALString = tagnostr; + if (Changed) DataReceive?.Invoke(this, new DataEventArgs(DataType.CALL)); + } + WriteData(MakeCheckSum("ACKCAL")); + } + else if (rcvdNow.StartsWith("CCA")) //능동형 Call에 의하여 들어 오는 구문 + { + + var tagnostr = encoding.GetString(bRcvData, 4, 4); + if (int.TryParse(tagnostr, out int tagnoint)) + { + var Changed = !old_CCAString.Equals(tagnostr); + data.CCAString = tagnostr; + data.CCANo = tagnoint; + old_CCAString = tagnostr; + if (Changed) DataReceive?.Invoke(this, new DataEventArgs(DataType.CCA)); + } + WriteData(MakeCheckSum("ACKCCA")); + } + } + #endregion + + private string MakeCheckSum(string sCommand) + { + //sCommand = sCommand.ToUpper(); + + List buffer = new List(); + buffer.Add(0x02); + + //byte[] bCommand = System.Text.ASCIIEncoding.ASCII.GetBytes(sCommand); + buffer.AddRange(System.Text.ASCIIEncoding.ASCII.GetBytes(sCommand)); + + //make sum + int nSum = 0; + for (int nCnt = 1; nCnt < buffer.Count; nCnt++) + nSum += buffer[nCnt]; + + string sSum = nSum.ToString("X2").ToUpper();// Convert.ToString(nSum, 16).ToUpper(); + if (sSum.Length < 2) sSum = "0" + sSum; + sSum = sSum.Substring(sSum.Length - 2); + + //if (sSum.Length == 3) + // sSum = sSum.Remove(0, 1); + //else if (sSum.Length == 4) + // sSum = sSum.Remove(0, 2); + + buffer.AddRange(System.Text.ASCIIEncoding.Default.GetBytes(sSum)); + buffer.Add(0x03); + + // byte[] bStxEtx = { 0x02, 0x03 }; + + + + //var orgstr = (System.Text.ASCIIEncoding.ASCII.GetString(bStxEtx, 0, 1) + sCommand + sSum + System.Text.ASCIIEncoding.ASCII.GetString(bStxEtx, 1, 1)); + var newstr = System.Text.Encoding.Default.GetString(buffer.ToArray()); + return newstr; + + } + + ///// + ///// commandQueue에 명령을 추가합니다(체크섬은 자동 추가됨) + ///// + ///// 체크섬을 제외한 평문 + ///// sendlog 에 추가할 경우 true를 입력하세요 + //public void AddCommand(string cmd, bool addlog = true, int Repeat = 1) + //{ + // var fullcmd = MakeCheckSum(cmd); + // for (int i = 0; i < Repeat; i++) + // commandQueue.Enqueue(fullcmd); + // if (addlog) + // { + // Message?.Invoke(this, new MessageEventArgs() + // } + //} + + public enum eStopOpt + { + Stop = 0, + MarkStop, + MarkRotateLeft, + MarkRotateRight, + MarkChangeDirection, + } + public enum eRunOpt + { + NotSet, + Forward, + Backward, + } + + public enum ManulOpt + { + FS, + BS, + RT, + LT, + FL, + FR, + BL, + BR, + } + public enum Sensor + { + PBSOff = 0, + PBSOn, + AllOn, + } + public enum Speed + { + High, + Mid, + Low, + } + public enum LiftCommand + { + /// + /// lift up + /// + UP, + /// + /// lift down + /// + DN, + /// + /// lift 동작 정지 + /// + STP, + /// + /// magnet holder on + /// + ON, + /// + /// magnet holder off + /// + OFF + } + + + private bool CheckSum(byte[] bData) + { + if (bData.Length < 2) // 데이터 길이가 2이하일 경우 비정상 처리 + return false; + + int nSum = 0; + // byte[] bData = encoding.GetBytes(sData); + + for (int nCnt = 1; nCnt < bData.Length - 3; nCnt++) + { + nSum += bData[nCnt]; + } + + + string sSum = Convert.ToString(nSum, 16).ToUpper(); + + string sCSTemp = string.Empty; + + if (sSum.Length == 3) + sCSTemp = sSum.Remove(0, 1); + else if (sSum.Length == 4) + sCSTemp = sSum.Remove(0, 2); + + if (bData[bData.Length - 2] == '*' && bData[bData.Length - 3] == '*') + return true; + + if (sCSTemp[0] == (char)(bData[bData.Length - 3]) && sCSTemp[1] == (char)(bData[bData.Length - 2])) + return true; + else + return false; + } + + } + + +} diff --git a/Cs_HMI/SubProject/AGV/Properties/AssemblyInfo.cs b/Cs_HMI/SubProject/AGV/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e23ba39 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("BMS Commnunication Module")] +[assembly: AssemblyDescription("BMS Commnunication Module")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ATK4")] +[assembly: AssemblyProduct("BMS Commnunication Module")] +[assembly: AssemblyCopyright("Copyright ©ATK4 2020")] +[assembly: AssemblyTrademark("ATK4")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("7a94c30c-6772-4f71-bf9c-111071a1bc70")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 +// 기본값으로 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("20.03.09.0000")] +[assembly: AssemblyFileVersion("20.03.09.0000")] diff --git a/Cs_HMI/SubProject/AGV/Structure/AgvData.cs b/Cs_HMI/SubProject/AGV/Structure/AgvData.cs new file mode 100644 index 0000000..8faa844 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Structure/AgvData.cs @@ -0,0 +1,50 @@ +using System; + +namespace arDev +{ + public partial class Narumi + { + + public class AgvData + { + public char Sts { get; set; } + public char Speed { get; set; } + public char Direction { get; set; } + + public int guidesensor { get; set; } + + + public string TagString { get; set; } = string.Empty; + public int TagNo { get; set; } = -1; + public string CallString { get; set; } = string.Empty; + public int CallNo { get; set; } = -1; + public string CCAString { get; set; } = string.Empty; + public int CCANo { get; set; } = -1; + + + + + public override string ToString() + { + //모든사태값을 탭으로 구분하여 문자를 생성한다 + var sb = new System.Text.StringBuilder(); + + sb.AppendLine($"[Sts] : {Sts}"); + sb.AppendLine($"[Speed] : {Speed}"); + sb.AppendLine($"[Direction] : {Direction}"); + sb.AppendLine($"[guidesensor] : {guidesensor}"); + + sb.AppendLine($"[TagNo] : {TagNo}"); + sb.AppendLine($"[CallNo] : {CallNo}"); + sb.AppendLine($"[CCANo] : {CCANo}"); + + + return sb.ToString(); + } + + + } + } + + +} diff --git a/Cs_HMI/SubProject/AGV/Structure/ErrorFlag.cs b/Cs_HMI/SubProject/AGV/Structure/ErrorFlag.cs new file mode 100644 index 0000000..e8ebb06 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Structure/ErrorFlag.cs @@ -0,0 +1,99 @@ +using System; + +namespace arDev +{ + public partial class Narumi + { + + public class ErrorFlag + { + private COMM.Flag _value { get; set; } = new COMM.Flag(16); + public void SetValue(Int16 value) { this._value.writeValue(value); } + public UInt16 Value + { + get + { + return (UInt16)_value.Value; + } + } + public enum eflag + { + Emergency = 0, + Overcurrent, + Charger_run_error, + Charger_pos_error, + line_out_error = 4, + + /// + /// 기동시 자석 감지 에러 + /// + runerror_by_no_magent_line, + /// + /// 호출제어기 통신 오류 + /// + controller_comm_error = 11, + /// + /// 도착경보기 통신 오류 + /// + arrive_ctl_comm_error, + + /// + /// 자동문제어기 통신 오류 + /// + door_ctl_comm_error, + + /// + /// 자동충전기 통신 오류 + /// + charger_comm_error, + + /// + /// 교차로 제어기 통신 오류 + /// + cross_ctrl_comm_error, + } + + public bool GetValue(eflag idx) + { + return _value.Get((int)idx); + } + public bool GetChanged(eflag idx) + { + return _value.GetChanged((int)idx); + } + + public bool Emergency { get { return GetValue(eflag.Emergency); } } + public bool Overcurrent { get { return GetValue(eflag.Overcurrent); } } + public bool Charger_run_error { get { return GetValue(eflag.Charger_run_error); } } + public bool Charger_pos_error { get { return GetValue(eflag.Charger_pos_error); } } + public bool line_out_error { get { return GetValue(eflag.line_out_error); } } + public bool runerror_by_no_magent_line { get { return GetValue(eflag.runerror_by_no_magent_line); } } + public bool controller_comm_error { get { return GetValue(eflag.controller_comm_error); } } + public bool arrive_ctl_comm_error { get { return GetValue(eflag.arrive_ctl_comm_error); } } + public bool door_ctl_comm_error { get { return GetValue(eflag.door_ctl_comm_error); } } + public bool charger_comm_error { get { return GetValue(eflag.charger_comm_error); } } + public bool cross_ctrl_comm_error { get { return GetValue(eflag.cross_ctrl_comm_error); } } + public override string ToString() + { + //모든사태값을 탭으로 구분하여 문자를 생성한다 + var sb = new System.Text.StringBuilder(); + for (int i = 0; i < 16; i++) + { + var def = Enum.IsDefined(typeof(eflag), i); + if (def) + { + var flag = (eflag)i; + var value = _value.Get(i); + sb.AppendLine($"[{i:00}][{flag}] : {value}"); + } + + + } + return sb.ToString(); + } + } + + } + + +} diff --git a/Cs_HMI/SubProject/AGV/Structure/Signals.cs b/Cs_HMI/SubProject/AGV/Structure/Signals.cs new file mode 100644 index 0000000..42677cb --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Structure/Signals.cs @@ -0,0 +1,72 @@ +using System; + +namespace arDev +{ + public partial class Narumi + { + + public class Signal + { + private COMM.Flag _value { get; set; } = new COMM.Flag(16); + public void SetValue(Int16 value) { this._value.writeValue(value); } + public UInt16 Value + { + get + { + return (UInt16)_value.Value; + } + } + public enum eflag + { + front_gate_out = 0, + rear_sensor_out, + mark_sensor_1, + mark_sensor_2, + front_left_sensor, + front_right_sensor, + front_center_sensor, + charger_align_sensor, + } + + public bool GetValue(eflag idx) + { + return _value.Get((int)idx); + } + public bool GetChanged(eflag idx) + { + return _value.GetChanged((int)idx); + } + + public Boolean front_gate_out { get { return GetValue(eflag.front_gate_out); } } + public Boolean rear_sensor_out { get { return GetValue(eflag.rear_sensor_out); } } + public Boolean mark_sensor_1 { get { return GetValue(eflag.mark_sensor_1); } } + public Boolean mark_sensor_2 { get { return GetValue(eflag.mark_sensor_2); } } + public Boolean mark_sensor { get { return mark_sensor_1 || mark_sensor_2; } } + public Boolean front_left_sensor { get { return GetValue(eflag.front_left_sensor); } } + public Boolean front_right_sensor { get { return GetValue(eflag.front_right_sensor); } } + public Boolean front_center_sensor { get { return GetValue(eflag.front_center_sensor); } } + public Boolean charger_align_sensor { get { return GetValue(eflag.charger_align_sensor); } } + public override string ToString() + { + //모든사태값을 탭으로 구분하여 문자를 생성한다 + var sb = new System.Text.StringBuilder(); + for (int i = 0; i < 16; i++) + { + var def = Enum.IsDefined(typeof(eflag), i); + if(def) + { + var flag = (eflag)i; + var value = _value.Get(i); + sb.AppendLine($"[{i:00}][{flag}] : {value}"); + } + + } + return sb.ToString(); + } + + } + + } + + +} diff --git a/Cs_HMI/SubProject/AGV/Structure/SystemFlag0.cs b/Cs_HMI/SubProject/AGV/Structure/SystemFlag0.cs new file mode 100644 index 0000000..5e3b2ba --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Structure/SystemFlag0.cs @@ -0,0 +1,77 @@ +using System; + +namespace arDev +{ + public partial class Narumi + { + + public class SystemFlag0 + { + private COMM.Flag _value { get; set; } = new COMM.Flag(16); + public void SetValue(Int16 value) { this._value.writeValue(value); } + public UInt16 Value + { + get + { + return (UInt16)_value.Value; + } + } + + public enum eflag + { + Memory_RW_State = 5, + EXT_IO_Conn_State, + RFID_Conn_State, + M5E_Module_Run_State = 8, + Front_Ultrasonic_Conn_State, + Front_Untrasonic_Sensor_State, + Side_Ultrasonic_Conn_State, + Side_Ultrasonic_Sensor_State = 12, + Front_Guide_Sensor_State, + Rear_Guide_Sensor_State, + Battery_Level_Check + } + + public bool GetValue(eflag idx) + { + return _value.Get((int)idx); + } + public bool GetChanged(eflag idx) + { + return _value.GetChanged((int)idx); + } + public bool Memory_RW_State { get { return GetValue(eflag.Memory_RW_State); } } + public bool EXT_IO_Conn_State { get { return GetValue(eflag.EXT_IO_Conn_State); } } + public bool RFID_Conn_State { get { return GetValue(eflag.RFID_Conn_State); } } + public bool M5E_Module_Run_State { get { return GetValue(eflag.M5E_Module_Run_State); } } + public bool Front_Ultrasonic_Conn_State { get { return GetValue(eflag.Front_Ultrasonic_Conn_State); } } + public bool Front_Untrasonic_Sensor_State { get { return GetValue(eflag.Front_Untrasonic_Sensor_State); } } + public bool Side_Ultrasonic_Conn_State { get { return GetValue(eflag.Side_Ultrasonic_Conn_State); } } + public bool Side_Ultrasonic_Sensor_State { get { return GetValue(eflag.Side_Ultrasonic_Sensor_State); } } + public bool Front_Guide_Sensor_State { get { return GetValue(eflag.Front_Guide_Sensor_State); } } + public bool Rear_Guide_Sensor_State { get { return GetValue(eflag.Rear_Guide_Sensor_State); } } + public bool Battery_Level_Check { get { return GetValue(eflag.Battery_Level_Check); } } + + public override string ToString() + { + //모든사태값을 탭으로 구분하여 문자를 생성한다 + var sb = new System.Text.StringBuilder(); + for(int i = 0; i < 16; i++) + { + var def = Enum.IsDefined(typeof(eflag), i); + if (def) + { + var flag = (eflag)i; + var value = _value.Get(i); + sb.AppendLine($"[{i:00}][{flag}] : {value}"); + } + + } + return sb.ToString(); + } + } + + } + + +} diff --git a/Cs_HMI/SubProject/AGV/Structure/SystemFlag1.cs b/Cs_HMI/SubProject/AGV/Structure/SystemFlag1.cs new file mode 100644 index 0000000..2207285 --- /dev/null +++ b/Cs_HMI/SubProject/AGV/Structure/SystemFlag1.cs @@ -0,0 +1,97 @@ +using System; + +namespace arDev +{ + public partial class Narumi + { + + public class SystemFlag1 + { + private COMM.Flag _value { get; set; } = new COMM.Flag(16); + public void SetValue(Int16 value) { this._value.writeValue(value); } + + public UInt16 Value + { + get + { + return (UInt16)_value.Value; + } + } + public enum eflag + { + Side_Detect_Ignore = 3, + Melody_check, + Mark2_check, + Mark1_check, + gateout_check, + Battery_charging = 8, + re_Start, + + /// + /// 전방 감지 무시 + /// + front_detect_ignore, + + /// + /// 전방장애물감지상태 + /// + front_detect_check, + + /// + /// 전방감지 후 정지 상태 + /// + stop_by_front_detect = 12, + /// + /// 교차로 진입 후 정지 상태 + /// + stop_by_cross_in, + agv_stop, + agv_run + } + + public bool GetValue(eflag idx) + { + return _value.Get((int)idx); + } + public bool GetChanged(eflag idx) + { + return _value.GetChanged((int)idx); + } + public bool Side_Detect_Ignore { get { return GetValue(eflag.Side_Detect_Ignore); } } + public bool Melody_check { get { return GetValue(eflag.Melody_check); } } + public bool Mark2_check { get { return GetValue(eflag.Mark2_check); } } + public bool Mark1_check { get { return GetValue(eflag.Mark1_check); } } + public bool gateout_check { get { return GetValue(eflag.gateout_check); } } + public bool Battery_charging { get { return GetValue(eflag.Battery_charging); } } + public bool re_Start { get { return GetValue(eflag.re_Start); } } + public bool front_detect_ignore { get { return GetValue(eflag.front_detect_ignore); } } + public bool front_detect_check { get { return GetValue(eflag.front_detect_check); } } + public bool stop_by_front_detect { get { return GetValue(eflag.stop_by_front_detect); } } + public bool stop_by_cross_in { get { return GetValue(eflag.stop_by_cross_in); } } + public bool agv_stop { get { return GetValue(eflag.agv_stop); } } + public bool agv_run { get { return GetValue(eflag.agv_run); } } + public bool agv_run_manual { get; set; } + public override string ToString() + { + //모든사태값을 탭으로 구분하여 문자를 생성한다 + var sb = new System.Text.StringBuilder(); + for (int i = 0; i < 16; i++) + { + var def = Enum.IsDefined(typeof(eflag), i); + if (def) + { + var flag = (eflag)i; + var value = _value.Get(i); + sb.AppendLine($"[{i:00}][{flag}] : {value}"); + } + + } + return sb.ToString(); + } + + } + + } + + +} diff --git a/Cs_HMI/SubProject/AGVControl/BatteryLevelGauge.Designer.cs b/Cs_HMI/SubProject/AGVControl/BatteryLevelGauge.Designer.cs new file mode 100644 index 0000000..80eb48e --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/BatteryLevelGauge.Designer.cs @@ -0,0 +1,37 @@ + +namespace AGVControl +{ + partial class BatteryLevelGauge + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/AGVControl/BatteryLevelGauge.cs b/Cs_HMI/SubProject/AGVControl/BatteryLevelGauge.cs new file mode 100644 index 0000000..e6e371f --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/BatteryLevelGauge.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AGVControl +{ + public partial class BatteryLevelGauge : Control + { + float _vlevel = 50; + public float VLevel { get { return _vlevel; } set { _vlevel = value; } } + public float Volt { get; set; } = 0; + public String sign { get; set; } = "%"; + public float CurA { get; set; } = 0; + public float MaxA { get; set; } = 0; + + bool isopen = false; + public Boolean IsOpen { get { return isopen; } set { isopen = value; this.Invalidate(); } } + + public Color BorderColor { get; set; } = Color.DimGray; + + public BatteryLevelGauge() + { + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + this.Resize += arLabel_Resize; + } + + + protected override void OnPaint(PaintEventArgs pe) + { + pe.Graphics.InterpolationMode = InterpolationMode.High; + pe.Graphics.SmoothingMode = SmoothingMode.AntiAlias; + pe.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + + //base.OnPaint(pe); + pe.Graphics.FillRectangle(new SolidBrush(BackColor), DisplayRectangle); + + var r = new RectangleF(this.DisplayRectangle.Left + Padding.Left, + this.DisplayRectangle.Top + Padding.Top, + this.DisplayRectangle.Width - Padding.Left - Padding.Right, + this.DisplayRectangle.Height - Padding.Top - Padding.Bottom); + + pe.Graphics.FillRectangle(new SolidBrush(this.BackColor), r); + + + var w = r.Width * (this.VLevel / 100f); + var lr = new RectangleF(r.Left, r.Top, w, r.Height); + + Color bColor = Color.Red; + if (VLevel > 80) bColor = Color.YellowGreen; + else if (VLevel > 60) bColor = Color.Yellow; + else if (VLevel > 40) bColor = Color.Orange; + else if (VLevel > 20) bColor = Color.Tomato; + else bColor = Color.Red; + pe.Graphics.FillRectangle(new SolidBrush(bColor), lr); + + Color textcolor = this.ForeColor; + if (IsOpen == false) textcolor = Color.Black; + var smg = IsOpen ? $"{ this.VLevel:N0}{ this.sign}" : "연결안됨"; + + pe.Graphics.DrawString(smg, this.Font, new SolidBrush(textcolor), r, + new StringFormat + { + Alignment = StringAlignment.Center, + LineAlignment = StringAlignment.Center + }); + + pe.Graphics.DrawRectangle(Pens.Black, r.Left, r.Top, r.Width, r.Height); + + + } + void arLabel_Resize(object sender, EventArgs e) + { + Invalidate(); + } + } +} diff --git a/Cs_HMI/SubProject/AGVControl/GuideSensor.Designer.cs b/Cs_HMI/SubProject/AGVControl/GuideSensor.Designer.cs new file mode 100644 index 0000000..6e879bd --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/GuideSensor.Designer.cs @@ -0,0 +1,37 @@ + +namespace Narumi.UC +{ + partial class GuideSensor + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/AGVControl/GuideSensor.cs b/Cs_HMI/SubProject/AGVControl/GuideSensor.cs new file mode 100644 index 0000000..ad196f6 --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/GuideSensor.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Narumi.UC +{ + public partial class GuideSensor : Control + { + public int SensorValue { get; set; } = 0; + public bool LMark { get; set; } = false; + public bool RMark { get; set; } = false; + + public GuideSensor() + { + InitializeComponent(); + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + this.Resize += arLabel_Resize; + } + void arLabel_Resize(object sender, EventArgs e) + { + Invalidate(); + } + + protected override void OnPaint(PaintEventArgs pe) + { + var boxcount = 11; + + var r = new RectangleF(this.DisplayRectangle.Left + Padding.Left, + this.DisplayRectangle.Top + Padding.Top, + this.DisplayRectangle.Width - Padding.Left - Padding.Right, + this.DisplayRectangle.Height - Padding.Top - Padding.Bottom); + + var term = 3; + var w = ((r.Width -1) - (term * (boxcount - 1))) / boxcount; + var h = r.Height -1; + + pe.Graphics.FillRectangle(new SolidBrush(this.BackColor), this.DisplayRectangle); + //pe.Graphics.DrawRectangle(Pens.Red, r.Left, r.Top, r.Width, r.Height); + + for (int i = 0; i < boxcount; i++) + { + var x = r.Left + i * term + i * w; + var y = r.Top; + var r2 = new RectangleF(x, y, w, h); + + if (this.Enabled == false) + { + pe.Graphics.FillRectangle(Brushes.LightGray, r2); + } + else + { + + if (i == 0) + { + if (LMark) + pe.Graphics.FillRectangle(Brushes.SkyBlue, r2); + else + pe.Graphics.FillRectangle(Brushes.LightGray, r2); + } + else if (i == 9) + { + if (RMark) + pe.Graphics.FillRectangle(Brushes.SkyBlue, r2); + else + pe.Graphics.FillRectangle(Brushes.LightGray, r2); + } + else + { + if (SensorValue == i) + pe.Graphics.FillRectangle(Brushes.Tomato, r2); + else + pe.Graphics.FillRectangle(Brushes.LightGray, r2); + } + + pe.Graphics.DrawRectangle(Pens.DimGray, r2.Left,r2.Top,r2.Width,r2.Height); + + if (i == 0 || i == 10) + { + pe.Graphics.DrawString("M/K", this.Font, + new SolidBrush(this.ForeColor), r2, + new StringFormat + { + Alignment = StringAlignment.Center, + LineAlignment = StringAlignment.Center + }); + } + } + + } + } + } +} diff --git a/Cs_HMI/SubProject/AGVControl/MyRadioButton.Designer.cs b/Cs_HMI/SubProject/AGVControl/MyRadioButton.Designer.cs new file mode 100644 index 0000000..74af0ba --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/MyRadioButton.Designer.cs @@ -0,0 +1,37 @@ + +namespace AGVControl +{ + partial class MyRadioButton + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/AGVControl/MyRadioButton.cs b/Cs_HMI/SubProject/AGVControl/MyRadioButton.cs new file mode 100644 index 0000000..8843fe2 --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/MyRadioButton.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AGVControl +{ + public partial class MyRadioButton : RadioButton + { + public int CheckWidth { get; set; } = 30; + public Color CheckOnColor { get; set; } = Color.OrangeRed; + public Color CheckOffColor { get; set; } = Color.DimGray; + public Color Bordercolor { get; set; } = Color.DimGray; + public int BorderSize { get; set; } = 2; + public int BorderRadius { get; set; } = 7; + public MyRadioButton() + { + InitializeComponent(); + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + this.Resize += arLabel_Resize; + } + + protected override void OnPaint(PaintEventArgs pe) + { + pe.Graphics.InterpolationMode = InterpolationMode.High; + pe.Graphics.SmoothingMode = SmoothingMode.AntiAlias; + pe.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + + pe.Graphics.Clear(this.BackColor); + + var XPosition = this.DisplayRectangle.Left; + var YPosition = this.DisplayRectangle.Top; + using (GraphicsPath Path = new GraphicsPath()) + { + Path.AddLine(XPosition + BorderRadius, YPosition, XPosition + Width - (BorderRadius * 2), YPosition); + Path.AddArc(XPosition + Width - (BorderRadius * 2), YPosition, BorderRadius * 2, BorderRadius * 2, 270, 90); + Path.AddLine(XPosition + Width, YPosition + BorderRadius, XPosition + Width, YPosition + Height - (BorderRadius * 2)); + Path.AddArc(XPosition + Width - (BorderRadius * 2), YPosition + Height - (BorderRadius * 2), BorderRadius * 2, BorderRadius * 2, 0, 90); + Path.AddLine(XPosition + Width - (BorderRadius * 2), YPosition + Height, XPosition + BorderRadius, YPosition + Height); + Path.AddArc(XPosition, YPosition + Height - (BorderRadius * 2), BorderRadius * 2, BorderRadius * 2, 90, 90); + Path.AddLine(XPosition, YPosition + Height - (BorderRadius * 2), XPosition, YPosition + BorderRadius); + Path.AddArc(XPosition, YPosition, BorderRadius * 2, BorderRadius * 2, 180, 90); + Path.CloseFigure(); + + + + + var r1 = new Rectangle( + DisplayRectangle.Left, DisplayRectangle.Top, + CheckWidth, + DisplayRectangle.Height - 1); + var r2 = new Rectangle(r1.Right + 3, r1.Top, DisplayRectangle.Width - r1.Width - 3 - Padding.Right, r1.Height); + var CC = Checked ? CheckOnColor : CheckOffColor; + pe.Graphics.FillRectangle(new SolidBrush(CC), r1); + StringFormat sf = new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }; + if (this.TextAlign == ContentAlignment.MiddleLeft) sf.Alignment = StringAlignment.Near; + else if (this.TextAlign == ContentAlignment.MiddleRight) sf.Alignment = StringAlignment.Far; + pe.Graphics.DrawString(this.Text, this.Font, new SolidBrush(ForeColor), r2, sf); + //pe.Graphics.DrawRectangle(new Pen(this.Bordercolor, this.BorderSize), DisplayRectangle); + this.Region = new System.Drawing.Region(Path); + + + pe.Graphics.DrawPath(new Pen(this.Bordercolor, this.BorderSize), Path); + + + + } + } + void arLabel_Resize(object sender, EventArgs e) + { + Invalidate(); + } + } +} diff --git a/Cs_HMI/SubProject/AGVControl/Properties/AssemblyInfo.cs b/Cs_HMI/SubProject/AGVControl/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..53f3556 --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("AGVControl")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AGVControl")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("8cb883c0-99c3-4dd4-b017-f9b92010a806")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 +// 기본값으로 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/SubProject/AGVControl/RoundButton.Designer.cs b/Cs_HMI/SubProject/AGVControl/RoundButton.Designer.cs new file mode 100644 index 0000000..7c57131 --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/RoundButton.Designer.cs @@ -0,0 +1,37 @@ + +namespace AGVControl +{ + partial class RoundButton + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/AGVControl/RoundButton.cs b/Cs_HMI/SubProject/AGVControl/RoundButton.cs new file mode 100644 index 0000000..ad8352b --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/RoundButton.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AGVControl +{ + public partial class RoundButton : Button + { + public int CornerRadius { get; set; } = 7; + public RoundButton() + { + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + this.Resize += arLabel_Resize; + } + + protected override void OnPaint(PaintEventArgs pevent) + { + pevent.Graphics.InterpolationMode = InterpolationMode.High; + pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias; + pevent.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; + + var XPosition = this.DisplayRectangle.Left; + var YPosition = this.DisplayRectangle.Top; + using (GraphicsPath Path = new GraphicsPath()) + { + Path.AddLine(XPosition + CornerRadius, YPosition, XPosition + Width - (CornerRadius * 2), YPosition); + Path.AddArc(XPosition + Width - (CornerRadius * 2), YPosition, CornerRadius * 2, CornerRadius * 2, 270, 90); + Path.AddLine(XPosition + Width, YPosition + CornerRadius, XPosition + Width, YPosition + Height - (CornerRadius * 2)); + Path.AddArc(XPosition + Width - (CornerRadius * 2), YPosition + Height - (CornerRadius * 2), CornerRadius * 2, CornerRadius * 2, 0, 90); + Path.AddLine(XPosition + Width - (CornerRadius * 2), YPosition + Height, XPosition + CornerRadius, YPosition + Height); + Path.AddArc(XPosition, YPosition + Height - (CornerRadius * 2), CornerRadius * 2, CornerRadius * 2, 90, 90); + Path.AddLine(XPosition, YPosition + Height - (CornerRadius * 2), XPosition, YPosition + CornerRadius); + Path.AddArc(XPosition, YPosition, CornerRadius * 2, CornerRadius * 2, 180, 90); + Path.CloseFigure(); + this.Region = new System.Drawing.Region(Path); + } + base.OnPaint(pevent); + } + + void arLabel_Resize(object sender, EventArgs e) + { + Invalidate(); + } + + } +} diff --git a/Cs_HMI/SubProject/AGVControl/ValueSelect.Designer.cs b/Cs_HMI/SubProject/AGVControl/ValueSelect.Designer.cs new file mode 100644 index 0000000..24f89d2 --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/ValueSelect.Designer.cs @@ -0,0 +1,36 @@ +namespace AGVControl +{ + partial class ValueSelect + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/AGVControl/ValueSelect.cs b/Cs_HMI/SubProject/AGVControl/ValueSelect.cs new file mode 100644 index 0000000..67f6ea2 --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/ValueSelect.cs @@ -0,0 +1,262 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.Remoting.Messaging; +using System.Text; +using System.Windows.Forms; + +namespace AGVControl +{ + public partial class ValueSelect : Control + { + public ValueSelect() + { + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + this.Resize += arLabel_Resize; + this.MouseClick += ValueSelect_MouseClick; + this.MouseEnter += (s1, e1) => { this.Cursor = Cursors.Hand; }; + this.MouseLeave += (s1, e1) => { this.Cursor = Cursors.Default; }; + } + + private void ValueSelect_MouseClick(object sender, MouseEventArgs e) + { + //마우스클릭 + if (rectLButton.IsEmpty == false && rectLButton.Contains(e.Location)) + { + if (SideButtonClickValue != 0.0) + { + var newvalue = this.Value - SideButtonClickValue; + if (newvalue < MinValue) newvalue = MinValue; + this.Value = newvalue; + } + + if (ButtonClick != null) ButtonClick(this, new ButtonClickEventArgs(MouseButtons.Left)); + } + + + if (rectRButton.IsEmpty == false && rectRButton.Contains(e.Location)) + { + if (SideButtonClickValue != 0.0) + { + var newvalue = this.Value + SideButtonClickValue; + if (newvalue > MaxValue) newvalue = MaxValue; + this.Value = newvalue; + } + + if (ButtonClick != null) ButtonClick(this, new ButtonClickEventArgs(MouseButtons.Right)); + } + + + if (rectCButton.IsEmpty == false && rectCButton.Contains(e.Location)) + if (ButtonClick != null) ButtonClick(this, new ButtonClickEventArgs(MouseButtons.Middle)); + } + + private Rectangle rectLButton; + private Rectangle rectRButton; + private Rectangle rectCButton; + private Boolean bMakeRect = true; + + private double _minvalue = 0.0; + private double _maxvalue = 9999999999.0; + public double MinValue { get { return _minvalue; } set { _minvalue = value; Invalidate(); } } + + public double MaxValue { get { return _maxvalue; } set { _maxvalue = value; Invalidate(); } } + + + + private UInt16 _decimalposition = 0; + private string _buttonwdith = string.Empty; + private double _value = 0; + private Color _border = Color.Lime; + private double buttongabp; + public double SideButtonClickValue { get { return buttongabp; } set { buttongabp = value; Invalidate(); } } + + private Color _backbutton = Color.White; + private Color _sidebutto = Color.Black; + + public Color BackColorButton { get { return _backbutton; } set { _backbutton = value; Invalidate(); } } + public Color ForeColorButton { get { return _sidebutto; } set { _sidebutto = value; Invalidate(); } } + + + + public Color ColorBorder { get { return _border; } set { _border = value; Invalidate(); } } + + public override string Text + { + get => Value.ToString(); + set + { + if (double.TryParse(value, out double dblval) == true) + this.Value = dblval; + } + } + + public double Value + { + get { return _value; } + set + { + if (_value != value) + { + //이 값이 범위를 초과했는지 확인 + if (value < MinValue) + { + _value = MinValue; + //throw new Exception(string.Format("입력값이 컨트롤의 최소값보다 작습니다(입력:{0},최소값:{1})",value,MinValue)); + } + else if (value > MaxValue) + { + _value = MaxValue; + //throw new Exception(string.Format("입력값이 컨트롤의 최대값보다 작습니다(입력:{0},최대값:{1})", value, MaxValue)); + } + else + { + _value = value; + + } + Invalidate(); + if (ValueChanged != null) ValueChanged(this, new EventArgs()); + } + } + } + public UInt16 DecimalPosition { get { return _decimalposition; } set { _decimalposition = value; Invalidate(); } } + public string ButtonWidth { get { return _buttonwdith; } set { _buttonwdith = value; Invalidate(); } } + + private string _nulldisplay = string.Empty; + public string NullDisplay { get { return _nulldisplay; } set { _nulldisplay = value; Invalidate(); } } + + private Font _sidefont; + public Font FontSideButton { get { if (_sidefont == null) return this.Font; else return _sidefont; } set { _sidefont = value; Invalidate(); } } + + void arLabel_Resize(object sender, EventArgs e) + { + this.bMakeRect = true; + Invalidate(); + } + + public class ButtonClickEventArgs : EventArgs + { + public MouseButtons Button; + public ButtonClickEventArgs(MouseButtons button) + { + this.Button = button; + // Console.WriteLine("button clickc : " +button.ToString()); + } + } + + public event EventHandler ButtonClick; + public event EventHandler ValueChanged; + + protected override void OnPaint(PaintEventArgs pe) + { + //base.OnPaint(pe); + if (bMakeRect) MakeRect(); + + + + StringFormat sf = new StringFormat(); + sf.Alignment = StringAlignment.Center; + sf.LineAlignment = StringAlignment.Center; + sf.Trimming = StringTrimming.None; + sf.FormatFlags = StringFormatFlags.NoWrap; + + //좌측버튼표시 + if (rectLButton.IsEmpty == false) + { + pe.Graphics.FillRectangle(new SolidBrush(BackColorButton), rectLButton); + pe.Graphics.DrawString("<<", this.FontSideButton, new SolidBrush(this.ForeColorButton), rectLButton, sf); + } + + if (rectRButton.IsEmpty == false) + { + pe.Graphics.FillRectangle(new SolidBrush(BackColorButton), rectRButton); + pe.Graphics.DrawString(">>", this.FontSideButton, new SolidBrush(this.ForeColorButton), rectRButton, sf); + } + + //값표시 + string valuestr; + if (Value == 0.0 && string.IsNullOrEmpty(NullDisplay) == false) + valuestr = NullDisplay; + else + valuestr = Value.ToString("N" + DecimalPosition.ToString()); + + pe.Graphics.FillRectangle(new SolidBrush(BackColor), rectCButton); + pe.Graphics.DrawString(valuestr, this.Font, new SolidBrush(this.ForeColor), rectCButton, sf); + sf.Dispose(); + + + //테두리표시 + if (rectLButton.IsEmpty == false) + pe.Graphics.DrawRectangle(new Pen(ColorBorder), rectLButton); + if (rectRButton.IsEmpty == false) + pe.Graphics.DrawRectangle(new Pen(ColorBorder), rectRButton); + pe.Graphics.DrawRectangle(new Pen(ColorBorder), rectCButton); + } + + void MakeRect() + { + int bWidth; + if (string.IsNullOrEmpty(ButtonWidth) == false) + { + if (ButtonWidth.EndsWith("%")) + { + if (int.TryParse(ButtonWidth.Substring(0, ButtonWidth.Length - 1), out bWidth) == false) + bWidth = 0; //숫자로 바꾸는거 실패 + else bWidth = (int)(this.DisplayRectangle.Width * (bWidth / 100.0)); + } + else + { + if (int.TryParse(ButtonWidth, out bWidth) == false) + bWidth = 0; + } + } + else bWidth = 0; + + if (bWidth > 0) + { + int buttongap = 1; + //각버튼간 2px 간격을 띄운다. + bWidth = bWidth - buttongap * 2; + rectLButton = new Rectangle( + DisplayRectangle.Left, + DisplayRectangle.Top, + bWidth, + DisplayRectangle.Height - 1); + + rectCButton = new Rectangle( + rectLButton.Right + buttongap, + DisplayRectangle.Top, + DisplayRectangle.Width - rectLButton.Width * 2 - buttongap * 2, + DisplayRectangle.Height - 1); + + rectRButton = new Rectangle( + rectCButton.Right + buttongap, + DisplayRectangle.Top, + bWidth - 1, + DisplayRectangle.Height - 1); + } + else + { + rectLButton = Rectangle.Empty; + rectRButton = Rectangle.Empty; + rectCButton = new Rectangle(DisplayRectangle.Left, + DisplayRectangle.Top, + DisplayRectangle.Width - 1, + DisplayRectangle.Height - 1); + } + bMakeRect = true; + } + } +} diff --git a/Cs_HMI/SubProject/AGVControl/agvControl.csproj b/Cs_HMI/SubProject/AGVControl/agvControl.csproj new file mode 100644 index 0000000..1857bcc --- /dev/null +++ b/Cs_HMI/SubProject/AGVControl/agvControl.csproj @@ -0,0 +1,81 @@ + + + + + Debug + AnyCPU + {8CB883C0-99C3-4DD4-B017-F9B92010A806} + Library + Properties + AGVControl + AGVControl + v4.8 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + Component + + + BatteryLevelGauge.cs + + + Component + + + GuideSensor.cs + + + Component + + + MyRadioButton.cs + + + + Component + + + RoundButton.cs + + + Component + + + ValueSelect.cs + + + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/CommData/CommData.csproj b/Cs_HMI/SubProject/CommData/CommData.csproj new file mode 100644 index 0000000..2140b9f --- /dev/null +++ b/Cs_HMI/SubProject/CommData/CommData.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {14E8C9A5-013E-49BA-B435-EFEFC77DD623} + Library + Properties + VarData + VarData + v4.8 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/CommData/Enum.cs b/Cs_HMI/SubProject/CommData/Enum.cs new file mode 100644 index 0000000..295b01a --- /dev/null +++ b/Cs_HMI/SubProject/CommData/Enum.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace COMM +{ + public enum eVarInt32 + { + PickOnCount = 0, + PickOfCount, + LPickOnCount, + SumQty, + ChargeWaitSec, + + } + public enum eVarUInt32 + { + Spare=0, + } + + public enum eVarDBL + { + LeftJogSpeed, + RightJogSpeed, + CurrentLeftJogSpeed, + CurrentRightJogSpeed, + SpeedOffsetCW, + SpeedOffsetCCW, + MaxSpeedCW, + MaxSpeedCCW, + SQLConnection, + } + + public enum eVarByte + { + None = 0, + /// + /// 충전명련전송횟수 + /// + CHARGE_CMDCNT, + ButtonJog, + DataIndex , + } + + public enum eVarBool + { + //comm area start(0~31) + None = 0, + DebugMode, + SQLCONN, + + //plc area start (32~63) + FLAG_STOPZ = 32, + FLAG_SETUP, + FLAG_SYNC, + FLAG_WAIT, + /// + /// 상태머신이 동작중인가 + /// 장비동작은 AGV_RUN 플래그를 확인 하세요. + /// + FLAG_AUTORUN, + FLAG_MANUALRUN, + FLAG_LIMITHIGH, + FLAG_LIMITLOW, + FLAG_POWERLOSS, + + /// + /// AGV 진행방향(UP = backward, DOWN = forward) + /// + AGVDIR_UP, + + /// + /// 마크센서가 감지되면 활성화됨 + /// (알림용으로도 쓰니 삭제 안됨) + /// + MARK_SENSOR, + MARK_SENSOROFF, + FLAG_LEFT_RUN, + FLAG_RIGHT_RUN, + FLAG_RUN_CMD, + FLAG_GO_CHAGER, + FLAG_NEXTSTOP_ALIGN, + NEXTSTOP_MARK, + + /// + /// mark 1 혹은 2 의 값이 들어오면 설정됨 + /// + //SENSOR_MARK, + CHG_POSERR, + FLAG_CHARGEONA, + FLAG_CHARGEONM, + OVERLOAD, + OVERLOADL, + OVERLOADR, + BATTERY_LOW, + BATTERY_HIGH, + MINSPACE, + CHARGE_CMDCNT, + CHARGE_READY, + CHARGE_WAIT, + + AGV_ERROR, + WAIT_COVER_DOWN, + WAIT_COVER_UP, + EMERGENCY, + + ITEMON, + + + /// + /// 충전시작명령을 전송했다 + /// + WAIT_CHARGEACK, + + + //agv area start ( 64 ~ 95) + + + //area start (96~127) + + } + + public enum eVarString + { + + MCStatus, + DataIndex, + StatusMessage, + JOBType, + JOBCustCode, + SWVersion, + ChargeCheckMsg, + } + + public enum eVarTime + { + LastConnTry_PLC, + LastConn_PLC, + LastRecv_PLC, + + LastConnTry_XBE, + LastConn_XBE, + LastRecv_XBE, + + LastConnTry_BAT, + LastConn_BAT, + LastRecv_BAT, + LastSend_CMD, + LastSend_BAT, + + LastConnTry_AGV, + LastConn_AGV, + LastRecv_AGV, + + /// + /// 상태머신이 IDLE 전환시 설정 + /// + IdleStart, + /// + /// 충전시도시 설정 + /// + ChargeTry, + /// + /// 충전시작(확인)시 설정 + /// + ChargeStart, + + /// + /// 충전종료시점 + /// + ChargeEnd, + /// + /// 장비가동중 READY상태 전환시 설정 + /// + ReadyStart, + + MarkSensorOff, + + /// + /// 상태머신이 RUN되는 경우에 설정 + /// 단 세부스텝이 READY 인 경우는 제외 + /// + RunStart, + + SendChargeOff, + ChargeSearch, + + BatWarnTime, + IdleStopTime, + StatusReporttime, + } + + + +} diff --git a/Cs_HMI/SubProject/CommData/Flag.cs b/Cs_HMI/SubProject/CommData/Flag.cs new file mode 100644 index 0000000..360708d --- /dev/null +++ b/Cs_HMI/SubProject/CommData/Flag.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace COMM +{ + public class Flag + { + public Boolean IsInit; //H/W설정이 안된경우에만 FALSE로 한다 + public string errorMessage; + + public int PortCount; + private UInt64 _value; + private UInt64 _changed; + public string[] Name; + + public UInt64 Value { get { return _value; } } + + public event EventHandler ValueChanged; + public class ValueEventArgs : EventArgs + { + private int _arridx; + private Boolean _oldvalue; + private Boolean _newvalue; + + public int ArrIDX { get { return _arridx; } } + public Boolean OldValue { get { return _oldvalue; } } + public Boolean NewValue { get { return _newvalue; } } + + public ValueEventArgs(int arridx, Boolean oldvalue, Boolean newvalue) + { + _arridx = arridx; + _oldvalue = oldvalue; + _newvalue = newvalue; + } + } + + public Flag(int pcnt) + { + if (pcnt > 64) throw new Exception("Max count is 64"); + PortCount = pcnt; + IsInit = true; + errorMessage = string.Empty; + _value = 0; + _changed = 0; + Name = new string[PortCount]; + for (int i = 0; i < Name.Length; i++) + { + Name[i] = string.Empty; + } + } + + public void writeValue(Int16 val) + { + var NewValue = (ulong)val; + _changed = this._value ^ NewValue; + this._value = NewValue; + } + + //private Boolean readValue(ref UInt64 value, int idx) + //{ + // var offset = (UInt64)(1 << idx); + // return ((value & offset) != 0); + //} + + public Boolean Get(int idx) + { + var offset = (UInt64)(1 << idx); + return (_value & offset) != 0; + } + + /// + /// 변경여부를 확인 합니다 + /// + /// + /// + public Boolean GetChanged(int idx) + { + var offset = (UInt64)(1 << idx); + return (this._changed & offset) != 0; + } + + public void Set(int idx, Boolean value) + { + var oldvalue = Get(idx); + + if (value) + { + var offset = (UInt64)(1 << idx); + _value = _value | offset; + } + else + { + var offset = (UInt64)(~(1 << idx)); + _value = _value & offset; + } + + if (oldvalue != value) + { + if (ValueChanged != null) + ValueChanged(this, new ValueEventArgs(idx, oldvalue, value)); + } + } + + + } +} diff --git a/Cs_HMI/SubProject/CommData/Properties/AssemblyInfo.cs b/Cs_HMI/SubProject/CommData/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..428bb8c --- /dev/null +++ b/Cs_HMI/SubProject/CommData/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("VarData")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("VarData")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("14e8c9a5-013e-49ba-b435-efefc77dd623")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 +// 기본값으로 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/SubProject/CommData/RS232.cs b/Cs_HMI/SubProject/CommData/RS232.cs new file mode 100644 index 0000000..e3f9c7a --- /dev/null +++ b/Cs_HMI/SubProject/CommData/RS232.cs @@ -0,0 +1,487 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading; + +namespace arDev +{ + public abstract partial class arRS232 : IDisposable + { + protected System.IO.Ports.SerialPort _device; + protected ManualResetEvent _mre; + protected byte[] LastReceiveBuffer = new byte[] { }; + /// + /// 최종 전송 메세지 + /// + public byte[] lastSendBuffer = new byte[] { }; + + protected List tempBuffer = new List(); + protected Boolean findSTX = false; + public string errorMessage { get; set; } + public DateTime LastConnTime { get; set; } + public DateTime LastConnTryTime { get; set; } + public DateTime lastSendTime; + /// + /// 메세지 수신시 사용하는 내부버퍼 + /// + protected List _buffer = new List(); + + + // public byte[] LastRecvData; + public string LastRecvString + { + get + { + if (LastReceiveBuffer == null) return String.Empty; + else return System.Text.Encoding.Default.GetString(LastReceiveBuffer); + } + } + /// + /// 마지막으로 데이터를 받은 시간 + /// + public DateTime lastRecvTime; + + + public int WriteError = 0; + public string WriteErrorMessage = string.Empty; + public int WaitTimeout { get; set; } = 1000; + public int MinRecvLength { get; set; } = 1; + /// + /// 포트이름 + /// + [Description("시리얼 포트 이름")] + [Category("설정"), DisplayName("Port Name")] + public string PortName + { + get + { + if (_device == null) return string.Empty; + else return _device.PortName; + } + set + { + if (this.IsOpen) + { + Message?.Invoke(this, new MessageEventArgs("포트가 열려있어 포트이름을 변경할 수 없습니다", true)); + } + else if (String.IsNullOrEmpty(value) == false) + _device.PortName = value; + else + { + Message?.Invoke(this, new MessageEventArgs("No PortName", true)); + } + } + } + + public int BaudRate + { + get + { + if (_device == null) return 0; + else return _device.BaudRate; + } + set + { + if (this.IsOpen) + { + Message?.Invoke(this, new MessageEventArgs("포트가 열려있어 BaudRate(를) 변경할 수 없습니다", true)); + } + else if (value != 0) + _device.BaudRate = value; + else Message?.Invoke(this, new MessageEventArgs("No baud rate", true)); + } + } + + + public arRS232() + { + _device = new System.IO.Ports.SerialPort(); + this.BaudRate = 9600; + + _device.DataReceived += barcode_DataReceived; + _device.ErrorReceived += this.barcode_ErrorReceived; + _device.WriteTimeout = 5000; + _device.ReadTimeout = 5000; + // _device.DtrEnable = false; + _device.ReadBufferSize = 8192; + _device.WriteBufferSize = 8192; + + errorMessage = string.Empty; + lastRecvTime = DateTime.Parse("1982-11-23"); + LastConnTime = DateTime.Parse("1982-11-23"); + LastConnTryTime = DateTime.Parse("1982-11-23"); + lastRecvTime = DateTime.Parse("1982-11-23"); + this._mre = new ManualResetEvent(true); + } + + ~arRS232() + { + Dispose(false); + } + + + // Flag: Has Dispose already been called? + bool disposed = false; + + // Public implementation of Dispose pattern callable by consumers. + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + // Protected implementation of Dispose pattern. + protected virtual void Dispose(bool disposing) + { + if (disposed) + return; + + if (disposing) + { + // Free any other managed objects here. + // + } + + _device.DataReceived -= barcode_DataReceived; + _device.ErrorReceived -= this.barcode_ErrorReceived; + + // Free any unmanaged objects here. + // + disposed = true; + } + + public Boolean Open() + { + try + { + _device.Open(); + return IsOpen; + } + catch (Exception ex) + { + errorMessage = ex.Message; + Message.Invoke(this, new MessageEventArgs(ex.Message, true)); + return false; + } + } + public string GetHexString(Byte[] input) + { + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + foreach (byte b in input) + sb.Append(" " + b.ToString("X2")); + return sb.ToString(); + } + + /// + /// 포트가 열려있는지 확인 + /// + [Description("현재 시리얼포트가 열려있는지 확인합니다")] + [Category("정보"), DisplayName("Port Open")] + public Boolean IsOpen + { + get + { + if (_device == null) return false; + return _device.IsOpen; + } + } + + public virtual void Close(Boolean PortClose = true) + { + if (_device != null && _device.IsOpen) + { + _device.DiscardInBuffer(); + _device.DiscardOutBuffer(); + if (PortClose) _device.Close(); //dispose에서는 포트를 직접 클리어하지 않게 해뒀다. + } + } + protected Boolean RaiseRecvData() + { + return RaiseRecvData(LastReceiveBuffer.ToArray(), false); + } + /// + /// 수신받은 메세지를 발생 시킵니다 + /// + /// + /// + public virtual Boolean RaiseRecvData(byte[] Data, bool udpatelastbuffer) + { + //181206 - 최종수신 메세지 기록 + lastRecvTime = DateTime.Now; + if (udpatelastbuffer && Data != null) + { + if (LastReceiveBuffer == null || LastReceiveBuffer.Length != Data.Length) + { + LastReceiveBuffer = new byte[Data.Length]; + Array.Copy(Data, LastReceiveBuffer, Data.Length); + } + } + + try + { + Message?.Invoke(this, new MessageEventArgs(Data, true)); //recvmessage + if (ProcessRecvData(Data) == false) + { + //Message?.Invoke(this, new MessageEventArgs(Data, true)); //recvmessage + Message?.Invoke(this, new MessageEventArgs(this.errorMessage, true)); //errormessage + return false; + } + else + { + + return true; + } + } + catch (Exception ex) + { + this.errorMessage = ex.Message; + this.Message?.Invoke(this, new MessageEventArgs(ex.Message, true)); + return false; + } + } + + /// + /// 수신받은 자료를 처리한다 + /// + /// + /// + public abstract bool ProcessRecvData(byte[] data); + + #region "Internal Events" + + void barcode_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) + { + Message?.Invoke(this, new MessageEventArgs(e.ToString(), true)); + } + + byte[] buffer = new byte[] { }; + void barcode_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) + { + + try + { + int ReadCount = _device.BytesToRead; + + buffer = new byte[ReadCount]; + _device.Read(buffer, 0, buffer.Length); + + System.Text.StringBuilder LogMsg = new StringBuilder(); + + byte[] remainBuffer; + Repeat: + if (CustomParser(buffer, out remainBuffer)) + { + //분석완료이므로 받은 데이터를 버퍼에 기록한다 + if (LastReceiveBuffer == null || (LastReceiveBuffer.Length != tempBuffer.Count)) + Array.Resize(ref LastReceiveBuffer, tempBuffer.Count); + Array.Copy(tempBuffer.ToArray(), LastReceiveBuffer, tempBuffer.Count); + tempBuffer.Clear(); + + //수신메세지발생 + RaiseRecvData(); + if (remainBuffer != null && remainBuffer.Length > 0) + { + //버퍼를 변경해서 다시 전송을 해준다. + Array.Resize(ref buffer, remainBuffer.Length); + Array.Copy(remainBuffer, buffer, remainBuffer.Length); + goto Repeat; //남은 버퍼가 있다면 진행을 해준다. + } + } + + } + catch (Exception ex) + { + if (IsOpen) + { + //_device.DiscardInBuffer(); + //_device.DiscardOutBuffer(); + } + errorMessage = ex.Message; + this.Message?.Invoke(this, new MessageEventArgs(ex.Message, true)); + } + + } + + + #endregion + + #region "External Events" + + + /// + /// 오류 및 기타 일반 메세지 + /// + public event EventHandler Message; + + #endregion + + #region "Event Args" + + /// + /// 데이터를 수신할떄 사용함(RAW 포함) + /// + public class ReceiveDataEventArgs : EventArgs + { + private byte[] _buffer = null; + + /// + /// 바이트배열의 버퍼값 + /// + public byte[] Value { get { return _buffer; } } + + /// + /// 버퍼(바이트배열)의 데이터를 문자로 반환합니다. + /// + public string StrValue + { + get + { + //return string.Empty; + + if (_buffer == null || _buffer.Length < 1) return string.Empty; + else return System.Text.Encoding.Default.GetString(_buffer); + } + } + public ReceiveDataEventArgs(byte[] buffer) + { + _buffer = buffer; + } + } + + /// + /// 메세지를 강제 발생 + /// + /// + /// + protected virtual void RaiseMessage(MessageType mt, string message) + { + this.Message?.Invoke(this, new MessageEventArgs(mt, message)); + } + public enum MessageType + { + Normal, + Error, + Send, + Recv, + } + + public class MessageEventArgs : EventArgs + { + public MessageType MsgType { get; set; } + private string _message = string.Empty; + + /// + /// Recv,Send,Normal,Error 모두 지원 + /// + public string Message { get { return _message; } } + + private byte[] _data = null; + + /// + /// Recv,Send에서만 값이 존재 합니다 + /// + public byte[] Data { get { return _data; } } + public MessageEventArgs(string Message, bool isError = false) + { + if (isError) MsgType = MessageType.Error; + else MsgType = MessageType.Normal; + _message = Message; + } + public MessageEventArgs(MessageType msgtype, string Message) + { + MsgType = msgtype; + _message = Message; + _data = System.Text.Encoding.Default.GetBytes(Message); + } + + public MessageEventArgs(byte[] buffer, bool isRecv = true) + { + if (isRecv) MsgType = MessageType.Recv; + else MsgType = MessageType.Send; + _data = new byte[buffer.Length]; + Array.Copy(buffer, _data, Data.Length); + _message = System.Text.Encoding.Default.GetString(_data); + } + + } + + #endregion + + + + protected abstract bool CustomParser(byte[] buf, out byte[] remainBuffer); + + /// + /// 데이터수신시간이 설정값보다 x 2.5를 초과하면 false 가 반환됨 + /// + public Boolean IsValid + { + get + { + if (IsOpen == false) return false; + if (lastRecvTime.Year == 1982) return false; + var ts = DateTime.Now - lastRecvTime; + if (ts.TotalSeconds > 5) return false; + return true; + } + } + protected bool WriteData(string cmd) + { + return WriteData(System.Text.Encoding.Default.GetBytes(cmd)); + } + /// + /// 포트에 쓰기(barcode_DataReceived 이벤트로 메세지수신) + /// + protected Boolean WriteData(byte[] data) + { + Boolean bRet = false; + + //171205 : 타임아웃시간추가 + if (!_mre.WaitOne(WaitTimeout)) + { + errorMessage = $"WriteData:MRE:WaitOne:TimeOut {WaitTimeout}ms"; + this.Message?.Invoke(this, new MessageEventArgs(errorMessage, true)); + return false; + } + + _mre.Reset(); + + //Array.Resize(ref data, data.Length + 2); + + try + { + lastSendTime = DateTime.Now; + if (lastSendBuffer == null) lastSendBuffer = new byte[data.Length]; //171113 + else Array.Resize(ref lastSendBuffer, data.Length); + Array.Copy(data, lastSendBuffer, data.Length); + + for (int i = 0; i < data.Length; i++) + _device.Write(data, i, 1); + + //_device.Write(data, 0, data.Length); + + //171113 + this.Message?.Invoke(this, new MessageEventArgs(data, false)); + + bRet = true; + WriteError = 0; + WriteErrorMessage = string.Empty; + } + catch (Exception ex) + { + // this.isinit = false; + this.Message?.Invoke(this, new MessageEventArgs(ex.Message, true)); + bRet = false; + WriteError += 1; //연속쓰기오류횟수 + WriteErrorMessage = ex.Message; + } + finally + { + _mre.Set(); + } + return bRet; + } + } +} diff --git a/Cs_HMI/SubProject/CommData/Var.cs b/Cs_HMI/SubProject/CommData/Var.cs new file mode 100644 index 0000000..92f638a --- /dev/null +++ b/Cs_HMI/SubProject/CommData/Var.cs @@ -0,0 +1,340 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; + +namespace COMM +{ + public abstract class VarData : INotifyPropertyChanged + { + protected T[] _values; + protected T defaultvalue; + protected string[] _code; + protected string[] _desc; + + public event PropertyChangedEventHandler PropertyChanged; + + protected void OnPropertyChanged(string name) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); + } + + public T this[int idx] + { + get { return Get(idx); } + set { Set(idx, value); } + } + + public string StrType + { + get + { + return typeof(T).ToString(); + } + } + public VarData(int capa, T defvalue = default(T)) + { + _values = new T[capa]; + _code = new string[capa]; + _desc = new string[capa]; + + defaultvalue = defvalue; + Clear(); + + if (typeof(T) == typeof(UInt16)) SupportAdd = true; + else if (typeof(T) == typeof(UInt32)) SupportAdd = true; + else if (typeof(T) == typeof(Int16)) SupportAdd = true; + else if (typeof(T) == typeof(Int32)) SupportAdd = true; + else if (typeof(T) == typeof(Int64)) SupportAdd = true; + else if (typeof(T) == typeof(UInt64)) SupportAdd = true; + else if (typeof(T) == typeof(byte)) SupportAdd = true; + else if (typeof(T) == typeof(double)) SupportAdd = true; + else if (typeof(T) == typeof(Single)) SupportAdd = true; + else if (typeof(T) == typeof(string)) SupportAdd = false; + else if (typeof(T) == typeof(bool)) SupportAdd = false; + else if (typeof(T) == typeof(DateTime)) SupportAdd = false; + else throw new Exception($"Support Data Type : {typeof(T)}"); + } + + public virtual void Set(int idx, T value) + { + var changed = _values[idx].Equals(value); + _values[idx] = value; + if (changed) OnPropertyChanged($"{idx}|{value}"); //idx값을 알림한다 + } + public virtual T Get(int idx) + { + return _values[idx]; + } + + public virtual void Clear(T value) + { + for (int i = 0; i < _values.Length; i++) + _values[i] = value; + } + public virtual void Clear() + { + Clear(defaultvalue); + } + public void Clear(int idx) + { + _values[idx] = defaultvalue; + } + public Tuple GetCodeDesc(int idx) + { + return new Tuple(_code[idx], _desc[idx]); + } + public virtual bool SupportAdd { get; private set; } + } + + public abstract class VarDataNumber : VarData + { + public VarDataNumber(int capa) : base(capa) { } + + public abstract void Add(T value); + public abstract void Add(int idx, T value); + } + + public class VarDataI32 : VarDataNumber + { + public VarDataI32(int capa) : base(capa) { } + + public override void Add(Int32 value) + { + for (int i = 0; i < _values.Length; i++) + _values[i] += value; + } + + public override void Add(int idx, Int32 value) + { + _values[idx] += value; + } + public void Add(eVarInt32 idx, Int32 value = 1) + { + Add((int)idx, value); + } + public void Clear(eVarInt32 idx) + { + Clear((int)idx); + } + public Int32 this[eVarInt32 idx] + { + get { return Get((int)idx); } + set { Set((int)idx, value); } + } + + } + public class VarDataDBL : VarDataNumber + { + public VarDataDBL(int capa) : base(capa) { } + + public override void Add(double value) + { + for (int i = 0; i < _values.Length; i++) + _values[i] += value; + } + + public override void Add(int idx, double value) + { + _values[idx] += value; + } + public void Add(eVarDBL idx, double value = 1) + { + Add((int)idx, value); + } + public void Clear(eVarDBL idx) + { + Clear((int)idx); + } + public double this[eVarDBL idx] + { + get { return Get((int)idx); } + set { Set((int)idx, value); } + } + } + public class VarDataUI32 : VarDataNumber + { + public VarDataUI32(int capa) : base(capa) { } + + public override void Add(UInt32 value) + { + for (int i = 0; i < _values.Length; i++) + _values[i] += value; + } + + public override void Add(int idx, UInt32 value) + { + _values[idx] += value; + } + public void Add(eVarUInt32 idx, UInt32 value = 1) + { + Add((int)idx, value); + } + public void Clear(eVarUInt32 idx) + { + Clear((int)idx); + } + public UInt32 this[eVarUInt32 idx] + { + get { return Get((int)idx); } + set { Set((int)idx, value); } + } + } + + public class VarDataByte : VarDataNumber + { + public VarDataByte(int capa) : base(capa) { } + + public override void Add(byte value) + { + for (int i = 0; i < _values.Length; i++) + _values[i] += value; + } + public override void Add(int idx, byte value) + { + _values[idx] += value; + } + public void Add(eVarByte idx, byte value) + { + Add((int)idx, value); + } + public byte this[eVarByte idx] + { + get + { + return Get((int)idx); + } + set + { + Set((int)idx, value); + } + } + } + + public class VarDataBool : VarData + { + public VarDataBool(int capa) : base(capa) { } + + public bool this[eVarBool idx] + { + get + { + return Get(idx); + } + set + { + Set(idx, value); + } + } + public bool Get(eVarBool idx) + { + return Get((int)idx); + } + public void Set(eVarBool idx, bool value) + { + Set((int)idx, value); + } + } + + public class VarDataStr : VarData + { + public VarDataStr(int capa) : base(capa, string.Empty) { } + public string Get(eVarString idx) + { + return Get((int)idx); + } + public void Set(eVarString idx, string value) + { + Set((int)idx, value); + } + public string this[eVarString idx] + { + get { return Get(idx); } + set { Set(idx, value); } + } + } + public class VarDataDateTime : VarData + { + public VarDataDateTime(int capa) : base(capa, new DateTime(1982, 11, 23)) { } + + public DateTime this[eVarTime idx] + { + get + { + return Get((int)idx); + } + set + { + Set(idx, value); + } + } + + public TimeSpan RUN(int idx) + { + return DateTime.Now - _values[idx]; + } + public TimeSpan RUN(eVarTime idx) + { + return RUN((int)idx); + } + [Browsable(false)] + public void Add(int idx, TimeSpan value) + { + _values[idx] += value; + } + + public void Add(eVarTime idx, TimeSpan value) + { + Add((int)idx, value); + } + /// + /// 지정된 시간으로 업데이트 합니다 + /// + /// + /// + public void Set(eVarTime idx, DateTime value) + { + Set((int)idx, value); + } + /// + /// 현재시간으로 업데이트 합니다 + /// + /// + public void Set(eVarTime idx) + { + Set(idx, DateTime.Now); + } + public bool IsSet(eVarTime idx) + { + return this[idx].Year != 1982; + } + } + //공용변수(시간) + public static class VAR + { + public static VarDataBool BOOL; + public static VarDataByte BYTE; + public static VarDataStr STR; + public static VarDataDateTime TIME; + public static VarDataI32 I32; + public static VarDataUI32 U32; + public static VarDataDBL DBL; + + public static bool isInit { get; private set; } = false; + + public static void Init(int varlen) + { + if (isInit) return; //already init + //가변 데이트타임변수 + BOOL = new VarDataBool(varlen); + BYTE = new VarDataByte(varlen); + STR = new VarDataStr(varlen); + TIME = new VarDataDateTime(varlen); + I32 = new VarDataI32(varlen); + U32 = new VarDataUI32(varlen); + DBL = new VarDataDBL(varlen); + isInit = true; + } + } +} diff --git a/Cs_HMI/SubProject/GitUpdate.bat b/Cs_HMI/SubProject/GitUpdate.bat new file mode 100644 index 0000000..f750ddd --- /dev/null +++ b/Cs_HMI/SubProject/GitUpdate.bat @@ -0,0 +1,5 @@ +@echo off +echo Git AutoUpdate +echo tindevil@nate.com +for /d %%i in (*) do echo Enterinng "%i" | cd "%i" | git.exe pull --progress -v --no-rebase "origin" master | cd .. +@pause \ No newline at end of file diff --git a/Cs_HMI/SubProject/MSSQLCommand/MSSQLCommand.csproj b/Cs_HMI/SubProject/MSSQLCommand/MSSQLCommand.csproj new file mode 100644 index 0000000..d05c1f0 --- /dev/null +++ b/Cs_HMI/SubProject/MSSQLCommand/MSSQLCommand.csproj @@ -0,0 +1,47 @@ + + + + + Debug + AnyCPU + {AAF68D20-4590-4AB0-BB91-E0DD04C91DEC} + Library + Properties + MSSQLCommand + MSSQLCommand + v4.0 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/MSSQLCommand/Monitor.cs b/Cs_HMI/SubProject/MSSQLCommand/Monitor.cs new file mode 100644 index 0000000..e224b6c --- /dev/null +++ b/Cs_HMI/SubProject/MSSQLCommand/Monitor.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MSSQLCommand +{ + public class Monitor + { + /// + /// Connection String + /// + public string CS { get; private set; } + + private int + public Monitor(string ip, string id, string pass, string db) + { + //ConnectionString = $"Data Source =10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!"; + CS = $"Data Source={ip};Initial Catalog={db};Persist Security Info=True;User ID={id};Password={pass}"; + } + + } +} diff --git a/Cs_HMI/SubProject/MSSQLCommand/Properties/AssemblyInfo.cs b/Cs_HMI/SubProject/MSSQLCommand/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..040a91a --- /dev/null +++ b/Cs_HMI/SubProject/MSSQLCommand/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("MSSQLCommand")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MSSQLCommand")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("aaf68d20-4590-4ab0-bb91-e0dd04c91dec")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 +// 기본값으로 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/SubProject/Patch/App.config b/Cs_HMI/SubProject/Patch/App.config new file mode 100644 index 0000000..5ffd8f8 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/Cs_HMI/SubProject/Patch/Form1.Designer.cs b/Cs_HMI/SubProject/Patch/Form1.Designer.cs new file mode 100644 index 0000000..86e4ce0 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Form1.Designer.cs @@ -0,0 +1,63 @@ +namespace Patch +{ + partial class Form1 + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.SuspendLayout(); + // + // progressBar1 + // + this.progressBar1.Dock = System.Windows.Forms.DockStyle.Fill; + this.progressBar1.Location = new System.Drawing.Point(0, 0); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(481, 68); + this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee; + this.progressBar1.TabIndex = 1; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(481, 68); + this.Controls.Add(this.progressBar1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.ProgressBar progressBar1; + } +} + diff --git a/Cs_HMI/SubProject/Patch/Form1.cs b/Cs_HMI/SubProject/Patch/Form1.cs new file mode 100644 index 0000000..27ce6ad --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Form1.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Patch +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + this.Text = "Software Patch"; + this.Show(); + + Application.DoEvents(); + + //현재폴더에서 _patch 폴더 찾는다 + Boolean runClient = true; + var srcpath = new System.IO.DirectoryInfo ( System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "_patch")); + if (srcpath.Exists == true) + { + //기존 프로그램 종료될떄까지 기다린다 + this.Text = "기존 프로그램 종료 대기"; + Application.DoEvents(); + bool closeok = true; + System.Diagnostics.Stopwatch wat = new System.Diagnostics.Stopwatch(); + wat.Restart(); + while (CheckExistProcess("Amkor") == true) + { + Application.DoEvents(); + System.Threading.Thread.Sleep(10); + if(wat.ElapsedMilliseconds >= 10000) + { + MessageBox.Show("기존프로그램이 종료되지 않았습니다", "패치실패", MessageBoxButtons.OK, MessageBoxIcon.Error); + closeok = false; + break; + } + } + + if (CheckExistProcess("Amkor") == false) + { + + //버젼체크하고 파일 복사해준다 + var files = srcpath.GetFiles(); + this.progressBar1.Maximum = files.Length; + this.progressBar1.Value = 0; + this.progressBar1.Style = ProgressBarStyle.Continuous; + + var myPath = new System.IO.DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); + + try + { + foreach (var file in files) + { + this.Text = "패치파일 : " + file.Name; + Application.DoEvents(); + + file.CopyTo(System.IO.Path.Combine(file.Directory.Parent.FullName, file.Name), true); // System.IO.File.Copy(file, myPath.FullName, true); + this.progressBar1.Value += 1; + System.Threading.Thread.Sleep(100); + } + + //패치파일을 삭제한다 + srcpath.Delete(true); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + else runClient = false; + } + + //클라이언트실행 + if(runClient==true) + { + var file_run = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Amkor.exe"); + RunProcess(file_run); + } + + //프로그래램 종료 + this.Close(); + } + + public Boolean CheckExistProcess(string ProcessName) + { + foreach (var prc in System.Diagnostics.Process.GetProcesses()) + { + if (prc.ProcessName.StartsWith("svchost")) continue; + if (prc.ProcessName.ToUpper() == ProcessName.ToUpper()) return true; + } + return false; + } + + public Boolean RunProcess(string file, string arg = "") + { + var fi = new System.IO.FileInfo(file); + if (!fi.Exists) + { + //Pub.log.AddE("Run Error : " + file); + return false; + } + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(file); + si.Arguments = arg; + prc.StartInfo = si; + prc.Start(); + return true; + } + + } +} diff --git a/Cs_HMI/SubProject/Patch/Form1.resx b/Cs_HMI/SubProject/Patch/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/Patch/Program.cs b/Cs_HMI/SubProject/Patch/Program.cs new file mode 100644 index 0000000..30927a1 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Patch +{ + static class Program + { + /// + /// 해당 애플리케이션의 주 진입점입니다. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Cs_HMI/SubProject/Patch/Properties/AssemblyInfo.cs b/Cs_HMI/SubProject/Patch/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1321da1 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("Patch")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Patch")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("37dc0bae-50bf-41e4-baab-b0e211467ad1")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 +// 기본값으로 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/SubProject/Patch/Properties/Resources.Designer.cs b/Cs_HMI/SubProject/Patch/Properties/Resources.Designer.cs new file mode 100644 index 0000000..df0a58a --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Patch.Properties { + using System; + + + /// + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. + /// + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Patch.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 + /// 재정의합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Cs_HMI/SubProject/Patch/Properties/Resources.resx b/Cs_HMI/SubProject/Patch/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/Patch/Properties/Settings.Designer.cs b/Cs_HMI/SubProject/Patch/Properties/Settings.Designer.cs new file mode 100644 index 0000000..28633b4 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Patch.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Cs_HMI/SubProject/Patch/Properties/Settings.settings b/Cs_HMI/SubProject/Patch/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Cs_HMI/SubProject/Patch/SWPatch.csproj b/Cs_HMI/SubProject/Patch/SWPatch.csproj new file mode 100644 index 0000000..0a88855 --- /dev/null +++ b/Cs_HMI/SubProject/Patch/SWPatch.csproj @@ -0,0 +1,84 @@ + + + + + Debug + AnyCPU + {37DC0BAE-50BF-41E4-BAAB-B0E211467AD1} + WinExe + Patch + SWPatch + v4.8 + 512 + true + + + + x86 + true + full + false + ..\..\..\..\..\..\Amkor\AGV3\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/ProPLC/Arduino/EnumStruct.cs b/Cs_HMI/SubProject/ProPLC/Arduino/EnumStruct.cs new file mode 100644 index 0000000..6dfda17 --- /dev/null +++ b/Cs_HMI/SubProject/ProPLC/Arduino/EnumStruct.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace arDev.Arduino +{ + public enum IODirection + { + Input = 0, + Output + } + + public enum MessageType + { + Normal = 0, + SendData, + ReceiveData, + Message, + RxIOData, + RxSetData, + } + +} diff --git a/Cs_HMI/SubProject/ProPLC/Arduino/EventsIO.cs b/Cs_HMI/SubProject/ProPLC/Arduino/EventsIO.cs new file mode 100644 index 0000000..51b572d --- /dev/null +++ b/Cs_HMI/SubProject/ProPLC/Arduino/EventsIO.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace arDev.Arduino +{ + public partial class DIO + { + /// + /// Digital Input/Output Changed + /// + public event EventHandler ValueChanged; + public event EventHandler FlagChanged; + + /// + /// 마그넷 센서의 값이 변경되었을때 발생 함 + /// + public event EventHandler PositionChanged; + + ///// + ///// Digital Input/Output Message + ///// + //public event EventHandler Message; + + public class FlagValueEventArgs : EventArgs + { + private int _arridx; + private Boolean _oldvalue; + private Boolean _newvalue; + + public int ArrIDX { get { return _arridx; } } + public Boolean OldValue { get { return _oldvalue; } } + public Boolean NewValue { get { return _newvalue; } } + + public FlagValueEventArgs( int ArrIDX, Boolean oldvalue, Boolean newvalue) + { + _arridx = ArrIDX; + _oldvalue = oldvalue; + _newvalue = newvalue; + } + } + + public class IOValueEventArgs : EventArgs + { + private int _arridx; + private Boolean _oldvalue; + private Boolean _newvalue; + private IODirection _dir; + + public int ArrIDX { get { return _arridx; } } + public Boolean OldValue { get { return _oldvalue; } } + public Boolean NewValue { get { return _newvalue; } } + public IODirection Direction { get { return _dir; } } + + public IOValueEventArgs(IODirection dir, int ArrIDX, Boolean oldvalue, Boolean newvalue) + { + _arridx = ArrIDX; + _oldvalue = oldvalue; + _newvalue = newvalue; + _dir = dir; + } + } + + //public class MessageEventArgs : EventArgs + //{ + // private Boolean _isError = false; + // public Boolean IsError { get { return _isError; } } + // private string _message = string.Empty; + // public string Message { get { return _message; } } + // private Arduino.MessageType _mtype; + // public Arduino.MessageType MessageType { get { return _mtype; } } + // public MessageEventArgs(Arduino.MessageType mType, string Message, Boolean isError) + // { + // _isError = isError; + // _message = Message; + // this._mtype = mType; + // } + //} + + } +} diff --git a/Cs_HMI/SubProject/ProPLC/Arduino/MemoryAccess.cs b/Cs_HMI/SubProject/ProPLC/Arduino/MemoryAccess.cs new file mode 100644 index 0000000..1ba4a7d --- /dev/null +++ b/Cs_HMI/SubProject/ProPLC/Arduino/MemoryAccess.cs @@ -0,0 +1,556 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.ComponentModel; +using System.Reflection; +using System.Runtime; +using System.Runtime.InteropServices; +using System.Collections.Concurrent; + +namespace arDev.Arduino +{ + public partial class DIO : arRS232 + { + protected object lockobj = new object(); + public struct SetupInfo + { + public byte ioInterval; + public byte ResetCount; + public byte SpeedH; + public byte SpeedL; + public byte SpeedZ; + public byte pindirRevDILow; + public byte pindirRevDIHigh; + public byte UpTime; + public byte BalanceThd; + public byte MarkThd; + public byte SpeedC; + public byte BalanceThdUp; + + public Boolean IsValid; + public void Clear() + { + pindirRevDIHigh = 0; + pindirRevDILow = 0; + ioInterval = 0; + ResetCount = 0; + SpeedH = 0; + SpeedL = 0; + SpeedC = 0; + BalanceThd = 0; + BalanceThd = 0; + UpTime = 0; + MarkThd = 0; + SpeedZ = 0; + IsValid = false; + } + } + + public SetupInfo setupInfo; + private Boolean STX11 = false; + private Boolean STX21 = false; + //private Boolean ETX11 = false; + // private byte[] buffer1; + // readonly List Tempbuffer1 = new List(); + readonly ManualResetEvent mre = new ManualResetEvent(true); + // protected string errorMessage = string.Empty; + // readonly System.IO.Ports.SerialPort dev = null; + private byte LEN1 = 0; + //private byte CHK1 = 0; + //private int bufferCount1 = 0; + + public DateTime ConnTryTime = DateTime.Now.AddDays(-1); + protected DateTime[] SetFlagTime = new DateTime[32]; + readonly Boolean[] Flag = new bool[32]; + readonly Boolean[] DIValue = new bool[16]; + readonly Boolean[] DOValue = new bool[16]; + public UInt16[] AIValue = new ushort[3]; + public byte[] AOValue = new byte[3]; + public string ioBinStr = string.Empty; + public string SetupStr = string.Empty; + public byte RunTime = 0; + + public byte[] MAG_VALUE = new byte[2]; + public byte[] SV_SPEED = new byte[2]; + public Boolean isDisposed = false; //dispose가 호출되었는가? + + public string LastMessage { get; set; } + public DateTime LastMessageTime { get; set; } + + + /// + /// 생성자 + /// + public DIO() + { + //설정의 값 + setupInfo = new SetupInfo(); + setupInfo.Clear(); + + SV_SPEED[0] = 0; + SV_SPEED[1] = 0; + + //마그넷 센서(0~100) + MAG_VALUE[0] = 50; + MAG_VALUE[1] = 50; + + lastRecvTime = DateTime.Parse("1982-11-23"); + + for (int i = 0; i < Flag.Length; i++) + Flag[i] = false; + for (int i = 0; i < DIValue.Length; i++) + DIValue[i] = false; + for (int i = 0; i < DOValue.Length; i++) + DOValue[i] = false; + for (int i = 0; i < AIValue.Length; i++) + AIValue[i] = 0; + for (int i = 0; i < AOValue.Length; i++) + AOValue[i] = 0; + for (int i = 0; i < SetFlagTime.Length; i++) + SetFlagTime[i] = DateTime.Parse("1982-11-23"); + + } + + protected override bool CustomParser(byte[] buf, out byte[] remainBuffer) + { + List remain = new List(); + + + Boolean bComplete = false; + for (int i = 0; i < buf.Length; i++) + { + var incomByte = buf[i]; + if (bComplete == true) + { + remain.Add(incomByte); + } + else + { + if (STX11 == false) + { + if (incomByte != '@') + { + STX21 = false; + // ETX11 = false; + continue; + } + else + { + STX11 = true; + tempBuffer.Clear(); + tempBuffer.Add(incomByte); + } + } + else if (STX21 == false) + { + if (tempBuffer.Count != 1 || tempBuffer.Count < 1 || tempBuffer[0] != '@' || incomByte != '@') + { + STX11 = false; + //ETX11 = false; + continue; + } + else + { + STX21 = true; + tempBuffer.Add(incomByte); + } + } + else + { + tempBuffer.Add(incomByte); + + //여기서부터는무조건 누적한다. + if (tempBuffer.Count == 3) + { + if (tempBuffer[0] != '@' || tempBuffer[1] != '@') + { + STX11 = false; + STX21 = false; + // ETX11 = false; + LEN1 = 0; + tempBuffer.Clear(); + } + else LEN1 = incomByte; //데이터 길이가온다 + } + //else if (Tempbuffer1.Count == LEN1 + 5) //ETX1 + //{ + // if (incomingByte != 0x0D) + // { + // //ETX가 와야하는데 다른데이터가 왔다 + // STX11 = false; + // STX21 = false; + // // ETX11 = false; + + // var str = System.Text.Encoding.Default.GetString(Tempbuffer1.ToArray()); + // RaiseMessage(MessageType.ReceiveData, "에러 모두 파기 : " + str, true); + + // Tempbuffer1.Clear(); + // } + //} + else if (tempBuffer.Count == LEN1 + 6) + { + //전체길이를 만족햇다. + if (incomByte != 0x0A) + { + //ETX가 와야하는데 다른데이터가 왔다 + STX11 = false; + STX21 = false; + // ETX11 = false; + //var str = System.Text.Encoding.Default.GetString(Tempbuffer1.ToArray()); + RaiseMessage(MessageType.Error, "에러 모두 파기 : ETX 값 오류"); + tempBuffer.Clear(); + } + else if (tempBuffer[tempBuffer.Count - 2] != 0x0D) + { + //ETX가 와야하는데 다른데이터가 왔다 + STX11 = false; + STX21 = false; + // ETX11 = false; + //var str = System.Text.Encoding.Default.GetString(Tempbuffer1.()); + RaiseMessage(MessageType.Error, "에러 모두 파기 : ETX 값 오류"); + tempBuffer.Clear(); + } + else + { + STX11 = false; + STX21 = false; + // ETX11 = false; + //if (LastReceiveBuffer == null) LastReceiveBuffer = new byte[tempBuffer.Count]; + //else if (LastReceiveBuffer.Length != tempBuffer.Count) Array.Resize(ref LastReceiveBuffer, Tempbuffer1.Count); + //tempBuffer.CopyTo(LastReceiveBuffer)tempBuffer + //tempBuffer.Clear(); + bComplete = true; + } + } + } + } + + + + } + + remainBuffer = remain.ToArray(); + return bComplete; + } + + + bool Checksum(byte[] buffer, int datalength) + { + //체크섬필요 221118 + if (buffer[buffer.Length-3] == '*') + { + return true; + } + byte checksum = 0; + for (int i = 3; i < datalength + 3; i++) + { + checksum = (byte)(checksum ^ buffer[i]); + } + return checksum == buffer[buffer.Length - 3]; + } + + public override bool ProcessRecvData(byte[] data) + { + var hexString = GetHexString(data);//.gethe + var len = data[2]; + if (len + 6 != data.Length) + { + RaiseMessage(MessageType.Error, string.Format("길이오류 예상:{0},수신:{1},{2}", len + 5, data.Length, hexString)); + } + else if (data[0] != 0x40 || data[1] != 0x40 || data[data.Length - 2] != 0x0D || data[data.Length - 1] != 0x0A) + { + RaiseMessage(MessageType.Error, string.Format("헤더 오류 : {0}", hexString)); + } + else if (Checksum(data, len) == false) //체크섬 221118 + { + RaiseMessage(MessageType.Error, string.Format("체크섬 오류 : {0}", hexString)); + } + else + { + //RaiseMessage(MessageType.ReceiveData, hexString); + lastRecvTime = DateTime.Now; + var cmd = data[3]; + if (cmd == 'I') //IOData + { + if (len != 10) + RaiseMessage(MessageType.Error, "IO수신길이오류:" + DateTime.Now.ToString("mm:ss.fff") + " 수신 : " + hexString); + else Parse_IOData(data); + } + else if (cmd == 'T') + { + // Boolean errorMessage = buffer[4] == 1; + var message = System.Text.Encoding.Default.GetString(data, 5, len - 2);//데이터타입과 에러여부 제거 + LastMessage = message; + LastMessageTime = DateTime.Now; + RaiseMessage(MessageType.Normal, message); + } + else if (cmd == 'S') //setup 정보 200310 (홈) + { + if (len != 13) + RaiseMessage(MessageType.Error, "SETUP수신길이오류:" + DateTime.Now.ToString("mm:ss.fff") + " 수신 : " + hexString); + else Parse_SetupData(data); + } + else + { + RaiseMessage(MessageType.Normal, "Unknown:" + hexString + "\n" + "Data=" + System.Text.Encoding.Default.GetString(data)); + } + } + return true; + } + + + + + void Parse_IOData(byte[] buffer) + { + var IOData = BitConverter.ToUInt32(buffer, 4); + + //var newMagF = BitConverter.ToUInt16(buffer, 8); + //va1r newMagB = BitConverter.ToUInt16(buffer, 10); + //var newAlign = BitConverter.ToUInt16(buffer, 12); + //if (newMagF != AIValue[0] || newMagB != AIValue[1]) + //{ + // AIValue[0] = newMagF;// BitConverter.ToUInt16(buffer, 8); //마그넷센서 F + // AIValue[1] = newMagB; //BitConverter.ToUInt16(buffer, 10); //마그넷센서 B + // PositionChanged?.Invoke(this, null); + //} + //AIValue[2] = newAlign; + //AOValue[0] = buffer[14]; //왼쪽바퀴 속도 + //AOValue[1] = buffer[15]; //오른쪽바퀴 속도 + //AOValue[2] = buffer[16]; //Z축 속도 + //SV_SPEED[0] = buffer[21]; //왼쪽바퀴의 설정속도 + //SV_SPEED[1] = buffer[22]; //오른쪽바퀴의 설정속도 + //MAG_VALUE[0] = buffer[23]; //magnet front + //MAG_VALUE[1] = buffer[24]; //magnet rear + RunTime = buffer[12]; + + //플래그값 확인 + byte[] buf_flag = new byte[4]; + Array.Copy(buffer, 8, buf_flag, 0, 4); + var baF = new System.Collections.BitArray(buf_flag); + for (int i = 0; i < 32; i++) + { + Boolean val = baF[i]; + + //입력 + if (this.Flag[i] != val) + { + Flag[i] = val; + + //변경이벤트 생성 + FlagChanged?.Invoke(this, new FlagValueEventArgs(i, !val, val)); + } + } + + //IO값 확인 + byte[] buf_iodata = new byte[4]; + Array.Copy(buffer, 4, buf_iodata, 0, 4); + var ba = new System.Collections.BitArray(buf_iodata); + for (int i = 0; i < 32; i++) + { + Boolean val = ba[i]; + if (i >= 16) + { + //출력 + if (DOValue[i - 16] != val) + { + DOValue[i - 16] = val; + + //변경이벤트 생성 + ValueChanged?.Invoke(this, new IOValueEventArgs(IODirection.Output, i - 16, !val, val)); + } + } + else + { + //입력 + if (DIValue[i] != val) + { + DIValue[i] = val; + + //변경이벤트 생성 + ValueChanged?.Invoke(this, new IOValueEventArgs(IODirection.Input, i, !val, val)); + } + } + } + + ioBinStr = Convert.ToString(IOData, 2).PadLeft(32, '0'); + //string msg = string.Format(DateTime.Now.ToString("mm:ss.fff") + " IO:{0},AN={1:0000},{2:0000},FG={3},AO={4},{5}", + // binstr, An1, An2, FGData, Ao11, Ao12); + } + void Parse_SetupData(byte[] buffer) + { + setupInfo.ioInterval = buffer[4]; + setupInfo.ResetCount = buffer[5]; + setupInfo.SpeedH = buffer[6]; + setupInfo.SpeedL = buffer[7]; + setupInfo.SpeedZ = buffer[8]; + setupInfo.pindirRevDIHigh = buffer[9]; + setupInfo.pindirRevDILow = buffer[10]; + setupInfo.UpTime = buffer[11]; + setupInfo.BalanceThd = buffer[12]; + setupInfo.MarkThd = buffer[13]; + setupInfo.SpeedC = buffer[14]; + setupInfo.BalanceThdUp = buffer[15]; + + SetupStr = string.Format("I:{0},R={1},H={2},L={3},Z={4},UP={5},BL={6},MK={7},SPD_C={8},BLUP={9}", + setupInfo.ioInterval, + setupInfo.ResetCount, + setupInfo.SpeedH, + setupInfo.SpeedL, + setupInfo.SpeedZ, + setupInfo.UpTime, + setupInfo.BalanceThd, + setupInfo.MarkThd, + setupInfo.SpeedC, + setupInfo.BalanceThdUp); + } + + public byte MakeChecksum(byte[] buffer) + { + //return 0; + byte chk = 0; + foreach (var b in buffer) + chk = (byte)(chk ^ b); + return chk; + } + + + + + #region "Method" + + protected Boolean Sendcommand(byte cmd, byte p1, byte p2) + { + //이번호의 상태를 on/off 해줘야함 + List buffer = new List + { + cmd, //command + p1, + p2 + }; + + byte dataLen = (byte)buffer.Count; //데이터길이 + byte checksum = MakeChecksum(buffer.ToArray()); + + buffer.Insert(0, (byte)'@'); //stx + buffer.Insert(1, (byte)'@'); //stx + buffer.Insert(2, dataLen); + buffer.Add(checksum); //길이를 제외한 실제 데이터 영역만 체크섬 + buffer.Add(0x0D); //etx + buffer.Add(0x0A); //etx + + return WriteData(buffer.ToArray()); + } + + + + + /// + /// 이벤트를 강제 생성합니다.(내부변수값도 변경됩니다) + /// + /// + /// + /// + public void RaiseEvent(IODirection dir, int idx, Boolean value) + { + if (ValueChanged != null) + { + if (!mre.WaitOne(100)) + { + RaiseMessage( MessageType.Error, "RaiseEvent WaitOne Timeout"); + return; + } + + mre.Reset(); + + bool curValue; + if (dir == IODirection.Input) + { + curValue = DIValue[idx]; + DIValue[idx] = value; + } + else + { + curValue = DOValue[idx]; + DOValue[idx] = value; + } + + try + { + //이벤트를 할당한곳에서 오류가 나면 이곳에서 에러가 잡힌다. + ValueChanged(this, new IOValueEventArgs(dir, idx, curValue, value)); + } + catch (Exception ex) + { + RaiseMessage(MessageType.Error, ex.Message); + } + finally + { + mre.Set(); + } + } + } + + //public Boolean GetFlag(byte idx) + //{ + // return Flag[idx]; + //} + + public Boolean GetValueI(byte idx) + { + if (idx < DIValue.Length) return DIValue[idx]; + else return false; + } + + public Boolean GetValueO(byte idx) + { + if (idx < DOValue.Length) return DOValue[idx]; + else return false; + } + + + //public Boolean SetValueI(int idx,Boolean value) + //{ + // if (idx < DIValue.Length) + // { + // DIValue[idx] = value; + // return true; + // } + // else return false; + //} + + public Boolean SetValue(byte idx, Boolean value) + { + byte SET_PINMODE = 3; + if (value == true) return Sendcommand(SET_PINMODE, idx, 1); + else return Sendcommand(SET_PINMODE, idx, 0); + } + + + public Boolean SetToggle(byte idx) + { + var curbalue = GetValueO(idx); + return SetValue(idx, !curbalue); + } + + + + public string GetErrorMessage() + { + return errorMessage; + } + + + + + #endregion + + + + + + + } +} diff --git a/Cs_HMI/SubProject/ProPLC/FakePLC.cs b/Cs_HMI/SubProject/ProPLC/FakePLC.cs new file mode 100644 index 0000000..eb98a61 --- /dev/null +++ b/Cs_HMI/SubProject/ProPLC/FakePLC.cs @@ -0,0 +1,387 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using arDev.Arduino; +using COMM; + +namespace arDev +{ + public class FakePLC : arDev.Arduino.DIO + { + + private System.Threading.Thread thPLC; + public bool Shutdown { get; set; } = false; + + public FakePLC() + { + COMM.VAR.Init(128); + } + + ~FakePLC() + { + + System.Threading.Tasks.Task.Run(() => + { + //쓰레드가 살아잇다면 대기한다 + if (thPLC != null && thPLC.IsAlive) + { + System.Threading.Thread.Sleep(100); + } + + this.Close(); + }); + } + + + private object lockobjdata = new object(); + public enum eEEPAddress + { + EEP_IOINTERVAL = 0, + EEP_RESETCOUNT, + EEP_DIREVH, + EEP_DIREVL, + EEP_OPTION, + EEP_UPTIME, + }; + + public enum eCommand : byte + { + LOAD = 0, //EEPROM 불러오기 + SAVE, //EEPROM 저장 + RESET, //초기화 + PINGCHK, + SET_PINMODE, //PINMODE 설정 + SET_DOUTPUT, //디지털출력설정(포트번호,값[1,0]) + SET_AOUTPUT, //아날로그출력설정(포트GET_SETTING = 50, //셋팅값 요청 + SET_FLAG, + SET_EEPROM, + SET_MANUALSPEED, + GET_SETTING = 50, + GUIDE_MOT = 90, //가이드커버(양쪽) 0=멈춤,1=UP,2=DN 아스키코드표 90=Z + SET_EEP_DIREV, + }; + + + //public enum MotorType + //{ + // Left = 0, + // Right + //} + //public enum Direction + //{ + // CW = 0, + // CCW, + //} + //public enum RunType + //{ + // Stop = 0, + // Up, + // Dn + //} + + public enum DIName + { + PINI_EMG = 0, + PINI_BTN_1, + PINI_BTN_2, + PINI_BTN_3, + PINI_BTN_4, + PINI_OVERLOADL, + PINI_OVERLOADR, + PINI_EMPTY_07, + PINI_EMPTY_08, + PINI_BTN_ZUP, + PINI_BTN_ZDN, + PINI_LIMIT_LU, + PINI_LIMIT_LD, + PINI_LIMIT_RU, + PINI_LIMIT_RD, + PINI_STOP, + } + public enum DIPin + { + PINI_EMG = 30, + PINI_BTN_1, + PINI_BTN_2, + PINI_BTN_3, + PINI_BTN_4, + PINI_OVERLOADL, + PINI_OVERLOADR, + PINI_EMPTY_07, + PINI_EMPTY_08, + PINI_BTN_ZUP, + PINI_BTN_ZDN, + PINI_LIMIT_LU, + PINI_LIMIT_LD, + PINI_LIMIT_RU, + PINI_LIMIT_RD, + PINI_STOP, + + } + + public enum DOName + { + PINO_GUIDEMOTOR_LDIR, + PINO_GUIDEMOTOR_LRUN, + PINO_GUIDEMOTOR_RDIR, + PINO_GUIDEMOTOR_RRUN, + PINO_EMPTY_04, + PINO_EMPTY_05, + PINO_EMPTY_06, + PINO_EMPTY_07, + } + public enum DOPin + { + PINO_GUIDEMOTOR_LDIR = 22, + PINO_GUIDEMOTOR_LRUN, + PINO_GUIDEMOTOR_RDIR, + PINO_GUIDEMOTOR_RRUN, + PINO_EMPTY_04, + PINO_EMPTY_05, + PINO_EMPTY_06, + PINO_EMPTY_07, + } + + public enum Rundirection : byte + { + Stop = 0, + Forward, + Backward, + Left, + Right, + EStop, + } + + public enum ZMotDirection + { + Stop = 0, + Up, + Down + } + + + private bool Sendcommand(eCommand cmd, char p1, char p2) + { + return Sendcommand(cmd, (byte)p1, (byte)p2); + } + private bool Sendcommand(eCommand cmd, char p1, byte p2 = 0) + { + return Sendcommand(cmd, (byte)p1, p2); + } + private bool Sendcommand(eCommand cmd, byte p1 = 0, byte p2 = 0) + { + if (cmd != eCommand.PINGCHK) + { + if (cmd == eCommand.SET_FLAG) + { + //플래그값은 공용변수로 변경 + var idx = (eVarBool)p1; + VAR.BOOL[idx] = p2 != 0; + RaiseMessage(MessageType.Send, string.Format("PLC CMD:{0} [{1}]=>{2}", cmd, (eVarBool)p1, p2)); + } + else + RaiseMessage(MessageType.Send, string.Format("PLC CMD:{0}, P1:{1}, P2:{2}", cmd, p1, p2)); + } + return Sendcommand((byte)cmd, p1, p2); + } + + public Boolean GetValueI(DIName idx) + { + return GetValueI((byte)idx); + } + public Boolean GetValueO(DOName idx) + { + return GetValueO((byte)idx); + } + public Boolean GetFlag(int flag) + { + return COMM.VAR.BOOL[flag]; + } + + public Boolean GetFlag(COMM.eVarBool flag) + { + return COMM.VAR.BOOL[(int)flag]; + } + + public Boolean SetFlag(byte idx, Boolean value) + { + + SetFlagTime[(int)idx] = DateTime.Now; //플래그기록을 시도한 시간 + + if (value == true) + return Sendcommand(eCommand.SET_FLAG, idx, 1); + else + return Sendcommand(eCommand.SET_FLAG, idx, 0); + } + + //public Boolean SetOpt_AD4Invert(Boolean value) + //{ + // var idx = (byte)PLCFlag.FLAG_ENABLE_AD4INVERT; + // SetFlagTime[idx] = DateTime.Now; //플래그기록을 시도한 시간 + + // if (value == true) + // return Sendcommand(eCommand.SET_FLAG, idx, 1); + // else + // return Sendcommand(eCommand.SET_FLAG, idx, 0); + //} + //public Boolean SetLog_SpeedControl(Boolean value) + //{ + // var idx = (byte)PLCFlag.FLAG_ENABLE_LOG_SPEED; + // SetFlagTime[idx] = DateTime.Now; //플래그기록을 시도한 시간 + + // if (value == true) + // return Sendcommand(eCommand.SET_FLAG, idx, 1); + // else + // return Sendcommand(eCommand.SET_FLAG, idx, 0); + //} + + + + public Boolean SetFlag(eVarBool flag, Boolean value) + { + VAR.BOOL[flag] = value; + return true; + } + + public Boolean SetEEP(eEEPAddress address, byte value) + { + RaiseMessage(MessageType.Normal, string.Format("[M] Set EEP Rom Addr={0},Val={1}", address, value)); + return Sendcommand(eCommand.SET_EEPROM, (byte)address, value); + } + + public Boolean SetOutput(byte pinNO, Boolean Value) + { + if (Value == true) return Sendcommand(eCommand.SET_DOUTPUT, pinNO, 1); + else return Sendcommand(eCommand.SET_DOUTPUT, pinNO, 0); + } + + public byte ApplySpeedH = 0; + public byte ApplySpeedL = 0; + public byte ApplySpeedC = 0; + public byte ApplySpeedZ = 0; + + public DateTime SaveTime = DateTime.Parse("1982-11-23"); + + + public Boolean SetPinReverse(byte High, byte Low) + { + RaiseMessage(MessageType.Normal, + string.Format("Pin Reverse H={0},L={1}", High, Low) + ); + + bool b1 = Sendcommand(eCommand.SET_EEPROM, (byte)eEEPAddress.EEP_DIREVH, High); + bool b2 = Sendcommand(eCommand.SET_EEPROM, (byte)eEEPAddress.EEP_DIREVL, Low); + return b1 && b2; + } + public Boolean SetMotorUpTime(byte value) + { + RaiseMessage(MessageType.Normal, + string.Format("Motor Up Time Value={0}", value) + ); + + bool b1 = Sendcommand(eCommand.SET_EEPROM, (byte)eEEPAddress.EEP_UPTIME, value); + return b1; + } + + public Boolean SaveEEPROM() + { + RaiseMessage(MessageType.Normal, + string.Format("Save EEPROM") + ); + + bool b1 = Sendcommand(eCommand.SAVE, 0); + return b1; + } + public Boolean LoadEEPROM() + { + RaiseMessage(MessageType.Normal, + string.Format("Load EEPROM") + ); + + bool b1 = Sendcommand(eCommand.LOAD, 0); + return b1; + } + + //public double ManualSpeed = 0.0; + //public bool SetManualSpeed(double Percvalue) + //{ + // var Speed = (byte)((Percvalue / 100.0) * 255.0); + // ManualSpeed = Percvalue; + // // datamanager.COMCONTROLLER.Speak($"{Percvalue} 퍼센트 설정"); + // RaiseMessage(MessageType.Normal, + // string.Format("Convert Speed Hold {0}%->{1}", Percvalue, Speed), + // false); + + // return Sendcommand(eCommand.SET_MANUALSPEED, Speed); + //} + + public DateTime LastPingTime = DateTime.Parse("1982-11-23"); + + + public bool SendPing() + { + LastPingTime = DateTime.Now; + return Sendcommand(eCommand.PINGCHK, 0, 0); + } + + + + + + public bool ZMot(ZMotDirection dir) + { + if (dir == ZMotDirection.Up) + return Sendcommand(eCommand.GUIDE_MOT, 'A', 'P'); //up + else if (dir == ZMotDirection.Down) + return Sendcommand(eCommand.GUIDE_MOT, 'A', 'N'); //down + else if (dir == ZMotDirection.Stop) + return Sendcommand(eCommand.GUIDE_MOT, 'A', 'S'); //stop + else return false; + } + public bool ZMot_Left(ZMotDirection dir) + { + if (dir == ZMotDirection.Up) + return Sendcommand(eCommand.GUIDE_MOT, 'L', 'P'); //up + else if (dir == ZMotDirection.Down) + return Sendcommand(eCommand.GUIDE_MOT, 'L', 'N'); //down + else if (dir == ZMotDirection.Stop) + return Sendcommand(eCommand.GUIDE_MOT, 'L', 'S'); //stop + else return false; + + } + public bool ZMot_Right(ZMotDirection dir) + { + if (dir == ZMotDirection.Up) + return Sendcommand(eCommand.GUIDE_MOT, 'R', 'P'); //up + else if (dir == ZMotDirection.Down) + return Sendcommand(eCommand.GUIDE_MOT, 'R', 'N'); //down + else if (dir == ZMotDirection.Stop) + return Sendcommand(eCommand.GUIDE_MOT, 'R', 'S'); //stop + else return false; + } + + /// + /// 오버로드 또는 L이 활성화되되면 True를 반환함 + /// + /// + public Boolean IsOverLoad() + { + if (GetValueI(DIName.PINI_OVERLOADL) || GetValueI(DIName.PINI_OVERLOADR)) return true; + else return false; + } + public Boolean IsLimitUp() + { + if (GetValueI(DIName.PINI_LIMIT_LU) || GetValueI(DIName.PINI_LIMIT_RU)) return true; + else return false; + } + public Boolean IsLimitDn() + { + if (GetValueI(DIName.PINI_LIMIT_LD) || GetValueI(DIName.PINI_LIMIT_RD)) return true; + else return false; + } + + } +} diff --git a/Cs_HMI/SubProject/ProPLC/PLC.Net45.csproj b/Cs_HMI/SubProject/ProPLC/PLC.Net45.csproj new file mode 100644 index 0000000..8c8f3d9 --- /dev/null +++ b/Cs_HMI/SubProject/ProPLC/PLC.Net45.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {476C8E64-7B6B-4554-ACA2-04302715750F} + Library + Properties + Device + Device_PLC + v4.8 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + {14e8c9a5-013e-49ba-b435-efefc77dd623} + CommData + + + + \ No newline at end of file diff --git a/Cs_HMI/SubProject/ProPLC/Properties/AssemblyInfo.cs b/Cs_HMI/SubProject/ProPLC/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..64e7d13 --- /dev/null +++ b/Cs_HMI/SubProject/ProPLC/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("Device_PLC")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Device_PLC")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("476c8e64-7b6b-4554-aca2-04302715750f")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 +// 기본값으로 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/SubProject/arFrameControl/GridView/ColorListItem.cs b/Cs_HMI/SubProject/arFrameControl/GridView/ColorListItem.cs new file mode 100644 index 0000000..08251be --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/GridView/ColorListItem.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; + +namespace arFrame.Control +{ + [TypeConverterAttribute(typeof(ExpandableObjectConverter))] + public class ColorListItem + { + public System.Drawing.Color BackColor1 { get; set; } + public System.Drawing.Color BackColor2 { get; set; } + public string Remark { get; set; } + + public ColorListItem() + { + BackColor1 = System.Drawing.Color.Transparent; + BackColor2 = System.Drawing.Color.Transparent; + Remark = string.Empty; + } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/GridView/GridItem.cs b/Cs_HMI/SubProject/arFrameControl/GridView/GridItem.cs new file mode 100644 index 0000000..cc6d377 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/GridView/GridItem.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; + +namespace arFrame.Control +{ + [TypeConverterAttribute(typeof(ExpandableObjectConverter))] + public class GridViewItem + { + public int row { get; private set; } + public int col { get; private set; } + + public int idx { get; private set; } + [Category("arFrame"), DisplayName("Tag")] + public string Tag { get; set; } + [Category("arFrame"), DisplayName("글자 정렬 방식")] + public System.Drawing.ContentAlignment TextAlign { get; set; } + [Category("arFrame"), DisplayName("글자 여백")] + public System.Windows.Forms.Padding Padding { get; set; } + [Category("arFrame"), DisplayName("메뉴 사용여부"), Description("활성화시 메뉴의 클릭이벤트가 발생하지 않습니다")] + public Boolean Enable { get; set; } + + public System.Drawing.Color BackColor1 { get; set; } + public System.Drawing.Color BackColor2 { get; set; } + + public Boolean Dirty { get; set; } + + public System.Drawing.RectangleF rect { get; set; } + + [Category("arFrame"), DisplayName("번호")] + public int No { get; set; } + + public GridViewItem(int idx_,int _r,int _c) + { + this.row = _r; + this.col = _c; + BackColor1 = System.Drawing.Color.Transparent; + BackColor2 = System.Drawing.Color.Transparent; + rect = System.Drawing.RectangleF.Empty; + Enable = true; + this.idx = idx_; + TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + Padding = new System.Windows.Forms.Padding(0, 0, 0, 0); + No = 0; + this.Dirty = true; + } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/GridView/GridView.Designer.cs b/Cs_HMI/SubProject/arFrameControl/GridView/GridView.Designer.cs new file mode 100644 index 0000000..2a9a87e --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/GridView/GridView.Designer.cs @@ -0,0 +1,36 @@ +namespace arFrame.Control +{ + partial class GridView + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/GridView/GridView.cs b/Cs_HMI/SubProject/arFrameControl/GridView/GridView.cs new file mode 100644 index 0000000..26be37a --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/GridView/GridView.cs @@ -0,0 +1,624 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace arFrame.Control +{ + public partial class GridView : System.Windows.Forms.Control + { + private int bordersize = 0; + private int menubordersize = 1; + private int menugap = 5; + private System.Windows.Forms.Padding padding = new Padding(3, 3, 3, 3); + private System.Drawing.Color backcolor = System.Drawing.Color.White; + private System.Drawing.Color bordercolor = System.Drawing.Color.Black; + private Boolean textattachtoimage = true; + private Boolean _showIndexString = true; + + private System.Drawing.Color _shadowColor = System.Drawing.Color.Transparent; + private System.Drawing.Color foreColorPin = System.Drawing.Color.WhiteSmoke; + private System.Drawing.Font fontPin = new Font("Consolas", 8, FontStyle.Bold); + + private Point _matrixsize = new Point(8, 2); + public Point MatrixSize { get { return _matrixsize; } set { _matrixsize = value; ResetArray(); RemakeChartRect(); } } + + [Browsable(false)] + public int ColumnCount { get { return _matrixsize.X; } } + [Browsable(false)] + public int RowCount { get { return _matrixsize.Y; } } + public int ItemCount { get { return ColumnCount * RowCount; } } + + private GridViewItem[] Items; + + private UInt16[] _values; + private string[] _titles; + private string[] _tags; + private string[] _names; + private ColorListItem[] _colorlist; + public ColorListItem[] ColorList { get { return _colorlist; } set { _colorlist = value; this.Invalidate(); } } + + public string[] Names { get { return _names; } set { _names = value; Invalidate(); } } + public string[] Titles { get { return _titles; } set { _titles = value; Invalidate(); } } + public UInt16[] Values { get { return _values; } set { _values = value; Invalidate(); } } + public string[] Tags { get { return _tags; } set { _tags = value; } } + + private bool _showdebuginfo = false; + public Boolean showDebugInfo { get { return _showdebuginfo; } set { _showdebuginfo = value; Invalidate(); } } + + public void setNames(string[] value) + { + _names = value; + } + + public void setTitle(string[] value) + { + List titlerows = new List(); + List tagrows = new List(); + + for (int i = 0; i < value.Length; i++) + { + var r = (int)(Math.Floor((double)(i / ColumnCount))); + var c = i % ColumnCount; + + if (titlerows.Count < r + 1) titlerows.Add(string.Empty); + if (tagrows.Count < r + 1) tagrows.Add(string.Empty); + + var prestr = titlerows[r]; + if (prestr != "") prestr += "|"; + titlerows[r] = prestr + value[i]; + + var prestr_t = tagrows[r]; + if (prestr_t != "") prestr_t += "|"; + tagrows[r] = prestr_t + ""; + + if (i < itemCount) this.Items[i].Enable = true; + } + this._titles = titlerows.ToArray(); + this._tags = tagrows.ToArray(); + } + + public Boolean setTitle(int row, int col, string value, string itemtag = "") + { + if (_titles == null) _titles = new string[0]; + if (_tags == null) _tags = new string[0]; + + if ( row >= _titles.Length) Array.Resize(ref _titles, row + 1); + if( row >= _tags.Length) Array.Resize(ref _tags, row+1); + + if (_titles[row] == null) _titles[row] = string.Empty; + if (_tags[row] == null) _tags[row] = string.Empty; + + var linebuf = _titles[row].Split('|'); + var linebuf_t = _tags[row].Split('|'); + + if (col >= linebuf.Length) Array.Resize(ref linebuf, col + 1); + if (col >= linebuf_t.Length) Array.Resize(ref linebuf_t, col + 1); + + linebuf[col] = value; + linebuf_t[col] = itemtag; + + _titles[row] = string.Join("|", linebuf); + _tags[row] = string.Join("|", linebuf_t); + return true; + //var idx = row * this.ColumnCount + col; + //return setTitle(idx, value); + } + public Boolean setTitle(int idx, string value) + { + if (idx < ColumnCount) return setTitle(0, idx, value); + else + { + //줄값이 필요하다 + var row = (int)(Math.Floor((double)(idx / ColumnCount))); + var col = idx % ColumnCount; + return setTitle(row, col, value); + } + } + + + public void setValue(bool[] value) + { + var v = new UInt16[value.Length]; + for (int i = 0; i < value.Length; i++) + v[i] = (UInt16)(value[i] ? 1 : 0); + _values = v; + } + public void setValue(UInt16[] value) + { + _values = value; + } + public Boolean setValue(int idx, ushort value) + { + if (this._values == null) _values = new ushort[idx + 1]; + if (idx >= this._values.Length) Array.Resize(ref _values, idx + 1); + this._values[idx] = value; + return true; + } + public Boolean setTag(string[] value) + { + this._tags = value; + return true; + } + public Boolean setTag(int idx, string value) + { + if (this._tags == null) Tags = new string[idx + 1]; + if (idx >= this.Tags.Length) Array.Resize(ref _tags, idx + 1); + this._tags[idx] = value; + return true; + } + public void ClearValue(ushort defaultValue = 0) + { + if (_values != null) + for(int i = 0; i < _values.Length;i++) + _values[i] = defaultValue; + } + public void ClearTitle(string defaultValue = "") + { + if (_values != null) + for (int i = 0; i < _titles.Length; i++) + _titles[i] = defaultValue; + } + public void ClearTag(string defaultValue = "") + { + if (_tags != null) + for (int i = 0; i < _tags.Length; i++) + _tags[i] = defaultValue; + } + public void setValue(ushort value) + { + for(int i = 0; i < _values.Length;i++) + this._values[i] = value; + } + public void setItemEnable(int idx, bool value) + { + if (idx >= _values.Length || idx >= this.Items.Length) return; + this.Items[idx].Enable = value; + } + + /// + /// 지정된 컬러태그값을 입력한다. + /// + /// + /// + /// + public Boolean setValue(int idx, string tagString) + { + //동일태그값을 찾는다 + if (idx >= _values.Length) return false; + + int value = -1; + for (int i = 0; i < ColorList.Length; i++) + if (ColorList[i].Remark.ToLower() == tagString.ToLower()) + { + value = i; + break; + } + + if (value != -1) + { + this._values[idx] = (ushort)value; + this.Items[idx].Enable = true; + return true; + } + else return false; + + + } + public Boolean setValue(int idx, bool value) + { + return setValue(idx, (ushort)(value ? 1 : 0)); + } + public Boolean setValue(int row, int col, ushort value) + { + var idx = row * this.ColumnCount + col; + return setValue(idx, value); + } + public Boolean setValue(int row, int col, int value) + { + var idx = row * this.ColumnCount + col; + return setValue(idx, (ushort)value); + } + public Boolean setValueToggle(int row, int col, ushort value1,ushort value2) + { + var idx = row * this.ColumnCount + col; + if(getValue(idx) == value1) return setValue(idx, value2); + else return setValue(idx, value1); + } + public Boolean setValue(int row, int col, bool value) + { + var idx = row * this.ColumnCount + col; + return setValue(idx, (ushort)(value ? 1 : 0)); + } + public Boolean setValue(int row, int col, string value) + { + var idx = row * this.ColumnCount + col; + return setValue(idx, value); + } + + public ushort getValue(int idx) + { + if (idx >= _values.Length) return 0; + return _values[idx]; + } + public ushort getValue(int row, int col) + { + var idx = row * this.ColumnCount + col; + return getValue(idx); + } + + [Category("arFrame")] + public bool ShowIndexString { get { return _showIndexString; } set { _showIndexString = value; Invalidate(); } } + + [Category("arFrame"), DisplayName("테두리 굵기")] + public int BorderSize { get { return bordersize; } set { this.bordersize = value; Invalidate(); } } + [Category("arFrame"), DisplayName("메뉴 테두리 굵기")] + public int MenuBorderSize { get { return menubordersize; } set { this.menubordersize = value; Invalidate(); } } + [Category("arFrame"), DisplayName("메뉴 간격")] + public int MenuGap { get { return menugap; } set { this.menugap = value; RemakeChartRect(); Invalidate(); } } + [Category("arFrame"), DisplayName("글자를 이미지 다음에 표시"), Description("이미지가 있는 경우 해당 이미지 옆에 글자를 붙입니다")] + public Boolean TextAttachToImage { get { return textattachtoimage; } set { this.textattachtoimage = value; Invalidate(); } } + + [Category("arFrame"), DisplayName("색상-테두리")] + public System.Drawing.Color BorderColor { get { return bordercolor; } set { this.bordercolor = value; Invalidate(); } } + [Category("arFrame"), DisplayName("내부 여백")] + public new System.Windows.Forms.Padding Padding { get { return padding; } set { this.padding = value; RemakeChartRect(); Invalidate(); } } + + [Category("arFrame"), DisplayName("색상-전체배경색")] + public override System.Drawing.Color BackColor { get { return backcolor; } set { this.backcolor = value; Invalidate(); } } + + [Category("arFrame"), DisplayName("색상-글자(그림자)")] + public System.Drawing.Color ShadowColor { get { return _shadowColor; } set { _shadowColor = value; this.Invalidate(); } } + + [Category("arFrame"), DisplayName("색상-글자")] + public override Color ForeColor { get { return base.ForeColor; } set { base.ForeColor = value; } } + + [Category("arFrame"), DisplayName("색상-글자(번호)")] + public Color ForeColorPin { get { return foreColorPin; } set { foreColorPin = value; } } + + [Category("arFrame"), DisplayName("글꼴-번호")] + public Font FontPin { get { return fontPin; } set { fontPin = value; Invalidate(); } } + [Category("arFrame"), DisplayName("글꼴-항목")] + public override Font Font { get { return base.Font; } set { base.Font = value; Invalidate(); } } + + private int mouseOverItemIndex = -1; + public GridView() + { + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + //값과 이름은 외부의 값을 사용한다 + ResetArray(); + + if (MinimumSize.Width == 0 || MinimumSize.Height == 0) + MinimumSize = new Size(100, 50); + } + + + void ResetArray() + { + if (this._values != null) Array.Resize(ref this._values, itemCount);// = new UInt16[itemCount]; + // if (this._titles != null) Array.Resize(ref this._titles, itemCount);// + // if (this._names != null) Array.Resize(ref this._names, itemCount);// + } + + int itemCount { get { return ColumnCount * RowCount; } } + protected override void OnSizeChanged(EventArgs e) + { + base.OnSizeChanged(e); + RemakeChartRect(); + } + + public event EventHandler ItemClick; + public class ItemClickEventArgs : EventArgs + { + public int idx { get; set; } + public GridViewItem Item { get; set; } + public ItemClickEventArgs(int idx_, GridViewItem item) + { + this.Item = item; + this.idx = idx_; + } + } + + protected override void OnMouseClick(MouseEventArgs e) + { + //마우스클릭시 해당 버튼을 찾아서 반환한다. + if (Items == null || Items.Length < 1) return; + for (int i = 0; i < Items.Length; i++) + { + var rect = Items[i].rect;//[i]; + if (rect.Contains(e.Location)) + { + var menu = Items[i]; + + //미사용개체는 이벤트를 아에 발생하지 않는다 + if (menu.Enable == true && ItemClick != null) + ItemClick(this, new ItemClickEventArgs(i, menu)); + break; + } + } + } + + protected override void OnMouseLeave(EventArgs e) + { + this.mouseOverItemIndex = -1; + this.Invalidate(); + } + protected override void OnMouseMove(MouseEventArgs e) + { + if (Items == null || Items.Length < 1) + { + this.mouseOverItemIndex = -1; + return; + } + + for (int i = 0; i < Items.Length; i++) + { + var rect = Items[i].rect;// rects[i]; + if (rect.Contains(e.Location)) + { + if (i != mouseOverItemIndex) + { + mouseOverItemIndex = i; + this.Invalidate(); + } + + break; + } + } + } + public void setItemTextAlign(int row, int col, System.Drawing.ContentAlignment TextAlign) + { + var item = this.Items.Where(t => t.row == row && t.col == col).FirstOrDefault(); + if (item != null) item.TextAlign = TextAlign; + } + public void setItemTextAlign(System.Drawing.ContentAlignment TextAlign) + { + foreach (var item in this.Items) + item.TextAlign = TextAlign; + } + + protected override void OnPaint(PaintEventArgs pe) + { + //배경그리기 + //using (var sb = new System.Drawing.Drawing2D.LinearGradientBrush(DisplayRectangle, BackColor, BackColor2On, System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + pe.Graphics.FillRectangle(new SolidBrush(BackColor), DisplayRectangle); + + if (Items == null) + { + pe.Graphics.DrawString("no items", this.Font, Brushes.Red, 100, 100); + return; + } + + var items = Items.OrderBy(t => t.No); + foreach (var menu in items) + { + drawItem(menu.idx, pe.Graphics); + } + + //테두리 그리기 + if (BorderSize > 0) + { + pe.Graphics.DrawRectangle(new Pen(this.BorderColor, BorderSize), + this.DisplayRectangle.Left, + this.DisplayRectangle.Top, + this.DisplayRectangle.Width - 1, + this.DisplayRectangle.Height - 1); + } + } + + public void drawItem(int itemIndex, Graphics g = null) + { + if (g == null) g = this.CreateGraphics(); + var menu = this.Items[itemIndex]; + + if (menu.rect == RectangleF.Empty) return; + + var rect = menu.rect;// rects[i]; + + var diplayText = string.Empty; + + //타이틀이 줄번호별로 처리됨 + if (_titles != null && menu.row < _titles.Length && _titles[menu.row] != null ) + { + var linebif = _titles[menu.row].Split('|'); + if (menu.col < linebif.Length) + diplayText = linebif[menu.col]; + } + + UInt16 Value = 0; + if (_values != null && menu.idx < _values.Length) Value = _values[menu.idx]; + + //배경이 투명이 아니라면 그린다. + var bgColor1 = Color.FromArgb(30, 30, 30);// BackColor1Off; + var bgColor2 = Color.FromArgb(30, 30, 30);// BackColor2Off; + + //해당 값에 따른 컬러값을 읽는다. + if (ColorList != null && Value < ColorList.Length) + { + bgColor1 = this.ColorList[Value].BackColor1; + bgColor2 = this.ColorList[Value].BackColor2; + } + + using (var sb = new System.Drawing.Drawing2D.LinearGradientBrush(rect, bgColor1, bgColor2, System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + g.FillRectangle(sb, rect); + + // if (mouseOverItemIndex == menu.idx) + // this.Cursor = Cursors.Hand; + // else + // this.Cursor = Cursors.Arrow; + + //테두리를 그리는 속성과 트기가 설정된 경우에만 표시 + //if (mouseOverItemIndex == i) + // { + // pe.Graphics.DrawRectangle(new Pen(Color.DeepSkyBlue), rect.Left, rect.Top, rect.Width, rect.Height); + //} + //else + { + if (MenuBorderSize > 0) + { + using (var p = new Pen(BorderColor, MenuBorderSize)) + g.DrawRectangle(p, rect.Left, rect.Top, rect.Width, rect.Height); + } + } + + //인덱스번호 출력 + if (ShowIndexString && _names != null && menu.idx < _names.Length) + { + //표시글자 + var idxstr = string.Format("[{0}] {1}", menu.idx, _names[menu.idx]); + + //그림자 추가 + if (ShadowColor != System.Drawing.Color.Transparent) + g.DrawString(idxstr, FontPin, new SolidBrush(ShadowColor), menu.rect.Left + 4, menu.rect.Top + 4); + + //일반글자표시 + g.DrawString(idxstr, FontPin, new SolidBrush(this.ForeColorPin), menu.rect.Left + 3, menu.rect.Top + 3); + } + + if (diplayText != "") + { + using (StringFormat sf = new StringFormat(StringFormatFlags.NoClip)) + { + //글자를 텍스트 이후에 붙이는 거라면? + if (menu.TextAlign == ContentAlignment.BottomCenter || menu.TextAlign == ContentAlignment.BottomLeft || + menu.TextAlign == ContentAlignment.BottomRight) sf.LineAlignment = StringAlignment.Far; + else if (menu.TextAlign == ContentAlignment.MiddleCenter || menu.TextAlign == ContentAlignment.MiddleLeft || + menu.TextAlign == ContentAlignment.MiddleRight) sf.LineAlignment = StringAlignment.Center; + else if (menu.TextAlign == ContentAlignment.TopCenter || menu.TextAlign == ContentAlignment.TopLeft || + menu.TextAlign == ContentAlignment.TopRight) sf.LineAlignment = StringAlignment.Near; + + if (menu.TextAlign == ContentAlignment.BottomCenter || menu.TextAlign == ContentAlignment.MiddleCenter || + menu.TextAlign == ContentAlignment.TopCenter) sf.Alignment = StringAlignment.Center; + else if (menu.TextAlign == ContentAlignment.BottomLeft || menu.TextAlign == ContentAlignment.MiddleLeft || + menu.TextAlign == ContentAlignment.TopLeft) sf.Alignment = StringAlignment.Near; + else if (menu.TextAlign == ContentAlignment.BottomRight || menu.TextAlign == ContentAlignment.MiddleRight || + menu.TextAlign == ContentAlignment.TopRight) sf.Alignment = StringAlignment.Far; + + //그림자 추가 + if (ShadowColor != System.Drawing.Color.Transparent) + g.DrawString(diplayText, this.Font, new SolidBrush(ShadowColor), + new RectangleF((float)(rect.Left + 1f), (float)(rect.Top + 1f), (float)rect.Width, (float)rect.Height), sf); + + g.DrawString(diplayText, this.Font, new SolidBrush(ForeColor), rect, sf); + } + } + + if (showDebugInfo) + { + g.DrawString(Value.ToString(), this.fontPin, Brushes.SkyBlue, rect.Left, rect.Top); + } + + } + + /// + /// arFrame 전용 속성값을 복사 합니다 + /// + /// + public void copyTo(GridView ctl) + { + ctl.backcolor = this.backcolor; + ctl.menugap = this.menugap; + ctl.Items = this.Items; + ctl.menubordersize = this.menubordersize; + ctl.padding = this.padding; + ctl.ForeColor = this.ForeColor; + ctl.Font = this.Font; + ctl.TextAttachToImage = this.TextAttachToImage; + ctl.bordercolor = this.bordercolor; + ctl.bordersize = this.bordersize; + } + + public void RemakeChartRect() + { + if (DisplayRectangle == Rectangle.Empty) return; + + double x = 0; + double y = 0; + double w = DisplayRectangle.Width / (ColumnCount * 1.0); + double h = DisplayRectangle.Height / (RowCount * 1.0); + + if (this.Items == null || itemCount != this.Items.Length) + { + //아이템갯수가 달라졌으므로 다시 갱신해야함 + GridViewItem[] item = new GridViewItem[RowCount * ColumnCount]; + for (int r = 0; r < RowCount; r++) + { + for (int c = 0; c < ColumnCount; c++) + { + int idx = r * ColumnCount + c; + item[idx] = new GridViewItem(idx, r, c); + item[idx].Enable = false; + item[idx].Padding = new Padding(0, 0, 0, 0); + item[idx].TextAlign = ContentAlignment.MiddleCenter; + x = (c * w); + y = (r * h); + item[idx].rect = new RectangleF((float)x, (float)y, (float)w, (float)h); + } + } + + this.Items = item; + } + else + { + //아이템의 갯수는 같으므로 좌표값만 변경해준다. + for (int r = 0; r < RowCount; r++) + { + for (int c = 0; c < ColumnCount; c++) + { + int idx = r * ColumnCount + c; + var item = Items[idx]; + x = (c * w); + y = (r * h); + item.Dirty = true; + item.rect = new RectangleF((float)x, (float)y, (float)w, (float)h); + } + } + } + this.Invalidate(); + + //int i = 0; + //var menuList = this.Items.OrderBy(t => t.No).ToArray(); + //foreach (var menu in menuList) + //{ + // int x, y, w, h; + // // var menu = menus[i]; + + // var mWidth = menuwidth; + // if (menu.MenuWidth > 0) mWidth = menu.MenuWidth; + + // w = mWidth; + // h = DisplayRectangle.Height - Padding.Top - Padding.Bottom; + + // if (menu.isRightMenu) + // { + // x = DisplayRectangle.Right - Padding.Right - (rightAcc) - (MenuGap * rightIdx); + // y = DisplayRectangle.Top + Padding.Top; + // rightAcc += 0;// = 0;// x; + // rightIdx += 1; + // } + // else + // { + // x = DisplayRectangle.Left + Padding.Left + leftAcc + (MenuGap * leftIdx); + // y = DisplayRectangle.Top + Padding.Top; + // leftAcc += mWidth; + // leftIdx += 1; + // } + // rects[i] = new Rectangle(x, y, w, h); + // i += 1; + //} + } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuControl.Designer.cs b/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuControl.Designer.cs new file mode 100644 index 0000000..a535234 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuControl.Designer.cs @@ -0,0 +1,36 @@ +namespace arFrame.Control +{ + partial class MenuControl + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuControl.cs b/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuControl.cs new file mode 100644 index 0000000..c089624 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuControl.cs @@ -0,0 +1,676 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Xml; + +namespace arFrame.Control +{ + + public partial class MenuControl : System.Windows.Forms.Control + { + private int bordersize = 0; + private int menubordersize = 1; + private int menuwidth = 100; + private int menugap = 5; + private System.Windows.Forms.Padding padding = new Padding(3, 3, 3, 3); + private System.Drawing.Color backcolor = System.Drawing.Color.White; + private System.Drawing.Color backcolor2 = System.Drawing.Color.Gainsboro; + private System.Drawing.Color bordercolor = System.Drawing.Color.Black; + private Boolean enablemenubakcolor = false; + private Boolean enablemenuborder = false; + private Boolean textattachtoimage = true; + + [Category("arFrame"), DisplayName("메뉴")] + public MenuItem[] menus { get; set; } + + private Rectangle[] rects = null; + + [Category("arFrame"), DisplayName("테두리 굵기")] + public int BorderSize { get { return bordersize; } set { this.bordersize = value; Invalidate(); } } + [Category("arFrame"), DisplayName("메뉴 테두리 굵기")] + public int MenuBorderSize { get { return menubordersize; } set { this.menubordersize = value; Invalidate(); } } + [Category("arFrame"), DisplayName("메뉴 너비")] + public int MenuWidth { get { return menuwidth; } set { this.menuwidth = value; RemakeChartRect(); Invalidate(); } } + [Category("arFrame"), DisplayName("메뉴 간격")] + public int MenuGap { get { return menugap; } set { this.menugap = value; RemakeChartRect(); Invalidate(); } } + [Category("arFrame"), DisplayName("기능-메뉴별 배경색")] + public Boolean EnableMenuBackColor { get { return enablemenubakcolor; } set { this.enablemenubakcolor = value; Invalidate(); } } + [Category("arFrame"), DisplayName("기능-메뉴별 테두리")] + public Boolean EnableMenuBorder { get { return enablemenuborder; } set { this.enablemenuborder = value; Invalidate(); } } + [Category("arFrame"), DisplayName("글자를 이미지 다음에 표시"), Description("이미지가 있는 경우 해당 이미지 옆에 글자를 붙입니다")] + public Boolean TextAttachToImage { get { return textattachtoimage; } set { this.textattachtoimage = value; Invalidate(); } } + [Category("arFrame"), DisplayName("이미지 표시 여백(좌,상)")] + public System.Drawing.Point ImagePadding { get; set; } + [Category("arFrame"), DisplayName("이미지 표시 크기(너비,높이)")] + public System.Drawing.Size ImageSize { get; set; } + [Category("arFrame"), DisplayName("색상-테두리")] + public System.Drawing.Color BorderColor { get { return bordercolor; } set { this.bordercolor = value; Invalidate(); } } + [Category("arFrame"), DisplayName("내부 여백")] + public new System.Windows.Forms.Padding Padding { get { return padding; } set { this.padding = value; RemakeChartRect(); Invalidate(); } } + [Category("arFrame"), DisplayName("색상-배경1")] + public override System.Drawing.Color BackColor { get { return backcolor; } set { this.backcolor = value; Invalidate(); } } + [Category("arFrame"), DisplayName("색상-배경2")] + public System.Drawing.Color BackColor2 { get { return backcolor2; } set { this.backcolor2 = value; Invalidate(); } } + [Category("arFrame"), DisplayName("색상-글자")] + public override Color ForeColor { get { return base.ForeColor; } set { base.ForeColor = value; } } + + private int mouseOverItemIndex = -1; + public MenuControl() + { + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + + + ImagePadding = new System.Drawing.Point(0, 0); + ImageSize = new System.Drawing.Size(24, 24); + + + if (MinimumSize.Width == 0 || MinimumSize.Height == 0) + MinimumSize = new Size(100, 50); + + } + protected override void OnSizeChanged(EventArgs e) + { + base.OnSizeChanged(e); + RemakeChartRect(); + } + + + public event EventHandler ItemClick; + public class MenuEventArgs : EventArgs + { + public string Command { get; set; } + public int idx { get; set; } + public MenuEventArgs(string cmd_, int idx_) + { + this.Command = cmd_; + this.idx = idx_; + } + } + + protected override void OnMouseClick(MouseEventArgs e) + { + // if(DesignMode) + // { + // if(e.Button == System.Windows.Forms.MouseButtons.Right) + // { + // System.Windows.Forms.MessageBox.Show("Sdf"); + + // } + // } + // else + { + //마우스클릭시 해당 버튼을 찾아서 반환한다. + if (menus == null || menus.Length < 1) return; + for (int i = 0; i < menus.Length; i++) + { + var rect = rects[i]; + if (rect.Contains(e.Location)) + { + var menu = menus[i]; + + //미사용개체는 이벤트를 아에 발생하지 않는다 + if (menu.Enable == true && ItemClick != null) + ItemClick(this, new MenuEventArgs(menu.Command, i)); + break; + } + } + } + + } + protected override void OnMouseLeave(EventArgs e) + { + this.mouseOverItemIndex = -1; + this.Invalidate(); + } + protected override void OnMouseMove(MouseEventArgs e) + { + if (menus == null || menus.Length < 1) + { + this.mouseOverItemIndex = -1; + return; + } + for (int i = 0; i < menus.Length; i++) + { + var rect = rects[i]; + if (rect.Contains(e.Location)) + { + if (i != mouseOverItemIndex) + { + mouseOverItemIndex = i; + this.Invalidate(); + } + + break; + } + } + } + + protected override void OnPaint(PaintEventArgs pe) + { + + + // if(DesignMode) + // { + // pe.Graphics.FillRectangle(Brushes.Red, this.DisplayRectangle); + // } + //else + { + //배경그리기 + using (var sb = new System.Drawing.Drawing2D.LinearGradientBrush(DisplayRectangle, BackColor, BackColor2, System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + pe.Graphics.FillRectangle(sb, DisplayRectangle); + } + + //테두리 그리기 + if (BorderSize > 0) + { + pe.Graphics.DrawRectangle(new Pen(this.BorderColor, BorderSize), + this.DisplayRectangle.Left, + this.DisplayRectangle.Top, + this.DisplayRectangle.Width - 1, + this.DisplayRectangle.Height - 1); + } + + //커서모양 + if (mouseOverItemIndex == -1) this.Cursor = Cursors.Arrow; + else this.Cursor = Cursors.Hand; + + if (rects == null) RemakeChartRect(); + if (rects != null && rects.Length > 0) + { + StringFormat sf = new StringFormat(StringFormatFlags.NoClip); + var items = menus.OrderBy(t => t.No); + int i = 0; + foreach (var menu in items) + { + var rect = rects[i]; + + //배경이 투명이 아니라면 그린다. + if (mouseOverItemIndex == i) + { + //마우스오버된놈이다. + using (var sb = new System.Drawing.Drawing2D.LinearGradientBrush(rect, Color.FromArgb(100, Color.LightSkyBlue), Color.FromArgb(100, Color.DeepSkyBlue), System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + pe.Graphics.FillRectangle(sb, rect); + } + else + { + if (this.enablemenubakcolor == true && menu.BackColor != System.Drawing.Color.Transparent && menu.BackColor2 != System.Drawing.Color.Transparent) + { + using (var sb = new System.Drawing.Drawing2D.LinearGradientBrush(rect, menu.BackColor, menu.BackColor2, System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + pe.Graphics.FillRectangle(sb, rect); + } + + } + + //이미지표시 + int ix, iy, iw, ih; + ix = iy = iw = ih = 0; + if (menu.Image != null) + { + ix = rect.Left; + iy = rect.Top; + iw = ImageSize.Width; + ih = ImageSize.Height; + + if (menu.ImageAlign == ContentAlignment.BottomCenter || menu.ImageAlign == ContentAlignment.BottomLeft || + menu.ImageAlign == ContentAlignment.BottomRight) iy += DisplayRectangle.Bottom - ih; + else if (menu.ImageAlign == ContentAlignment.MiddleCenter || menu.ImageAlign == ContentAlignment.MiddleLeft || + menu.ImageAlign == ContentAlignment.MiddleRight) iy += (int)(DisplayRectangle.Top + ((rect.Height - ih) / 2.0)); + else if (menu.ImageAlign == ContentAlignment.TopCenter || menu.ImageAlign == ContentAlignment.TopLeft || + menu.ImageAlign == ContentAlignment.TopRight) iy += DisplayRectangle.Top; + + if (menu.ImageAlign == ContentAlignment.BottomCenter || menu.ImageAlign == ContentAlignment.MiddleCenter || + menu.ImageAlign == ContentAlignment.TopCenter) ix += (int)(DisplayRectangle.Left + ((rect.Width - iw) / 2.0)); + else if (menu.ImageAlign == ContentAlignment.BottomLeft || menu.ImageAlign == ContentAlignment.MiddleLeft || + menu.ImageAlign == ContentAlignment.TopLeft) ix += DisplayRectangle.Left; + else if (menu.ImageAlign == ContentAlignment.BottomRight || menu.ImageAlign == ContentAlignment.MiddleRight || + menu.ImageAlign == ContentAlignment.TopRight) ix += DisplayRectangle.Right - iw; + + if (menu.ImagePadding.X != 0 || menu.ImagePadding.Y != 0) + { + ix += menu.ImagePadding.X; + iy += menu.ImagePadding.Y; + } + else + { + ix += ImagePadding.X; + iy += ImagePadding.Y; + } + if (menu.ImageSize.Width != 0 && menu.ImageSize.Height != 0) + { + iw = menu.ImageSize.Width; + ih = menu.ImageSize.Height; + } + + pe.Graphics.DrawImage(menu.Image, + new Rectangle(ix, iy, iw, ih)); + } + + //테두리를 그리는 속성과 트기가 설정된 경우에만 표시 + if (mouseOverItemIndex == i) + { + pe.Graphics.DrawRectangle(new Pen(Color.DeepSkyBlue), rect); + } + else + { + if (EnableMenuBorder && MenuBorderSize > 0) + { + using (var p = new Pen(menu.BorderColor, MenuBorderSize)) + pe.Graphics.DrawRectangle(p, rect); + } + } + + + //글자를 텍스트 이후에 붙이는 거라면? + if (menu.Image != null && TextAttachToImage) + { + var fsize = pe.Graphics.MeasureString(menu.Text, this.Font); + pe.Graphics.DrawString(menu.Text, this.Font, new SolidBrush(menu.ForeColor), + (float)(ix + iw + 1), + (float)(iy + ((ih - fsize.Height) / 2.0))); + } + else + { + if (menu.TextAlign == ContentAlignment.BottomCenter || menu.TextAlign == ContentAlignment.BottomLeft || + menu.TextAlign == ContentAlignment.BottomRight) sf.LineAlignment = StringAlignment.Far; + else if (menu.TextAlign == ContentAlignment.MiddleCenter || menu.TextAlign == ContentAlignment.MiddleLeft || + menu.TextAlign == ContentAlignment.MiddleRight) sf.LineAlignment = StringAlignment.Center; + else if (menu.TextAlign == ContentAlignment.TopCenter || menu.TextAlign == ContentAlignment.TopLeft || + menu.TextAlign == ContentAlignment.TopRight) sf.LineAlignment = StringAlignment.Near; + + if (menu.TextAlign == ContentAlignment.BottomCenter || menu.TextAlign == ContentAlignment.MiddleCenter || + menu.TextAlign == ContentAlignment.TopCenter) sf.Alignment = StringAlignment.Center; + else if (menu.TextAlign == ContentAlignment.BottomLeft || menu.TextAlign == ContentAlignment.MiddleLeft || + menu.TextAlign == ContentAlignment.TopLeft) sf.Alignment = StringAlignment.Near; + else if (menu.TextAlign == ContentAlignment.BottomRight || menu.TextAlign == ContentAlignment.MiddleRight || + menu.TextAlign == ContentAlignment.TopRight) sf.Alignment = StringAlignment.Far; + + pe.Graphics.DrawString(menu.Text, this.Font, new SolidBrush(menu.ForeColor), rect, sf); + } + i += 1; + } + sf.Dispose(); + } + //if(DesignMode) + //{ + // pe.Graphics.DrawString("deisgn", this.Font, Brushes.Red, 1, 1); + //} + } + + /// + /// arFrame 전용 속성값을 복사 합니다 + /// + /// + public void copyTo(MenuControl ctl) + { + ctl.backcolor = this.backcolor; + ctl.backcolor2 = this.BackColor2; + ctl.MenuWidth = this.menuwidth; + ctl.menugap = this.menugap; + ctl.menus = this.menus; + ctl.menubordersize = this.menubordersize; + ctl.padding = this.padding; + ctl.ForeColor = this.ForeColor; + ctl.Font = this.Font; + ctl.EnableMenuBackColor = this.EnableMenuBackColor; + ctl.EnableMenuBorder = this.EnableMenuBorder; + ctl.ImagePadding = this.ImagePadding; + ctl.ImageSize = this.ImageSize; + ctl.TextAttachToImage = this.TextAttachToImage; + ctl.bordercolor = this.bordercolor; + ctl.bordersize = this.bordersize; + } + + public void Save(string File) + { + //xml로 데이터를 저장자 + System.Text.StringBuilder NewXml = new System.Text.StringBuilder(); + NewXml.AppendLine(""); + NewXml.AppendLine(" "); + NewXml.AppendLine(""); + + if (System.IO.File.Exists(File)) System.IO.File.Delete(File); + System.IO.File.WriteAllText(File, NewXml.ToString().Replace('\'', '\"'), System.Text.Encoding.UTF8); + var vDocu = new XmlDocument(); + vDocu.Load(File); + //var nsmgr = new XmlNamespaceManager(new System.Xml.NameTable()); + //nsmgr.AddNamespace("x", "http://tindevil.com"); + var Root = vDocu.DocumentElement; + + //저장하려는 속성목록을 먼저 생성한다 + //미사용 목록이 너무 많아서 그렇게 함 + foreach (var m in this.GetType().GetMethods()) + { + var mName = m.Name.ToLower(); + if (mName.StartsWith("get_") == false || mName == "get_menus") continue; + + var pt = this.GetType().GetProperty(m.Name.Substring(4)); + if (pt != null) + { + var categoryName = GetCategoryName(pt); + if (categoryName.ToLower() != "arframe") continue; + + //자료형에따라서 그값을 변경한다 + var value = m.Invoke(this, null); + var newNode = vDocu.CreateElement(pt.Name);// m.Name.Substring(4)); + newNode.InnerText = getValueString(m, value); + Root.AppendChild(newNode); + } + } + + + foreach (var item in this.menus.OrderBy(t => t.No)) + { + var node = vDocu.CreateElement("Item"); + var attNo = vDocu.CreateAttribute("No"); + attNo.Value = item.No.ToString(); + node.Attributes.Append(attNo); + + foreach (var m in item.GetType().GetMethods()) + { + var mName = m.Name.ToLower(); + if (mName.StartsWith("get_") == false || mName == "get_no") continue; + + var value = m.Invoke(item, null); + var sNode = vDocu.CreateElement(m.Name.Substring(4)); + sNode.InnerText = getValueString(m, value); + node.AppendChild(sNode); + } + Root.AppendChild(node); + } + vDocu.Save(File); + } + + public void Load(string File) + { + if (System.IO.File.Exists(File) == false) return; + + List NewMenu = new List(); + var vDocu = new XmlDocument(); + vDocu.Load(File); + var Root = vDocu.DocumentElement; //루트요소(Tindevil) + + + + //저장하려는 속성목록을 먼저 생성한다 + //미사용 목록이 너무 많아서 그렇게 함 + foreach (var m in this.GetType().GetMethods()) + { + var mName = m.Name.ToLower(); + if (mName.StartsWith("get_") == false || mName == "get_menus") continue; + + var methodName = m.Name.Substring(4); + var pt = this.GetType().GetProperty(methodName); + if (pt != null) + { + var categoryName = GetCategoryName(pt); + if (categoryName.ToLower() != "arframe") continue; + + //SEt명령이 있어야 사용이 가능하다 + var setMethod = this.GetType().GetMethod("set_" + methodName); + if (setMethod == null) continue; + + //값을 읽어온다 + var Node = Root.SelectSingleNode(methodName); + if (Node != null) + { + var strValue = Node.InnerText; + var value = getValueFromString(m.ReturnType, strValue); // setValueString(m.ReturnType, setMethod, strValue); + setMethod.Invoke(this, new object[] { value }); + } + } + } + + + //foreach (var item in this.menus.OrderBy(t => t.No)) + //{ + // var node = vDocu.CreateElement("Item"); + // var attNo = vDocu.CreateAttribute("No"); + // attNo.Value = item.No.ToString(); + // node.Attributes.Append(attNo); + + // foreach (var m in item.GetType().GetMethods()) + // { + // var mName = m.Name.ToLower(); + // if (mName.StartsWith("get_") == false || mName == "get_no") continue; + + // var value = m.Invoke(item, null); + // var sNode = vDocu.CreateElement(m.Name.Substring(4)); + // sNode.InnerText = getValueString(m, value); + // node.AppendChild(sNode); + // } + // Root.AppendChild(node); + //} + } + + + private string getValueString(System.Reflection.MethodInfo m, object value) + { + var strValue = ""; + string valuetype = m.ReturnType.Name.ToLower(); + if (m.ReturnType == typeof(System.Drawing.Color)) + strValue = ((System.Drawing.Color)value).ToArgb().ToString(); + else if (m.ReturnType == typeof(System.Drawing.Rectangle)) + { + var rect = (System.Drawing.Rectangle)value; + strValue = string.Format("{0};{1};{2};{3}", rect.Left, rect.Top, rect.Width, rect.Height); + } + else if (m.ReturnType == typeof(System.Drawing.RectangleF)) + { + var rectf = (System.Drawing.RectangleF)value; + strValue = string.Format("{0};{1};{2};{3}", rectf.Left, rectf.Top, rectf.Width, rectf.Height); + } + else if (m.ReturnType == typeof(Boolean)) + { + strValue = ((Boolean)value) ? "1" : "0"; + } + else if (m.ReturnType == typeof(System.Drawing.Point)) + { + var pt1 = (Point)value; + strValue = string.Format("{0};{1}", pt1.X, pt1.Y); + } + else if (m.ReturnType == typeof(System.Drawing.PointF)) + { + var ptf = (PointF)value; + strValue = string.Format("{0};{1}", ptf.X, ptf.Y); + } + else if (m.ReturnType == typeof(System.Drawing.Size)) + { + var sz = (Size)value; + strValue = string.Format("{0};{1}", sz.Width, sz.Height); + } + else if (m.ReturnType == typeof(System.Drawing.SizeF)) + { + var szf = (SizeF)value; + strValue = string.Format("{0};{1}", szf.Width, szf.Height); + } + else if (m.ReturnType == typeof(System.Drawing.Bitmap)) + { + var bitmap = (Bitmap)value; + + // Convert the image to byte[] + System.IO.MemoryStream stream = new System.IO.MemoryStream(); + bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp); + byte[] imageBytes = stream.ToArray(); + strValue = Convert.ToBase64String(imageBytes); + } + else if (m.ReturnType == typeof(System.Windows.Forms.Padding)) + { + var pd = (System.Windows.Forms.Padding)value; + strValue = string.Format("{0};{1};{2};{3}", pd.Left, pd.Top, pd.Right, pd.Bottom); + } + else + strValue = value.ToString(); + return strValue; + } + + + private object getValueFromString(Type ReturnType, string strValue) + { + + + if (ReturnType == typeof(System.Drawing.Color)) + { + var cint = int.Parse(strValue); + return System.Drawing.Color.FromArgb(cint); + } + else if (ReturnType == typeof(System.Drawing.Rectangle)) + { + var buf = strValue.Split(';'); + var x = int.Parse(buf[0]); + var y = int.Parse(buf[1]); + var w = int.Parse(buf[2]); + var h = int.Parse(buf[3]); + return new Rectangle(x, y, w, h); + } + else if (ReturnType == typeof(System.Drawing.RectangleF)) + { + var buf = strValue.Split(';'); + var x = float.Parse(buf[0]); + var y = float.Parse(buf[1]); + var w = float.Parse(buf[2]); + var h = float.Parse(buf[3]); + return new RectangleF(x, y, w, h); + } + else if (ReturnType == typeof(Boolean)) + { + return strValue == "1"; + } + else if (ReturnType == typeof(System.Drawing.Point)) + { + var buf = strValue.Split(';'); + var x = int.Parse(buf[0]); + var y = int.Parse(buf[1]); + return new Point(x, y); + } + else if (ReturnType == typeof(System.Drawing.PointF)) + { + var buf = strValue.Split(';'); + var x = float.Parse(buf[0]); + var y = float.Parse(buf[1]); + return new PointF(x, y); + } + else if (ReturnType == typeof(System.Drawing.Size)) + { + var buf = strValue.Split(';'); + var x = int.Parse(buf[0]); + var y = int.Parse(buf[1]); + return new Size(x, y); + } + else if (ReturnType == typeof(System.Drawing.SizeF)) + { + var buf = strValue.Split(';'); + var x = float.Parse(buf[0]); + var y = float.Parse(buf[1]); + return new SizeF(x, y); + } + else if (ReturnType == typeof(System.Drawing.Bitmap)) + { + //문자을을 바이트로 전환다 + byte[] imageBytes = Convert.FromBase64String(strValue); + + Bitmap retval = null; + using (System.IO.MemoryStream stream = new System.IO.MemoryStream(imageBytes)) + retval = new Bitmap(stream); + return retval; + } + else if (ReturnType == typeof(System.Windows.Forms.Padding)) + { + var buf = strValue.Split(';'); + var x = int.Parse(buf[0]); + var y = int.Parse(buf[1]); + var w = int.Parse(buf[2]); + var h = int.Parse(buf[3]); + return new Padding(x, y, w, h); + } + else if (ReturnType == typeof(Int16)) return Int16.Parse(strValue); + else if (ReturnType == typeof(Int32)) return Int32.Parse(strValue); + else if (ReturnType == typeof(Int64)) return Int64.Parse(strValue); + else if (ReturnType == typeof(UInt16)) return UInt16.Parse(strValue); + else if (ReturnType == typeof(UInt32)) return UInt32.Parse(strValue); + else + return strValue; + } + + + + public string GetCategoryName(System.Reflection.PropertyInfo m) + { + var displayName = m + .GetCustomAttributes(typeof(CategoryAttribute), true) + .FirstOrDefault() as CategoryAttribute; + + if (displayName != null) + return displayName.Category; + + return ""; + } + public string GetDisplayName(System.Reflection.MethodInfo m) + { + var displayName = m + .GetCustomAttributes(typeof(DisplayNameAttribute), true) + .FirstOrDefault() as DisplayNameAttribute; + + if (displayName != null) + return displayName.DisplayName; + + return ""; + } + + public void RemakeChartRect() + { + if (rects != null) rects = null; + if (menus == null || menus.Length < 1) return; + + rects = new Rectangle[menus.Length]; + int leftIdx = 0; + int rightIdx = 0; + int leftAcc = 0; + int rightAcc = 0; + + + int i = 0; + var menuList = this.menus.OrderBy(t => t.No).ToArray(); + foreach (var menu in menuList) + { + int x, y, w, h; + // var menu = menus[i]; + + var mWidth = menuwidth; + if (menu.MenuWidth > 0) mWidth = menu.MenuWidth; + + w = mWidth; + h = DisplayRectangle.Height - Padding.Top - Padding.Bottom; + + if (menu.isRightMenu) + { + x = DisplayRectangle.Right - Padding.Right - (rightAcc) - (MenuGap * rightIdx); + y = DisplayRectangle.Top + Padding.Top; + rightAcc += 0;// = 0;// x; + rightIdx += 1; + } + else + { + x = DisplayRectangle.Left + Padding.Left + leftAcc + (MenuGap * leftIdx); + y = DisplayRectangle.Top + Padding.Top; + leftAcc += mWidth; + leftIdx += 1; + } + rects[i] = new Rectangle(x, y, w, h); + i += 1; + } + } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuItem.cs b/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuItem.cs new file mode 100644 index 0000000..87347bc --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MenuBar/MenuItem.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; + +namespace arFrame.Control +{ + [TypeConverterAttribute(typeof(ExpandableObjectConverter))] + public class MenuItem + { + [Category("arFrame"),DisplayName("메뉴이름")] + public string Text { get; set; } + [Category("arFrame"), DisplayName("색상-테두리"), Description("메뉴속성의 테두리 기능이 켜져야 합니다")] + public System.Drawing.Color BorderColor { get; set; } + [Category("arFrame"),DisplayName("색상-배경1"),Description("메뉴속성의 배경 기능이 켜져야 합니다")] + public System.Drawing.Color BackColor { get; set; } + [Category("arFrame"), DisplayName("색상-배경2"), Description("메뉴속성의 배경 기능이 켜져야 합니다")] + public System.Drawing.Color BackColor2 { get; set; } + [Category("arFrame"),DisplayName("색상-글자")] + public System.Drawing.Color ForeColor { get; set; } + [Category("arFrame"),DisplayName("메뉴 구분자로 사용합니다")] + public Boolean isSeparate { get; set; } + [Category("arFrame"),DisplayName("오른쪽 붙임")] + public Boolean isRightMenu { get; set; } + [Category("arFrame"),DisplayName("실행 명령")] + public string Command { get; set; } + [Category("arFrame"),DisplayName("아이콘 이미지")] + public System.Drawing.Bitmap Image { get; set; } + [Category("arFrame"),DisplayName("글자 정렬 방식")] + public System.Drawing.ContentAlignment TextAlign { get; set; } + [Category("arFrame"),DisplayName("이미지 정렬 방식")] + public System.Drawing.ContentAlignment ImageAlign { get; set; } + [Category("arFrame"),DisplayName("글자 여백")] + public System.Windows.Forms.Padding Padding { get; set; } + [Category("arFrame"),DisplayName("메뉴 사용여부"),Description("활성화시 메뉴의 클릭이벤트가 발생하지 않습니다")] + public Boolean Enable { get; set; } + [Category("arFrame"),DisplayName("이미지 표시 여백(좌,상)")] + public System.Drawing.Point ImagePadding { get; set; } + [Category("arFrame"),DisplayName("이미지 표시 크기(너비,높이)")] + public System.Drawing.Size ImageSize { get; set; } + [Category("arFrame"),DisplayName("메뉴 간격")] + public int MenuWidth { get; set; } + + [Category("arFrame"),DisplayName("번호")] + public int No { get; set; } + + public MenuItem() + { + Enable = true; + BorderColor = System.Drawing.Color.FromArgb(20, 20, 20); + BackColor = System.Drawing.Color.DimGray; + BackColor2 = System.Drawing.Color.FromArgb(100, 100, 100); + ForeColor = System.Drawing.Color.Black; + Text = "Menu"; + isRightMenu = false; + Command = string.Empty; + Image = null; + isSeparate = false; + TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + Padding = new System.Windows.Forms.Padding(0, 0, 0, 0); + ImagePadding = new System.Drawing.Point(0, 0); + ImageSize = new System.Drawing.Size(0, 0); + MenuWidth = 0; + No = 0; + } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotCommandButton.Designer.cs b/Cs_HMI/SubProject/arFrameControl/MotCommandButton.Designer.cs new file mode 100644 index 0000000..953c119 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotCommandButton.Designer.cs @@ -0,0 +1,36 @@ +namespace arFrame.Control +{ + partial class MotCommandButton + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotCommandButton.cs b/Cs_HMI/SubProject/arFrameControl/MotCommandButton.cs new file mode 100644 index 0000000..b305825 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotCommandButton.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace arFrame.Control +{ + public partial class MotCommandButton : Button + { + public enum eCommand + { + AbsoluteMove = 0, + RelativeMove , + AcceptPosition + } + public MotCommandButton() + { + InitializeComponent(); + motCommand = eCommand.AbsoluteMove; + motValueControl = null; + motAccControl = null; + motSpdControl = null; + } + public MotValueNumericUpDown motValueControl { get; set; } + public MotValueNumericUpDown motAccControl { get; set; } + public MotValueNumericUpDown motSpdControl { get; set; } + public eCommand motCommand { get; set; } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotLinkLabel.Designer.cs b/Cs_HMI/SubProject/arFrameControl/MotLinkLabel.Designer.cs new file mode 100644 index 0000000..15ccadf --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotLinkLabel.Designer.cs @@ -0,0 +1,36 @@ +namespace arFrame.Control +{ + partial class MotLinkLabel + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotLinkLabel.cs b/Cs_HMI/SubProject/arFrameControl/MotLinkLabel.cs new file mode 100644 index 0000000..c20b6ad --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotLinkLabel.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace arFrame.Control +{ + public partial class MotLinkLabel : System.Windows.Forms.LinkLabel + { + public MotLinkLabel() + { + InitializeComponent(); + this.LinkColor = Color.Chartreuse; + } + public MotValueNumericUpDown motValueControl { get; set; } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotValueNumericUpDown.Designer.cs b/Cs_HMI/SubProject/arFrameControl/MotValueNumericUpDown.Designer.cs new file mode 100644 index 0000000..1541105 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotValueNumericUpDown.Designer.cs @@ -0,0 +1,36 @@ +namespace arFrame.Control +{ + partial class MotValueNumericUpDown + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotValueNumericUpDown.cs b/Cs_HMI/SubProject/arFrameControl/MotValueNumericUpDown.cs new file mode 100644 index 0000000..c13ca3d --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotValueNumericUpDown.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace arFrame.Control +{ + public partial class MotValueNumericUpDown : NumericUpDown + { + public MotValueNumericUpDown() + { + InitializeComponent(); + MotionIndex = -1; + } + public int MotionIndex { get; set; } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotionView/MotITem.cs b/Cs_HMI/SubProject/arFrameControl/MotionView/MotITem.cs new file mode 100644 index 0000000..24f74fa --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotionView/MotITem.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; + +namespace arFrame.Control +{ + [TypeConverterAttribute(typeof(ExpandableObjectConverter))] + public class MotITem + { + public int idx { get; private set; } + [Category("arFrame"), DisplayName("Tag")] + public string Tag { get; set; } + [Category("arFrame"), DisplayName("글자 정렬 방식")] + public System.Drawing.ContentAlignment TextAlign { get; set; } + [Category("arFrame"), DisplayName("글자 여백")] + public System.Windows.Forms.Padding Padding { get; set; } + [Category("arFrame"), DisplayName("메뉴 사용여부"), Description("활성화시 메뉴의 클릭이벤트가 발생하지 않습니다")] + public Boolean Enable { get; set; } + public string Text { get; set; } + + public Boolean Dirty { get; set; } + + public System.Drawing.Rectangle[] subRect = null; + + //모션 상태값 + public Boolean[] State; + public double Position { get; set; } + public double PositionCmd { get; set; } + public System.Drawing.Color PositionColor { get; set; } + + public System.Drawing.RectangleF rect { get; set; } + + [Category("arFrame"), DisplayName("번호")] + public int No { get; set; } + + public MotITem(int idx_) + { + this.Dirty = true; + PositionColor = System.Drawing.Color.White; + subRect = new System.Drawing.Rectangle[6]; + rect = System.Drawing.RectangleF.Empty; + Enable = true; + this.idx = idx_; + TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + Padding = new System.Windows.Forms.Padding(0, 0, 0, 0); + No = 0; + this.Text = string.Empty; + this.Enable = true; + this.State = new bool[] { false,false,false,false,false,false}; + Position = 0; + PositionCmd = 0; + } + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotionView/MotionDisplay.Designer.cs b/Cs_HMI/SubProject/arFrameControl/MotionView/MotionDisplay.Designer.cs new file mode 100644 index 0000000..be4639e --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotionView/MotionDisplay.Designer.cs @@ -0,0 +1,36 @@ +namespace arFrame.Control +{ + partial class MotionDisplay + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 구성 요소 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/MotionView/MotionDisplay.cs b/Cs_HMI/SubProject/arFrameControl/MotionView/MotionDisplay.cs new file mode 100644 index 0000000..c770c5a --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/MotionView/MotionDisplay.cs @@ -0,0 +1,306 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace arFrame.Control +{ + public partial class MotionDisplay : System.Windows.Forms.Control + { + private Color[] colorB1 = new Color[] { + Color.MediumSeaGreen, + Color.DeepSkyBlue, + Color.Tomato, + Color.Purple, + Color.Tomato, + Color.FromArgb(40,40,40) + }; + private Color[] colorB2 = new Color[] { + Color.SeaGreen, + Color.SteelBlue, + Color.Red, + Color.Indigo, + Color.Red, + Color.FromArgb(30,30,30) + }; + + private StringFormat sf = new StringFormat(); + private string[] IndiName = new string[] { "INP","ORG","LIM","HST","ALM","" }; + public MotITem[] Items; + private int _colcount = 3; + private int _rowcount = 2; + private Color _bordercolor = Color.Black; + private Color _gridcolor = Color.FromArgb(50, 50, 50); + private int _bordersize = 1; + private Padding _padding; + private string _postionformat = ""; + private int _headerHeight = 16; + private Font _headerfont = new Font("Consolas",7f); + + + private int itemCount { get { return _colcount * _rowcount; } } + + public new Font Font { get { return base.Font; } set { base.Font = value; this.Invalidate(); } } + public Font HeaderFont { get { return _headerfont; } set { _headerfont = value; this.Invalidate(); } } + public int HeaderHeight { get { return _headerHeight; } set { _headerHeight = value; RemakeChartRect(); this.Invalidate(); } } + public new Padding Padding { get { if (_padding == null) return Padding.Empty; else return _padding; } set { _padding = value; RemakeChartRect(); Invalidate(); } } + public int ColumnCount { get { return _colcount; } set { _colcount = value; ResetArray(); RemakeChartRect(); } } + public int RowCount { get { return _rowcount; } set { _rowcount = value; ResetArray(); RemakeChartRect(); } } + public int BorderSize { get { return _bordersize; } set { _bordersize = value; Invalidate(); } } + public Color BorderColor { get { return _bordercolor; } set { _bordercolor = value; Invalidate(); } } + public string PositionDisplayFormat { get { return _postionformat; } set { _postionformat = value; Invalidate(); } } + public Color GridColor { get { return _gridcolor; } set { _gridcolor = value; Invalidate(); } } + + public new Boolean Enabled { get { return base.Enabled; } set { base.Enabled = value; Invalidate(); } } + + public MotionDisplay() + { + InitializeComponent(); + + // Set Optimized Double Buffer to reduce flickering + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); + + // Redraw when resized + this.SetStyle(ControlStyles.ResizeRedraw, true); + sf.LineAlignment = StringAlignment.Center; + sf.Alignment = StringAlignment.Center; + + + //값과 이름은 외부의 값을 사용한다 + ResetArray(); + + if (MinimumSize.Width == 0 || MinimumSize.Height == 0) + MinimumSize = new Size(100, 50); + } + + void ResetArray() + { + + } + + + protected override void OnSizeChanged(EventArgs e) + { + base.OnSizeChanged(e); + RemakeChartRect(); + } + + public void RemakeChartRect() + { + if (DisplayRectangle == Rectangle.Empty) return; + + var baseRect = new Rectangle( + DisplayRectangle.Left + _padding.Left, + DisplayRectangle.Top + _padding.Top, + DisplayRectangle.Width - _padding.Left - _padding.Right, + DisplayRectangle.Height - _padding.Top - _padding.Bottom); + + double x = 0; + double y = 0; + double w = baseRect.Width / (_colcount * 1.0); + double h = baseRect.Height / (_rowcount * 1.0); + + if (this.Items == null || itemCount != this.Items.Length) + { + //아이템갯수가 달라졌으므로 다시 갱신해야함 + var item = new MotITem[RowCount * ColumnCount]; + for (int r = 0; r < RowCount; r++) + { + for (int c = 0; c < ColumnCount; c++) + { + int idx = r * ColumnCount + c; + item[idx] = new MotITem(idx); + item[idx].Enable = false; + item[idx].Padding = new Padding(0, 0, 0, 0); + item[idx].TextAlign = ContentAlignment.MiddleCenter; + x = baseRect.Left + (c * w); + y = baseRect.Top + (r * h); + item[idx].rect = new RectangleF((float)x, (float)y, (float)w, (float)h); + item[idx].Dirty = true; + } + } + + this.Items = item; + } + else + { + //아이템의 갯수는 같으므로 좌표값만 변경해준다. + for (int r = 0; r < RowCount; r++) + { + for (int c = 0; c < ColumnCount; c++) + { + int idx = r * ColumnCount + c; + var item = Items[idx]; + x = (c * w); + y = (r * h); + item.rect = new RectangleF((float)x, (float)y, (float)w, (float)h); + item.Dirty = true; + } + } + } + this.Invalidate(); + + } + + protected override void OnPaint(PaintEventArgs pe) + { + //배경그리기 + //using (var sb = new System.Drawing.Drawing2D.LinearGradientBrush(DisplayRectangle, BackColor, BackColor2On, System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + pe.Graphics.FillRectangle(new SolidBrush(this.BackColor), DisplayRectangle); + + if (Items == null) + { + pe.Graphics.DrawString("no items", this.Font, Brushes.Red, 100, 100); + return; + } + + var items = Items.OrderBy(t => t.No); + foreach (var menu in items) + { + drawItem(menu.idx, pe.Graphics); + } + + //테두리 그리기 + if (BorderSize > 0) + { + pe.Graphics.DrawRectangle(new Pen(this.BorderColor, BorderSize), + this.DisplayRectangle.Left, + this.DisplayRectangle.Top, + this.DisplayRectangle.Width - 1, + this.DisplayRectangle.Height - 1); + } + } + + private void drawItem(int itemIndex, Graphics g = null) + { + if (g == null) g = this.CreateGraphics(); + var item = this.Items[itemIndex]; + + // g.DrawString("rect null", this.Font, Brushes.White, 100, 100); + + if (item.rect == RectangleF.Empty) return; + + var rect = item.rect;// rects[i]; + + var diplayText = item.Text; + + //byte Value = 0; + + //배경이 투명이 아니라면 그린다. + //var bgColor1 = Color.DarkBlue; //BackColor1Off; + //var bgColor2 = Color.Blue;// BackColor2Off; + + //if (Value != 0 && item.Enable != false) + //{ + // //bgColor1 = Value == 1 ? BackColor1On : BackColor1Err; + // //bgColor2 = Value == 1 ? BackColor2On : BackColor2Err; + //} + + //using (var sb = new System.Drawing.Drawing2D.LinearGradientBrush(rect, bgColor1, bgColor2, System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + // g.FillRectangle(sb, rect); + + // if (mouseOverItemIndex == menu.idx) + // this.Cursor = Cursors.Hand; + // else + // this.Cursor = Cursors.Arrow; + + //테두리를 그리는 속성과 트기가 설정된 경우에만 표시 + //if (mouseOverItemIndex == i) + // { + // pe.Graphics.DrawRectangle(new Pen(Color.DeepSkyBlue), rect.Left, rect.Top, rect.Width, rect.Height); + //} + //else + { + // using (var p = new Pen(BorderColor, 1)) + // g.DrawRectangle(p, rect.Left, rect.Top, rect.Width, rect.Height); + } + + //총 5개의 인디게이터와 하단에 위치값을 표시하는 영역이 있따. + //줄 영역은 50%비율로 처리함 + if(item.Dirty) + { + //각 영역을 다시 그려줘야한다. + var indiWidth = rect.Width / 5.0; + // var indiHeight = rect.Height / 2.0; + for (int c = 0; c < 5; c++) + { + item.subRect[c] = new Rectangle((int)(c * indiWidth + item.rect.Left), (int)(item.rect.Top), (int)indiWidth, (int)HeaderHeight); + } + item.Dirty = false; + + //위치값을 나타내는 영역 + item.subRect[5] = new Rectangle((int)item.rect.Left, (int)(item.rect.Top + HeaderHeight), (int)rect.Width, (int)rect.Height - HeaderHeight ); + + } + + for(int i = 0 ; i < item.subRect.Length;i++) + { + var B1 = colorB1[i]; + var B2 = colorB2[i]; + + if (i < (item.subRect.Length - 1)) //상태표시칸은 현재 값에 따라서 색상을 달리한다 + { + if ( this.Enabled == false || (item.State[i] == false && DesignMode == false)) + { + B1 = Color.FromArgb(20,20,20); + B2 = Color.FromArgb(50,50,50); + } + } + + var rt = item.subRect[i]; + using (var br = new System.Drawing.Drawing2D.LinearGradientBrush(rt, B1, B2, System.Drawing.Drawing2D.LinearGradientMode.Vertical)) + g.FillRectangle(br, rt); + + // g.DrawRectangle(Pens.Yellow, rt); + if (i < (item.subRect.Length-1)) + { + sf.Alignment = StringAlignment.Center; + sf.LineAlignment = StringAlignment.Center; + g.DrawString(IndiName[i], HeaderFont, Brushes.White, rt, sf); + } + else + { + sf.LineAlignment = StringAlignment.Center; + sf.Alignment = StringAlignment.Far; + g.DrawString(item.Position.ToString(PositionDisplayFormat) + " [" + item.PositionCmd.ToString(PositionDisplayFormat) + "] ", + this.Font, + new SolidBrush(item.PositionColor), + rt, + sf); + } + } + + //테두리선은 우측만 처리한다 + for (int i = 0; i < item.subRect.Length ; i++) + { + var rt = item.subRect[i]; + var x1 = rt.Right; + var y1 = rt.Top; + var x2 = rt.Right; + var y2 = rt.Bottom; + g.DrawLine(new Pen(GridColor), x1, y1, x2, y2); + } + var posRect = item.subRect[item.subRect.Length - 1]; + g.DrawLine(new Pen(Color.Black,1), posRect.Left, posRect.Top, posRect.Right, posRect.Top); + + + //인덱스번호 출력 + if (diplayText != "") + { + g.DrawString(string.Format("[{0}] {1}", item.idx, diplayText), + this.Font, new SolidBrush(this.ForeColor), + item.rect.Left + 3, item.rect.Top + 3); + } + + + + } + + } +} diff --git a/Cs_HMI/SubProject/arFrameControl/Properties/AssemblyInfo.cs b/Cs_HMI/SubProject/arFrameControl/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a63a2d8 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리의 일반 정보는 다음 특성 집합을 통해 제어됩니다. +// 어셈블리와 관련된 정보를 수정하려면 +// 이 특성 값을 변경하십시오. +[assembly: AssemblyTitle("arFrameControl")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("arFrameControl")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하십시오. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("9fa3ef10-3c75-40a2-b3e6-a37900b26d0e")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 버전이 자동으로 +// 지정되도록 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/SubProject/arFrameControl/arFrameControl.csproj b/Cs_HMI/SubProject/arFrameControl/arFrameControl.csproj new file mode 100644 index 0000000..1ff2b94 --- /dev/null +++ b/Cs_HMI/SubProject/arFrameControl/arFrameControl.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {A16C9667-5241-4313-888E-548375F85D29} + Library + Properties + arFrame.Control + arFrameControl + v4.8 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + Component + + + MotCommandButton.cs + + + + Component + + + GridView.cs + + + Component + + + MenuControl.cs + + + + + Component + + + MotionDisplay.cs + + + Component + + + MotLinkLabel.cs + + + Component + + + MotValueNumericUpDown.cs + + + + + + {f31c242c-1b15-4518-9733-48558499fe4b} + arControl + + + + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs b/Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs new file mode 100644 index 0000000..9f11f63 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs @@ -0,0 +1,166 @@ +namespace Test_BMS +{ + partial class Form1 + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.logTextBox1 = new arCtl.LogTextBox(); + this.button3 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(27, 35); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(131, 20); + this.comboBox1.TabIndex = 0; + this.comboBox1.Text = "com15"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(301, 35); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(108, 20); + this.button1.TabIndex = 1; + this.button1.Text = "connect"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(415, 34); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(106, 20); + this.button2.TabIndex = 1; + this.button2.Text = "close"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // comboBox2 + // + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Items.AddRange(new object[] { + "9600", + "12800", + "25600", + "250000"}); + this.comboBox2.Location = new System.Drawing.Point(164, 35); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(131, 20); + this.comboBox2.TabIndex = 2; + this.comboBox2.Text = "9600"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(27, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(26, 12); + this.label1.TabIndex = 3; + this.label1.Text = "port"; + this.label1.Click += new System.EventHandler(this.label1_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(162, 13); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(33, 12); + this.label2.TabIndex = 3; + this.label2.Text = "baud"; + // + // logTextBox1 + // + this.logTextBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(24)))), ((int)(((byte)(24))))); + this.logTextBox1.ColorList = new arCtl.sLogMessageColor[0]; + this.logTextBox1.DateFormat = "yy-MM-dd HH:mm:ss"; + this.logTextBox1.DefaultColor = System.Drawing.Color.LightGray; + this.logTextBox1.EnableDisplayTimer = true; + this.logTextBox1.EnableGubunColor = true; + this.logTextBox1.Font = new System.Drawing.Font("Consolas", 9F); + this.logTextBox1.ListFormat = "[{0}] {1}"; + this.logTextBox1.Location = new System.Drawing.Point(27, 87); + this.logTextBox1.MaxListCount = ((ushort)(200)); + this.logTextBox1.MaxTextLength = ((uint)(4000u)); + this.logTextBox1.MessageInterval = 50; + this.logTextBox1.Name = "logTextBox1"; + this.logTextBox1.Size = new System.Drawing.Size(494, 351); + this.logTextBox1.TabIndex = 4; + this.logTextBox1.Text = ""; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(301, 61); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(220, 20); + this.button3.TabIndex = 5; + this.button3.Text = "send query"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(574, 450); + this.Controls.Add(this.button3); + this.Controls.Add(this.logTextBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.comboBox2); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.comboBox1); + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private arCtl.LogTextBox logTextBox1; + private System.Windows.Forms.Button button3; + } +} + diff --git a/Cs_HMI/TestProject/Test_BMS/Form1.cs b/Cs_HMI/TestProject/Test_BMS/Form1.cs new file mode 100644 index 0000000..e6a6518 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Form1.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Test_BMS +{ + public partial class Form1 : Form + { + arDev.BMS bms; + public Form1() + { + InitializeComponent(); + bms = new arDev.BMS(); + bms.BMSDataReceive += Bms_BMSDataReceive; + bms.Message += Bms_Message; + } + + private void Bms_Message(object sender, arDev.arRS232.MessageEventArgs e) + { + var sb = new System.Text.StringBuilder(); + if (e.Data != null) + { + foreach (var b in e.Data) + sb.Append(" " + b.ToString("X2")); + } + else sb.Append(e.Message); + addmsg($"{e.MsgType}:{sb}"); + } + + private void Bms_BMSDataReceive(object sender, EventArgs e) + { + //최종 데이터가 수신되는 경우 + string msg = $"{bms.Current_Volt}v,{bms.Current_Level}%,{bms.Current_Amp}/{bms.Current_MaxAmp}"; + addmsg("Recv:" + msg); + } + + + void addmsg(string m) + { + if (logTextBox1.InvokeRequired) + { + logTextBox1.BeginInvoke(new Action(() => { + logTextBox1.AddMsg(m); + })); + } + else + { + logTextBox1.AddMsg(m); + } + } + + private void Bms_RxData(object sender, arDev.BMS.ReceiveDataEventArgs e) + { + addmsg("Rx:" + e.StrValue); + } + + private void Form1_Load(object sender, EventArgs e) + { + this.comboBox1.Items.Clear(); + foreach (var port in System.IO.Ports.SerialPort.GetPortNames()) + this.comboBox1.Items.Add(port); + } + + private void button1_Click(object sender, EventArgs e) + { + bms.BaudRate = int.Parse(this.comboBox2.Text); + bms.PortName = comboBox1.Text; + bms.Open(); + addmsg($"open:{bms.IsOpen}"); + } + + private void button2_Click(object sender, EventArgs e) + { + bms.Close(); + } + + private void button3_Click(object sender, EventArgs e) + { + bms.SendQuery(); + } + + private void label1_Click(object sender, EventArgs e) + { + comboBox1.Text = "COM41"; + } + } +} diff --git a/Cs_HMI/TestProject/Test_BMS/Form1.resx b/Cs_HMI/TestProject/Test_BMS/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_BMS/Program.cs b/Cs_HMI/TestProject/Test_BMS/Program.cs new file mode 100644 index 0000000..868a592 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace Test_BMS +{ + static class Program + { + /// + /// 해당 응용 프로그램의 주 진입점입니다. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Cs_HMI/TestProject/Test_BMS/Properties/AssemblyInfo.cs b/Cs_HMI/TestProject/Test_BMS/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0d1b439 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("BMS Commnunication Module Test")] +[assembly: AssemblyDescription("BMS Commnunication Module Test")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("BMS Commnunication Module Test")] +[assembly: AssemblyProduct("BMS Test Software")] +[assembly: AssemblyCopyright("Copyright ©ATK4 2020")] +[assembly: AssemblyTrademark("ATK4")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("ce3fff9f-6aca-44bd-b64a-33ff4ad5e82e")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 +// 지정되도록 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("20.03.09.0")] +[assembly: AssemblyFileVersion("20.03.09.0")] diff --git a/Cs_HMI/TestProject/Test_BMS/Properties/Resources.Designer.cs b/Cs_HMI/TestProject/Test_BMS/Properties/Resources.Designer.cs new file mode 100644 index 0000000..888e033 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Test_BMS.Properties { + using System; + + + /// + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. + /// + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_BMS.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 + /// 재정의합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_BMS/Properties/Resources.resx b/Cs_HMI/TestProject/Test_BMS/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_BMS/Properties/Settings.Designer.cs b/Cs_HMI/TestProject/Test_BMS/Properties/Settings.Designer.cs new file mode 100644 index 0000000..03db24a --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Test_BMS.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_BMS/Properties/Settings.settings b/Cs_HMI/TestProject/Test_BMS/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Cs_HMI/TestProject/Test_BMS/Sample.txt b/Cs_HMI/TestProject/Test_BMS/Sample.txt new file mode 100644 index 0000000..5c46548 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Sample.txt @@ -0,0 +1,8 @@ +[22-12-27 14:32:49] open:True +[22-12-27 14:32:49] Send: DD A5 03 00 FF FD 77 0D +[22-12-27 14:32:50] Send: DD A5 03 00 FF FD 77 0D +[22-12-27 14:32:50] Recv:26.61v,81.4% +[22-12-27 14:32:50] Recv: DD 03 00 1B 0A 65 00 00 21 63 29 04 00 00 2C 92 00 00 00 00 00 00 28 51 03 08 02 0B 69 0B 66 FC 9C 77 +[22-12-27 14:32:50] Send: DD A5 03 00 FF FD 77 0D +[22-12-27 14:32:51] Recv:26.61v,81.4% +[22-12-27 14:32:51] Recv: DD 03 00 1B 0A 65 00 00 21 63 29 04 00 00 2C 92 00 00 00 00 00 00 28 51 03 08 02 0B 69 0B 66 FC 9C 77 diff --git a/Cs_HMI/TestProject/Test_BMS/Test_BMS.csproj b/Cs_HMI/TestProject/Test_BMS/Test_BMS.csproj new file mode 100644 index 0000000..9bfe482 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/Test_BMS.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {CE3FFF9F-6ACA-44BD-B64A-33FF4AD5E82E} + WinExe + Test_BMS + Test_BMS + v4.8 + 512 + true + + + + x86 + true + full + false + ..\..\..\..\..\..\..\..\Amkor\AGV2\Test\BMS\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + ..\..\DLL\arControl.Net4.dll + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {7a94c30c-6772-4f71-bf9c-0df071a1bc70} + BMS + + + {14e8c9a5-013e-49ba-b435-efefc77dd623} + CommData + + + + + + + + xcopy "$(TargetDir)*.exe" "\\192.168.1.80\Amkor\AGV2\Test\BMS" /Y +xcopy "$(TargetDir)*.dll" "\\192.168.1.80\Amkor\AGV2\Test\BMS" /Y + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_BMS/app.config b/Cs_HMI/TestProject/Test_BMS/app.config new file mode 100644 index 0000000..2c0f559 --- /dev/null +++ b/Cs_HMI/TestProject/Test_BMS/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Cs_HMI/TestProject/Test_NLRF100/Form1.Designer.cs b/Cs_HMI/TestProject/Test_NLRF100/Form1.Designer.cs new file mode 100644 index 0000000..c726f10 --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Form1.Designer.cs @@ -0,0 +1,222 @@ +namespace Test_NLRF100 +{ + partial class Form1 + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.radRs232 = new System.Windows.Forms.RadioButton(); + this.radTcp = new System.Windows.Forms.RadioButton(); + this.tbAddr = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btOpen = new System.Windows.Forms.Button(); + this.logTextBox1 = new arCtl.LogTextBox(); + this.btClose = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.SuspendLayout(); + // + // radRs232 + // + this.radRs232.AutoSize = true; + this.radRs232.Location = new System.Drawing.Point(21, 17); + this.radRs232.Name = "radRs232"; + this.radRs232.Size = new System.Drawing.Size(57, 16); + this.radRs232.TabIndex = 0; + this.radRs232.Text = "RS232"; + this.radRs232.UseVisualStyleBackColor = true; + // + // radTcp + // + this.radTcp.AutoSize = true; + this.radTcp.Checked = true; + this.radTcp.Location = new System.Drawing.Point(21, 39); + this.radTcp.Name = "radTcp"; + this.radTcp.Size = new System.Drawing.Size(65, 16); + this.radTcp.TabIndex = 0; + this.radTcp.TabStop = true; + this.radTcp.Text = "TCP/IP"; + this.radTcp.UseVisualStyleBackColor = true; + // + // tbAddr + // + this.tbAddr.Location = new System.Drawing.Point(93, 34); + this.tbAddr.Name = "tbAddr"; + this.tbAddr.Size = new System.Drawing.Size(135, 21); + this.tbAddr.TabIndex = 1; + this.tbAddr.Text = "192.168.1.10"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(91, 17); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(88, 12); + this.label1.TabIndex = 2; + this.label1.Text = "Port / Address"; + // + // btOpen + // + this.btOpen.Location = new System.Drawing.Point(250, 14); + this.btOpen.Name = "btOpen"; + this.btOpen.Size = new System.Drawing.Size(90, 40); + this.btOpen.TabIndex = 3; + this.btOpen.Text = "Open"; + this.btOpen.UseVisualStyleBackColor = true; + this.btOpen.Click += new System.EventHandler(this.btOpen_Click); + // + // logTextBox1 + // + this.logTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.logTextBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(24)))), ((int)(((byte)(24))))); + this.logTextBox1.ColorList = new arCtl.sLogMessageColor[0]; + this.logTextBox1.DateFormat = "yy-MM-dd HH:mm:ss"; + this.logTextBox1.DefaultColor = System.Drawing.Color.LightGray; + this.logTextBox1.EnableDisplayTimer = false; + this.logTextBox1.EnableGubunColor = true; + this.logTextBox1.Font = new System.Drawing.Font("Consolas", 9F); + this.logTextBox1.ListFormat = "[{0}] {1}"; + this.logTextBox1.Location = new System.Drawing.Point(17, 66); + this.logTextBox1.MaxListCount = ((ushort)(200)); + this.logTextBox1.MaxTextLength = ((uint)(4000u)); + this.logTextBox1.MessageInterval = 50; + this.logTextBox1.Name = "logTextBox1"; + this.logTextBox1.Size = new System.Drawing.Size(419, 331); + this.logTextBox1.TabIndex = 4; + this.logTextBox1.Text = ""; + // + // btClose + // + this.btClose.Location = new System.Drawing.Point(346, 14); + this.btClose.Name = "btClose"; + this.btClose.Size = new System.Drawing.Size(90, 40); + this.btClose.TabIndex = 5; + this.btClose.Text = "Close"; + this.btClose.UseVisualStyleBackColor = true; + this.btClose.Click += new System.EventHandler(this.btClose_Click); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button1.Enabled = false; + this.button1.Location = new System.Drawing.Point(20, 403); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(90, 40); + this.button1.TabIndex = 6; + this.button1.Text = "Read"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button2.Enabled = false; + this.button2.Location = new System.Drawing.Point(116, 403); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(90, 40); + this.button2.TabIndex = 7; + this.button2.Text = "Stop"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button3.Enabled = false; + this.button3.Location = new System.Drawing.Point(212, 403); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(90, 40); + this.button3.TabIndex = 8; + this.button3.Text = "Help"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button4 + // + this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button4.Enabled = false; + this.button4.Location = new System.Drawing.Point(337, 403); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(90, 40); + this.button4.TabIndex = 9; + this.button4.Text = "Ping"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // timer1 + // + this.timer1.Interval = 200; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(449, 450); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.btClose); + this.Controls.Add(this.logTextBox1); + this.Controls.Add(this.btOpen); + this.Controls.Add(this.label1); + this.Controls.Add(this.tbAddr); + this.Controls.Add(this.radTcp); + this.Controls.Add(this.radRs232); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.RadioButton radRs232; + private System.Windows.Forms.RadioButton radTcp; + private System.Windows.Forms.TextBox tbAddr; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btOpen; + private arCtl.LogTextBox logTextBox1; + private System.Windows.Forms.Button btClose; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Timer timer1; + } +} + diff --git a/Cs_HMI/TestProject/Test_NLRF100/Form1.cs b/Cs_HMI/TestProject/Test_NLRF100/Form1.cs new file mode 100644 index 0000000..3676065 --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Form1.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Test_NLRF100 +{ + public partial class Form1 : Form + { + arDev.NLRF100.Device dev; + public Form1() + { + InitializeComponent(); + dev = new arDev.NLRF100.Device(); + dev.Message += Dev_Message; + dev.ReceiveData += Dev_ReceiveData; + } + + private void Dev_ReceiveData(object sender, arDev.NLRF100.Device.ReceviceDataEventArgs e) + { + //데이터를 읽었을때 + logTextBox1.AddMsg("수신", string.Format("\n안테나={0},값={1}",e.Antena,e.DataString)); + } + + private void Dev_Message(object sender, arDev.NLRF100.Device.MessageEventArgs e) + { + if (e.isError) logTextBox1.AddMsg("ERROR", "\n"+e.Message); + else logTextBox1.AddMsg("\n"+e.Message); + } + + private void btOpen_Click(object sender, EventArgs e) + { + if (dev != null && dev.bInit && dev.IsOpen) + { + dev.Close(); + } + + if (tbAddr.Text == "") + { + Util.MsgE("포트/HostIP 를 입력하세요"); + return; + } + + if (radRs232.Checked) dev.init(arDev.NLRF100.eConnType.RS232, tbAddr.Text); + else dev.init(arDev.NLRF100.eConnType.SOCKET, tbAddr.Text); + + if (dev.IsOpen == false) + { + logTextBox1.AddMsg("ERROR", "접속실패"); + + } + else + { + logTextBox1.AddMsg("접속성공"); + + } + + timer1.Start(); + } + + private void Form1_Load(object sender, EventArgs e) + { + + } + + private void btClose_Click(object sender, EventArgs e) + { + if (dev != null && dev.IsOpen) + { + dev.Close(); + this.logTextBox1.AddMsg("접속 종료"); + + + timer1.Stop(); + } + } + + private void button1_Click(object sender, EventArgs e) + { + //read + dev.Start(); + } + + private void button2_Click(object sender, EventArgs e) + { + //stop + dev.Stop(); + } + + private void button3_Click(object sender, EventArgs e) + { + //help + dev.Help(); + } + + private void button4_Click(object sender, EventArgs e) + { + //ping + dev.Ping(); + } + + private void timer1_Tick(object sender, EventArgs e) + { + this.Text = "접속상태:" + dev.IsOpen.ToString(); + if(dev.IsOpen) + { + button1.Enabled = true; + button2.Enabled = true; + button3.Enabled = true; + button4.Enabled = true; + } else + { + button1.Enabled = false; + button2.Enabled = false; + button3.Enabled = false; + button4.Enabled = false; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_NLRF100/Form1.resx b/Cs_HMI/TestProject/Test_NLRF100/Form1.resx new file mode 100644 index 0000000..aac33d5 --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Form1.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_NLRF100/Program.cs b/Cs_HMI/TestProject/Test_NLRF100/Program.cs new file mode 100644 index 0000000..b47751c --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace Test_NLRF100 +{ + static class Program + { + /// + /// 해당 응용 프로그램의 주 진입점입니다. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Cs_HMI/TestProject/Test_NLRF100/Properties/AssemblyInfo.cs b/Cs_HMI/TestProject/Test_NLRF100/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f1da5a4 --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("Test_NLRF100")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Test_NLRF100")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("2cdad6d3-2d25-4604-a46c-edec0eb308d8")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 +// 지정되도록 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Cs_HMI/TestProject/Test_NLRF100/Properties/Resources.Designer.cs b/Cs_HMI/TestProject/Test_NLRF100/Properties/Resources.Designer.cs new file mode 100644 index 0000000..040712a --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Test_NLRF100.Properties +{ + + + /// + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. + /// + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 + // ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_NLRF100.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 + /// 재정의합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_NLRF100/Properties/Resources.resx b/Cs_HMI/TestProject/Test_NLRF100/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_NLRF100/Properties/Settings.Designer.cs b/Cs_HMI/TestProject/Test_NLRF100/Properties/Settings.Designer.cs new file mode 100644 index 0000000..8206ddc --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Test_NLRF100.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_NLRF100/Properties/Settings.settings b/Cs_HMI/TestProject/Test_NLRF100/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Cs_HMI/TestProject/Test_NLRF100/Test_NLRF100.csproj b/Cs_HMI/TestProject/Test_NLRF100/Test_NLRF100.csproj new file mode 100644 index 0000000..c86e10b --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Test_NLRF100.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {2CDAD6D3-2D25-4604-A46C-EDEC0EB308D8} + WinExe + Test_NLRF100 + Test_NLRF100 + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Sub\arCtl\obj\Debug\arControl.Net4.dll + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_NLRF100/Util.cs b/Cs_HMI/TestProject/Test_NLRF100/Util.cs new file mode 100644 index 0000000..9df6ad4 --- /dev/null +++ b/Cs_HMI/TestProject/Test_NLRF100/Util.cs @@ -0,0 +1,407 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Management; +using System.Net; +using System.Text; +using System.Windows.Forms; + +namespace Test_NLRF100 +{ + public static class Util + { + #region "MessageBox" + public static void MsgI(string m, Boolean legacy = true) + { + //if(legacy) + { + MessageBox.Show(m, "확인", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + } + public static void MsgE(string m, Boolean legacy = false) + { + //if(legacy) + { + MessageBox.Show(m, "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + public static DialogResult MsgQ(string m, Boolean legacy = false, string btOK = "확인",string btCancel = "아니오") + { + //if(legacy) + { + DialogResult dlg = MessageBox.Show(m, "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question); + return dlg; + } + + } + + #endregion + + public static string SelectSerialPort() + { + var f = new System.Windows.Forms.Form(); + f.WindowState = System.Windows.Forms.FormWindowState.Normal; + f.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + f.Size = new System.Drawing.Size(800, 400); + f.MaximizeBox = false; + f.MinimizeBox = false; + f.Text = "Select Port"; + f.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + var lst = new System.Windows.Forms.ListBox(); + lst.Font = new System.Drawing.Font("Consolas", 15, System.Drawing.FontStyle.Bold); + lst.Dock = System.Windows.Forms.DockStyle.Fill; + lst.DoubleClick += (s1, e1) => + { + if (lst.SelectedItem != null) f.DialogResult = System.Windows.Forms.DialogResult.OK; + }; + using (var searcher = new ManagementObjectSearcher("SELECT * FROM WIN32_SerialPort")) + { + var portnames = System.IO.Ports.SerialPort.GetPortNames().OrderBy(t => t); + var ports = searcher.Get().Cast().ToList(); + foreach (var port in portnames) + { + var desc = ""; + var portInfo = ports.Where(t => t["DeviceId"].ToString() == port).FirstOrDefault(); + if (portInfo != null) desc = portInfo["Caption"].ToString(); + lst.Items.Add(string.Format("{0} - {1}", port, desc)); + } + } + f.Controls.Add(lst); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + var name = lst.SelectedItem.ToString().Split('-'); + return name[0].Trim(); + } + else return string.Empty; + } + + public static void ScreenCaptrue(int _BitmapWidth, int _BitmapHeight, Point ptSouce) + { + try + { + Bitmap bitmap = new Bitmap(_BitmapWidth, _BitmapHeight); + Graphics _graphic = Graphics.FromImage(bitmap); + + _graphic.CopyFromScreen(ptSouce, new Point(0, 0), new Size(_BitmapWidth, _BitmapHeight)); + + string savefile = System.IO.Path.Combine(Util.CurrentPath, "ScreenShot", DateTime.Now.ToString("yyyyMMddHHmmss") + ".png"); + System.IO.FileInfo grpath = new FileInfo(savefile); + if (!grpath.Directory.Exists) grpath.Directory.Create(); + + bitmap.Save(grpath.FullName, System.Drawing.Imaging.ImageFormat.Png); + Util.MsgI("화면 캡쳐 성공\n" + + "위치:" + grpath.Directory.FullName +"\n" + + "파일명: " + grpath.Name); + } + catch (Exception ex) + { + Util.MsgE("화면 캡쳐 실패\n" + ex.Message); + } + } + + + public static void SaveBugReport(string content, string subdirName = "BugReport") + { + try + { + var path = CurrentPath + subdirName; + if (!System.IO.Directory.Exists(path)) System.IO.Directory.CreateDirectory(path); + var file = path + "\\" + DateTime.Now.ToString("yyyyMMdd_HHmmss_fff") + ".txt"; + System.IO.File.WriteAllText(file, content, System.Text.Encoding.UTF8); + } + catch + { + //nothing + } + } + + public static void CopyData(System.Data.DataRow drSrc, System.Data.DataRow drDes) + { + if (drDes == null || drSrc == null) return; + foreach (System.Data.DataColumn col in drSrc.Table.Columns) + { + if (col.ColumnName.ToUpper() == "IDX") continue; + drDes[col.ColumnName] = drSrc[col.ColumnName]; + } + + } + + /// + /// 현재실행중인폴더를 반환합니다. + /// + public static string CurrentPath + { + get + { + return AppDomain.CurrentDomain.BaseDirectory; + } + } + /// + /// 콤마와 줄바꿈등을 제거합니다. + /// + /// + public static string ToCSVString(string src) + { + string retval = src.Replace("\r", "").Replace("\n", "").Replace(",", ""); + return retval; + } + + public static Boolean RunProcess(string file, string arg = "") + { + var fi = new System.IO.FileInfo(file); + if (!fi.Exists) + { + // Pub.log.AddE("Run Error : " + file); + return false; + } + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(file); + si.Arguments = arg; + prc.StartInfo = si; + prc.Start(); + return true; + } + + #region "convert" + public static string RectToStr(Rectangle rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string RectToStr(RectangleF rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string PointToStr(Point pt) + { + return string.Format("{0};{1}", pt.X, pt.Y); + } + public static string PointToStr(PointF pt) + { + return string.Format("{0};{1}", pt.X, pt.Y); + } + + #endregion + + #region "NIC" + + /// + /// 지정된 nic카드가 현재 목록에 존재하는지 확인한다. + /// + /// + public static Boolean ExistNIC(string NICName) + { + if (string.IsNullOrEmpty(NICName)) return false; + foreach (string NetName in NICCardList()) + { + if (NetName.ToLower() == NICName.ToLower()) + { + return true; + } + } + return false; + } + + /// + /// Ehternet Card 를 사용안함으로 설정합니다.(관리자권한필요) + /// + /// + public static Boolean NICDisable(string NICName) + { + //해당 nic 가 현재 목록에 존재하는지 확인한다. + + string cmd = "interface set interface " + NICName + " disable"; + Process prc = new Process(); + ProcessStartInfo si = new ProcessStartInfo("netsh", cmd); + si.WindowStyle = ProcessWindowStyle.Hidden; + prc.StartInfo = si; + prc.Start(); + + ////목록에서 사라질때까지 기다린다. + DateTime SD = DateTime.Now; + Boolean timeout = false; + while ((true)) + { + + bool FindNetwork = false; + foreach (string NetName in NICCardList()) + { + if (NetName == NICName.ToLower()) + { + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + + if (!FindNetwork) + break; // TODO: might not be correct. Was : Exit While + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + timeout = true; + break; // TODO: might not be correct. Was : Exit While + } + } + return !timeout; + } + + public static List NICCardList() + { + List Retval = new List(); + foreach (System.Net.NetworkInformation.NetworkInterface Net in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()) + { + if (Net.NetworkInterfaceType == System.Net.NetworkInformation.NetworkInterfaceType.Ethernet) + { + Retval.Add(Net.Name.ToUpper()); + } + } + return Retval; + } + + /// + /// 이더넷카드를 사용함으로 설정합니다. + /// + /// + public static Boolean NICEnable(string NICName) + { + string cmd = "interface set interface " + NICName + " enable"; + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo("netsh", cmd); + si.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; + prc.StartInfo = si; + prc.Start(); + + + ////목록에생길떄까지 대기 + DateTime SD = DateTime.Now; + while ((true)) + { + + bool FindNetwork = false; + foreach (string NetName in NICCardList()) + { + if (NetName.ToLower() == NICName.ToLower()) + { + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + + if (FindNetwork) + break; // TODO: might not be correct. Was : Exit While + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + return false; + } + } + + ////결이 완료될떄까지 기다린다. + SD = DateTime.Now; + while ((true)) + { + + bool FindNetwork = false; + foreach (System.Net.NetworkInformation.NetworkInterface Net in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()) + { + if (Net.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.GigabitEthernet && + Net.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Ethernet) continue; + if (Net.Name.ToLower() == NICName.ToLower()) + { + //string data = Net.GetIPProperties().GatewayAddresses[0].ToString(); + + if (Net.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up) + { + + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + } + if (FindNetwork) + return true; + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + return false; + } + } + + } + + #endregion + + public static void RunExplorer(string arg) + { + System.Diagnostics.ProcessStartInfo si = new ProcessStartInfo("explorer"); + si.Arguments = arg; + System.Diagnostics.Process.Start(si); + } + + #region "watchdog" + public static void WatchDog_Run() + { + System.IO.FileInfo fi = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "WatchCat.exe"); + if (!fi.Exists) return; + var Exist = CheckExistProcess("watchcat"); + if (Exist) return; + RunProcess(fi.FullName); + } + + public static Boolean CheckExistProcess(string ProcessName) + { + foreach (var prc in System.Diagnostics.Process.GetProcesses()) + { + if (prc.ProcessName.StartsWith("svchost")) continue; + if (prc.ProcessName.ToUpper() == ProcessName.ToUpper()) return true; + } + return false; + } + #endregion + + #region "web function" + /// + /// URL로부터 문자열을 수신합니다. + /// + /// + /// + /// + public static string GetStrfromurl(string url, out Boolean isError) + { + isError = false; + string result = ""; + try + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(url)); + request.Timeout = 60000; + request.ReadWriteTimeout = 60000; + + request.MaximumAutomaticRedirections = 4; + request.MaximumResponseHeadersLength = 4; + request.Credentials = CredentialCache.DefaultCredentials; + var response = request.GetResponse() as HttpWebResponse; + var txtReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8); + result = txtReader.ReadToEnd(); + } + catch (Exception ex) + { + isError = true; + result = ex.Message.ToString(); + } + return result; + } + + #endregion + + } +} diff --git a/Cs_HMI/TestProject/Test_Narumi/Form1.Designer.cs b/Cs_HMI/TestProject/Test_Narumi/Form1.Designer.cs new file mode 100644 index 0000000..ed19445 --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Form1.Designer.cs @@ -0,0 +1,536 @@ +namespace Test_BMS +{ + partial class Form1 + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.comboBox2 = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.logTextBox1 = new arCtl.LogTextBox(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.button9 = new System.Windows.Forms.Button(); + this.button10 = new System.Windows.Forms.Button(); + this.button11 = new System.Windows.Forms.Button(); + this.button12 = new System.Windows.Forms.Button(); + this.button13 = new System.Windows.Forms.Button(); + this.button14 = new System.Windows.Forms.Button(); + this.button15 = new System.Windows.Forms.Button(); + this.button16 = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.rt0 = new System.Windows.Forms.RichTextBox(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.rt1 = new System.Windows.Forms.RichTextBox(); + this.rt2 = new System.Windows.Forms.RichTextBox(); + this.rt3 = new System.Windows.Forms.RichTextBox(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.logTextBox2 = new arCtl.LogTextBox(); + this.button17 = new System.Windows.Forms.Button(); + this.button18 = new System.Windows.Forms.Button(); + this.button19 = new System.Windows.Forms.Button(); + this.tableLayoutPanel1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); + this.SuspendLayout(); + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(46, 10); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(100, 20); + this.comboBox1.TabIndex = 0; + this.comboBox1.Text = "COM21"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(289, 10); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(108, 20); + this.button1.TabIndex = 1; + this.button1.Text = "connect"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(403, 10); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(106, 20); + this.button2.TabIndex = 1; + this.button2.Text = "close"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // comboBox2 + // + this.comboBox2.FormattingEnabled = true; + this.comboBox2.Items.AddRange(new object[] { + "9600", + "12800", + "25600", + "250000"}); + this.comboBox2.Location = new System.Drawing.Point(188, 10); + this.comboBox2.Name = "comboBox2"; + this.comboBox2.Size = new System.Drawing.Size(95, 20); + this.comboBox2.TabIndex = 2; + this.comboBox2.Text = "57600"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(15, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(26, 12); + this.label1.TabIndex = 3; + this.label1.Text = "port"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(150, 14); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(33, 12); + this.label2.TabIndex = 3; + this.label2.Text = "baud"; + // + // logTextBox1 + // + this.logTextBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(24)))), ((int)(((byte)(24))))); + this.logTextBox1.ColorList = new arCtl.sLogMessageColor[0]; + this.logTextBox1.DateFormat = "ss.fff"; + this.logTextBox1.DefaultColor = System.Drawing.Color.LightGray; + this.logTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.logTextBox1.EnableDisplayTimer = true; + this.logTextBox1.EnableGubunColor = true; + this.logTextBox1.Font = new System.Drawing.Font("Consolas", 9F); + this.logTextBox1.ListFormat = "[{0}] {1}"; + this.logTextBox1.Location = new System.Drawing.Point(3, 3); + this.logTextBox1.MaxListCount = ((ushort)(200)); + this.logTextBox1.MaxTextLength = ((uint)(4000u)); + this.logTextBox1.MessageInterval = 50; + this.logTextBox1.Name = "logTextBox1"; + this.logTextBox1.Size = new System.Drawing.Size(335, 494); + this.logTextBox1.TabIndex = 4; + this.logTextBox1.Text = ""; + // + // button3 + // + this.button3.Dock = System.Windows.Forms.DockStyle.Fill; + this.button3.Location = new System.Drawing.Point(3, 3); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(130, 49); + this.button3.TabIndex = 5; + this.button3.Text = "forward"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button4 + // + this.button4.Dock = System.Windows.Forms.DockStyle.Fill; + this.button4.Location = new System.Drawing.Point(3, 58); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(130, 49); + this.button4.TabIndex = 6; + this.button4.Text = "backward"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // button5 + // + this.button5.Dock = System.Windows.Forms.DockStyle.Fill; + this.button5.Location = new System.Drawing.Point(139, 3); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(130, 49); + this.button5.TabIndex = 7; + this.button5.Text = "stop"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // button6 + // + this.button6.Dock = System.Windows.Forms.DockStyle.Fill; + this.button6.Location = new System.Drawing.Point(275, 3); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(130, 49); + this.button6.TabIndex = 8; + this.button6.Text = "set f"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // button7 + // + this.button7.Dock = System.Windows.Forms.DockStyle.Fill; + this.button7.Location = new System.Drawing.Point(139, 58); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(130, 49); + this.button7.TabIndex = 9; + this.button7.Text = "mark stop"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // button8 + // + this.button8.Dock = System.Windows.Forms.DockStyle.Fill; + this.button8.Location = new System.Drawing.Point(275, 58); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(130, 49); + this.button8.TabIndex = 10; + this.button8.Text = "Run"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button8_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 5; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.0005F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.0005F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.0005F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 19.9985F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); + this.tableLayoutPanel1.Controls.Add(this.button6, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.button4, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.button7, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.button3, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.button5, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.button8, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.button9, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.button10, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.button11, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.button12, 3, 2); + this.tableLayoutPanel1.Controls.Add(this.button13, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.button14, 3, 0); + this.tableLayoutPanel1.Controls.Add(this.button15, 4, 0); + this.tableLayoutPanel1.Controls.Add(this.button16, 4, 1); + this.tableLayoutPanel1.Controls.Add(this.button17, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.button18, 1, 3); + this.tableLayoutPanel1.Controls.Add(this.button19, 2, 3); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 37); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.00062F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.00062F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.00062F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 24.99813F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(683, 222); + this.tableLayoutPanel1.TabIndex = 11; + // + // button9 + // + this.button9.Dock = System.Windows.Forms.DockStyle.Fill; + this.button9.Location = new System.Drawing.Point(3, 113); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(130, 49); + this.button9.TabIndex = 11; + this.button9.Text = "충전시작"; + this.button9.UseVisualStyleBackColor = true; + this.button9.Click += new System.EventHandler(this.button9_Click); + // + // button10 + // + this.button10.Dock = System.Windows.Forms.DockStyle.Fill; + this.button10.Location = new System.Drawing.Point(139, 113); + this.button10.Name = "button10"; + this.button10.Size = new System.Drawing.Size(130, 49); + this.button10.TabIndex = 12; + this.button10.Text = "충전종료"; + this.button10.UseVisualStyleBackColor = true; + this.button10.Click += new System.EventHandler(this.button10_Click); + // + // button11 + // + this.button11.Dock = System.Windows.Forms.DockStyle.Fill; + this.button11.Location = new System.Drawing.Point(275, 113); + this.button11.Name = "button11"; + this.button11.Size = new System.Drawing.Size(130, 49); + this.button11.TabIndex = 12; + this.button11.Text = "도착알림(ON)"; + this.button11.UseVisualStyleBackColor = true; + this.button11.Click += new System.EventHandler(this.button11_Click); + // + // button12 + // + this.button12.Dock = System.Windows.Forms.DockStyle.Fill; + this.button12.Location = new System.Drawing.Point(411, 113); + this.button12.Name = "button12"; + this.button12.Size = new System.Drawing.Size(130, 49); + this.button12.TabIndex = 13; + this.button12.Text = "도착알림(OFF)"; + this.button12.UseVisualStyleBackColor = true; + this.button12.Click += new System.EventHandler(this.button12_Click); + // + // button13 + // + this.button13.Dock = System.Windows.Forms.DockStyle.Fill; + this.button13.Location = new System.Drawing.Point(411, 58); + this.button13.Name = "button13"; + this.button13.Size = new System.Drawing.Size(130, 49); + this.button13.TabIndex = 14; + this.button13.Text = "ERR-RESET"; + this.button13.UseVisualStyleBackColor = true; + this.button13.Click += new System.EventHandler(this.button13_Click); + // + // button14 + // + this.button14.Dock = System.Windows.Forms.DockStyle.Fill; + this.button14.Location = new System.Drawing.Point(411, 3); + this.button14.Name = "button14"; + this.button14.Size = new System.Drawing.Size(130, 49); + this.button14.TabIndex = 15; + this.button14.Text = "set b"; + this.button14.UseVisualStyleBackColor = true; + this.button14.Click += new System.EventHandler(this.button14_Click); + // + // button15 + // + this.button15.Dock = System.Windows.Forms.DockStyle.Fill; + this.button15.Location = new System.Drawing.Point(547, 3); + this.button15.Name = "button15"; + this.button15.Size = new System.Drawing.Size(133, 49); + this.button15.TabIndex = 16; + this.button15.Text = "manual f"; + this.button15.UseVisualStyleBackColor = true; + this.button15.Click += new System.EventHandler(this.button15_Click); + // + // button16 + // + this.button16.Dock = System.Windows.Forms.DockStyle.Fill; + this.button16.Location = new System.Drawing.Point(547, 58); + this.button16.Name = "button16"; + this.button16.Size = new System.Drawing.Size(133, 49); + this.button16.TabIndex = 16; + this.button16.Text = "manual b"; + this.button16.UseVisualStyleBackColor = true; + this.button16.Click += new System.EventHandler(this.button16_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.comboBox1); + this.panel1.Controls.Add(this.button1); + this.panel1.Controls.Add(this.button2); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.comboBox2); + this.panel1.Controls.Add(this.label1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1264, 37); + this.panel1.TabIndex = 12; + // + // rt0 + // + this.rt0.Dock = System.Windows.Forms.DockStyle.Fill; + this.rt0.Location = new System.Drawing.Point(3, 3); + this.rt0.Name = "rt0"; + this.rt0.Size = new System.Drawing.Size(284, 292); + this.rt0.TabIndex = 13; + this.rt0.Text = ""; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.Controls.Add(this.rt0, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.rt1, 1, 0); + this.tableLayoutPanel2.Controls.Add(this.rt2, 0, 1); + this.tableLayoutPanel2.Controls.Add(this.rt3, 1, 1); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Right; + this.tableLayoutPanel2.Location = new System.Drawing.Point(683, 37); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 2; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 41.27424F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 58.72576F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(581, 722); + this.tableLayoutPanel2.TabIndex = 14; + // + // rt1 + // + this.rt1.Dock = System.Windows.Forms.DockStyle.Fill; + this.rt1.Location = new System.Drawing.Point(293, 3); + this.rt1.Name = "rt1"; + this.rt1.Size = new System.Drawing.Size(285, 292); + this.rt1.TabIndex = 13; + this.rt1.Text = ""; + // + // rt2 + // + this.rt2.Dock = System.Windows.Forms.DockStyle.Fill; + this.rt2.Location = new System.Drawing.Point(3, 301); + this.rt2.Name = "rt2"; + this.rt2.Size = new System.Drawing.Size(284, 418); + this.rt2.TabIndex = 13; + this.rt2.Text = ""; + // + // rt3 + // + this.rt3.Dock = System.Windows.Forms.DockStyle.Fill; + this.rt3.Location = new System.Drawing.Point(293, 301); + this.rt3.Name = "rt3"; + this.rt3.Size = new System.Drawing.Size(285, 418); + this.rt3.TabIndex = 13; + this.rt3.Text = ""; + // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.ColumnCount = 2; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel3.Controls.Add(this.logTextBox1, 0, 0); + this.tableLayoutPanel3.Controls.Add(this.logTextBox2, 1, 0); + this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 259); + this.tableLayoutPanel3.Name = "tableLayoutPanel3"; + this.tableLayoutPanel3.RowCount = 1; + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel3.Size = new System.Drawing.Size(683, 500); + this.tableLayoutPanel3.TabIndex = 15; + // + // logTextBox2 + // + this.logTextBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(24)))), ((int)(((byte)(24))))); + this.logTextBox2.ColorList = new arCtl.sLogMessageColor[0]; + this.logTextBox2.DateFormat = "ss.fff"; + this.logTextBox2.DefaultColor = System.Drawing.Color.LightGray; + this.logTextBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.logTextBox2.EnableDisplayTimer = true; + this.logTextBox2.EnableGubunColor = true; + this.logTextBox2.Font = new System.Drawing.Font("Consolas", 9F); + this.logTextBox2.ListFormat = "[{0}] {1}"; + this.logTextBox2.Location = new System.Drawing.Point(344, 3); + this.logTextBox2.MaxListCount = ((ushort)(200)); + this.logTextBox2.MaxTextLength = ((uint)(4000u)); + this.logTextBox2.MessageInterval = 50; + this.logTextBox2.Name = "logTextBox2"; + this.logTextBox2.Size = new System.Drawing.Size(336, 494); + this.logTextBox2.TabIndex = 4; + this.logTextBox2.Text = ""; + // + // button17 + // + this.button17.Dock = System.Windows.Forms.DockStyle.Fill; + this.button17.Location = new System.Drawing.Point(3, 168); + this.button17.Name = "button17"; + this.button17.Size = new System.Drawing.Size(130, 51); + this.button17.TabIndex = 17; + this.button17.Text = "Speed L"; + this.button17.UseVisualStyleBackColor = true; + this.button17.Click += new System.EventHandler(this.button17_Click); + // + // button18 + // + this.button18.Dock = System.Windows.Forms.DockStyle.Fill; + this.button18.Location = new System.Drawing.Point(139, 168); + this.button18.Name = "button18"; + this.button18.Size = new System.Drawing.Size(130, 51); + this.button18.TabIndex = 17; + this.button18.Text = "Speed M"; + this.button18.UseVisualStyleBackColor = true; + this.button18.Click += new System.EventHandler(this.button18_Click); + // + // button19 + // + this.button19.Dock = System.Windows.Forms.DockStyle.Fill; + this.button19.Location = new System.Drawing.Point(275, 168); + this.button19.Name = "button19"; + this.button19.Size = new System.Drawing.Size(130, 51); + this.button19.TabIndex = 17; + this.button19.Text = "Speed H"; + this.button19.UseVisualStyleBackColor = true; + this.button19.Click += new System.EventHandler(this.button19_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1264, 759); + this.Controls.Add(this.tableLayoutPanel3); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.tableLayoutPanel2); + this.Controls.Add(this.panel1); + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.tableLayoutPanel1.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel3.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.ComboBox comboBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private arCtl.LogTextBox logTextBox1; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Button button10; + private System.Windows.Forms.Button button11; + private System.Windows.Forms.Button button12; + private System.Windows.Forms.Button button13; + private System.Windows.Forms.RichTextBox rt0; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.RichTextBox rt1; + private System.Windows.Forms.RichTextBox rt2; + private System.Windows.Forms.RichTextBox rt3; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; + private arCtl.LogTextBox logTextBox2; + private System.Windows.Forms.Button button14; + private System.Windows.Forms.Button button15; + private System.Windows.Forms.Button button16; + private System.Windows.Forms.Button button17; + private System.Windows.Forms.Button button18; + private System.Windows.Forms.Button button19; + } +} + diff --git a/Cs_HMI/TestProject/Test_Narumi/Form1.cs b/Cs_HMI/TestProject/Test_Narumi/Form1.cs new file mode 100644 index 0000000..d67d7ea --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Form1.cs @@ -0,0 +1,218 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Test_BMS +{ + public partial class Form1 : Form + { + arDev.Narumi dev; + arUtil.Log log1 = new arUtil.Log(); + arUtil.Log log2 = new arUtil.Log(); + public Form1() + { + InitializeComponent(); + dev = new arDev.Narumi(); + dev.DataReceive += Dev_DataReceive; + dev.Message += Dev_Message; + log1.FileNameFormat = "{yyyyMMdd}_COM"; + log2.FileNameFormat = "{yyyyMMdd}_STS"; + this.FormClosed += Form1_FormClosed; + } + + private void Form1_FormClosed(object sender, FormClosedEventArgs e) + { + log1.Flush(); + log2.Flush(); + } + + private void Dev_Message(object sender, arDev.arRS232.MessageEventArgs e) + { + addmsg(e.MsgType.ToString(), e.Message);// $"{e.MsgType}:{e.Message}"); + } + + private void Dev_DataReceive(object sender, arDev.Narumi.DataEventArgs e) + { + //throw new NotImplementedException(); + updatestatue(); + } + + void updatestatue() + { + if (this.rt0.InvokeRequired) + { + this.Invoke(new MethodInvoker(updatestatue)); + return; + } + + this.rt0.Text = $"system0-{dev.system0.Value:X2}\n" + dev.system0.ToString(); + this.rt1.Text = $"system1-{dev.system1.Value:X2}\n" + dev.system1.ToString(); + this.rt2.Text = $"error-{dev.error.Value:X2}\n" + dev.error.ToString(); + this.rt3.Text = $"iosignal-{dev.signal.Value:X2}\n" + dev.signal.ToString() + "data\n" + dev.data.ToString(); + //this.rt4.Text = "data\n" + dev.data.ToString(); + + + } + + private void Form1_Load(object sender, EventArgs e) + { + this.comboBox1.Items.Clear(); + foreach (var port in System.IO.Ports.SerialPort.GetPortNames()) + this.comboBox1.Items.Add(port); + } + + void addmsg(string grp,string m) + { + if(m.Contains("STS")) + { + log2.Add(grp, m); + if (logTextBox2.InvokeRequired) + { + logTextBox2.BeginInvoke(new Action(() => + { + logTextBox2.AddMsg(m); + })); + } + else + { + logTextBox2.AddMsg(m); + } + } + else + { + log1.Add(grp, m); + if (logTextBox1.InvokeRequired) + { + logTextBox1.BeginInvoke(new Action(() => + { + logTextBox1.AddMsg(m); + })); + } + else + { + logTextBox1.AddMsg(m); + } + } + + } + + + + + private void button1_Click(object sender, EventArgs e) + { + dev.BaudRate = int.Parse(this.comboBox2.Text); + dev.PortName = comboBox1.Text; + dev.Open(); + addmsg("conn",$"open:{dev.IsOpen}"); + } + + private void button2_Click(object sender, EventArgs e) + { + dev.Close(); + } + + + + private void button6_Click(object sender, EventArgs e) + { + dev.AGVMoveSet(new arDev.Narumi.BunkiData + { + Bunki = arDev.Narumi.eBunki.Strate, + Direction = arDev.Narumi.eMoveDir.Forward, + PBSSensor = 1, + Speed = arDev.Narumi.eMoveSpd.Low, + }); + } + + private void button5_Click(object sender, EventArgs e) + { + dev.AGVMoveStop("form1-button5", arDev.Narumi.eStopOpt.Stop); + } + + private void button7_Click(object sender, EventArgs e) + { + dev.AGVMoveStop("form1-button7",arDev.Narumi.eStopOpt.MarkStop); + } + + private void button4_Click(object sender, EventArgs e) + { + dev.AGVMoveRun(arDev.Narumi.eRunOpt.Backward); + } + private void button3_Click(object sender, EventArgs e) + { + dev.AGVMoveRun(arDev.Narumi.eRunOpt.Forward); + } + + private void button8_Click(object sender, EventArgs e) + { + dev.AGVMoveRun(); + } + + private void button9_Click(object sender, EventArgs e) + { + dev.AGVCharge(30, true); + } + + private void button10_Click(object sender, EventArgs e) + { + dev.AGVCharge(30, false); + } + + private void button11_Click(object sender, EventArgs e) + { + dev.AGVTowerLamp(true); + } + + private void button12_Click(object sender, EventArgs e) + { + dev.AGVTowerLamp(false); + } + + private void button13_Click(object sender, EventArgs e) + { + dev.AGVErrorReset(); + } + + private void button14_Click(object sender, EventArgs e) + { + dev.AGVMoveSet(new arDev.Narumi.BunkiData + { + Bunki = arDev.Narumi.eBunki.Strate, + Direction = arDev.Narumi.eMoveDir.Backward, + PBSSensor = 1, + Speed = arDev.Narumi.eMoveSpd.Low, + }); + } + + private void button15_Click(object sender, EventArgs e) + { + dev.AGVMoveManual(arDev.Narumi.ManulOpt.FS, arDev.Narumi.Speed.Low, arDev.Narumi.Sensor.AllOn); + } + + private void button16_Click(object sender, EventArgs e) + { + dev.AGVMoveManual(arDev.Narumi.ManulOpt.BS, arDev.Narumi.Speed.Low, arDev.Narumi.Sensor.AllOn); + } + + private void button17_Click(object sender, EventArgs e) + { + dev.AGVMoveSet(new arDev.Narumi.BunkiData(dev.data.Direction, dev.data.Sts, 'L')); + } + + private void button18_Click(object sender, EventArgs e) + { + dev.AGVMoveSet(new arDev.Narumi.BunkiData(dev.data.Direction, dev.data.Sts, 'M')); + } + + private void button19_Click(object sender, EventArgs e) + { + dev.AGVMoveSet(new arDev.Narumi.BunkiData(dev.data.Direction, dev.data.Sts, 'H')); + } + } +} diff --git a/Cs_HMI/TestProject/Test_Narumi/Form1.resx b/Cs_HMI/TestProject/Test_Narumi/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_Narumi/Program.cs b/Cs_HMI/TestProject/Test_Narumi/Program.cs new file mode 100644 index 0000000..868a592 --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace Test_BMS +{ + static class Program + { + /// + /// 해당 응용 프로그램의 주 진입점입니다. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Cs_HMI/TestProject/Test_Narumi/Properties/AssemblyInfo.cs b/Cs_HMI/TestProject/Test_Narumi/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2800cf9 --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("BMS Commnunication Module Test")] +[assembly: AssemblyDescription("BMS Commnunication Module Test")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("BMS Commnunication Module Test")] +[assembly: AssemblyProduct("BMS Test Software")] +[assembly: AssemblyCopyright("Copyright ©ATK4 2020")] +[assembly: AssemblyTrademark("ATK4")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("ce3fff9f-6aca-1234-b64a-33ff4ad5e82e")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 +// 지정되도록 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("20.03.09.0")] +[assembly: AssemblyFileVersion("20.03.09.0")] diff --git a/Cs_HMI/TestProject/Test_Narumi/Properties/Resources.Designer.cs b/Cs_HMI/TestProject/Test_Narumi/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1b46bdf --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Test_Narumi.Properties { + using System; + + + /// + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. + /// + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_Narumi.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 + /// 재정의합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_Narumi/Properties/Resources.resx b/Cs_HMI/TestProject/Test_Narumi/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_Narumi/Properties/Settings.Designer.cs b/Cs_HMI/TestProject/Test_Narumi/Properties/Settings.Designer.cs new file mode 100644 index 0000000..78f82ca --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Test_Narumi.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_Narumi/Properties/Settings.settings b/Cs_HMI/TestProject/Test_Narumi/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Cs_HMI/TestProject/Test_Narumi/Sample.txt b/Cs_HMI/TestProject/Test_Narumi/Sample.txt new file mode 100644 index 0000000..a950cfe --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Sample.txt @@ -0,0 +1,14 @@ +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 +02 53 54 53 32 35 38 46 46 46 46 34 30 30 30 30 30 30 30 4C 53 46 30 30 30 30 30 30 33 41 03 \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_Narumi/Test_Narumi.csproj b/Cs_HMI/TestProject/Test_Narumi/Test_Narumi.csproj new file mode 100644 index 0000000..9c42ed6 --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/Test_Narumi.csproj @@ -0,0 +1,102 @@ + + + + + Debug + AnyCPU + {EB77976F-4DE4-46A5-8B25-D07226204C32} + WinExe + Test_Narumi + Test_Narumi + v4.8 + 512 + true + + + + AnyCPU + true + full + false + ..\..\..\..\..\..\..\..\Amkor\AGV2\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + ..\Sub\arCtl\obj\Debug\arControl.Net4.dll + + + ..\..\DLL\ArLog.Net4.dll + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {8bae0eac-3d25-402f-9a65-2ba1ecfe28b7} + NARUMI + + + {14e8c9a5-013e-49ba-b435-efefc77dd623} + CommData + + + + + + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_Narumi/app.config b/Cs_HMI/TestProject/Test_Narumi/app.config new file mode 100644 index 0000000..2c0f559 --- /dev/null +++ b/Cs_HMI/TestProject/Test_Narumi/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Cs_HMI/TestProject/Test_ProPLC/Form1.Designer.cs b/Cs_HMI/TestProject/Test_ProPLC/Form1.Designer.cs new file mode 100644 index 0000000..04552c1 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Form1.Designer.cs @@ -0,0 +1,577 @@ +namespace Test_ProPLC +{ + partial class Form1 + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마세요. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + arFrame.Control.ColorListItem colorListItem1 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem2 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem3 = new arFrame.Control.ColorListItem(); + arFrame.Control.ColorListItem colorListItem4 = new arFrame.Control.ColorListItem(); + this.serialPort1 = new System.IO.Ports.SerialPort(this.components); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.textbox1 = new System.Windows.Forms.ComboBox(); + this.textbox2 = new System.Windows.Forms.ComboBox(); + this.gv1 = new arFrame.Control.GridView(); + this.gv2 = new arFrame.Control.GridView(); + this.logSub = new arCtl.LogTextBox(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.logMain = new arCtl.LogTextBox(); + this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.button9 = new System.Windows.Forms.Button(); + this.button10 = new System.Windows.Forms.Button(); + this.button11 = new System.Windows.Forms.Button(); + this.button12 = new System.Windows.Forms.Button(); + this.button13 = new System.Windows.Forms.Button(); + this.button14 = new System.Windows.Forms.Button(); + this.button15 = new System.Windows.Forms.Button(); + this.button16 = new System.Windows.Forms.Button(); + this.button17 = new System.Windows.Forms.Button(); + this.button18 = new System.Windows.Forms.Button(); + this.button19 = new System.Windows.Forms.Button(); + this.button20 = new System.Windows.Forms.Button(); + this.button21 = new System.Windows.Forms.Button(); + this.button22 = new System.Windows.Forms.Button(); + this.button23 = new System.Windows.Forms.Button(); + this.button24 = new System.Windows.Forms.Button(); + this.button35 = new System.Windows.Forms.Button(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(9, 10); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(108, 36); + this.button1.TabIndex = 0; + this.button1.Text = "Conn"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(9, 333); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(108, 36); + this.button2.TabIndex = 4; + this.button2.Text = "Conn"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(123, 10); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(843, 21); + this.textBox3.TabIndex = 6; + // + // textBox4 + // + this.textBox4.Location = new System.Drawing.Point(123, 333); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(843, 21); + this.textBox4.TabIndex = 7; + // + // textbox1 + // + this.textbox1.FormattingEnabled = true; + this.textbox1.Location = new System.Drawing.Point(9, 52); + this.textbox1.Name = "textbox1"; + this.textbox1.Size = new System.Drawing.Size(108, 20); + this.textbox1.TabIndex = 8; + // + // textbox2 + // + this.textbox2.FormattingEnabled = true; + this.textbox2.Location = new System.Drawing.Point(9, 375); + this.textbox2.Name = "textbox2"; + this.textbox2.Size = new System.Drawing.Size(108, 20); + this.textbox2.TabIndex = 9; + this.textbox2.Text = "COM31"; + // + // gv1 + // + this.gv1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.gv1.BorderSize = 1; + colorListItem1.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30))))); + colorListItem1.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + colorListItem1.Remark = ""; + colorListItem2.BackColor1 = System.Drawing.Color.Orange; + colorListItem2.BackColor2 = System.Drawing.Color.DarkOrange; + colorListItem2.Remark = ""; + this.gv1.ColorList = new arFrame.Control.ColorListItem[] { + colorListItem1, + colorListItem2}; + this.gv1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.gv1.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gv1.FontPin = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold); + this.gv1.ForeColor = System.Drawing.Color.White; + this.gv1.ForeColorPin = System.Drawing.Color.WhiteSmoke; + this.gv1.Location = new System.Drawing.Point(123, 37); + this.gv1.MatrixSize = new System.Drawing.Point(8, 4); + this.gv1.MenuBorderSize = 1; + this.gv1.MenuGap = 5; + this.gv1.MinimumSize = new System.Drawing.Size(100, 50); + this.gv1.Name = "gv1"; + this.gv1.Names = null; + this.gv1.ShadowColor = System.Drawing.Color.Black; + this.gv1.showDebugInfo = false; + this.gv1.ShowIndexString = true; + this.gv1.Size = new System.Drawing.Size(592, 169); + this.gv1.TabIndex = 10; + this.gv1.Tags = null; + this.gv1.Text = "gridView1"; + this.gv1.TextAttachToImage = true; + this.gv1.Titles = null; + this.gv1.Values = null; + this.gv1.ItemClick += new System.EventHandler(this.gv1_ItemClick); + // + // gv2 + // + this.gv2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.gv2.BorderSize = 1; + colorListItem3.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30))))); + colorListItem3.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); + colorListItem3.Remark = ""; + colorListItem4.BackColor1 = System.Drawing.Color.Orange; + colorListItem4.BackColor2 = System.Drawing.Color.DarkOrange; + colorListItem4.Remark = ""; + this.gv2.ColorList = new arFrame.Control.ColorListItem[] { + colorListItem3, + colorListItem4}; + this.gv2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.gv2.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gv2.FontPin = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Bold); + this.gv2.ForeColor = System.Drawing.Color.White; + this.gv2.ForeColorPin = System.Drawing.Color.WhiteSmoke; + this.gv2.Location = new System.Drawing.Point(123, 360); + this.gv2.MatrixSize = new System.Drawing.Point(8, 4); + this.gv2.MenuBorderSize = 1; + this.gv2.MenuGap = 5; + this.gv2.MinimumSize = new System.Drawing.Size(100, 50); + this.gv2.Name = "gv2"; + this.gv2.Names = null; + this.gv2.ShadowColor = System.Drawing.Color.Black; + this.gv2.showDebugInfo = false; + this.gv2.ShowIndexString = true; + this.gv2.Size = new System.Drawing.Size(592, 169); + this.gv2.TabIndex = 11; + this.gv2.Tags = null; + this.gv2.Text = "gridView1"; + this.gv2.TextAttachToImage = true; + this.gv2.Titles = null; + this.gv2.Values = null; + this.gv2.ItemClick += new System.EventHandler(this.gv2_ItemClick); + // + // logSub + // + this.logSub.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(24)))), ((int)(((byte)(24))))); + this.logSub.ColorList = new arCtl.sLogMessageColor[0]; + this.logSub.DateFormat = "yy-MM-dd HH:mm:ss"; + this.logSub.DefaultColor = System.Drawing.Color.LightGray; + this.logSub.EnableDisplayTimer = true; + this.logSub.EnableGubunColor = true; + this.logSub.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.logSub.ListFormat = "[{0}] {1}"; + this.logSub.Location = new System.Drawing.Point(123, 535); + this.logSub.MaxListCount = ((ushort)(200)); + this.logSub.MaxTextLength = ((uint)(4000u)); + this.logSub.MessageInterval = 50; + this.logSub.Name = "logSub"; + this.logSub.Size = new System.Drawing.Size(592, 132); + this.logSub.TabIndex = 12; + this.logSub.Text = ""; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(721, 360); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(152, 36); + this.button3.TabIndex = 13; + this.button3.Text = "Z-UP"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button4 + // + this.button4.Location = new System.Drawing.Point(721, 402); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(152, 36); + this.button4.TabIndex = 14; + this.button4.Text = "Z-STOP"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // button5 + // + this.button5.Location = new System.Drawing.Point(721, 444); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(152, 36); + this.button5.TabIndex = 15; + this.button5.Text = "Z-DN"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // logMain + // + this.logMain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(24)))), ((int)(((byte)(24)))), ((int)(((byte)(24))))); + this.logMain.ColorList = new arCtl.sLogMessageColor[0]; + this.logMain.DateFormat = "yy-MM-dd HH:mm:ss"; + this.logMain.DefaultColor = System.Drawing.Color.LightGray; + this.logMain.EnableDisplayTimer = true; + this.logMain.EnableGubunColor = true; + this.logMain.Font = new System.Drawing.Font("맑은 고딕", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.logMain.ListFormat = "[{0}] {1}"; + this.logMain.Location = new System.Drawing.Point(123, 212); + this.logMain.MaxListCount = ((ushort)(200)); + this.logMain.MaxTextLength = ((uint)(4000u)); + this.logMain.MessageInterval = 50; + this.logMain.Name = "logMain"; + this.logMain.Size = new System.Drawing.Size(592, 115); + this.logMain.TabIndex = 16; + this.logMain.Text = ""; + // + // button6 + // + this.button6.BackColor = System.Drawing.Color.Tomato; + this.button6.ForeColor = System.Drawing.Color.White; + this.button6.Location = new System.Drawing.Point(721, 79); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(73, 36); + this.button6.TabIndex = 19; + this.button6.Text = "L_STOP"; + this.button6.UseVisualStyleBackColor = false; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // button7 + // + this.button7.Location = new System.Drawing.Point(721, 121); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(73, 36); + this.button7.TabIndex = 18; + this.button7.Text = "L-DN"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // button8 + // + this.button8.Location = new System.Drawing.Point(721, 37); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(73, 36); + this.button8.TabIndex = 17; + this.button8.Text = "L-UP"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button8_Click); + // + // button9 + // + this.button9.BackColor = System.Drawing.Color.Tomato; + this.button9.ForeColor = System.Drawing.Color.White; + this.button9.Location = new System.Drawing.Point(800, 78); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(73, 36); + this.button9.TabIndex = 22; + this.button9.Text = "R-STOP"; + this.button9.UseVisualStyleBackColor = false; + this.button9.Click += new System.EventHandler(this.button9_Click); + // + // button10 + // + this.button10.Location = new System.Drawing.Point(800, 120); + this.button10.Name = "button10"; + this.button10.Size = new System.Drawing.Size(73, 36); + this.button10.TabIndex = 21; + this.button10.Text = "R-DN"; + this.button10.UseVisualStyleBackColor = true; + this.button10.Click += new System.EventHandler(this.button10_Click); + // + // button11 + // + this.button11.Location = new System.Drawing.Point(800, 36); + this.button11.Name = "button11"; + this.button11.Size = new System.Drawing.Size(73, 36); + this.button11.TabIndex = 20; + this.button11.Text = "R-UP"; + this.button11.UseVisualStyleBackColor = true; + this.button11.Click += new System.EventHandler(this.button11_Click); + // + // button12 + // + this.button12.BackColor = System.Drawing.Color.White; + this.button12.ForeColor = System.Drawing.Color.Black; + this.button12.Location = new System.Drawing.Point(721, 205); + this.button12.Name = "button12"; + this.button12.Size = new System.Drawing.Size(152, 36); + this.button12.TabIndex = 25; + this.button12.Text = "STOP"; + this.button12.UseVisualStyleBackColor = false; + this.button12.Click += new System.EventHandler(this.button12_Click); + // + // button13 + // + this.button13.BackColor = System.Drawing.Color.White; + this.button13.Location = new System.Drawing.Point(721, 247); + this.button13.Name = "button13"; + this.button13.Size = new System.Drawing.Size(152, 36); + this.button13.TabIndex = 24; + this.button13.Text = "BACK"; + this.button13.UseVisualStyleBackColor = false; + this.button13.Click += new System.EventHandler(this.button13_Click); + // + // button14 + // + this.button14.BackColor = System.Drawing.Color.White; + this.button14.Location = new System.Drawing.Point(721, 163); + this.button14.Name = "button14"; + this.button14.Size = new System.Drawing.Size(152, 36); + this.button14.TabIndex = 23; + this.button14.Text = "GO"; + this.button14.UseVisualStyleBackColor = false; + this.button14.Click += new System.EventHandler(this.button14_Click); + // + // button15 + // + this.button15.Location = new System.Drawing.Point(879, 67); + this.button15.Name = "button15"; + this.button15.Size = new System.Drawing.Size(87, 24); + this.button15.TabIndex = 26; + this.button15.Text = "10"; + this.button15.UseVisualStyleBackColor = true; + this.button15.Click += new System.EventHandler(this.button15_Click); + // + // button16 + // + this.button16.Location = new System.Drawing.Point(879, 91); + this.button16.Name = "button16"; + this.button16.Size = new System.Drawing.Size(87, 24); + this.button16.TabIndex = 27; + this.button16.Text = "20"; + this.button16.UseVisualStyleBackColor = true; + this.button16.Click += new System.EventHandler(this.button15_Click); + // + // button17 + // + this.button17.Location = new System.Drawing.Point(879, 139); + this.button17.Name = "button17"; + this.button17.Size = new System.Drawing.Size(87, 24); + this.button17.TabIndex = 29; + this.button17.Text = "40"; + this.button17.UseVisualStyleBackColor = true; + this.button17.Click += new System.EventHandler(this.button15_Click); + // + // button18 + // + this.button18.Location = new System.Drawing.Point(879, 115); + this.button18.Name = "button18"; + this.button18.Size = new System.Drawing.Size(87, 24); + this.button18.TabIndex = 28; + this.button18.Text = "30"; + this.button18.UseVisualStyleBackColor = true; + this.button18.Click += new System.EventHandler(this.button15_Click); + // + // button19 + // + this.button19.Location = new System.Drawing.Point(879, 235); + this.button19.Name = "button19"; + this.button19.Size = new System.Drawing.Size(87, 24); + this.button19.TabIndex = 33; + this.button19.Text = "80"; + this.button19.UseVisualStyleBackColor = true; + this.button19.Click += new System.EventHandler(this.button15_Click); + // + // button20 + // + this.button20.Location = new System.Drawing.Point(879, 211); + this.button20.Name = "button20"; + this.button20.Size = new System.Drawing.Size(87, 24); + this.button20.TabIndex = 32; + this.button20.Text = "70"; + this.button20.UseVisualStyleBackColor = true; + this.button20.Click += new System.EventHandler(this.button15_Click); + // + // button21 + // + this.button21.Location = new System.Drawing.Point(879, 187); + this.button21.Name = "button21"; + this.button21.Size = new System.Drawing.Size(87, 24); + this.button21.TabIndex = 31; + this.button21.Text = "60"; + this.button21.UseVisualStyleBackColor = true; + this.button21.Click += new System.EventHandler(this.button15_Click); + // + // button22 + // + this.button22.Location = new System.Drawing.Point(879, 163); + this.button22.Name = "button22"; + this.button22.Size = new System.Drawing.Size(87, 24); + this.button22.TabIndex = 30; + this.button22.Text = "50"; + this.button22.UseVisualStyleBackColor = true; + this.button22.Click += new System.EventHandler(this.button15_Click); + // + // button23 + // + this.button23.Location = new System.Drawing.Point(879, 283); + this.button23.Name = "button23"; + this.button23.Size = new System.Drawing.Size(87, 24); + this.button23.TabIndex = 35; + this.button23.Text = "100"; + this.button23.UseVisualStyleBackColor = true; + this.button23.Click += new System.EventHandler(this.button15_Click); + // + // button24 + // + this.button24.Location = new System.Drawing.Point(879, 259); + this.button24.Name = "button24"; + this.button24.Size = new System.Drawing.Size(87, 24); + this.button24.TabIndex = 34; + this.button24.Text = "90"; + this.button24.UseVisualStyleBackColor = true; + this.button24.Click += new System.EventHandler(this.button15_Click); + // + // button35 + // + this.button35.Location = new System.Drawing.Point(879, 42); + this.button35.Name = "button35"; + this.button35.Size = new System.Drawing.Size(87, 24); + this.button35.TabIndex = 46; + this.button35.Text = "0"; + this.button35.UseVisualStyleBackColor = true; + this.button35.Click += new System.EventHandler(this.button15_Click); + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(9, 401); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(108, 20); + this.comboBox1.TabIndex = 47; + this.comboBox1.Text = "57600"; + // + // timer1 + // + this.timer1.Interval = 250; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick_1); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(974, 677); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.button35); + this.Controls.Add(this.button23); + this.Controls.Add(this.button24); + this.Controls.Add(this.button19); + this.Controls.Add(this.button20); + this.Controls.Add(this.button21); + this.Controls.Add(this.button22); + this.Controls.Add(this.button17); + this.Controls.Add(this.button18); + this.Controls.Add(this.button16); + this.Controls.Add(this.button15); + this.Controls.Add(this.button12); + this.Controls.Add(this.button13); + this.Controls.Add(this.button14); + this.Controls.Add(this.button9); + this.Controls.Add(this.button10); + this.Controls.Add(this.button11); + this.Controls.Add(this.button6); + this.Controls.Add(this.button7); + this.Controls.Add(this.button8); + this.Controls.Add(this.logMain); + this.Controls.Add(this.button5); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.logSub); + this.Controls.Add(this.gv2); + this.Controls.Add(this.gv1); + this.Controls.Add(this.textbox2); + this.Controls.Add(this.textbox1); + this.Controls.Add(this.textBox4); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.IO.Ports.SerialPort serialPort1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.ComboBox textbox1; + private System.Windows.Forms.ComboBox textbox2; + private arFrame.Control.GridView gv1; + private arFrame.Control.GridView gv2; + private arCtl.LogTextBox logSub; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private arCtl.LogTextBox logMain; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Button button10; + private System.Windows.Forms.Button button11; + private System.Windows.Forms.Button button12; + private System.Windows.Forms.Button button13; + private System.Windows.Forms.Button button14; + private System.Windows.Forms.Button button15; + private System.Windows.Forms.Button button16; + private System.Windows.Forms.Button button17; + private System.Windows.Forms.Button button18; + private System.Windows.Forms.Button button19; + private System.Windows.Forms.Button button20; + private System.Windows.Forms.Button button21; + private System.Windows.Forms.Button button22; + private System.Windows.Forms.Button button23; + private System.Windows.Forms.Button button24; + private System.Windows.Forms.Button button35; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Timer timer1; + } +} + diff --git a/Cs_HMI/TestProject/Test_ProPLC/Form1.cs b/Cs_HMI/TestProject/Test_ProPLC/Form1.cs new file mode 100644 index 0000000..3638c70 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Form1.cs @@ -0,0 +1,659 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Test_ProPLC +{ + public partial class Form1 : Form + { + arDev.FakePLC dev2; + public Form1() + { + InitializeComponent(); + this.serialPort1.DataReceived += SerialPort1_DataReceived; + dev2 = new arDev.FakePLC(); + this.dev2.ValueChanged += Dev2_ValueChanged; + this.dev2.Message += Dev2_Message; + this.FormClosed += Form1_FormClosed; + } + + private void Form1_FormClosed(object sender, FormClosedEventArgs e) + { + timer1.Stop(); + } + + private void Dev2_ValueChanged(object sender, arDev.Arduino.DIO.IOValueEventArgs e) + { + addMsg2($"val({e.ArrIDX}) -> {e.NewValue}"); + + } + + byte[] buffer1; + List Tempbuffer1 = new List(); + byte[] buffer2; + List Tempbuffer2 = new List(); + + + Boolean STX11 = false; + Boolean STX21 = false; + Boolean ETX11 = false; + + Boolean STX12 = false; + Boolean STX22 = false; + Boolean ETX12 = false; + + + //MAIN PLC + byte[] DIpinList1 = new byte[] { 22, 23, 24, 25, 26, 27, 28, 29, 41 }; + string[] DIpinName1 = new string[] { "EMERGENCTY", "OVR_L", "LIDAR_STOP", "LIDAR_SLOW", "OVR_R", "MARK", "GATEOUT_B", "GATEOUT_F", "ALIGN" }; + + byte[] DOpinList1 = new byte[] { 33, 34, 35, 36, 37, 43, 44, 39, 40 }; + string[] DopinName1 = new string[] { "MOT_POWER_GUIDE", "MOT_POWER_L", "MOT_POWER_R", "LIDAR_DIR", "CHARGE_ON", "MOT_DIR_L", "MOT_RUN_L", "MOT_DIR_R", "MOT_RUN_R" }; + + + // SUB PLC + byte[] DIpinList2 = new byte[] { 22, 23, 24, 25, 41, 42, 43, 45, 38 }; + string[] DIpinName2 = new string[] { "BTN_GUIDE_UP", "BTN_GUIDE_DN", "BTN_QA1", "BTN_QC", "LIM_HIGH_R", "LIM_LOW_R", "LIM_HIGH_L", "BTN_PACK", "LIM_LOW_L" }; + + + byte[] DOpinList2 = new byte[] { 30, 31, 32, 33 }; + string[] DopinName2 = new string[] { "GMOT_INT", "GMOT_DIR", "GMOT_RUN", "GMOT_STA" }; + + + byte LEN1 = 0; + byte CHK1 = 0; + int bufferCount1 = 0; + + byte LEN2 = 0; + byte CHK2 = 0; + int bufferCount2 = 0; + private void SerialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) + { + bufferCount1 = this.serialPort1.BytesToRead; + byte[] rxBuffer = new byte[bufferCount1]; + serialPort1.Read(rxBuffer, 0, bufferCount1); + foreach (byte incomingByte in rxBuffer) + { + if (STX11 == false) + { + if (incomingByte != '@') + { + STX21 = false; + ETX11 = false; + continue; + } + else + { + STX11 = true; + Tempbuffer1.Add(incomingByte); + } + } + else if (STX21 == false) + { + if (Tempbuffer1.Count != 1 || Tempbuffer1.Count < 1 || Tempbuffer1[0] != '@' || incomingByte != '@') + { + STX11 = false; + ETX11 = false; + continue; + } + else + { + STX21 = true; + Tempbuffer1.Add(incomingByte); + } + } + else + { + Tempbuffer1.Add(incomingByte); + + //여기서부터는무조건 누적한다. + if (Tempbuffer1.Count == 3) + { + if (Tempbuffer1[0] != 0x40 || Tempbuffer1[1] != '@') + { + STX11 = false; + STX21 = false; + ETX11 = false; + LEN1 = 0; + Tempbuffer1.Clear(); + } + else LEN1 = incomingByte; //데이터 길이가온다 + } + else if (Tempbuffer1.Count == LEN1 + 2 + 1 + 1) //체크섬이 왔다 + { + CHK1 = incomingByte; + } + else if (Tempbuffer1.Count == LEN1 + 2 + 1 + 1 + 1) //ETX1 + { + if (incomingByte != 0x0D) + { + //ETX가 와야하는데 다른데이터가 왔다 + STX11 = false; + STX21 = false; + ETX11 = false; + Console.WriteLine("에러 모두 파기"); + Tempbuffer1.Clear(); + } + } + else if (Tempbuffer1.Count == LEN1 + 2 + 1 + 1 + 1 + 1) + { + //전체길이를 만족햇다. + if (incomingByte != 0x0A) + { + //ETX가 와야하는데 다른데이터가 왔다 + STX11 = false; + STX21 = false; + ETX11 = false; + Console.WriteLine("에러 모두 파기"); + Tempbuffer1.Clear(); + } + else + { + STX11 = false; + STX21 = false; + ETX11 = false; + if (buffer1 == null) buffer1 = new byte[Tempbuffer1.Count]; + else if (buffer1.Length != Tempbuffer1.Count) Array.Resize(ref buffer1, Tempbuffer1.Count); + Tempbuffer1.CopyTo(buffer1); + Tempbuffer1.Clear(); + parser(buffer1, tbMsg1, 0); + } + } + } + + + } + } + private void Dev2_Message(object sender, arDev.arRS232.MessageEventArgs e) + { + addMsg2($"{e.Message}"); + } + + + delegate void DisplayMessage(string message); + + void parser(byte[] buffer, Action func, int type) + { + // DisplayMessage messageTarget; + + var hexString = buffer.GetHexString(); + var len = buffer[2]; + if (len + 6 != buffer.Length) + { + + func(string.Format("길이오류 예상:{0},수신:{1},{2}", len + 5, buffer.Length, hexString)); + } + else if (buffer[0] != 0x40 || buffer[1] != 0x40 || buffer[buffer.Length - 2] != 0x0D || buffer[buffer.Length - 1] != 0x0A) + { + func(string.Format("헤더 오류 : {0}", hexString)); + } + else + { + + var cmd = buffer[3]; + if (cmd == 'I') //IOData + { + if (len != 15) + { + func("IO수신길이오류:" + DateTime.Now.ToString("mm:ss.fff") + " 수신 : " + hexString); + } + else + { + var IOData = BitConverter.ToUInt32(buffer, 4); + var An1 = BitConverter.ToUInt16(buffer, 8); + var An2 = BitConverter.ToUInt16(buffer, 10); + var Ao11 = buffer[12]; + var Ao12 = buffer[13]; + var FGData = BitConverter.ToInt32(buffer, 14); + + byte[] buf_iodata = new byte[4]; + Array.Copy(buffer, 4, buf_iodata, 0, 4); + + var ba = new System.Collections.BitArray(buf_iodata); + for (int i = 0; i < 32; i++) + { + Boolean val = ba[i]; + if (val) + { + + } + if (type == 0) this.gv1.setValue(i, val); + else this.gv2.setValue(i, val); + } + + + var binstr = Convert.ToString(IOData, 2).PadLeft(32, '0'); + string msg = string.Format(DateTime.Now.ToString("mm:ss.fff") + " IO:{0},AN={1:0000},{2:0000},FG={3},AO={4},{5}", + binstr, An1, An2, FGData, Ao11, Ao12); + func(msg); + + if (type == 0) gv1.Invalidate(); + else gv2.Invalidate(); + + } + } + else if (cmd == 'T') + { + Boolean errorMessage = buffer[4] == 1; + var message = System.Text.Encoding.Default.GetString(buffer, 5, len - 2);//데이터타입과 에러여부 제거 + if (type == 0) + addMsg1("Rx : " + hexString + ", 메세지: " + message); + else + addMsg2("Rx : " + hexString + ", 메세지: " + message); + } + else + { + if (type == 0) + addMsg1(DateTime.Now.ToString("mm:ss.fff") + " 수신 : " + hexString + "\n" + "Data=" + System.Text.Encoding.Default.GetString(buffer)); + else + addMsg2(DateTime.Now.ToString("mm:ss.fff") + " 수신 : " + hexString + "\n" + "Data=" + System.Text.Encoding.Default.GetString(buffer)); + + //func(); + } + + + + } + //Console.WriteLine("Rx : " + hexString); + } + void tbMsg1(string m) + { + if (textBox3.InvokeRequired) + { + textBox3.BeginInvoke(new Action(() => + { + textBox3.Text = (m + "\n"); + // textBox3.ScrollToCaret(); + })); + } + else + { + textBox3.Text = (m + "\n"); + //textBox3.ScrollToCaret(); + + } + } + void tbMsg2(string m) + { + if (textBox4.InvokeRequired) + { + textBox4.BeginInvoke(new Action(() => + { + textBox4.Text = (m + "\n"); + // richTextBox2.ScrollToCaret(); + })); + } + else + { + textBox4.Text = (m + "\n"); + //richTextBox2.ScrollToCaret(); + + } + } + + private void button1_Click(object sender, EventArgs e) + { + if (this.dev2.IsOpen) + { + this.serialPort1.Close(); + this.button1.BackColor = SystemColors.Control; + } + else + { + if (textbox1.Text.isEmpty()) return; + this.serialPort1.PortName = textbox1.Text; + this.serialPort1.BaudRate = 250000; + this.serialPort1.Open(); + button1.BackColor = Color.Lime; + } + } + + + private void timer1_Tick(object sender, EventArgs e) + { + this.Text = bufferCount1.ToString() + "/" + bufferCount2.ToString(); + } + + private void button2_Click(object sender, EventArgs e) + { + if (textbox2.Text.isEmpty()) return; + if (this.dev2.IsOpen) + { + this.dev2.Close(); + this.button2.BackColor = SystemColors.Control; + } + else + { + this.dev2.PortName = textbox2.Text; + this.dev2.BaudRate = int.Parse(comboBox1.Text); + this.dev2.Open(); + button2.BackColor = Color.Lime; + // timer1.Start(); + } + addMsg2($"open:{this.dev2.IsOpen}"); + + + } + + private void Form1_Load(object sender, EventArgs e) + { + textbox1.Items.Clear(); + textbox2.Items.Clear(); + foreach (var port in System.IO.Ports.SerialPort.GetPortNames()) + { + textbox1.Items.Add(port); + textbox2.Items.Add(port); + } + // textbox1.Text = "COM15"; + // textbox2.Text = "COM16"; + + List values = new List(); + for (int i = 0; i < 32; i++) + values.Add(false); + + this.gv1.setValue(values.ToArray()); + this.gv2.setValue(values.ToArray()); + + //그리드뷰 값초기화 + for (int i = 0; i < 32; i++) + { + string pinName = i.ToString(); + + + if (i < 16 && i < DIpinName1.Length) + pinName = string.Format("[{0}:{2}] {1}", i, DIpinName1[i], DIpinList1[i]); + else if (i >= 16 && (i - 16) < DopinName1.Length) + pinName = string.Format("[{0}:{2}] {1}", i, DopinName1[i - 16], DOpinList1[i - 16]); + + + + this.gv1.setTitle(i, pinName); + this.gv1.setValue(i, 0); + } + + for (int i = 0; i < 32; i++) + { + string pinName = i.ToString(); + + if (i < 16) + { + var pin = (arDev.FakePLC.DIName)i; + pinName = $"[{i}] {pin}"; + } + else + { + var pin = (arDev.FakePLC.DOName)(i-16); + pinName = $"[{i}] {pin}"; + } + + this.gv2.setTitle(i, pinName); + this.gv2.setValue(i, 0); + } + timer1.Start(); + + } + + private void gv1_ItemClick(object sender, arFrame.Control.GridView.ItemClickEventArgs e) + { + //sub item click + if (e.idx < 16) + { + Util.MsgE("입력은 상태를 변경할 수 없습니다"); + } + else + { + //이 인덱스에 해당하는 포트번호를 가져왕야함 + + var dataIndex = e.idx - 16; + if (dataIndex >= 0) + { + var pinNo = DOpinList1[e.idx - 16]; + var curVal = gv1.getValue(e.idx); + byte newval = (byte)(curVal == 0 ? 1 : 0); + + Sendcommand1(eCommand1.SET_DOUTPUT, pinNo, newval); + } + else Util.MsgE("해당 주소는 허용되지 않습니다."); + } + } + + byte makeChecksum(byte[] buffer) + { + //return 0; + byte chk = 0; + foreach (var b in buffer) + chk = (byte)(chk ^ b); + return chk; + } + + enum eCommand1 : byte + { + LOAD = 0, //EEPROM 불러오기 + SAVE, //EEPROM 저장 + RESET, //초기화 + SET_PINMODE, //PINMODE 설정 + SET_DOUTPUT, //디지털출력설정(포트번호,값[1,0]) + SET_AOUTPUT, //아날로그출력설정(포트GET_SETTING = 50, 포트번호,값(0~255) + GET_SETTING = 50, //셋팅값 요청 + + MOT = 100, //p1(0=left,1=right), p2(0=stop,1=pos run,2=neg run) + MOVE_GO, + MOVE_BACK, + MOVE_LEFT, + MOVE_RIGHT, + MOVE_STOP + } + + + enum eCommand2 : byte + { + LOAD = 0, //EEPROM 불러오기 + SAVE, //EEPROM 저장 + RESET, //초기화 + SET_PINMODE, //PINMODE 설정 + SET_DOUTPUT, //디지털출력설정(포트번호,값[1,0]) + SET_AOUTPUT, //아날로그출력설정(포트번호,값[0~255]) + GET_SETTING = 50, //셋팅값 요청 + GUIDE_MOT, + SET_GUIDE_SPD = 100,//가이드커버(양쪽) 속도 설정(0~255) + } + void addMsg1(string m) + { + if (logMain.InvokeRequired) + { + logMain.BeginInvoke(new Action(() => + { + if (m.IndexOf('\n') != -1) m = m.Replace("\r", "").Replace("\n", ""); + logMain.AddMsg(m); + })); + } + else + { + if (m.IndexOf('\n') != -1) m = m.Replace("\r", "").Replace("\n", ""); + logMain.AddMsg(m); + + } + + } + void addMsg2(string m) + { + if (logSub.InvokeRequired) + { + logSub.BeginInvoke(new Action(() => + { + if (m.IndexOf('\n') != -1) m = m.Replace("\r", "").Replace("\n", ""); + logSub.AddMsg(m); + + })); + } + else + { + if (m.IndexOf('\n') != -1) m = m.Replace("\r", "").Replace("\n", ""); + logSub.AddMsg(m); + } + + } + private void gv2_ItemClick(object sender, arFrame.Control.GridView.ItemClickEventArgs e) + { + //sub item click + if (e.idx < 16) + { + Util.MsgE("입력은 상태를 변경할 수 없습니다"); + } + else + { + //이 인덱스에 해당하는 포트번호를 가져왕야함 + + var dataIndex = e.idx - 16; + if (dataIndex >= 0) + { + var pinNo = DOpinList2[e.idx - 16]; + var curVal = gv2.getValue(e.idx); + byte newval = (byte)(curVal == 0 ? 1 : 0); + + // Sendcommand2(eCommand2.SET_DOUTPUT, pinNo, newval); + } + else Util.MsgE("해당 주소는 허용되지 않습니다."); + + } + } + + + void Sendcommand1(eCommand1 cmd, byte p1, byte p2) + { + + //이번호의 상태를 on/off 해줘야함 + List buffer = new List(); + + buffer.Add((byte)cmd); //command + buffer.Add(p1); + buffer.Add(p2); + + byte dataLen = (byte)buffer.Count; //데이터길이 + byte checksum = makeChecksum(buffer.ToArray()); + + buffer.Insert(0, (byte)'@'); //stx + buffer.Insert(1, (byte)'@'); //stx + buffer.Insert(2, dataLen); + buffer.Add(checksum); //길이를 제외한 실제 데이터 영역만 체크섬 + buffer.Add(0x0D); //etx + buffer.Add(0x0A); //etx + + addMsg1("Tx Buffer : " + buffer.ToArray().GetHexString()); + + if (this.serialPort1.IsOpen) + serialPort1.Write(buffer.ToArray(), 0, buffer.Count); + else + addMsg1("포트(2)가 열리지 않았습니다"); + } + private void button3_Click(object sender, EventArgs e) + { + //-zup + dev2.ZMot(arDev.FakePLC.ZMotDirection.Up); + } + + private void button4_Click(object sender, EventArgs e) + { + //z-stop + dev2.ZMot(arDev.FakePLC.ZMotDirection.Stop); + } + + private void button5_Click(object sender, EventArgs e) + { + //z-down + dev2.ZMot(arDev.FakePLC.ZMotDirection.Down); + } + + private void button8_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOT, 0, 1); + } + + private void button6_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOT, 0, 0); + } + + private void button7_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOT, 0, 2); + } + + private void button10_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOT, 1, 2); + } + + private void button9_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOT, 1, 0); + } + + private void button11_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOT, 1, 1); + } + + private void button14_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOVE_GO, 0, 0); + } + + private void button12_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOVE_STOP, 0, 0); + } + + private void button13_Click(object sender, EventArgs e) + { + Sendcommand1(eCommand1.MOVE_BACK, 0, 0); + } + + private void button15_Click(object sender, EventArgs e) + { + //지정된 %의 값을 전송한다 + var but = sender as Button; + var percValue = byte.Parse(but.Text.ToString()); + var realValue = (percValue / 100.0) * 255.0; + + Sendcommand1(eCommand1.SET_AOUTPUT, 11, (byte)realValue); + Sendcommand1(eCommand1.SET_AOUTPUT, 12, (byte)realValue); + } + + private void button34_Click(object sender, EventArgs e) + { + //지정된 %의 값을 전송한다 + var but = sender as Button; + var percValue = byte.Parse(but.Text.ToString()); + var realValue = (percValue / 100.0) * 255.0; + + // Sendcommand2(eCommand2.SET_AOUTPUT, 11, (byte)realValue); //Z축 모터는 동일하게 사용한다 + } + + private void timer1_Tick_1(object sender, EventArgs e) + { + timer1.Stop(); + if (dev2 != null && dev2.IsOpen) + { + for(byte i = 0; i < 32;i++) + { + bool v = false; + + if (i < 16) v = dev2.GetValueI(i); + else v = dev2.GetValueO((byte)(i-16)); + + this.gv2.setValue(i, v); + } + this.gv2.Invalidate(); + } + + + timer1.Start(); + } + } +} diff --git a/Cs_HMI/TestProject/Test_ProPLC/Form1.resx b/Cs_HMI/TestProject/Test_ProPLC/Form1.resx new file mode 100644 index 0000000..c1be622 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Form1.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 95, 17 + + + 205, 17 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_ProPLC/MethodExtentions.cs b/Cs_HMI/TestProject/Test_ProPLC/MethodExtentions.cs new file mode 100644 index 0000000..04381bd --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/MethodExtentions.cs @@ -0,0 +1,216 @@ + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Test_ProPLC +{ + /// + /// generic method Extension + /// + public static class MethodExtensions + { + public static string ToString(this System.Drawing.Rectangle rect) + { + return string.Format("X={0},Y={1},W={2},H={3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string ToString(this System.Drawing.RectangleF rect) + { + return string.Format("X={0},Y={1},W={2},H={3}", rect.X, rect.Y, rect.Width, rect.Height); + } + + //public static void SetBGColor(this System.Windows.Forms.Label ctl,System.Drawing.Color color1) + //{ + // ctl.BackColor = System.Drawing.Color.Red; + //} + + /// + /// 0101이 반복되는 문자열 형태로 전환합니다. + /// + /// + /// + public static string BitString(this System.Collections.BitArray arr) + { + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + for (int i = arr.Length; i > 0; i--) + sb.Append(arr[i - 1] ? "1" : "0"); + return sb.ToString(); + } + + /// + /// int 값으로 변환합니다. + /// + /// + /// + public static int ValueI(this System.Collections.BitArray arr) + { + byte[] buf = new byte[4]; + arr.CopyTo(buf, 0); + return BitConverter.ToInt32(buf, 0); + } + + /// + /// 숫자인지 검사합니다. + /// + /// + /// + public static bool IsNumeric(this string input) + { + double data; + return double.TryParse(input, out data); + //return Regex.IsMatch(input, @"^\d+$"); + } + + /// + /// isnullorempty 를 수행합니다. + /// + /// + /// + public static Boolean isEmpty(this string input) + { + return string.IsNullOrEmpty(input); + } + + /// + /// default 인코딩을 사용하여 문자열로 반환합니다. + /// + /// + /// + public static string GetString(this Byte[] input) + { + return System.Text.Encoding.Default.GetString(input); + } + + /// + /// 16진수 문자열 형태로 반환합니다. + /// + /// + /// + public static string GetHexString(this Byte[] input) + { + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + foreach (byte b in input) + sb.Append(" " + b.ToString("X2")); + return sb.ToString(); + } + + public static string Base64Encode(this string src) + { + string base64enc = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(src)); + return base64enc; + } + public static string Base64Decode(this string src) + { + var base64dec = Convert.FromBase64String(src); + return System.Text.Encoding.UTF8.GetString(base64dec); + } + public static string UrlPathEncode(this string src) + { + string data = System.Web.HttpUtility.UrlPathEncode(src); + return data; + } + public static string UrlEncode(this string src) + { + string data = System.Web.HttpUtility.UrlEncode(src, System.Text.Encoding.UTF8); + return data; + } + public static string UrlDecode(this string src) + { + string data = System.Web.HttpUtility.UrlDecode(src, System.Text.Encoding.UTF8); + return data; + } + public static string toSizeStr(this Size rect) + { + return string.Format("{0};{1}", rect.Width, rect.Height); + } + public static string toPointStr(this PointF rect) + { + return string.Format("{0};{1}", rect.X, rect.Y); + } + public static string toPointStr(this Point rect) + { + return string.Format("{0};{1}", rect.X, rect.Y); + } + public static string toRectStr(this Rectangle rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Top, rect.Width, rect.Height); + } + public static string toRectStr(this RectangleF rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Top, rect.Width, rect.Height); + } + public static RectangleF toRectF(this string str) + { + var buffer = str.Split(';'); + if (buffer.Length != 4) return RectangleF.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new RectangleF(float.Parse(buffer[0]), float.Parse(buffer[1]), float.Parse(buffer[2]), float.Parse(buffer[3])); + } + public static Rectangle toRect(this string str) + { + var buffer = str.Split(';'); + if (buffer.Length != 4) return Rectangle.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new Rectangle(int.Parse(buffer[0]), int.Parse(buffer[1]), int.Parse(buffer[2]), int.Parse(buffer[3])); + } + public static Point toPoint(this string str) + { + str = str.Replace(",", ";").Replace("*", ";").Replace("x", ";").Replace(":", ";"); + + var buffer = str.Split(';'); + if (buffer.Length != 2) return Point.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new Point(int.Parse(buffer[0]), int.Parse(buffer[1])); + } + public static Size toSize(this string str) + { + str = str.Replace(",", ";").Replace("*", ";").Replace("x", ";").Replace(":", ";"); + + var buffer = str.Split(';'); + if (buffer.Length != 2) return Size.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new Size(int.Parse(buffer[0]), int.Parse(buffer[1])); + } + public static PointF toPointF(this string str) + { + str = str.Replace(",", ";").Replace("*", ";").Replace("x", ";").Replace(":", ";"); + + var buffer = str.Split(';'); + if (buffer.Length != 2) return PointF.Empty; + for (int i = 0; i < buffer.Length; i++) + if (buffer[i] == "") buffer[i] = "0"; + return new PointF(float.Parse(buffer[0]), float.Parse(buffer[1])); + } + public static Rectangle Fix(this Rectangle rect, Size imgsize) + { + //영역보정 + if (rect.Left < 1) rect.X = 1; + if (rect.Top < 1) rect.Y = 1; + if (rect.Right > imgsize.Width) rect.Width = imgsize.Width - rect.Left - 1; + if (rect.Bottom > imgsize.Height) rect.Height = imgsize.Height - rect.Top - 1; + if (rect.Width < 2 || rect.Height < 2) rect = Rectangle.Empty; + return rect; + } + public static RectangleF FixRoi(this RectangleF rect, Size imgsize) + { + //영역보정 + if (rect.Left < 1) rect.X = 1; + if (rect.Top < 1) rect.Y = 1; + if (rect.Right > imgsize.Width) rect.Width = imgsize.Width - rect.Left - 1; + if (rect.Bottom > imgsize.Height) rect.Height = imgsize.Height - rect.Top - 1; + if (rect.Width < 2 || rect.Height < 2) rect = Rectangle.Empty; + return rect; + } + + } +} + diff --git a/Cs_HMI/TestProject/Test_ProPLC/Program.cs b/Cs_HMI/TestProject/Test_ProPLC/Program.cs new file mode 100644 index 0000000..c08bf88 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace Test_ProPLC +{ + static class Program + { + /// + /// 해당 응용 프로그램의 주 진입점입니다. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Cs_HMI/TestProject/Test_ProPLC/Properties/AssemblyInfo.cs b/Cs_HMI/TestProject/Test_ProPLC/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..53eb983 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 +// 이러한 특성 값을 변경하세요. +[assembly: AssemblyTitle("Test_ProPLC")] +[assembly: AssemblyDescription("Test_ProPLC")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ATKEE1")] +[assembly: AssemblyProduct("Test_ProPLC")] +[assembly: AssemblyCopyright("Copyright ©ATK4 2020")] +[assembly: AssemblyTrademark("ATK4")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("9c027bf1-289f-4cc8-83f0-cb2b975c39c2")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 +// 지정되도록 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("20.03.05.1100")] +[assembly: AssemblyFileVersion("20.03.05.1100")] diff --git a/Cs_HMI/TestProject/Test_ProPLC/Properties/Resources.Designer.cs b/Cs_HMI/TestProject/Test_ProPLC/Properties/Resources.Designer.cs new file mode 100644 index 0000000..3a74d7e --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Test_ProPLC.Properties { + using System; + + + /// + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. + /// + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을 + // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_ProPLC.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을 + /// 재정의합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_ProPLC/Properties/Resources.resx b/Cs_HMI/TestProject/Test_ProPLC/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_ProPLC/Properties/Settings.Designer.cs b/Cs_HMI/TestProject/Test_ProPLC/Properties/Settings.Designer.cs new file mode 100644 index 0000000..8508b90 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:4.0.30319.42000 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace Test_ProPLC.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Cs_HMI/TestProject/Test_ProPLC/Properties/Settings.settings b/Cs_HMI/TestProject/Test_ProPLC/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Cs_HMI/TestProject/Test_ProPLC/Test_PLC.csproj b/Cs_HMI/TestProject/Test_ProPLC/Test_PLC.csproj new file mode 100644 index 0000000..0763fac --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Test_PLC.csproj @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {9C027BF1-289F-4CC8-83F0-CB2B975C39C2} + WinExe + Test_ProPLC + Test_ProPLC + v4.8 + 512 + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + ..\Sub\arCtl\bin\debug\arControl.Net4.dll + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {a16c9667-5241-4313-888e-548375f85d29} + arFrameControl + + + {14e8c9a5-013e-49ba-b435-efefc77dd623} + CommData + + + {476c8e64-7b6b-4554-aca2-04302715750f} + PLC.Net45 + + + + \ No newline at end of file diff --git a/Cs_HMI/TestProject/Test_ProPLC/Util.cs b/Cs_HMI/TestProject/Test_ProPLC/Util.cs new file mode 100644 index 0000000..af46d94 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/Util.cs @@ -0,0 +1,461 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Management; +using System.Net; +using System.Text; +using System.Windows.Forms; + +namespace Test_ProPLC +{ + public static class Util + { + #region "MessageBox" + public static void MsgI(string m, Boolean legacy = false) + { + //if(legacy) + //{ + MessageBox.Show(m, "확인", MessageBoxButtons.OK, MessageBoxIcon.Information); + //} + + } + public static void MsgE(string m, Boolean legacy = false) + { + //if(legacy) + //{ + MessageBox.Show(m, "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + //} + //else + //{ + // var f = new fMessageWindow("오류 알림\n" + m); + // f.SetWindowColor(fMessageWindow.EWinColor.Error); + // f.btNo.Visible = false; + // f.btYes.Text = "확인"; + // f.EnableUserClose = true; + // f.DialogMode = true; + // f.ShowDialog(); + //} + } + public static DialogResult MsgQ(string m, Boolean legacy = false, string btOK = "확인",string btCancel = "아니오") + { + //if(legacy) + { + DialogResult dlg = MessageBox.Show(m, "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question); + return dlg; + } + //else + //{ + // var f = new fMessageWindow("선택 알림\n" + m); + // f.SetWindowColor(fMessageWindow.EWinColor.Attention); + // f.EnableUserClose = true; + // f.DialogMode = true; + // f.btNo.Text = btCancel; + // f.btYes.Text = btOK; + // var dlg = f.ShowDialog(); + // return dlg; + //} + } + + #endregion + + public static string SelectSerialPort() + { + var f = new System.Windows.Forms.Form(); + f.WindowState = System.Windows.Forms.FormWindowState.Normal; + f.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + f.Size = new System.Drawing.Size(800, 400); + f.MaximizeBox = false; + f.MinimizeBox = false; + f.Text = "Select Port"; + f.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + var lst = new System.Windows.Forms.ListBox(); + lst.Font = new System.Drawing.Font("Consolas", 15, System.Drawing.FontStyle.Bold); + lst.Dock = System.Windows.Forms.DockStyle.Fill; + lst.DoubleClick += (s1, e1) => + { + if (lst.SelectedItem != null) f.DialogResult = System.Windows.Forms.DialogResult.OK; + }; + using (var searcher = new ManagementObjectSearcher("SELECT * FROM WIN32_SerialPort")) + { + var portnames = System.IO.Ports.SerialPort.GetPortNames().OrderBy(t => t); + var ports = searcher.Get().Cast().ToList(); + foreach (var port in portnames) + { + var desc = ""; + var portInfo = ports.Where(t => t["DeviceId"].ToString() == port).FirstOrDefault(); + if (portInfo != null) desc = portInfo["Caption"].ToString(); + lst.Items.Add(string.Format("{0} - {1}", port, desc)); + } + } + f.Controls.Add(lst); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + var name = lst.SelectedItem.ToString().Split('-'); + return name[0].Trim(); + } + else return string.Empty; + } + + public static void ScreenCaptrue(int _BitmapWidth, int _BitmapHeight, Point ptSouce) + { + try + { + Bitmap bitmap = new Bitmap(_BitmapWidth, _BitmapHeight); + Graphics _graphic = Graphics.FromImage(bitmap); + + _graphic.CopyFromScreen(ptSouce, new Point(0, 0), new Size(_BitmapWidth, _BitmapHeight)); + + string savefile = System.IO.Path.Combine(Util.CurrentPath, "ScreenShot", DateTime.Now.ToString("yyyyMMddHHmmss") + ".png"); + System.IO.FileInfo grpath = new FileInfo(savefile); + if (!grpath.Directory.Exists) grpath.Directory.Create(); + + bitmap.Save(grpath.FullName, System.Drawing.Imaging.ImageFormat.Png); + Util.MsgI("화면 캡쳐 성공\n" + + "위치:" + grpath.Directory.FullName +"\n" + + "파일명: " + grpath.Name); + } + catch (Exception ex) + { + Util.MsgE("화면 캡쳐 실패\n" + ex.Message); + } + } + + + public static void SaveBugReport(string content, string subdirName = "BugReport") + { + try + { + var path = CurrentPath + subdirName; + if (!System.IO.Directory.Exists(path)) System.IO.Directory.CreateDirectory(path); + var file = path + "\\" + DateTime.Now.ToString("yyyyMMdd_HHmmss_fff") + ".txt"; + System.IO.File.WriteAllText(file, content, System.Text.Encoding.UTF8); + } + catch + { + //nothing + } + } + + public static void CopyData(System.Data.DataRow drSrc, System.Data.DataRow drDes) + { + if (drDes == null || drSrc == null) return; + foreach (System.Data.DataColumn col in drSrc.Table.Columns) + { + if (col.ColumnName.ToUpper() == "IDX") continue; + drDes[col.ColumnName] = drSrc[col.ColumnName]; + } + + } + + /// + /// 현재실행중인폴더를 반환합니다. + /// + public static string CurrentPath + { + get + { + return AppDomain.CurrentDomain.BaseDirectory; + } + } + /// + /// 콤마와 줄바꿈등을 제거합니다. + /// + /// + public static string ToCSVString(string src) + { + string retval = src.Replace("\r", "").Replace("\n", "").Replace(",", ""); + return retval; + } + + public static Boolean RunProcess(string file, string arg = "") + { + var fi = new System.IO.FileInfo(file); + if (!fi.Exists) + { + // Pub.log.AddE("Run Error : " + file); + return false; + } + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(file); + si.Arguments = arg; + prc.StartInfo = si; + prc.Start(); + return true; + } + + #region "convert" + public static string RectToStr(Rectangle rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string RectToStr(RectangleF rect) + { + return string.Format("{0};{1};{2};{3}", rect.X, rect.Y, rect.Width, rect.Height); + } + public static string PointToStr(Point pt) + { + return string.Format("{0};{1}", pt.X, pt.Y); + } + public static string PointToStr(PointF pt) + { + return string.Format("{0};{1}", pt.X, pt.Y); + } + public static Rectangle StrToRect(string str) + { + if (str.isEmpty() || str.Split(';').Length != 4) str = "0;0;0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.Rectangle( + int.Parse(roibuf1[0]), + int.Parse(roibuf1[1]), + int.Parse(roibuf1[2]), + int.Parse(roibuf1[3])); + } + public static RectangleF StrToRectF(string str) + { + if (str.isEmpty() || str.Split(';').Length != 4) str = "0;0;0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.RectangleF( + float.Parse(roibuf1[0]), + float.Parse(roibuf1[1]), + float.Parse(roibuf1[2]), + float.Parse(roibuf1[3])); + } + public static Point StrToPoint(string str) + { + if (str.isEmpty() || str.Split(';').Length != 2) str = "0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.Point( + int.Parse(roibuf1[0]), + int.Parse(roibuf1[1])); + } + public static PointF StrToPointF(string str) + { + if (str.isEmpty() || str.Split(';').Length != 2) str = "0;0"; + var roibuf1 = str.Split(';'); + return new System.Drawing.PointF( + float.Parse(roibuf1[0]), + float.Parse(roibuf1[1])); + } + #endregion + + #region "NIC" + + /// + /// 지정된 nic카드가 현재 목록에 존재하는지 확인한다. + /// + /// + public static Boolean ExistNIC(string NICName) + { + if (string.IsNullOrEmpty(NICName)) return false; + foreach (string NetName in NICCardList()) + { + if (NetName.ToLower() == NICName.ToLower()) + { + return true; + } + } + return false; + } + + /// + /// Ehternet Card 를 사용안함으로 설정합니다.(관리자권한필요) + /// + /// + public static Boolean NICDisable(string NICName) + { + //해당 nic 가 현재 목록에 존재하는지 확인한다. + + string cmd = "interface set interface " + NICName + " disable"; + Process prc = new Process(); + ProcessStartInfo si = new ProcessStartInfo("netsh", cmd); + si.WindowStyle = ProcessWindowStyle.Hidden; + prc.StartInfo = si; + prc.Start(); + + ////목록에서 사라질때까지 기다린다. + DateTime SD = DateTime.Now; + Boolean timeout = false; + while ((true)) + { + + bool FindNetwork = false; + foreach (string NetName in NICCardList()) + { + if (NetName == NICName.ToLower()) + { + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + + if (!FindNetwork) + break; // TODO: might not be correct. Was : Exit While + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + timeout = true; + break; // TODO: might not be correct. Was : Exit While + } + } + return !timeout; + } + + public static List NICCardList() + { + List Retval = new List(); + foreach (System.Net.NetworkInformation.NetworkInterface Net in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()) + { + if (Net.NetworkInterfaceType == System.Net.NetworkInformation.NetworkInterfaceType.Ethernet) + { + Retval.Add(Net.Name.ToUpper()); + } + } + return Retval; + } + + /// + /// 이더넷카드를 사용함으로 설정합니다. + /// + /// + public static Boolean NICEnable(string NICName) + { + string cmd = "interface set interface " + NICName + " enable"; + System.Diagnostics.Process prc = new System.Diagnostics.Process(); + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo("netsh", cmd); + si.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; + prc.StartInfo = si; + prc.Start(); + + + ////목록에생길떄까지 대기 + DateTime SD = DateTime.Now; + while ((true)) + { + + bool FindNetwork = false; + foreach (string NetName in NICCardList()) + { + if (NetName.ToLower() == NICName.ToLower()) + { + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + + if (FindNetwork) + break; // TODO: might not be correct. Was : Exit While + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + return false; + } + } + + ////결이 완료될떄까지 기다린다. + SD = DateTime.Now; + while ((true)) + { + + bool FindNetwork = false; + foreach (System.Net.NetworkInformation.NetworkInterface Net in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()) + { + if (Net.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.GigabitEthernet && + Net.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Ethernet) continue; + if (Net.Name.ToLower() == NICName.ToLower()) + { + //string data = Net.GetIPProperties().GatewayAddresses[0].ToString(); + + if (Net.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up) + { + + FindNetwork = true; + break; // TODO: might not be correct. Was : Exit For + } + } + } + if (FindNetwork) + return true; + + System.Threading.Thread.Sleep(1000); + TimeSpan ts = DateTime.Now - SD; + if (ts.TotalSeconds > 10) + { + return false; + } + } + + } + + #endregion + + public static void RunExplorer(string arg) + { + System.Diagnostics.ProcessStartInfo si = new ProcessStartInfo("explorer"); + si.Arguments = arg; + System.Diagnostics.Process.Start(si); + } + + #region "watchdog" + public static void WatchDog_Run() + { + System.IO.FileInfo fi = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "WatchCat.exe"); + if (!fi.Exists) return; + var Exist = CheckExistProcess("watchcat"); + if (Exist) return; + RunProcess(fi.FullName); + } + + public static Boolean CheckExistProcess(string ProcessName) + { + foreach (var prc in System.Diagnostics.Process.GetProcesses()) + { + if (prc.ProcessName.StartsWith("svchost")) continue; + if (prc.ProcessName.ToUpper() == ProcessName.ToUpper()) return true; + } + return false; + } + #endregion + + #region "web function" + /// + /// URL로부터 문자열을 수신합니다. + /// + /// + /// + /// + public static string GetStrfromurl(string url, out Boolean isError) + { + isError = false; + string result = ""; + try + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(url)); + request.Timeout = 60000; + request.ReadWriteTimeout = 60000; + + request.MaximumAutomaticRedirections = 4; + request.MaximumResponseHeadersLength = 4; + request.Credentials = CredentialCache.DefaultCredentials; + var response = request.GetResponse() as HttpWebResponse; + var txtReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8); + result = txtReader.ReadToEnd(); + } + catch (Exception ex) + { + isError = true; + result = ex.Message.ToString(); + } + return result; + } + + #endregion + + } +} diff --git a/Cs_HMI/TestProject/Test_ProPLC/app.config b/Cs_HMI/TestProject/Test_ProPLC/app.config new file mode 100644 index 0000000..2c0f559 --- /dev/null +++ b/Cs_HMI/TestProject/Test_ProPLC/app.config @@ -0,0 +1,3 @@ + + + diff --git a/xbee_LineA_CallButton_P(45A5),C(17),B(9600).xpro b/xbee_LineA_CallButton_P(45A5),C(17),B(9600).xpro new file mode 100644 index 0000000..aff5114 Binary files /dev/null and b/xbee_LineA_CallButton_P(45A5),C(17),B(9600).xpro differ diff --git a/xbee_LineA_innotech_AGV_P(45A6),C(17),B(57600).xpro b/xbee_LineA_innotech_AGV_P(45A6),C(17),B(57600).xpro new file mode 100644 index 0000000..13a9d91 Binary files /dev/null and b/xbee_LineA_innotech_AGV_P(45A6),C(17),B(57600).xpro differ diff --git a/xbee_LineA_innotech_Charger_P(45A6),C(17),B(57600).xpro b/xbee_LineA_innotech_Charger_P(45A6),C(17),B(57600).xpro new file mode 100644 index 0000000..7aa1de7 Binary files /dev/null and b/xbee_LineA_innotech_Charger_P(45A6),C(17),B(57600).xpro differ