├── .gitignore ├── Hanbo.AOM.Configuration ├── ColorMM.cs ├── ConfigurationMM.cs ├── Hanbo.AOM.Configuration.csproj ├── Properties │ └── AssemblyInfo.cs └── ViewModels │ └── UnitViewModel.cs ├── Hanbo.Authenticate ├── AuthenticateManager.cs ├── Hanbo.Authenticate.csproj ├── NLog.config ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── Hanbo.CalibrationModule ├── CalibImage.cs ├── CalibrationAssistant.cs ├── Delegates │ └── CalibrationModuleDelegates.cs ├── Hanbo.CalibrationModule.csproj ├── Models │ └── QualityIssue.cs ├── Properties │ └── AssemblyInfo.cs └── QualityProcedures.cs ├── Hanbo.Configuration.Settings.Test ├── CameraSettingRepoTest.cs ├── Data │ └── CameraSetting.xml ├── Hanbo.Configuration.Settings.Test.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── Hanbo.Configuration.Settings ├── CameraSetting.cs ├── CameraSettingRepo.cs ├── Hanbo.Configuration.Settings.csproj └── Properties │ └── AssemblyInfo.cs ├── Hanbo.Custom.Attribute ├── Hanbo.Custom.Attribute.csproj ├── LocalizedDisplayNameAttribute.cs └── Properties │ └── AssemblyInfo.cs ├── Hanbo.Device.SingleInstance ├── App.config ├── DeviceCheckRepo.cs ├── DeviceCheckResult.cs ├── DeviceCheckViewModel.cs ├── DeviceChecker.cs ├── DeviceController.cs ├── Hanbo.Device.SingleInstance.csproj └── Properties │ └── AssemblyInfo.cs ├── Hanbo.Extensions ├── ApplicationExtensions.cs ├── Hanbo.Extensions.csproj ├── MathExtensions.cs └── Properties │ └── AssemblyInfo.cs ├── Hanbo.Geometry ├── GeoOperatorSet.cs ├── Hanbo.Geometry.csproj ├── Models │ └── GeoPoint.cs └── Properties │ └── AssemblyInfo.cs ├── Hanbo.Helper.Test ├── App.config ├── Configuration │ └── LightDefaultSettings.xml ├── ConfigurationHelperTest.cs ├── ExportHelperTest.cs ├── Hanbo.Helper.Test.csproj ├── ImageAssociateTest.cs ├── Properties │ └── AssemblyInfo.cs ├── ShapeFinderTest.cs └── packages.config ├── Hanbo.Helper ├── CameraSystem.cs ├── ConfigurationHelper.cs ├── ExportHelper.cs ├── Hanbo.Helper.csproj ├── HanboSecurityHelper.cs ├── ImageAssociate.cs ├── ImageConventer.cs ├── ImageHelper.cs ├── LicenseChecker.cs ├── ModelSerializer.cs ├── NLog.config ├── NLog.xsd ├── ProcessChecker.cs ├── Properties │ └── AssemblyInfo.cs ├── ResourceHelper.cs ├── ShapeFinder.cs ├── UnitConverter.cs └── packages.config ├── Hanbo.Image.Grab.Test ├── App.config ├── App_Data │ └── CameraAsetting.xml ├── GrabImageWorkingManTest.cs ├── Hanbo.Image.Grab.Test.csproj ├── Properties │ └── AssemblyInfo.cs ├── PylonGrabImageWorkingManTest.cs ├── PylonImageProviderTest.cs └── packages.config ├── Hanbo.Image.Grab ├── FrameGrabberArgs.cs ├── GrabImageStatusChangedEventArgs.cs ├── GrabImageWorkingMan.cs ├── GrabberEventResult.cs ├── GrabberEventViewModel.cs ├── HalconGrabber.cs ├── Hanbo.Image.Grab.csproj ├── IGrab.cs ├── IGrabImage.cs ├── LineScanGrabImageWorkingMan.cs ├── LineScanMan.cs ├── NLog.config ├── NLog.xsd ├── Properties │ └── AssemblyInfo.cs ├── PylonDriver │ └── PylonGrabImageWorkingMan.cs ├── PylonFeature.cs ├── PylonGrabImageWorkingMan.cs ├── PylonImageProvider.cs ├── PylonImageWorkingMan.cs ├── SmartWorkingMan.cs ├── WorkingManStatus.cs ├── packages.config └── packages │ ├── FluentAssertions.2.1.0.0 │ ├── FluentAssertions.2.1.0.0.nupkg │ ├── FluentAssertions.2.1.0.0.nuspec │ └── lib │ │ ├── net35 │ │ ├── FluentAssertions.dll │ │ ├── FluentAssertions.pdb │ │ └── FluentAssertions.xml │ │ ├── net40 │ │ ├── FluentAssertions.dll │ │ ├── FluentAssertions.pdb │ │ └── FluentAssertions.xml │ │ ├── net45 │ │ ├── FluentAssertions.dll │ │ ├── FluentAssertions.pdb │ │ └── FluentAssertions.xml │ │ ├── sl4-windowsphone71 │ │ ├── FluentAssertions.WindowsPhone.dll │ │ ├── FluentAssertions.WindowsPhone.pdb │ │ └── FluentAssertions.WindowsPhone.xml │ │ ├── sl4 │ │ ├── FluentAssertions.Silverlight.dll │ │ ├── FluentAssertions.Silverlight.pdb │ │ ├── FluentAssertions.Silverlight.xml │ │ ├── Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll │ │ └── Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.xml │ │ └── winrt45 │ │ ├── FluentAssertions.dll │ │ ├── FluentAssertions.pdb │ │ └── FluentAssertions.xml │ ├── NLog.2.0.1.2 │ ├── NLog.2.0.1.2.nupkg │ ├── NLog.2.0.1.2.nuspec │ ├── lib │ │ ├── net20 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── net35 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── net40 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── net45 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── sl2 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── sl3-wp │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── sl3 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── sl4-windowsphone71 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ ├── sl4 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ │ └── sl5 │ │ │ ├── NLog.dll │ │ │ └── NLog.xml │ └── tools │ │ ├── net20 │ │ └── InstallNLogConfig.exe │ │ ├── net35 │ │ └── InstallNLogConfig.exe │ │ ├── net40 │ │ └── InstallNLogConfig.exe │ │ └── net45 │ │ └── InstallNLogConfig.exe │ ├── NLog.Config.2.0.1.2 │ ├── NLog.Config.2.0.1.2.nupkg │ ├── NLog.Config.2.0.1.2.nuspec │ ├── content │ │ ├── NLog.config │ │ └── NLog.xsd │ └── tools │ │ └── Install.ps1 │ ├── repositories.config │ ├── xunit.1.9.1 │ ├── lib │ │ └── net20 │ │ │ ├── xunit.dll │ │ │ ├── xunit.dll.tdnet │ │ │ ├── xunit.runner.msbuild.dll │ │ │ ├── xunit.runner.tdnet.dll │ │ │ ├── xunit.runner.utility.dll │ │ │ └── xunit.xml │ └── xunit.1.9.1.nupkg │ └── xunit.extensions.1.9.1 │ ├── lib │ └── net20 │ │ ├── xunit.extensions.dll │ │ └── xunit.extensions.xml │ └── xunit.extensions.1.9.1.nupkg ├── Hanbo.Interface ├── Hanbo.Interface.csproj ├── IMeasure.cs ├── NLog.config ├── NLog.xsd ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── Hanbo.Log ├── Hanbo.Log.csproj ├── LogManager.cs ├── NLog.config ├── NLog.xsd ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── Hanbo.Models ├── Argument │ └── AutoExportArgument.cs ├── CameraSpecViewModel.cs ├── ExportMacroPlanViewModel.cs ├── HWindowSettingViewModel.cs ├── Hanbo.Models.csproj ├── LanguageViewModel.cs ├── LightDTO.cs ├── LightViewModel.cs ├── MacroViewModel.cs ├── MeasureExportModel.cs ├── PEGMoveViewModel.cs ├── ProgGraphicModel.cs ├── Properties │ └── AssemblyInfo.cs ├── ShapeViewModel.cs ├── SpecViewModel.cs └── UserMemberViewModel.cs ├── Hanbo.PEG.Helper.Test ├── Hanbo.PEG.Helper.Test.csproj ├── Properties │ └── AssemblyInfo.cs ├── TestPEGCalculator.cs └── packages.config ├── Hanbo.PEG.Helper ├── Hanbo.PEG.Helper.csproj ├── PEGCalculator.cs └── Properties │ └── AssemblyInfo.cs ├── Hanbo.Resources ├── Hanbo.Resources.csproj ├── Properties │ └── AssemblyInfo.cs ├── Resource.Designer.cs ├── Resource.resx ├── ResourceImageForm.Designer.cs ├── ResourceImageForm.cs ├── ResourceImageForm.resx └── Resources │ ├── 3pointCircle.png │ ├── 3pointCircle_blue.png │ ├── ExportFile.png │ ├── angle.png │ ├── angle_blue32.png │ ├── camera.png │ ├── clearList_32.png │ ├── connect.png │ ├── coordinateXY_24.png │ ├── crossPoint.png │ ├── crossPoint_blue32.png │ ├── disconnect.png │ ├── distance.png │ ├── distanceX.png │ ├── distanceX_32.png │ ├── distanceY.png │ ├── distanceY_32.png │ ├── distance_blue32.png │ ├── draw_arc.png │ ├── draw_arc1.png │ ├── draw_circle.png │ ├── draw_circle_blue32.png │ ├── draw_line.png │ ├── draw_line_blue32.png │ ├── draw_point.png │ ├── draw_point_blue32.png │ ├── draw_smart_arc.png │ ├── draw_smart_circle.png │ ├── folder_image.png │ ├── grident_22.png │ ├── lens.png │ ├── message_attention.png │ ├── move.png │ ├── save.png │ ├── saveDraw.png │ ├── stop.png │ ├── symmetryLine.png │ ├── symmetryLine_blue32.png │ ├── workspace_32.png │ ├── zoomLayer_24.png │ ├── zoom_fit_best3.png │ └── zoom_in.png ├── Hanbo.SDMS.ALGO ├── Hanbo.SDMS.ALGO.csproj ├── MSD │ ├── FirstFingerMidLine.cs │ ├── FirstFingerMidLine_New.cs │ ├── LastFingerMidLine.cs │ ├── LastFingerMidLine_New.cs │ ├── SDMS_A.cs │ ├── SDMS_A1.cs │ ├── SDMS_A2.cs │ ├── SDMS_A2Plus.cs │ ├── SDMS_A3.cs │ ├── SDMS_A3New.cs │ ├── SDMS_A4.cs │ ├── SDMS_A5.cs │ ├── SDMS_A8.cs │ ├── SDMS_Alpha.cs │ ├── SDMS_B.cs │ ├── SDMS_B1.cs │ ├── SDMS_B10.cs │ ├── SDMS_B11.cs │ ├── SDMS_B1Plus.cs │ ├── SDMS_B7.cs │ ├── SDMS_B8.cs │ ├── SDMS_CL.cs │ ├── SDMS_R1.cs │ ├── SDMS_R17.cs │ ├── SDMS_R18.cs │ ├── SDMS_R19.cs │ ├── SDMS_R2.cs │ ├── SDMS_R3.cs │ ├── SDMS_R4.cs │ ├── SDMS_R5.cs │ ├── SDMS_R6.cs │ └── SecondFingerMidLine.cs ├── Obsolete │ ├── SDMS_A.cs │ ├── SDMS_A1.cs │ ├── SDMS_A2.cs │ ├── SDMS_A3.cs │ ├── SDMS_A4.cs │ ├── SDMS_A5.cs │ ├── SDMS_A8.cs │ ├── SDMS_B.cs │ ├── SDMS_B1.cs │ ├── SDMS_B10.cs │ ├── SDMS_B7.cs │ ├── SDMS_B8.cs │ ├── SDMS_R1.cs │ ├── SDMS_R17.cs │ ├── SDMS_R18.cs │ ├── SDMS_R19.cs │ ├── SDMS_R2.cs │ ├── SDMS_R3.cs │ ├── SDMS_R4.cs │ ├── SDMS_R5.cs │ └── SDMS_R6.cs └── Properties │ └── AssemblyInfo.cs ├── Hanbo.SDMS.Model ├── App.config ├── Hanbo.SDMS.Model.csproj ├── NLog.config ├── NLog.xsd ├── Properties │ ├── AssemblyInfo.cs │ ├── Settings.Designer.cs │ └── Settings.settings ├── SDMS.dbml ├── SDMS.dbml.layout ├── SDMS.designer.cs ├── SDMSDataContext.cs ├── SDMSRepo.cs └── packages.config ├── Hanbo.System.SingleInstance.Test ├── App.config ├── Configuration │ ├── CameraTest.xml │ └── DeviceCheckList.xml ├── DeviceCheckRepoTest.cs ├── DeviceCheckerTest.cs ├── Hanbo.System.SingleInstance.Test.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── Hanbo.ToolStripUI.Helper ├── Hanbo.ToolStripUI.Helper.csproj ├── Properties │ └── AssemblyInfo.cs └── ToolStripUIHelper.cs ├── Hanbo.WindowControlWrapper ├── GeoDataGridViewManager.cs ├── Hanbo.WindowControlWrapper.csproj ├── MessageDisplayer.cs ├── NLog.config ├── NLog.xsd ├── Properties │ └── AssemblyInfo.cs ├── RefCoordinate.cs ├── RefSkew.cs └── packages.config ├── Hanbo.WindowsFormsControlLibrary ├── DemoForm.Designer.cs ├── DemoForm.cs ├── DemoForm.resx ├── Enum │ └── SystemStatusType.cs ├── Hanbo.WindowsFormsControlLibrary.csproj ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── 3pointCircle_blue.png │ ├── ExportFile.png │ ├── angle_blue32.png │ ├── camera.png │ ├── clearList_32.png │ ├── crossPoint_blue32.png │ ├── distanceX_32.png │ ├── distanceY_32.png │ ├── distance_blue32.png │ ├── draw_circle_blue32.png │ ├── draw_line_blue32.png │ ├── draw_point_blue32.png │ ├── draw_smart_line.png │ ├── draw_smart_point.png │ ├── folder_image.png │ ├── lens.png │ ├── move.png │ ├── save.png │ ├── saveDraw.png │ ├── stop.png │ ├── symmetryLine_blue32.png │ ├── zoom_fit_best3.png │ └── zoom_in.png └── UserControls │ ├── CustomHalconControl.Designer.cs │ ├── CustomHalconControl.cs │ ├── CustomHalconControl.resx │ ├── CustomHalconControlDesigner.cs │ ├── GeoDataUserControl.Designer.cs │ ├── GeoDataUserControl.cs │ ├── GeoDataUserControl.resx │ ├── GeometryMeasureControl.Designer.cs │ ├── GeometryMeasureControl.cs │ ├── GeometryMeasureControl.resx │ ├── HalconStatusStrip.Designer.cs │ ├── HalconStatusStrip.cs │ └── HalconStatusStrip.resx ├── LightControl ├── CCSCommandModel.cs ├── CCSLightControlAssistant.cs ├── CCSLightControlManager.cs ├── CCSReceiveDataResolver.cs ├── CCSReceiveMessageViewModel.cs ├── ChannelStatusViewModel.cs ├── ConnectionEventArgs.cs ├── InstructionModel.cs ├── LightControl.csproj ├── LightControl.sln ├── LightControlInitEventArgs.cs ├── LightControllerResponseEventArgs.cs ├── PD3LightControlManager.cs ├── PD3Test.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── LightControlTest ├── CCSReceiveDataResolverTest.cs ├── LightControlTest.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── MatchingModule ├── MatchingAssistant.cs ├── MatchingModule.csproj ├── MatchingOpt.cs ├── MatchingOptSpeed.cs ├── MatchingOptStatistics.cs ├── MatchingParam.cs ├── MatchingResult.cs └── Properties │ └── AssemblyInfo.cs ├── MeasureModule.Test ├── Data │ └── TestCaculateDistance.xml ├── DistanceHelperTest.cs ├── MeasureModule.Test.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── MeasureModule ├── Converter │ ├── GeoDataGridViewModelConverter.cs │ └── ProgGraphicModelConverter.cs ├── Helper │ ├── ContourDisplayHelper.cs │ ├── DistanceHelper.cs │ └── PositionLocater.cs ├── IMeasureGeoModel.cs ├── MeasureAssistant.cs ├── MeasureAssistantParam.cs ├── MeasureModule.csproj ├── MeasureViewModel.cs ├── Measurement.cs ├── MeasurementCircle.cs ├── MeasurementDistanceX.cs ├── MeasurementDistanceY.cs ├── MeasurementEdge.cs ├── MeasurementFitLine.cs ├── MeasurementPair.cs ├── MeasurementSymmetryLine.cs ├── MeasurementTwoLineAngle.cs ├── MeasurementTwoLineCrossPoint.cs ├── NLog.config ├── NLog.xsd ├── Properties │ └── AssemblyInfo.cs ├── Resolver │ └── MeasureViewModelResolver.cs ├── ResultDisplayViewModel.cs ├── ResultModels │ ├── AngleResult.cs │ ├── CircleResult.cs │ ├── DistanceResult.cs │ ├── FitLineResult.cs │ ├── LineResult.cs │ ├── MeasurementResult.cs │ └── PointResult.cs ├── SmartMeasurements │ └── AutoFitPoint.cs ├── ViewModel │ └── GeoDataGridViewModel.cs └── packages.config ├── PD3_Ethernet_LightControl ├── AsyncConnectionForm.Designer.cs ├── AsyncConnectionForm.cs ├── AsyncConnectionForm.resx ├── CCSLightControlForm.Designer.cs ├── CCSLightControlForm.cs ├── CCSLightControlForm.resx ├── DemoForm.Designer.cs ├── DemoForm.cs ├── DemoForm.resx ├── LightChannel.cs ├── LightControlForm.Designer.cs ├── LightControlForm.cs ├── LightControlForm.resx ├── PD3-3024-3-EI_eng_001.pdf ├── PD3_Ethernet_LightControl.csproj ├── ProbeConnectionForm.Designer.cs ├── ProbeConnectionForm.cs ├── ProbeConnectionForm.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── power_Off.png │ ├── power_Off_48.png │ └── power_On_48.png ├── app.config └── packages │ ├── repositories.config │ ├── xunit.1.9.1 │ ├── lib │ │ └── net20 │ │ │ ├── xunit.dll │ │ │ ├── xunit.dll.tdnet │ │ │ ├── xunit.runner.msbuild.dll │ │ │ ├── xunit.runner.tdnet.dll │ │ │ ├── xunit.runner.utility.dll │ │ │ └── xunit.xml │ ├── xunit.1.9.1.nupkg │ └── xunit.1.9.1.nuspec │ ├── xunit.extensions.1.9.1 │ ├── lib │ │ └── net20 │ │ │ ├── xunit.extensions.dll │ │ │ └── xunit.extensions.xml │ ├── xunit.extensions.1.9.1.nupkg │ └── xunit.extensions.1.9.1.nuspec │ └── xunit.runners.1.9.1 │ ├── tools │ ├── HTML.xslt │ ├── NUnitXml.xslt │ ├── xunit.console.clr4.exe │ ├── xunit.console.clr4.exe.config │ ├── xunit.console.clr4.x86.exe │ ├── xunit.console.clr4.x86.exe.config │ ├── xunit.console.exe │ ├── xunit.console.exe.config │ ├── xunit.console.x86.exe │ ├── xunit.console.x86.exe.config │ ├── xunit.gui.clr4.exe │ ├── xunit.gui.clr4.x86.exe │ ├── xunit.gui.exe │ ├── xunit.gui.x86.exe │ ├── xunit.runner.msbuild.dll │ ├── xunit.runner.utility.dll │ └── xunit.runner.utility.xml │ ├── xunit.runners.1.9.1.nupkg │ └── xunit.runners.1.9.1.nuspec ├── README.md ├── SDMSRepoTest ├── App.config ├── Data │ └── importMacroPlan.data ├── Hanbo.SDMS.Model.Test.csproj ├── Properties │ └── AssemblyInfo.cs ├── SDMSRepoTest.cs └── packages.config ├── ThirdParty ├── ComboBox │ ├── CustomComboBox.cs │ ├── OldNewEvent.cs │ ├── PopupControl.cs │ └── readme.txt ├── Properties │ └── AssemblyInfo.cs └── ThirdParty.csproj └── ViewROI ├── FunctionPlot.cs ├── GraphicsContext.cs ├── HObjectEntry.cs ├── HWndCtrl.cs ├── Interface ├── IContinueZoom.cs ├── IProg.cs └── IROIModelUpdateable.cs ├── MeasureParameter.cs ├── Model ├── PositionModel.cs └── ProgGraphicModel.cs ├── Properties └── AssemblyInfo.cs ├── ROI.cs ├── ROIAuxLine.cs ├── ROICircle.cs ├── ROICircleContour.cs ├── ROICircularArc.cs ├── ROIController.cs ├── ROILine.cs ├── ROIProgAngle.cs ├── ROIProgCircle.cs ├── ROIProgDistance.cs ├── ROIProgPoint.cs ├── ROIProgSymmetryLine.cs ├── ROIRectangle1.cs ├── ROIRectangle2.cs ├── ROIViewModel.cs ├── SmartROIs ├── SmartArc.cs ├── SmartCircle.cs ├── SmartLine.cs └── SmartPoint.cs ├── ViewROI.csproj └── ViewROI.sln /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | *.user 4 | *.suo 5 | -------------------------------------------------------------------------------- /Hanbo.AOM.Configuration/ColorMM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Hanbo.AOM.Configuration 8 | { 9 | /// 10 | /// 顏色轉換管理 11 | /// 12 | public static class ColorMM 13 | { 14 | /// 15 | /// 將顏色字串解析為顏色 (System.Drawing.Color) 16 | /// 17 | /// 顏色名稱 or 16 進位顏色字串 18 | /// 解析後的顏色 19 | /// 成功 or 失敗 20 | public static bool TryParseColor(string fromNameOrHtmlString, out Color parseColor) 21 | { 22 | bool parseSuccess = true; 23 | parseColor = Color.Empty; 24 | var fromNameColor = Color.FromName(fromNameOrHtmlString); 25 | if (fromNameColor.IsKnownColor) 26 | { 27 | parseColor = fromNameColor; 28 | } 29 | else 30 | { 31 | try 32 | { 33 | parseColor = ColorTranslator.FromHtml("#" + fromNameOrHtmlString); 34 | } 35 | catch 36 | { 37 | parseSuccess = false; 38 | } 39 | } 40 | return parseSuccess; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Hanbo.AOM.Configuration/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.AOM.Configuration")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.AOM.Configuration")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b8a87b0c-d346-4816-b127-6d44acd87c48")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.AOM.Configuration/ViewModels/UnitViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.AOM.Configuration.ViewModels 7 | { 8 | /// 9 | /// 量測單位 10 | /// 11 | public class UnitViewModel 12 | { 13 | public string Name { get; set; } 14 | 15 | public string Value { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Hanbo.Authenticate/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Hanbo.Authenticate/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Authenticate")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Authenticate")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8948cc0f-324b-4eca-95ac-af28778d9057")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Authenticate/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Hanbo.CalibrationModule/Delegates/CalibrationModuleDelegates.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.CalibrationModule.Delegates 7 | { 8 | public delegate void CalibDelegate(int value); 9 | public delegate void AddCalibImageCompletedDelegate(object sender, object e); 10 | } 11 | -------------------------------------------------------------------------------- /Hanbo.CalibrationModule/Models/QualityIssue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.CalibrationModule.Models 7 | { 8 | public class QualityIssue 9 | { 10 | /// 11 | /// Constant starting with QUALITY_ISSUE_*, defined in the class 12 | /// CalibrationAssistant. 13 | /// 14 | private int qIssue; 15 | /// 16 | /// Score obtained from the quality assessment 17 | /// 18 | private double qScore; 19 | 20 | /// Initialize an instance 21 | /// 22 | /// Constant starting with QUALITY_ISSUE_*, defined in 23 | /// the class CalibrationAssistant. 24 | /// 25 | /// 26 | /// Score achieved for this quality measurement. 27 | /// 28 | public QualityIssue(int IType, double scr) 29 | { 30 | qIssue = IType; 31 | qScore = scr; 32 | } 33 | 34 | // getter-setter methods 35 | public double getScore() 36 | { 37 | return qScore; 38 | } 39 | 40 | public int getIssueType() 41 | { 42 | return qIssue; 43 | } 44 | 45 | }//end of class 46 | } 47 | -------------------------------------------------------------------------------- /Hanbo.CalibrationModule/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.CalibrationModule")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.CalibrationModule")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4e2bf26d-4af9-4aad-8a99-8cfb9f41b462")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Configuration.Settings.Test/Data/CameraSetting.xml: -------------------------------------------------------------------------------- 1 | 2 | GigEVision 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | progressive 10 | -1 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Hanbo.Configuration.Settings.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Configuration.Settings.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Configuration.Settings.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b11f7f16-3ec0-4416-a339-d1808a02e531")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Configuration.Settings.Test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Hanbo.Configuration.Settings/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Configuration.Settings")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Configuration.Settings")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("574da6d9-75c7-4098-9c68-0cb09f0fb218")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Custom.Attribute/LocalizedDisplayNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Hanbo.Custom.Attribute 8 | { 9 | public class LocalizedDisplayNameAttribute : DisplayNameAttribute 10 | { 11 | /// 12 | /// LocalizedDisplayNameAttribute 13 | /// 14 | /// Resource ID 15 | /// 預設的顯示名稱,如果找不到 Resouce, 將用此替代 16 | public LocalizedDisplayNameAttribute(string resourceID, string defaultDisplayName) 17 | : base(GetMessageFromResource(resourceID, defaultDisplayName)) 18 | { 19 | 20 | } 21 | private static string GetMessageFromResource(string resourceId, string defaultDisplayName) 22 | { 23 | return Hanbo.Resources.Resource.ResourceManager.GetString(resourceId) ?? defaultDisplayName; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Hanbo.Custom.Attribute/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Custom.Attribute")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Custom.Attribute")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("81a3e985-5f24-4810-84f6-f3148f54aaf1")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Device.SingleInstance/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.Device.SingleInstance/DeviceCheckRepo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Xml.Linq; 8 | 9 | namespace Hanbo.Device.SingleInstance 10 | { 11 | public class DeviceCheckRepo 12 | { 13 | public List GetDeviceCheckList() 14 | { 15 | var deviceList = new List(); 16 | var fpath = ConfigurationManager.AppSettings["DeviceCheckList"]; 17 | if (File.Exists(fpath)) 18 | { 19 | var xDoc = XDocument.Load(fpath); 20 | deviceList = xDoc.Root.Elements("Device").Select(p => new DeviceCheckViewModel() 21 | { 22 | Name = p.Attribute("Name").Value, 23 | Description = p.Attribute("Description").Value, 24 | StaticClassName = p.Element("Check").Attribute("StaticClassName").Value, 25 | InvokeMethod = p.Element("Check").Attribute("InvokeMethod").Value, 26 | Params = p.Element("Check").Attribute("Params").Value, 27 | }).ToList(); 28 | } 29 | return deviceList; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Hanbo.Device.SingleInstance/DeviceCheckResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Device.SingleInstance 7 | { 8 | public class DeviceCheckResult 9 | { 10 | public bool Success { get; set; } 11 | 12 | public string Message { get; set; } 13 | 14 | public Exception ExceptionDetail { get; set; } 15 | 16 | public string Name { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Hanbo.Device.SingleInstance/DeviceCheckViewModel.cs: -------------------------------------------------------------------------------- 1 | using Hanbo.Custom.Attribute; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace Hanbo.Device.SingleInstance 9 | { 10 | public class DeviceCheckViewModel 11 | { 12 | [LocalizedDisplayNameAttribute("Model_DeviceName", "裝置名稱")] 13 | public string Name { get; set; } 14 | 15 | [LocalizedDisplayNameAttribute("Model_Description", "描述")] 16 | public string Description { get; set; } 17 | 18 | [LocalizedDisplayNameAttribute("Model_CheckResult", "檢查結果")] 19 | public string IsPass { get; set; } 20 | 21 | [LocalizedDisplayNameAttribute("Model_CheckMessage", "系統訊息")] 22 | public string Message { get; set; } 23 | 24 | public string StaticClassName { get; set; } 25 | 26 | public string InvokeMethod { get; set; } 27 | 28 | public string Params { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Hanbo.Device.SingleInstance/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Device.SingleInstance")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Hanbo Taiwan")] 12 | [assembly: AssemblyProduct("Hanbo.Device.SingleInstance")] 13 | [assembly: AssemblyCopyright("Copyright © 2013-2014 Hanbo Taiwan")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("354602b4-a669-455c-9696-8f8a94ca9041")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.2")] 36 | [assembly: AssemblyFileVersion("1.0.0.2")] 37 | -------------------------------------------------------------------------------- /Hanbo.Extensions/ApplicationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Hanbo.Extensions 8 | { 9 | public static class ApplicationExtensions 10 | { 11 | public static string ToAppAbsolutePath(this String str) 12 | { 13 | var baseDir = System.AppDomain.CurrentDomain.BaseDirectory; 14 | return Path.Combine(baseDir, str); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Hanbo.Extensions/MathExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Extensions 7 | { 8 | /// 9 | /// 提供數學計算功能 10 | /// 11 | public static class MathExtensions 12 | { 13 | /// 14 | /// *************** 15 | /// 把角度轉為 Halcon 徑度 16 | /// 角度, 順時針方向遞增 0 ~360 17 | /// Halcon Phi, 第一,二象限為正值,逆時針方向遞增 0 ~ PI 18 | /// 第三,四象限為負值, 順時針方向遞增 0 ~ -PI 19 | /// *************** 20 | /// 21 | /// 22 | /// 23 | public static double ToHalconPhi(this double degree) 24 | { 25 | double phi; 26 | if (degree <= 180.0 || degree == 0.0) 27 | { 28 | phi = -1 * degree * (Math.PI / 180.0); 29 | } 30 | else 31 | { 32 | phi = 2 * Math.PI - degree * (Math.PI / 180.0); 33 | } 34 | return phi; 35 | } 36 | 37 | /// 38 | /// 把 Halcon 徑度轉為角度 39 | /// 順時針方向計算角度 40 | /// 41 | /// 42 | /// 43 | public static double HalconPhiToDegree(this double halconPhi) 44 | { 45 | var halconDegree = Math.Abs(halconPhi * 180.0 / Math.PI); 46 | var degree = (halconPhi <= 0) ? halconDegree : 360.0 - halconDegree; 47 | return degree; 48 | } 49 | 50 | /// 51 | /// 角度轉徑度 52 | /// 53 | /// 54 | /// 55 | public static double DegreeToRad(this double degree) 56 | { 57 | // 1 pi rad = 180 degree, 1 rad = pi /180 degree 58 | return degree * (Math.PI / 180.0); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Hanbo.Extensions/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Extensions")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Extensions")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("10f5da12-15c9-4a3e-ac93-22eba6526c03")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Geometry/Models/GeoPoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Geometry.Models 7 | { 8 | /// 9 | /// 幾何座標點 10 | /// 11 | public class GeoPoint 12 | { 13 | /// 14 | /// Y 座標 15 | /// 16 | public double Row { get; set; } 17 | 18 | /// 19 | /// X 座標 20 | /// 21 | public double Col { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Hanbo.Geometry/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Geometry")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Geometry")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3263c8dd-6a71-4864-a359-a9cc66fa2f96")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Helper.Test/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.Helper.Test/Configuration/LightDefaultSettings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 1 7 | 1 8 | 20 9 | 10 | 11 | 2 12 | 1 13 | 50 14 | 15 | 16 | 17 | 18 | 1 19 | 1 20 | 20 21 | 22 | 23 | 2 24 | 1 25 | 50 26 | 27 | 28 | -------------------------------------------------------------------------------- /Hanbo.Helper.Test/ConfigurationHelperTest.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Xunit; 8 | using Xunit.Extensions; 9 | 10 | namespace Hanbo.Helper.Test 11 | { 12 | public class ConfigurationHelperTest 13 | { 14 | [Theory] 15 | [InlineData("PlanLight")] 16 | public void TestGetLightSettings(string settingName) 17 | { 18 | //assign & act 19 | var model = ConfigurationHelper.GetLightSettings(settingName); 20 | 21 | //assert 22 | Assert.True(model.LightDTOs.Count > 0); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Hanbo.Helper.Test/ImageAssociateTest.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Xunit; 8 | using Xunit.Extensions; 9 | 10 | namespace Hanbo.Helper.Test 11 | { 12 | public class ImageAssociateTest 13 | { 14 | [Theory] 15 | [InlineData(@"D:\Tmp\ghi\01.png", @"D:\Tmp\ghi\02.png", 4096.0, 8192.0)] 16 | [InlineData(@"D:\Tmp\ghi\c1.tif", @"D:\Tmp\ghi\03.png", 4096.0, 12288.0)] 17 | public void TestMergeTailImage(string sImagePath, string tImagePath, double expectedWidth, double expectedHeight) 18 | { 19 | //assign 20 | var sImage = new HImage(sImagePath); 21 | var tImage = new HImage(tImagePath); 22 | 23 | //act 24 | var mergedImage = ImageAssociate.MergeTailImage(sImage, tImage, MergeDirection.Vertical); 25 | 26 | //assert 27 | HTuple width, height; 28 | mergedImage.GetImageSize(out width, out height); 29 | Assert.Equal(expectedWidth, width.D); 30 | Assert.Equal(expectedHeight, height.D); 31 | 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Hanbo.Helper.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Helper.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Helper.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("df2b0b4e-3575-40f6-a0f4-4a5c3057e767")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Helper.Test/ShapeFinderTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Xunit; 6 | using Xunit.Extensions; 7 | 8 | namespace Hanbo.Helper.Test 9 | { 10 | public class ShapeFinderTest 11 | { 12 | [Theory] 13 | [InlineData(4)] 14 | public void GetOrderdShapeModelTest(int modelCount) 15 | { 16 | //assign 17 | var finder = new ShapeFinder(); 18 | var random = new Random(); 19 | double[] row = new double[modelCount]; 20 | double[] col = new double[modelCount]; 21 | double[] angle = new double[modelCount]; 22 | double[] score = new double[modelCount]; 23 | row = row.Select(p => random.NextDouble()).ToArray(); 24 | col = col.Select(p => random.NextDouble()).ToArray(); 25 | angle = angle.Select(p => random.NextDouble()).ToArray(); 26 | score = score.Select(p => random.NextDouble()).ToArray(); 27 | 28 | var model = new ShapeModel() 29 | { 30 | ModelId = new HalconDotNet.HTuple(), 31 | Row = new HalconDotNet.HTuple(row), 32 | Col = new HalconDotNet.HTuple(col), 33 | Angle = new HalconDotNet.HTuple(angle), 34 | Score = new HalconDotNet.HTuple(score), 35 | }; 36 | var colMin = model.Col.DArr.Min(); 37 | 38 | //act 39 | var orderedModel = finder.GetOrderdShapeModel(model); 40 | 41 | //assert 42 | Assert.True(colMin == orderedModel.Col[0].D); 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Hanbo.Helper.Test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Hanbo.Helper/HanboSecurityHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Security; 6 | 7 | namespace Hanbo.Helper 8 | { 9 | public class HanboSecurityHelper 10 | { 11 | public static string GetEncrypt(string rawText) 12 | { 13 | return FormsAuthentication.HashPasswordForStoringInConfigFile(rawText, "SHA1"); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Hanbo.Helper/LicenseChecker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.NetworkInformation; 5 | using System.Text; 6 | 7 | namespace Hanbo.Helper 8 | { 9 | public class LicenseChecker 10 | { 11 | public static bool IsLicenseValid() 12 | { 13 | #if DEBUG 14 | return true; 15 | #endif 16 | var isValid = false; 17 | var macCode = "00500805F4E4"; 18 | 19 | foreach (var item in NetworkInterface.GetAllNetworkInterfaces().Where(ni => ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet)) 20 | { 21 | if (item.GetPhysicalAddress().ToString() == macCode) 22 | { 23 | isValid = true; 24 | } 25 | } 26 | return isValid; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Hanbo.Helper/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Hanbo.Helper/ProcessChecker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace Hanbo.Helper 9 | { 10 | /// 11 | /// 應用程式執行檢查範圍 12 | /// 13 | public enum ProcessCheckRange { Local, Global }; 14 | 15 | /// 16 | /// 應用程式檢查類別 17 | /// 18 | public class ProcessChecker 19 | { 20 | /// 21 | /// 檢查應用程式是否已執行 22 | /// 23 | /// 檢查範圍 : Global (同一主機所有使用者), Local (同一主機相同使用者) 24 | /// 是否已執行 25 | public static bool IsProcessExists(ProcessCheckRange checkRange) 26 | { 27 | var isCreated = false; 28 | var muteRange = "Global\\"; 29 | switch (checkRange) 30 | { 31 | case ProcessCheckRange.Global: 32 | muteRange = "Global\\"; 33 | break; 34 | case ProcessCheckRange.Local: 35 | muteRange = "Local\\"; 36 | break; 37 | } 38 | var mutexName = Process.GetCurrentProcess().ProcessName; 39 | System.Threading.Mutex mutex = new System.Threading.Mutex(true, muteRange + mutexName, out isCreated); 40 | return isCreated; 41 | } 42 | 43 | /// 44 | /// 檢查應用程式是否已執行 45 | /// 46 | /// 47 | public static bool IsProcessExists() 48 | { 49 | var isCreated = true; 50 | Process curr = Process.GetCurrentProcess(); 51 | Process[] procs = Process.GetProcessesByName(curr.ProcessName); 52 | foreach (Process p in procs) 53 | { 54 | if ((p.Id != curr.Id) && 55 | (p.MainModule.FileName == curr.MainModule.FileName)) 56 | { 57 | isCreated = false; 58 | break; 59 | } 60 | } 61 | return isCreated; 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Hanbo.Helper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Helper")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Helper")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3b0e2f7e-aa9f-42d8-bcba-c7ad5056d09d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Helper/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab.Test/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab.Test/App_Data/CameraAsetting.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GigEVision 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | progressive 11 | -1 12 | default 13 | GtlForceIP=00305313b6ec,169.254.0.82/16 14 | false 15 | default 16 | GigEVision 17 | 0 18 | -1 19 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab.Test/GrabImageWorkingManTest.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using System.Collections.Generic; 4 | using System.Configuration; 5 | using System.Linq; 6 | using System.Text; 7 | using Xunit.Extensions; 8 | // 9 | using Hanbo.Extensions; 10 | using Hanbo.Configuration.Settings; 11 | using Xunit; 12 | using System.IO; 13 | 14 | namespace Hanbo.Image.Grab.Test 15 | { 16 | public class GrabImageWorkingManTest 17 | { 18 | [Theory] 19 | [InlineData(@"D:\Repo\Hanbo.Image.Grab.Test\App_Data\CameraAsetting.xml")] 20 | public void Test(string fpath) 21 | { 22 | //assign 23 | if (!File.Exists(fpath)) return; 24 | var dict = CameraSettingRepo.GetCameraSettingDictionary(fpath); 25 | var _fgArgs = new FrameGrabberArgs() 26 | { 27 | Name = dict["Name"], 28 | HorizontalResolution = Convert.ToInt32(dict["HorizontalResolution"]), 29 | VerticalResolution = Convert.ToInt32(dict["VerticalResolution"]), 30 | ImageWidth = Convert.ToInt32(dict["ImageWidth"]), 31 | ImageHeight = Convert.ToInt32(dict["ImageHeight"]), 32 | StartRow = Convert.ToInt32(dict["StartRow"]), 33 | StartColumn = Convert.ToInt32(dict["StartColumn"]), 34 | Field = dict["Field"], 35 | BitsPerChannel = Convert.ToInt32(dict["BitsPerChannel"]), 36 | ColorSpace = dict["ColorSpace"], 37 | Generic = dict["Generic"], 38 | ExternalTrigger = dict["ExternalTrigger"], 39 | CameraType = dict["CameraType"], 40 | Device = dict["Device"], 41 | Port = Convert.ToInt32(dict["Port"]), 42 | LineIn = Convert.ToInt32(dict["LineIn"]) 43 | }; 44 | var grabber = new HalconGrabber(_fgArgs); 45 | 46 | //act 47 | var model = grabber.SnapShot2(); 48 | 49 | //assert 50 | Assert.True(model.Result.State == GrabberEventState.Done); 51 | 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Image.Grab.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Image.Grab.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("882e8c1f-f69c-4714-9ce9-375ffb3a821e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab.Test/PylonImageProviderTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Xunit.Extensions; 6 | using FluentAssertions; 7 | 8 | namespace Hanbo.Image.Grab.Test 9 | { 10 | public class PylonImageProviderTest : IDisposable 11 | { 12 | PylonImageProvider worker; 13 | public PylonImageProviderTest() 14 | { 15 | worker = new PylonImageProvider(); 16 | } 17 | 18 | [Theory] 19 | [InlineData(PylonDrivenMode.Stream)] 20 | public void GrabImageTest(PylonDrivenMode mode) 21 | { 22 | //assign 23 | worker.Connect(); 24 | 25 | //act 26 | worker.GrabImage(); 27 | var image = worker.Image; 28 | 29 | //assert 30 | image.Should().NotBeNull("不可為 Null"); 31 | } 32 | 33 | public void Dispose() 34 | { 35 | worker.Dispose(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab.Test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/FrameGrabberArgs.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Hanbo.Image.Grab 8 | { 9 | public class FrameGrabberArgs 10 | { 11 | public int BitsPerChannel { get; set; } 12 | 13 | public string ColorSpace { get; set; } 14 | 15 | public string Generic { get; set; } 16 | 17 | public string CameraType { get; set; } 18 | 19 | public string Device { get; set; } 20 | 21 | public int Port { get; set; } 22 | 23 | public int LineIn { get; set; } 24 | 25 | public string ExternalTrigger { get; set; } 26 | 27 | public string Field { get; set; } 28 | 29 | public int StartColumn { get; set; } 30 | 31 | public int StartRow { get; set; } 32 | 33 | public int ImageHeight { get; set; } 34 | 35 | public int ImageWidth { get; set; } 36 | 37 | public int VerticalResolution { get; set; } 38 | 39 | public int HorizontalResolution { get; set; } 40 | 41 | public string Name { get; set; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/GrabImageStatusChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Image.Grab 7 | { 8 | public class GrabImageStatusChangedEventArgs: EventArgs 9 | { 10 | public WorkingManStatus Status { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/GrabberEventResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Image.Grab 7 | { 8 | public class GrabberEventResult 9 | { 10 | public GrabberEventState State { get; set; } 11 | 12 | public Exception Error { get; set; } 13 | 14 | public object Model { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/GrabberEventViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Image.Grab 7 | { 8 | public class GrabberEventViewModel 9 | { 10 | public GrabberReportEventHandler ReportHandler; 11 | public GrabberEventResult Result { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/IGrab.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Hanbo.Image.Grab 8 | { 9 | public delegate GrabberEventViewModel GrabberEventHandler(); 10 | public delegate void GrabberReportEventHandler(object sender, ProgressChangedEventArgs e); 11 | public enum GrabberEventState { Busy, Done, Fail } 12 | public interface IGrabber 13 | { 14 | GrabberEventHandler ConnectHandler { get; set; } 15 | GrabberEventHandler SnapShotHandler { get; set; } 16 | RunWorkerCompletedEventHandler ConnectCompletedHandler { get; set; } 17 | //GrabberEventHandler DisConnectHandler { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/IGrabImage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Image.Grab 7 | { 8 | public interface IGrabImage 9 | { 10 | /// 11 | /// 單張擷取 12 | /// 13 | void OneShot(); 14 | 15 | /// 16 | /// 連續擷取 17 | /// 18 | void ContinuouslyGrab(); 19 | 20 | /// 21 | /// 停止擷取 22 | /// 23 | void Stop(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Image.Grab")] 9 | [assembly: AssemblyDescription("Image Acquisition Library")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Hanbo Taiwan")] 12 | [assembly: AssemblyProduct("Hanbo.Image.Grab")] 13 | [assembly: AssemblyCopyright("Copyright © 2013-2014 Hanbo Taiwan")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e7a26180-a8eb-4220-9c53-f5c83cd3c735")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.1")] 36 | [assembly: AssemblyFileVersion("1.0.0.1")] 37 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/PylonFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Image.Grab 7 | { 8 | public class PylonFeature 9 | { 10 | /// 11 | /// 名稱 12 | /// 13 | public string Name { get; set; } 14 | 15 | /// 16 | /// Key 17 | /// 18 | public string Key { get; set; } 19 | 20 | /// 21 | /// Value 22 | /// 23 | public object Value { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/WorkingManStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Image.Grab 7 | { 8 | public enum GrabStage { Initial, Closed, Connecting, Connected, Grabbing, Grabbed, ContinuouslyGrabbing, Stop }; 9 | public enum GrabState { Idle, Busy }; 10 | public enum GrabInstruction { Initialize, Connect, DisConnect, GrabImage, ContinuouslyGrabImage }; 11 | /// 12 | /// workingMan 狀態 13 | /// 14 | public class WorkingManStatus 15 | { 16 | public bool IsConnection { get; set; } 17 | 18 | public string Message { get; set; } 19 | 20 | /// 21 | /// 階段 22 | /// 23 | public GrabStage Stage { get; set; } 24 | 25 | 26 | /// 27 | /// 狀態 28 | /// 29 | public GrabState State { get; set; } 30 | 31 | /// 32 | /// 指令 Input 33 | /// 34 | public GrabInstruction Instruction { get; set; } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/FluentAssertions.2.1.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/FluentAssertions.2.1.0.0.nupkg -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net35/FluentAssertions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net35/FluentAssertions.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net35/FluentAssertions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net35/FluentAssertions.pdb -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net40/FluentAssertions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net40/FluentAssertions.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net40/FluentAssertions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net40/FluentAssertions.pdb -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net45/FluentAssertions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net45/FluentAssertions.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net45/FluentAssertions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/net45/FluentAssertions.pdb -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4-windowsphone71/FluentAssertions.WindowsPhone.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4-windowsphone71/FluentAssertions.WindowsPhone.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4-windowsphone71/FluentAssertions.WindowsPhone.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4-windowsphone71/FluentAssertions.WindowsPhone.pdb -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4/FluentAssertions.Silverlight.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4/FluentAssertions.Silverlight.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4/FluentAssertions.Silverlight.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4/FluentAssertions.Silverlight.pdb -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/sl4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/winrt45/FluentAssertions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/winrt45/FluentAssertions.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/winrt45/FluentAssertions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/FluentAssertions.2.1.0.0/lib/winrt45/FluentAssertions.pdb -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/NLog.2.0.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/NLog.2.0.1.2.nupkg -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/NLog.2.0.1.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NLog 5 | 2.0.1.2 6 | NLog 7 | Kim Christensen 8 | Kim Christensen 9 | http://raw.github.com/NLog/NLog/master/LICENSE.txt 10 | http://github.com/NLog/NLog/ 11 | http://nlog-project.org/N.png 12 | false 13 | NLog is a logging platform for .NET with rich log routing and management capabilities. It can help you produce and manage high-quality logs for your application regardless of its size or complexity. 14 | This package installs NLog.dll with includes core logging functionality. 15 | For your main project also need to install "NLog Configuration" package. 16 | NLog - Advanced .NET and Silverlight Logging 17 | 18 | 19 | en-US 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net20/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net20/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net35/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net35/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net40/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net40/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net45/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/net45/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl2/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl2/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl3-wp/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl3-wp/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl3/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl3/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl4-windowsphone71/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl4-windowsphone71/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl4/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl4/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl5/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/lib/sl5/NLog.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net20/InstallNLogConfig.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net20/InstallNLogConfig.exe -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net35/InstallNLogConfig.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net35/InstallNLogConfig.exe -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net40/InstallNLogConfig.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net40/InstallNLogConfig.exe -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net45/InstallNLogConfig.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.2.0.1.2/tools/net45/InstallNLogConfig.exe -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.Config.2.0.1.2/NLog.Config.2.0.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/NLog.Config.2.0.1.2/NLog.Config.2.0.1.2.nupkg -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.Config.2.0.1.2/NLog.Config.2.0.1.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NLog.Config 5 | 2.0.1.2 6 | NLog Configuration 7 | Kim Christensen 8 | Kim Christensen 9 | http://raw.github.com/NLog/NLog/master/LICENSE.txt 10 | http://github.com/NLog/NLog/ 11 | http://nlog-project.org/NConfig.png 12 | false 13 | Empty NLog.config file. 14 | Empty NLog.config file for use with NLog. 15 | 16 | 17 | en-US 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.Config.2.0.1.2/content/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/NLog.Config.2.0.1.2/tools/Install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | $configItem = $project.ProjectItems.Item("NLog.config") 4 | 5 | // set 'Copy To Output Directory' to 'Copy if newer' 6 | $copyToOutput = $configItem.Properties.Item("CopyToOutputDirectory") 7 | $copyToOutput.Value = 1 8 | 9 | // set 'Build Action' to 'Content' 10 | $buildAction = $configItem.Properties.Item("BuildAction") 11 | $buildAction.Value = 2 12 | 13 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.dll.tdnet: -------------------------------------------------------------------------------- 1 | 2 | xUnit.net {0}.{1}.{2} build {3} 3 | xunit.runner.tdnet.dll 4 | Xunit.Runner.TdNet.TdNetRunner 5 | -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.runner.msbuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.runner.msbuild.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.runner.tdnet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.runner.tdnet.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.runner.utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/xunit.1.9.1/lib/net20/xunit.runner.utility.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.1.9.1/xunit.1.9.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/xunit.1.9.1/xunit.1.9.1.nupkg -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.extensions.1.9.1/lib/net20/xunit.extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/xunit.extensions.1.9.1/lib/net20/xunit.extensions.dll -------------------------------------------------------------------------------- /Hanbo.Image.Grab/packages/xunit.extensions.1.9.1/xunit.extensions.1.9.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Image.Grab/packages/xunit.extensions.1.9.1/xunit.extensions.1.9.1.nupkg -------------------------------------------------------------------------------- /Hanbo.Interface/IMeasure.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using MeasureModule; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace Hanbo.Interface 9 | { 10 | public interface IMeasure 11 | { 12 | MeasureResult Action(); 13 | 14 | /// 15 | /// 初始化 16 | /// 17 | /// 影像 18 | /// 比對模型 Row 位置 19 | /// 比對模型 Col 位置 20 | /// 比對模型 Angle 21 | void Initialize(HImage image, HTuple modelRow, HTuple modelColumn, HTuple modelAngle); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Hanbo.Interface/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Hanbo.Interface/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Interface")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Interface")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("115ec5aa-f29a-439f-9a13-46d494dd4e12")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Interface/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.Log/LogManager.cs: -------------------------------------------------------------------------------- 1 | using NLog; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Hanbo.Log 9 | { 10 | /// 11 | /// 使用 NLog 12 | /// 13 | public static class LogManager 14 | { 15 | private static Logger logger = NLog.LogManager.GetCurrentClassLogger(); 16 | public static void Error(Exception ex) 17 | { 18 | logger.Error(ex); 19 | } 20 | public static void Error(string msg) 21 | { 22 | logger.Error(msg); 23 | } 24 | 25 | public static void Debug(Exception ex) 26 | { 27 | logger.Debug(ex); 28 | } 29 | public static void Debug(string msg) 30 | { 31 | logger.Debug(msg); 32 | } 33 | 34 | public static void Fatal(Exception ex) 35 | { 36 | logger.Fatal(ex); 37 | } 38 | public static void Fatal(string msg) 39 | { 40 | logger.Fatal(msg); 41 | } 42 | 43 | public static void Trace(Exception ex) 44 | { 45 | logger.Trace(ex); 46 | } 47 | public static void Trace(string msg) 48 | { 49 | logger.Trace(msg); 50 | } 51 | 52 | public static void Info(Exception ex) 53 | { 54 | logger.Info(ex); 55 | } 56 | public static void Info(string msg) 57 | { 58 | logger.Info(msg); 59 | } 60 | 61 | public static void Warn(Exception ex) 62 | { 63 | logger.Warn(ex); 64 | } 65 | public static void Warn(string msg) 66 | { 67 | logger.Warn(msg); 68 | } 69 | 70 | 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Hanbo.Log/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Hanbo.Log/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Log")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Log")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("81df4c8d-423a-4419-81b4-ba3e351c02c2")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Log/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.Models/Argument/AutoExportArgument.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models.Argument 7 | { 8 | public enum AutoExportArgumentPostfixType { AutoNumber, DateTime, Mixed }; 9 | public enum AutoExportArgumentPrefixType { Default, Custom }; 10 | public class AutoExportArgument 11 | { 12 | public string OutputDirectory { get; set; } 13 | 14 | public string Prefix { get; set; } 15 | 16 | public string PostfixFormat { get; set; } 17 | 18 | public string ExtensionName { get; set; } 19 | 20 | public AutoExportArgumentPostfixType PostfixType; 21 | public AutoExportArgumentPrefixType PrefixType; 22 | 23 | /// 24 | /// 是否為 Mahr 格式輸出 25 | /// 26 | public bool IsMahrExport { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Hanbo.Models/CameraSpecViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | /// 9 | /// Camera 規格 ViewModel 10 | /// 11 | public class CameraSpecViewModel 12 | { 13 | /// 14 | /// 水平方向解析度 (pixel) 15 | /// 16 | public int HorizontalResolution { get; set; } 17 | 18 | /// 19 | /// 水平方向 Pixel size 20 | /// 21 | public double HorizontalPixelSize { get; set; } 22 | 23 | /// 24 | /// 垂直方向解析度 (pixel) 25 | /// 26 | public int VerticalResolution { get; set; } 27 | 28 | /// 29 | /// 垂直方向 Pixel size 30 | /// 31 | public double VerticalPixelSize { get; set; } 32 | 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Hanbo.Models/ExportMacroPlanViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | [Serializable] 9 | public class ExportMacroPlanViewModel 10 | { 11 | public string MacroName { get; set; } 12 | 13 | public string MacroGuid { get; set; } 14 | 15 | public string Note { get; set; } 16 | 17 | public System.Data.Linq.Binary ShapeModelBinary { get; set; } 18 | 19 | public System.Data.Linq.Binary TrainingImageBinary { get; set; } 20 | 21 | public System.Data.Linq.Binary MatchingParamBinaryData { get; set; } 22 | 23 | public System.Data.Linq.Binary MeasureBinaryData { get; set; } 24 | 25 | public System.Data.Linq.Binary MeasureAssistantBinaryData { get; set; } 26 | 27 | public double? ModelRow { get; set; } 28 | 29 | public double? ModelCol { get; set; } 30 | 31 | public double? ModelAngle { get; set; } 32 | 33 | public string ExportUnit { get; set; } 34 | 35 | public string UpperLightValue { get; set; } 36 | 37 | public string BottomLigthValue { get; set; } 38 | 39 | public bool? UpperLightSwitch { get; set; } 40 | 41 | public bool? BottomLightSiwtch { get; set; } 42 | 43 | public string CreateBy { get; set; } 44 | 45 | public string ModifiedBy { get; set; } 46 | 47 | public DateTime? CreateOn { get; set; } 48 | 49 | public DateTime? ModifiedOn { get; set; } 50 | 51 | public bool? IsDeleted { get; set; } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Hanbo.Models/HWindowSettingViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | /// 9 | /// HWCtrl 設定值 ViewModel 10 | /// 11 | public class HWindowSettingViewModel 12 | { 13 | public HWindowSettingViewModel() 14 | { 15 | HLines = 2; 16 | VLines = 2; 17 | GridLineColor = "red"; 18 | ShowGridLine = false; 19 | ShowAccuracyAreaGridLine = false; 20 | AccuracyAreaGridLineColor = "lime green"; 21 | } 22 | public int HLines { get; set; } 23 | public int VLines { get; set; } 24 | public string GridLineColor { get; set; } 25 | public bool ShowGridLine { get; set; } 26 | 27 | public bool ShowAccuracyAreaGridLine { get; set; } 28 | public string AccuracyAreaGridLineColor { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Hanbo.Models/LanguageViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | public class LanguageViewModel 9 | { 10 | /// 11 | /// 顯示文字 12 | /// 13 | public string Text { get; set; } 14 | 15 | /// 16 | /// 語系英文代碼 17 | /// 18 | public string Code { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Hanbo.Models/LightDTO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | public class LightDTO 9 | { 10 | public string Channel { get; set; } 11 | public string Intensity { get; set; } 12 | public string OnOff { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Hanbo.Models/LightViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | public class LightViewModel 9 | { 10 | public List LightDTOs; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Hanbo.Models/MacroViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Linq; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Hanbo.Models 8 | { 9 | public class MacroViewModel 10 | { 11 | /// 12 | /// 巨集名稱 13 | /// 14 | public string Name { get; set; } 15 | 16 | /// 17 | /// 巨集描述 18 | /// 19 | public string Note { get; set; } 20 | 21 | public string MacroGuid { get; set; } 22 | 23 | /// 24 | /// 量測二進位資料 25 | /// 26 | public Binary MeasureBinData { get; set; } 27 | 28 | /// 29 | /// 量測參數 30 | /// 31 | public Binary MAParamBinData { get; set; } 32 | 33 | /// 34 | /// 訓練模型 ViewModel 35 | /// 36 | public ShapeViewModel TrainingModel { get; set; } 37 | 38 | public string SpecFilepath { get; set; } 39 | 40 | /// 41 | /// ShapeModelFilepath 42 | /// 43 | public string ModelFilepath { get; set; } 44 | 45 | public List Specs { get; set; } 46 | 47 | public string AlgoDLLFilepath { get; set; } 48 | 49 | /// 50 | /// CH1 光源亮度 51 | /// 52 | public string CH1 { get; set; } 53 | 54 | public bool CH1Switch { get; set; } 55 | 56 | /// 57 | /// CH2 光源亮度 58 | /// 59 | public string CH2 { get; set; } 60 | public bool CH2Switch { get; set; } 61 | 62 | /// 63 | /// CH3 光源亮度 64 | /// 65 | public string CH3 { get; set; } 66 | public string CH3Switch { get; set; } 67 | 68 | public string ExportUnit { get; set; } 69 | 70 | public double LengthX { get; set; } 71 | 72 | public double LengthY { get; set; } 73 | 74 | /// 75 | /// 工程圖縮圖 76 | /// 77 | public Binary Snapshot { get; set; } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Hanbo.Models/MeasureExportModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | public class MeasureExportModel 9 | { 10 | /// 11 | /// 名稱 12 | /// 13 | public string MeasureName { get; set; } 14 | 15 | /// 16 | /// 符號 17 | /// 18 | public string Symbol { get; set; } 19 | 20 | /// 21 | /// 量測值 22 | /// 23 | public string MeasureValue { get; set; } 24 | 25 | /// 26 | /// 設計值 27 | /// 28 | public string Standard { get; set; } 29 | 30 | /// 31 | /// 公差下限 32 | /// 33 | public string Min { get; set; } 34 | 35 | /// 36 | /// 公差上限 37 | /// 38 | public string Max { get; set; } 39 | 40 | /// 41 | /// 偏差 42 | /// 43 | public string Deviation { get; set; } 44 | 45 | /// 46 | /// 評估 47 | /// 48 | public string Evaluation { get; set; } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Hanbo.Models/PEGMoveViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | /// 9 | /// Position Event Generation (PEG) 移動用 ViewModel 10 | /// 11 | public class PEGMoveViewModel 12 | { 13 | /// 14 | /// X 方向移動 Pixel 15 | /// 16 | public int XMovePixel { get; set; } 17 | 18 | /// 19 | /// X 方向移動 Loop 20 | /// 21 | public int XMoveLoop { get; set; } 22 | 23 | /// 24 | /// Y 方向移動 Pixel 25 | /// 26 | public int YMovePixel { get; set; } 27 | 28 | /// 29 | /// Y 方向移動 Loop 30 | /// 31 | public int YMoveLoop { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Hanbo.Models/ProgGraphicModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | /// 9 | /// 用來描述工程圖形 10 | /// 11 | public class ProgGraphicModel 12 | { 13 | public string ID { get; set; } 14 | public string Nmae { get; set; } 15 | public bool IsExportItem { get; set; } 16 | 17 | public double StartPhi { get; set; } 18 | public double EndPhi { get; set; } 19 | public string PointerOrder { get; set; } 20 | 21 | public double RowBegin { get; set; } 22 | public double ColBegin { get; set; } 23 | public double RowEnd { get; set; } 24 | public double ColEnd { get; set; } 25 | public double Distance { get; set; }//pixels 26 | 27 | public string MeasureType { get; set; } 28 | 29 | //相依的ROI資訊 30 | public ProgGraphicModel[] ROIs { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Hanbo.Models/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Models")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Models")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b0ff4d1d-c242-4a1c-9e4c-f4e57ea8c5ad")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Models/ShapeViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | /// 9 | /// 訓練模型的資訊 10 | /// 11 | public class ShapeViewModel 12 | { 13 | /// 14 | /// 中心點 Row 15 | /// 16 | public double? Row { get; set; } 17 | 18 | /// 19 | /// 中心點 Col 20 | /// 21 | public double? Col { get; set; } 22 | 23 | /// 24 | /// 角度 25 | /// 26 | public double? Angle { get; set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Hanbo.Models/SpecViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.Models 7 | { 8 | public class SpecDTO 9 | { 10 | public string MeasureType; 11 | public string MeasureName { get; set; } 12 | 13 | public string Min { get; set; } 14 | 15 | public string Normal { get; set; } 16 | 17 | public string Max { get; set; } 18 | 19 | public string AssemblyFullName { get; set; } 20 | 21 | public string Unit { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Hanbo.PEG.Helper.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.PEG.Helper.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.PEG.Helper.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("c782293f-d9f5-4d14-8c67-853fd667aa98")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.PEG.Helper.Test/TestPEGCalculator.cs: -------------------------------------------------------------------------------- 1 | using Hanbo.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using Xunit; 7 | using Xunit.Extensions; 8 | 9 | namespace Hanbo.PEG.Helper.Test 10 | { 11 | 12 | public class TestPEGCalculator 13 | { 14 | [Theory] 15 | [InlineData(57344, 57344, 4096, 4096, 7, 7, 4096, 2)] 16 | [InlineData(200000, 200000, 4096, 4096, 7, 7, 4082, 12)] 17 | public void TestGetPEGMoveModel(int width, int height, int hResolution, int vResolution 18 | , double hPixelsize, double vPixelsize 19 | , int expectedXMovingPixels, int expectedXMoveLoop) 20 | { 21 | //assign 22 | var spec = new CameraSpecViewModel() 23 | { 24 | HorizontalPixelSize = hPixelsize, 25 | HorizontalResolution = hResolution, 26 | VerticalPixelSize = vPixelsize, 27 | VerticalResolution = vResolution, 28 | }; 29 | 30 | //act 31 | var model = PEGCalculator.GetPEGMoveModel(width, height, spec); 32 | 33 | //assert 34 | Assert.True(model.xMoveLoop == expectedXMoveLoop); 35 | Assert.True(model.XMovePixel == expectedXMovingPixels); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Hanbo.PEG.Helper.Test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.PEG.Helper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.PEG.Helper")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.PEG.Helper")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6d9ba5c3-5160-4f87-92aa-3f8cd6594072")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Resources/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.Resources")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.Resources")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("0b09599f-cf08-4ff0-a90f-4f2982776a4c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.Resources/ResourceImageForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace Hanbo.Resources 11 | { 12 | public partial class ResourceImageForm : Form 13 | { 14 | public ResourceImageForm() 15 | { 16 | InitializeComponent(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/3pointCircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/3pointCircle.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/3pointCircle_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/3pointCircle_blue.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/ExportFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/ExportFile.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/angle.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/angle_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/angle_blue32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/camera.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/clearList_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/clearList_32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/connect.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/coordinateXY_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/coordinateXY_24.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/crossPoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/crossPoint.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/crossPoint_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/crossPoint_blue32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/disconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/disconnect.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/distance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/distance.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/distanceX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/distanceX.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/distanceX_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/distanceX_32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/distanceY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/distanceY.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/distanceY_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/distanceY_32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/distance_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/distance_blue32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_arc.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_arc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_arc1.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_circle.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_circle_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_circle_blue32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_line.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_line_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_line_blue32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_point.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_point_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_point_blue32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_smart_arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_smart_arc.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/draw_smart_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/draw_smart_circle.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/folder_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/folder_image.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/grident_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/grident_22.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/lens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/lens.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/message_attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/message_attention.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/move.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/save.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/saveDraw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/saveDraw.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/stop.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/symmetryLine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/symmetryLine.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/symmetryLine_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/symmetryLine_blue32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/workspace_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/workspace_32.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/zoomLayer_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/zoomLayer_24.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/zoom_fit_best3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/zoom_fit_best3.png -------------------------------------------------------------------------------- /Hanbo.Resources/Resources/zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.Resources/Resources/zoom_in.png -------------------------------------------------------------------------------- /Hanbo.SDMS.ALGO/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Habo.SDMS.ALGO")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Habo.SDMS.ALGO")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4b4bf3e0-1264-42fb-8981-4fced71a5885")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.SDMS.Model/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /Hanbo.SDMS.Model/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Hanbo.SDMS.Model/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.SDMS.Model")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.SDMS.Model")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4a703f09-f556-4cfc-a230-a48c974ec383")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.SDMS.Model/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | <?xml version="1.0" encoding="utf-16"?> 7 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 8 | <ConnectionString>Data Source=.\sqlexpress;Initial Catalog=AOM_SDMS;User ID=hanbo_user</ConnectionString> 9 | <ProviderName>System.Data.SqlClient</ProviderName> 10 | </SerializableConnectionString> 11 | Data Source=.\sqlexpress;Initial Catalog=AOM_SDMS;User ID=hanbo_user 12 | 13 | 14 | <?xml version="1.0" encoding="utf-16"?> 15 | <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 16 | <ConnectionString>Data Source=.\sqlexpress;Initial Catalog=AOM_SDMS;User ID=hanbo_user</ConnectionString> 17 | <ProviderName>System.Data.SqlClient</ProviderName> 18 | </SerializableConnectionString> 19 | Data Source=.\sqlexpress;Initial Catalog=AOM_SDMS;User ID=hanbo_user 20 | 21 | 22 | -------------------------------------------------------------------------------- /Hanbo.SDMS.Model/SDMSDataContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Hanbo.SDMS.Model 8 | { 9 | public partial class SDMSDataContext 10 | { 11 | partial void OnCreated() 12 | { 13 | string connectionString = ConfigurationManager.ConnectionStrings["SDMSConnString"].ToString(); 14 | this.Connection.ConnectionString = connectionString; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Hanbo.SDMS.Model/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.System.SingleInstance.Test/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Hanbo.System.SingleInstance.Test/Configuration/CameraTest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | GigEVision 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | progressive 11 | -1 12 | default 13 | GtlForceIP=003053147091,192.168.0.22/24 14 | false 15 | default 16 | 003053147091_Basler_acA130060gc 17 | 0 18 | -1 19 | -------------------------------------------------------------------------------- /Hanbo.System.SingleInstance.Test/Configuration/DeviceCheckList.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Hanbo.System.SingleInstance.Test/DeviceCheckRepoTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Xunit.Extensions; 6 | using FluentAssertions; 7 | namespace Hanbo.System.SingleInstance.Test 8 | { 9 | public class DeviceCheckRepoTest 10 | { 11 | [Theory] 12 | [InlineData()] 13 | public void GetDeviceCheckListTest() 14 | { 15 | //assign 16 | var repo = new DeviceCheckRepo(); 17 | 18 | //act 19 | var checkList = repo.GetDeviceCheckList(); 20 | 21 | //assert 22 | checkList.Should().NotBeEmpty("必須有檢查裝置清單"); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Hanbo.System.SingleInstance.Test/DeviceCheckerTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Xunit.Extensions; 6 | using FluentAssertions; 7 | 8 | namespace Hanbo.System.SingleInstance.Test 9 | { 10 | public class DeviceCheckerTest 11 | { 12 | [Theory] 13 | [InlineData()] 14 | public void CCDCheckTest() 15 | { 16 | //assign 17 | 18 | //act 19 | var result = DeviceChecker.CCDCheck(); 20 | 21 | //assert 22 | result.Success.Should().BeTrue("CCD 要能連線!"); 23 | } 24 | 25 | [Theory] 26 | [InlineData()] 27 | public void DBCheckTest() 28 | { 29 | //assign 30 | 31 | //act 32 | var result = DeviceChecker.DBCheck(); 33 | 34 | //assert 35 | result.Success.Should().BeTrue("資料庫要能連線!"); 36 | } 37 | 38 | [Theory] 39 | [InlineData()] 40 | public void LightControlCheckTest() 41 | { 42 | //assign 43 | 44 | //act 45 | var result = DeviceChecker.LightControlCheck(); 46 | 47 | //assert 48 | result.Success.Should().BeTrue("光源要能連線!"); 49 | } 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Hanbo.System.SingleInstance.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.System.SingleInstance.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.System.SingleInstance.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5fd43aa0-9a51-4c6c-867f-e0af4d37fe7f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.System.SingleInstance.Test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.ToolStripUI.Helper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.ToolStripUI.Helper")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.ToolStripUI.Helper")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("df848297-cacb-43b4-a036-a54697dc4be4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Hanbo.ToolStripUI.Helper/ToolStripUIHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows.Forms; 6 | 7 | 8 | namespace Hanbo.ToolStripUI.Helper 9 | { 10 | public class ToolStripUIHelper 11 | { 12 | /// 13 | /// ToolStripButton 有設定 CheckOnClick 屬性為 true 的按鈕們,當 任一按鈕 Checked 時,其他按鈕 unChecked 14 | /// 15 | /// 16 | public static void SetSingleToolStripButtonOn(ToolStripButton btn, ToolStripButton[] excludeButtons) 17 | { 18 | if (btn.Checked) 19 | { 20 | var checkOnClickItems = btn.GetCurrentParent().Items.OfType() 21 | .Where(p => p.CheckOnClick == true && !p.Equals(btn)); 22 | if(excludeButtons != null) 23 | { 24 | checkOnClickItems = checkOnClickItems.Where(p => !excludeButtons.Contains(p)); 25 | } 26 | 27 | foreach (ToolStripButton checkOnClickToolStrip in checkOnClickItems) 28 | { 29 | checkOnClickToolStrip.Checked = false; 30 | } 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Hanbo.WindowControlWrapper/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Hanbo.WindowControlWrapper/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.WindowControlWrapper")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Hanbo.WindowControlWrapper")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a64f530e-91e8-4920-8524-b6256c421226")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.10")] 36 | [assembly: AssemblyFileVersion("1.0.0.10")] 37 | -------------------------------------------------------------------------------- /Hanbo.WindowControlWrapper/RefCoordinate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.WindowControlWrapper 7 | { 8 | public class RefCoordinate 9 | { 10 | public RefCoordinate() 11 | { 12 | ID = ""; 13 | Name = "Default"; 14 | Desc = "影像座標"; 15 | } 16 | /// 17 | /// 參考座標 ID 18 | /// 19 | public string ID { get; set; } 20 | 21 | /// 22 | /// 顯示名稱 23 | /// 24 | public string Name { get; set; } 25 | 26 | /// 27 | /// 描述 28 | /// 29 | public string Desc { get; set; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Hanbo.WindowControlWrapper/RefSkew.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.WindowControlWrapper 7 | { 8 | /// 9 | /// 參考軸擺正 10 | /// 11 | public class RefSkew 12 | { 13 | public RefSkew() 14 | { 15 | ID = ""; 16 | Name = "Default (0)"; 17 | Desc = "傾斜 0 度"; 18 | } 19 | /// 20 | /// 參考元素 ID 21 | /// 22 | public string ID { get; set; } 23 | 24 | /// 25 | /// 顯示名稱 26 | /// 27 | public string Name { get; set; } 28 | 29 | /// 30 | /// 描述 31 | /// 32 | public string Desc { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Hanbo.WindowControlWrapper/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/DemoForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace Hanbo.WindowsFormsControlLibrary 11 | { 12 | public partial class DemoForm : Form 13 | { 14 | public DemoForm() 15 | { 16 | InitializeComponent(); 17 | init(); 18 | } 19 | 20 | private void init() 21 | { 22 | //WinStatusStrip.my 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Enum/SystemStatusType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Hanbo.WindowsFormsControlLibrary.Enum 7 | { 8 | /// 9 | /// 狀態列 10 | /// 11 | public enum SystemStatusType 12 | { 13 | /// 14 | /// 連線狀態 15 | /// 16 | ConnectionStatus, 17 | /// 18 | /// 操作模式 19 | /// 20 | ControlMode, 21 | /// 22 | /// 影像座標 23 | /// 24 | Coordinate, 25 | /// 26 | /// 歸零座標 27 | /// 28 | CustomCoordinate, 29 | /// 30 | /// 灰階 31 | /// 32 | GrayLevel, 33 | /// 34 | /// 系統訊息 35 | /// 36 | SystemMsg, 37 | /// 38 | /// 縮放比例 39 | /// 40 | ZoomFactor, 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Hanbo.WindowsFormsControlLibrary")] 9 | [assembly: AssemblyDescription("Hanbo Customize WindowForms Controls Library")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Hanbo")] 12 | [assembly: AssemblyProduct("Hanbo.WindowsFormsControlLibrary")] 13 | [assembly: AssemblyCopyright("Copyright © Hanbo 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("66a882dd-86c8-4011-ab25-808a90b7141f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.2")] 36 | [assembly: AssemblyFileVersion("1.0.0.2")] 37 | -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/3pointCircle_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/3pointCircle_blue.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/ExportFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/ExportFile.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/angle_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/angle_blue32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/camera.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/clearList_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/clearList_32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/crossPoint_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/crossPoint_blue32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/distanceX_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/distanceX_32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/distanceY_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/distanceY_32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/distance_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/distance_blue32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/draw_circle_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/draw_circle_blue32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/draw_line_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/draw_line_blue32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/draw_point_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/draw_point_blue32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/draw_smart_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/draw_smart_line.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/draw_smart_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/draw_smart_point.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/folder_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/folder_image.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/lens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/lens.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/move.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/save.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/saveDraw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/saveDraw.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/stop.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/symmetryLine_blue32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/symmetryLine_blue32.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/zoom_fit_best3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/zoom_fit_best3.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/Resources/zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/Hanbo.WindowsFormsControlLibrary/Resources/zoom_in.png -------------------------------------------------------------------------------- /Hanbo.WindowsFormsControlLibrary/UserControls/CustomHalconControlDesigner.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows.Forms.Design; 7 | namespace Hanbo.WindowsFormsControlLibrary 8 | { 9 | public class CustomHalconControlDesigner : ControlDesigner 10 | { 11 | public override void Initialize(IComponent comp) 12 | { 13 | base.Initialize(comp); 14 | var uc = (CustomHalconControl)comp; 15 | EnableDesignMode(uc.HalconContainer, "Panel_Halcon"); 16 | //EnableDesignMode(uc.HalconWin, "HalconWin"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LightControl/CCSCommandModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class CCSCommandModel 9 | { 10 | public Dictionary ChannelCommands { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LightControl/CCSReceiveDataResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class CCSReceiveDataResolver 9 | { 10 | public static CCSReceiveMessageViewModel Resolve(string message) 11 | { 12 | /* Message 組成 13 | * header (1bit) + channel (2bit) + receiveCommand + checksum + Delimiter 14 | * ------------------------------ OK: | OF999.S99.L9 or O00 or O01 or "" |------------------------ 15 | * ------------------------------ NG: | N01 or N02 or N03 | 16 | */ 17 | var channel = (message.Length > 3) ? message.Substring(1, 2) : ""; 18 | var receiveCommand = (message.Length > 4) ? message.Substring(3, message.Length - 3) : ""; 19 | var status = receiveCommand.Length > 1 ? receiveCommand.Substring(0, 1) : "NG"; 20 | var commandStatus = status == "O" ? "OK" : "NG"; 21 | 22 | var modelParts = receiveCommand.Split('.'); 23 | var hasLightModeInfo = modelParts.Length > 2; 24 | var intensity = hasLightModeInfo ? modelParts[0].Substring(2, 3) : ""; 25 | var lightMode = hasLightModeInfo ? modelParts[1].Substring(1, 2) : ""; 26 | var onOff = hasLightModeInfo ? modelParts[2].Substring(1, 1) : ""; 27 | 28 | return new CCSReceiveMessageViewModel() 29 | { 30 | Channel = channel, 31 | Status = commandStatus, 32 | Intensity = intensity, 33 | LightMode = lightMode, 34 | OnOff = (onOff == "1") ? LightSwitch.On : LightSwitch.OFF 35 | }; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LightControl/CCSReceiveMessageViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class CCSReceiveMessageViewModel 9 | { 10 | public string Channel { get; set; } 11 | public string Intensity { get; set; } 12 | public LightSwitch OnOff { get; set; } 13 | public string Status { get; set; } 14 | 15 | public string LightMode { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /LightControl/ChannelStatusViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class ChannelStatusViewModel 9 | { 10 | public string CommandStatus { get; set; } 11 | 12 | public string Channel { get; set; } 13 | 14 | public string Intensity { get; set; } 15 | 16 | public string Mode { get; set; } 17 | 18 | public string StrobeTime { get; set; } 19 | 20 | public string OnOff { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LightControl/ConnectionEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class ConnectionEventArgs 9 | { 10 | public bool IsConnected { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LightControl/InstructionModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class InstructionModel 9 | { 10 | public string Instruction { get; set; } 11 | public string Data { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LightControl/LightControl.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LightControl", "LightControl.csproj", "{E21F80EB-CB40-469E-B1F0-0494AC4B40E9}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {E21F80EB-CB40-469E-B1F0-0494AC4B40E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {E21F80EB-CB40-469E-B1F0-0494AC4B40E9}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {E21F80EB-CB40-469E-B1F0-0494AC4B40E9}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {E21F80EB-CB40-469E-B1F0-0494AC4B40E9}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /LightControl/LightControlInitEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class LightControlInitEventArgs 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /LightControl/LightControllerResponseEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace LightControl 7 | { 8 | public class LightControllerResponseEventArgs 9 | { 10 | public bool IsConnected { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /LightControl/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("LightControl")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightControl")] 13 | [assembly: AssemblyCopyright("Copyright © 2012")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("aa6347cf-5920-40e2-ab8f-71a12034e8d4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /LightControl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /LightControlTest/CCSReceiveDataResolverTest.cs: -------------------------------------------------------------------------------- 1 | using LightControl; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using Xunit; 7 | using Xunit.Extensions; 8 | 9 | namespace LightControlTest 10 | { 11 | public class CCSReceiveDataResolverTest 12 | { 13 | [Theory] 14 | //[InlineData("@00O004F\r\n", "OK")] 15 | [InlineData("@00OF075.S04.L160\r\n", "OK")] 16 | [InlineData("@00N0351\r\n", "NG")] 17 | 18 | public void ResolveTest(string message, string expectedStatus) 19 | { 20 | //act 21 | var model = CCSReceiveDataResolver.Resolve(message); 22 | 23 | System.Diagnostics.Debug.WriteLine("channel :" + model.Channel); 24 | System.Diagnostics.Debug.WriteLine("intensity :" + model.Intensity); 25 | System.Diagnostics.Debug.WriteLine("lightmodel :" + model.LightMode); 26 | System.Diagnostics.Debug.WriteLine("onOff :" + model.OnOff); 27 | System.Diagnostics.Debug.WriteLine("status :" + model.Status); 28 | 29 | //assert 30 | Assert.True(model.Status == expectedStatus); 31 | } 32 | /* 33 | , 34 | @00N0250\r\n 35 | */ 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /LightControlTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("LightControlTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("LightControlTest")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2c79e06c-e05d-42d0-ac8e-841396d808bb")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /LightControlTest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /MatchingModule/MatchingAssistant.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/MatchingModule/MatchingAssistant.cs -------------------------------------------------------------------------------- /MatchingModule/MatchingParam.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/MatchingModule/MatchingParam.cs -------------------------------------------------------------------------------- /MatchingModule/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MatchingModule")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MatchingModule")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("47eb9794-c9e0-4e53-9dfa-c8fbbad319a3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MeasureModule.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MeasureModule.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MeasureModule.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3f4eb154-272d-4049-8130-66a050848b50")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MeasureModule.Test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /MeasureModule/Converter/ProgGraphicModelConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using ViewROI; 6 | using ViewROI.Model; 7 | namespace MeasureModule 8 | { 9 | /// 10 | /// 工程模形轉換器 11 | /// 12 | public class ProgGraphicModelConverter 13 | { 14 | public ROIProgDistance ConvertToROIProgDistance(ProgGraphicModel raw) 15 | { 16 | ROIProgDistance model = new ROIProgDistance(raw); 17 | return model; 18 | } 19 | 20 | public ROIProgCircle ConvertToROIProgCircle(ProgGraphicModel raw) 21 | { 22 | ROIProgCircle model = new ROIProgCircle(raw); 23 | return model; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /MeasureModule/Helper/PositionLocater.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MeasureModule 7 | { 8 | /// 9 | /// 位置定位器 10 | /// 影像經由 mathcing 後, Model 的中心位置與訓練時的影像中心位置已有變化 11 | /// 使用 PositionLocater, 重新定位 12 | /// 13 | public static class PositionLocater 14 | { 15 | /// 16 | /// 重定位 17 | /// 18 | /// 訓練圖形中心點 Row 19 | /// 訓練圖形中心點 Col 20 | /// 目前圖形 Angle 21 | /// (現在圖形中心點 Row - 訓練圖形中心點 Row 22 | /// (現在圖形中心點 Col - 訓練圖形中心點 Col 23 | /// 訓練圖形時設定的 ROI Row 24 | /// 訓練圖形時設定的 ROI Col 25 | /// 回傳值 - 重定位後的 Row 26 | /// 回傳值 - 重定位後的 Col 27 | public static void ReLocater(HTuple stdRow, HTuple stdCol, HTuple curModelAngle, HTuple offsetRow, HTuple offsetCol 28 | , HTuple roiRow, HTuple roiCol 29 | , out HTuple curROI_Row, out HTuple curROI_Col) 30 | { 31 | //roiRow = 1110; 32 | //roiCol = 630; 33 | 34 | //STD 向量 STD_A_1_1_ 35 | HTuple veterRow = roiRow - stdRow; 36 | HTuple vertCol = roiCol - stdCol; 37 | 38 | HTuple roiVeterCol = (vertCol * (curModelAngle.TupleCos())) + (veterRow * (curModelAngle.TupleSin())); 39 | HTuple roiVectorRow = (veterRow * (curModelAngle.TupleCos())) - (vertCol * (curModelAngle.TupleSin())); 40 | 41 | 42 | //目前圖形 A_1_1_ 位置 43 | curROI_Row = (stdRow + roiVectorRow) + offsetRow; 44 | curROI_Col = (stdCol + roiVeterCol) + offsetCol; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /MeasureModule/IMeasureGeoModel.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using ViewROI; 6 | 7 | namespace MeasureModule 8 | { 9 | /// 10 | /// 定義幾何量測資料模型 11 | /// 12 | public interface IMeasureGeoModel 13 | { 14 | 15 | /// 16 | /// 點1 Y or 圓心座標 Y 17 | /// 18 | HTuple Row1 { get; set; } 19 | 20 | /// 21 | /// 點1 X or 圓心座標 X 22 | /// 23 | HTuple Col1 { get; set; } 24 | 25 | /// 26 | /// 點 2 Y 27 | /// 28 | HTuple Row2 { get; set; } 29 | 30 | /// 31 | /// 點 2 X 32 | /// 33 | HTuple Col2 { get; set; } 34 | 35 | /// 36 | /// 半徑 or 距離 37 | /// 38 | HTuple Distance { get; set; } 39 | 40 | /// 41 | /// 幾何類型 42 | /// 43 | MeasureType GeoType { get; set; } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /MeasureModule/MeasureAssistantParam.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace MeasureModule 6 | { 7 | [Serializable] 8 | public class MeasureAssistantParam 9 | { 10 | // 11 | public double mThresh { get; set; } 12 | public double mSigma { get; set; } 13 | public double mRoiWidth { get; set; } 14 | public double mInitThresh { get; set; } 15 | public double mInitSigma { get; set; } 16 | public double mInitRoiWidth { get; set; } 17 | public string mTransition { get; set; } 18 | public string mPosition { get; set; } 19 | public string mInterpolation { get; set; } 20 | public int mDispEdgeLength { get; set; } 21 | public bool mDispROIWidth { get; set; } 22 | public bool mSelPair { get; set; } 23 | 24 | // 25 | public MeasureAssistantParam() 26 | { 27 | //初始化參數 28 | initParam(); 29 | } 30 | 31 | private void initParam() 32 | { 33 | this.mThresh = 40.0; 34 | this.mSigma = 1.0; 35 | this.mRoiWidth = 10; 36 | this.mInterpolation = "bilinear"; 37 | this.mSelPair = false; 38 | this.mTransition = "all"; 39 | this.mPosition = "last"; 40 | this.mDispEdgeLength = 30; 41 | this.mDispROIWidth = true; 42 | 43 | this.mInitThresh = 40.0; 44 | this.mInitSigma = 1.0; 45 | this.mInitRoiWidth = 10; 46 | } 47 | 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /MeasureModule/MeasureViewModel.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using ViewROI; 6 | 7 | namespace MeasureModule 8 | { 9 | 10 | /// 11 | /// 量測的呈現資料模形 12 | /// 13 | public class MeasureViewModel : IMeasureGeoModel 14 | { 15 | /// 16 | /// 點1 Y or 圓心座標 Y 17 | /// 18 | public HTuple Row1 { get; set; } 19 | 20 | /// 21 | /// 點1 X or 圓心座標 X 22 | /// 23 | public HTuple Col1 { get; set; } 24 | 25 | /// 26 | /// 點 2 Y 27 | /// 28 | public HTuple Row2 { get; set; } 29 | 30 | /// 31 | /// 點 2 X 32 | /// 33 | public HTuple Col2 { get; set; } 34 | 35 | /// 36 | /// 半徑 or 距離 37 | /// 38 | public HTuple Distance { get; set; } 39 | 40 | /// 41 | /// 起始角度 42 | /// 43 | public HTuple StartPhi { get; set; } 44 | 45 | /// 46 | /// 結束角度 47 | /// 48 | public HTuple EndPhi { get; set; } 49 | 50 | public HTuple PointOrder { get; set; } 51 | 52 | /// 53 | /// 幾何類型 54 | /// 55 | public MeasureType GeoType { get; set; } 56 | 57 | /// 58 | /// 角度 59 | /// 60 | public HTuple Angle { get; set; } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /MeasureModule/Measurement.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/MeasureModule/Measurement.cs -------------------------------------------------------------------------------- /MeasureModule/MeasurementEdge.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/MeasureModule/MeasurementEdge.cs -------------------------------------------------------------------------------- /MeasureModule/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /MeasureModule/Resolver/MeasureViewModelResolver.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using MeasureModule.ViewModel; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace MeasureModule.Resolver 8 | { 9 | /// 10 | /// 將 不同類型 ViewModel 轉換為 IMeasureGeoModel 介面 11 | /// 12 | public class MeasureViewModelResolver 13 | { 14 | 15 | public static IMeasureGeoModel Resolve(GeoDataGridViewModel rawModel) 16 | { 17 | MeasureViewModel model = null; 18 | if (rawModel != null) 19 | { 20 | model = new MeasureViewModel() 21 | { 22 | Row1 = new HTuple(rawModel.Row1), 23 | Row2 = new HTuple(rawModel.Row2), 24 | Col1 = new HTuple(rawModel.Col1), 25 | Col2 = new HTuple(rawModel.Col2), 26 | Distance = new HTuple(rawModel.Distance), 27 | GeoType = rawModel.GeoType 28 | }; 29 | } 30 | return model; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /MeasureModule/ResultDisplayViewModel.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace MeasureModule 7 | { 8 | //class ResultDisplayViewModel 9 | //{ 10 | //} 11 | 12 | /// 13 | /// 顯示圖形與文字的 ViewModel 14 | /// 15 | public class ResultDisplayViewModel 16 | { 17 | /// 18 | /// 圖形 19 | /// 20 | public HObject ImageXLD { get; set; } 21 | 22 | /// 23 | /// 顯示文字 24 | /// 25 | public string DisplayText { get; set; } 26 | 27 | /// 28 | /// 顯示位置 X 29 | /// 30 | public double PositionX { get; set; } 31 | 32 | /// 33 | /// 顯示位置 Y 34 | /// 35 | public double PositionY { get; set; } 36 | 37 | public double FirstArrowX { get; set; } 38 | public double FirstArrowY { get; set; } 39 | public double SecArrowX { get; set; } 40 | public double SecArrowY { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /MeasureModule/ResultModels/MeasurementResult.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/MeasureModule/ResultModels/MeasurementResult.cs -------------------------------------------------------------------------------- /MeasureModule/ResultModels/PointResult.cs: -------------------------------------------------------------------------------- 1 | using HalconDotNet; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace MeasureModule 8 | { 9 | public class PointResult : MeasureResult 10 | { 11 | /// 12 | /// 點1 Row 13 | /// 14 | public HTuple Row1; 15 | 16 | /// 17 | /// 點1 Col 18 | /// 19 | public HTuple Col1; 20 | 21 | public bool IsParallel; 22 | 23 | public PointResult() 24 | { 25 | 26 | } 27 | public PointResult(PointResult result) 28 | : this(result.Row1, result.Col1, result.IsParallel) 29 | { 30 | 31 | } 32 | 33 | public PointResult(HTuple row1, HTuple col1, bool isParallel) 34 | { 35 | this.Row1 = new HTuple(row1); 36 | this.Col1 = new HTuple(col1); 37 | this.IsParallel = isParallel; 38 | } 39 | public PointResult(double row1, double col1, bool isParallel) 40 | { 41 | this.Row1 = new HTuple(row1); 42 | this.Col1 = new HTuple(col1); 43 | this.IsParallel = isParallel; 44 | } 45 | /// 46 | /// 線段的顯示 viewModel 47 | /// 48 | /// 49 | public override ResultDisplayViewModel CreateDisplayViewModel() 50 | { 51 | HXLDCont cross = new HXLDCont(); 52 | var size = 15; 53 | var angle = 0.785398; 54 | cross.GenCrossContourXld(this.Row1, this.Col1, size, angle); 55 | 56 | return new ResultDisplayViewModel() 57 | { 58 | PositionX = this.Col1, 59 | PositionY = this.Row1, 60 | ImageXLD = cross, 61 | }; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /MeasureModule/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/LightChannel.cs: -------------------------------------------------------------------------------- 1 | using LightControl; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace PD3_Ethernet_LightControl 8 | { 9 | /// 10 | /// 光源頻道資訊 11 | /// 12 | public class LightChannel 13 | { 14 | public string Channel { get; set; } 15 | public int Intensity { get; set; } 16 | public LightSwitch OnOff { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/PD3-3024-3-EI_eng_001.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/PD3-3024-3-EI_eng_001.pdf -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace PD3_Ethernet_LightControl 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | //Application.Run(new DemoForm()); 19 | //Application.Run(new LightControlForm()); 20 | //Application.Run(new ProbeConnectionForm()); 21 | //Application.Run(new AsyncConnectionForm()); 22 | Application.Run(new CCSLightControlForm()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PD3_Ethernet_LightControl")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PD3_Ethernet_LightControl")] 13 | [assembly: AssemblyCopyright("Copyright © 2012")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("695c0119-c2b8-4da7-b949-5fec5268fef0")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18047 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PD3_Ethernet_LightControl.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/Resources/power_Off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/Resources/power_Off.png -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/Resources/power_Off_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/Resources/power_Off_48.png -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/Resources/power_On_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/Resources/power_On_48.png -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.dll -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.dll.tdnet: -------------------------------------------------------------------------------- 1 | 2 | xUnit.net {0}.{1}.{2} build {3} 3 | xunit.runner.tdnet.dll 4 | Xunit.Runner.TdNet.TdNetRunner 5 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.runner.msbuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.runner.msbuild.dll -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.runner.tdnet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.runner.tdnet.dll -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.runner.utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.1.9.1/lib/net20/xunit.runner.utility.dll -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.1.9.1/xunit.1.9.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.1.9.1/xunit.1.9.1.nupkg -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.1.9.1/xunit.1.9.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | xunit 5 | 1.9.1 6 | xUnit.net 7 | James Newkirk, Brad Wilson 8 | James Newkirk, Brad Wilson 9 | http://xunit.codeplex.com/license 10 | http://xunit.codeplex.com/ 11 | http://download.codeplex.com/Download?ProjectName=xunit&DownloadId=365445 12 | false 13 | xUnit.net is a developer testing framework, built to support Test Driven Development, with a design goal of extreme simplicity and alignment with framework features. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.extensions.1.9.1/lib/net20/xunit.extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.extensions.1.9.1/lib/net20/xunit.extensions.dll -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.extensions.1.9.1/xunit.extensions.1.9.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.extensions.1.9.1/xunit.extensions.1.9.1.nupkg -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.extensions.1.9.1/xunit.extensions.1.9.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | xunit.extensions 5 | 1.9.1 6 | xUnit.net: Extensions 7 | James Newkirk, Brad Wilson 8 | James Newkirk, Brad Wilson 9 | http://xunit.codeplex.com/license 10 | http://xunit.codeplex.com/ 11 | http://download.codeplex.com/Download?ProjectName=xunit&DownloadId=365445 12 | false 13 | Extensions for the xUnit.net framework, including data theories (data-driven tests) and several extension attributes. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 14 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.x86.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.clr4.x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 14 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 14 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.x86.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.console.x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 14 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.clr4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.clr4.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.clr4.x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.clr4.x86.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.gui.x86.exe -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.runner.msbuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.runner.msbuild.dll -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.runner.utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/tools/xunit.runner.utility.dll -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/xunit.runners.1.9.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/xunit.runners.1.9.1.nupkg -------------------------------------------------------------------------------- /PD3_Ethernet_LightControl/packages/xunit.runners.1.9.1/xunit.runners.1.9.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | xunit.runners 5 | 1.9.1 6 | xUnit.net: Runners 7 | James Newkirk, Brad Wilson 8 | James Newkirk, Brad Wilson 9 | http://xunit.codeplex.com/license 10 | http://xunit.codeplex.com/ 11 | http://download.codeplex.com/Download?ProjectName=xunit&DownloadId=365445 12 | false 13 | Runners for the xUnit.net framework, including Console, GUI, and MSBuild. 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | HanboAOMClassLibrary 2 | ==================== 3 | 4 | Hanbo AOM Class Library 5 | -------------------------------------------------------------------------------- /SDMSRepoTest/Data/importMacroPlan.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/SDMSRepoTest/Data/importMacroPlan.data -------------------------------------------------------------------------------- /SDMSRepoTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SDMSRepoTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SDMSRepoTest")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("fd6fc6f7-806a-425d-981f-2f7b6e1183cd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /SDMSRepoTest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ThirdParty/ComboBox/OldNewEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CustomComboBox 4 | { 5 | public class OldNewEventArgs : EventArgs 6 | { 7 | public OldNewEventArgs(T oldValue, T newValue) 8 | { 9 | OldValue = oldValue; 10 | NewValue = newValue; 11 | } 12 | 13 | public T OldValue 14 | { 15 | get { return this.m_oldValue; } 16 | protected set { this.m_oldValue = value; } 17 | } 18 | public T NewValue 19 | { 20 | get { return this.m_newValue; } 21 | protected set { this.m_newValue = value; } 22 | } 23 | 24 | T m_oldValue = default(T); 25 | T m_newValue = default(T); 26 | } 27 | 28 | public delegate void OldNewEventHandler(object sender, OldNewEventArgs e); 29 | } 30 | -------------------------------------------------------------------------------- /ThirdParty/ComboBox/readme.txt: -------------------------------------------------------------------------------- 1 | http://www.codeproject.com/Articles/25471/Customizable-ComboBox-Drop-Down 2 | License 3 | This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3) -------------------------------------------------------------------------------- /ThirdParty/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ThirdParty")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ThirdParty")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4ee63342-7b55-4f99-9bbe-b0b33ee328c9")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.1")] 36 | [assembly: AssemblyFileVersion("1.0.0.1")] 37 | -------------------------------------------------------------------------------- /ViewROI/HObjectEntry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using HalconDotNet; 3 | using System.Collections; 4 | 5 | 6 | 7 | namespace ViewROI 8 | { 9 | 10 | /// 11 | /// This class is an auxiliary class, which is used to 12 | /// link a graphical context to an HALCON object. The graphical 13 | /// context is described by a hashtable, which contains a list of 14 | /// graphical modes (e.g GC_COLOR, GC_LINEWIDTH and GC_PAINT) 15 | /// and their corresponding values (e.g "blue", "4", "3D-plot"). These 16 | /// graphical states are applied to the window before displaying the 17 | /// object. 18 | /// 19 | public class HObjectEntry 20 | { 21 | /// Hashlist defining the graphical context for HObj 22 | public Hashtable gContext; 23 | 24 | /// HALCON object 25 | public HObject HObj; 26 | 27 | 28 | 29 | /// Constructor 30 | /// 31 | /// HALCON object that is linked to the graphical context gc. 32 | /// 33 | /// 34 | /// Hashlist of graphical states that are applied before the object 35 | /// is displayed. 36 | /// 37 | public HObjectEntry(HObject obj, Hashtable gc) 38 | { 39 | gContext = gc; 40 | HObj = obj; 41 | } 42 | 43 | /// 44 | /// Clears the entries of the class members Hobj and gContext 45 | /// 46 | public void clear() 47 | { 48 | gContext.Clear(); 49 | HObj.Dispose(); 50 | } 51 | 52 | }//end of class 53 | }//end of namespace 54 | -------------------------------------------------------------------------------- /ViewROI/HWndCtrl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/ViewROI/HWndCtrl.cs -------------------------------------------------------------------------------- /ViewROI/Interface/IContinueZoom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace ViewROI.Interface 7 | { 8 | /// 9 | /// 製作 ROI 時,會產生 Zoom Window, 等待使用者點擊 N 次後結束 ZoomWindow 10 | /// 11 | public interface IContinueZoom 12 | { 13 | /// 14 | /// 等待滑鼠點擊 N 次, 取得座標 15 | /// 16 | /// 滑鼠座標 x 17 | /// 滑鼠座標 y 18 | /// 19 | bool WaitForClickPoints(double x, double y); 20 | 21 | /// 22 | /// 已點擊次數 23 | /// 24 | int ClickedPoints { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ViewROI/Interface/IProg.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using ViewROI.Model; 6 | 7 | namespace ViewROI.Interface 8 | { 9 | /// 10 | /// 具有工程圖模型 11 | /// 12 | public interface IProg 13 | { 14 | ProgGraphicModel GetProgGraphicModel(); 15 | void SetCustomPos(double userDefineX, double userDefineY); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ViewROI/Interface/IROIModelUpdateable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace ViewROI.Interface 7 | { 8 | public interface IROIModelUpdateable 9 | { 10 | void UpdateROIModel(ROIViewModel updateModel); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ViewROI/MeasureParameter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ViewROI 6 | { 7 | public class MeasureParameter 8 | { 9 | /// 10 | /// Sigma of gaussian smoothing. 11 | /// Default value: 1.0 12 | /// 13 | public double Sigma { get; set; } 14 | 15 | /// 16 | /// Minimum edge amplitude 17 | /// Salient edges can be selected with the parameter Threshold, which constitutes a threshold on the amplitude 18 | /// 19 | public double Threshold { get; set; } 20 | 21 | /// 22 | /// Light/dark or dark/light edge. 23 | /// Default value: 'all' 24 | /// List of values: 'all', 'positive', 'negative' 25 | /// 26 | public string Transition { get; set; } 27 | 28 | /// 29 | /// Selection of end points. 30 | /// Default value: 'all' 31 | /// List of values: 'all', 'first', 'last' 32 | /// 33 | public string Select { get; set; } 34 | 35 | /* 36 | * 37 | this.mThresh = 40.0; 38 | this.mSigma = 1.0; 39 | this.mRoiWidth = 10; 40 | this.mInitThresh = 40.0; 41 | this.mInitSigma = 1.0; 42 | this.mInitRoiWidth = 10; 43 | this.mTransition = "all"; 44 | this.mPosition = "last"; 45 | this.mInterpolation = "bilinear"; 46 | this.mDispEdgeLength = 30; 47 | this.mDispROIWidth = true; 48 | this.mSelPair = false; 49 | 50 | 51 | 52 | 53 | this.setUnit("cm"); 54 | 55 | 56 | 57 | */ 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /ViewROI/Model/PositionModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ViewROI.Model 6 | { 7 | public class PositionModel 8 | { 9 | public double RowBegin; 10 | public double ColBegin; 11 | public double RowEnd; 12 | public double ColEnd; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ViewROI/Model/ProgGraphicModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ViewROI.Model 6 | { 7 | /// 8 | /// 用來描述工程圖形 9 | /// 10 | public class ProgGraphicModel 11 | { 12 | /// 13 | /// 工程圖 ID = Record ID 14 | /// 15 | public string ID { get; set; } 16 | 17 | /// 18 | /// 工程圖顯示的文字 19 | /// 20 | public string Name { get; set; } 21 | 22 | /// 23 | /// Y 起始點 24 | /// 25 | public double RowBegin { get; set; } 26 | 27 | /// 28 | /// X 起始點 29 | /// 30 | public double ColBegin { get; set; } 31 | 32 | /// 33 | /// Y 終點 34 | /// 35 | public double RowEnd { get; set; } 36 | 37 | /// 38 | /// X 終點 39 | /// 40 | public double ColEnd { get; set; } 41 | 42 | /// 43 | /// 兩元素距離 (pixels) 44 | /// 45 | public double Distance { get; set; }//pixels 46 | 47 | /// 48 | /// 量測類型 49 | /// 50 | public MeasureType GeoType { get; set; } 51 | 52 | public bool IsExportItem { get; set; } 53 | public double StartPhi { get; set; } 54 | public double EndPhi { get; set; } 55 | public string PointerOrder { get; set; } 56 | 57 | //相依的ROI資訊 58 | public ProgGraphicModel[] ROIs { get; set; } 59 | 60 | /// 61 | /// 使用者定義的 工程圖中心點位置 x 座標 62 | /// 63 | public Double? UserDefineCenterCol { get; set; } 64 | 65 | /// 66 | /// 使用者定義的 工程圖中心點位置 y 座標 67 | /// 68 | public Double? UserDefineCenterRow { get; set; } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /ViewROI/ROI.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/ViewROI/ROI.cs -------------------------------------------------------------------------------- /ViewROI/ROICircle.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/ViewROI/ROICircle.cs -------------------------------------------------------------------------------- /ViewROI/ROIController.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/ViewROI/ROIController.cs -------------------------------------------------------------------------------- /ViewROI/ROIRectangle2.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Joncash/HanboAOMClassLibrary/b1142358287647802772cc8fa99c3a3820b4bb69/ViewROI/ROIRectangle2.cs -------------------------------------------------------------------------------- /ViewROI/ROIViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ViewROI 6 | { 7 | /// 8 | /// 記錄 ROI 型態及資料 9 | /// 10 | [Serializable] 11 | public class ROIViewModel 12 | { 13 | /// 14 | /// ROI ID 15 | /// 16 | public string ID { get; set; } 17 | 18 | /// 19 | /// ROI 中心位置 Row 座標 20 | /// 21 | public double CenterRow { get; set; } 22 | 23 | /// 24 | /// ROI 中心位置 Col 座標 25 | /// 26 | public double CenterCol { get; set; } 27 | 28 | /// 29 | /// ROI 角度 30 | /// 31 | public double Phi { get; set; } 32 | 33 | /// 34 | /// ROI 長 => length1 35 | /// 36 | public double Length { get; set; } 37 | 38 | /// 39 | /// ROI 寬 => length2 40 | /// 41 | public double Width { get; set; } 42 | 43 | /// 44 | /// ROI 半徑 45 | /// 46 | public double Radius { get; set; } 47 | 48 | /// 49 | /// ROI 類型, Recontange1, or ROI Circle 50 | /// 51 | public int ROIType { get; set; } 52 | 53 | /// 54 | /// 重建模型資料 55 | /// 56 | /// 57 | public ROI MakeROI() 58 | { 59 | ROI roi = null; 60 | switch (ROIType) 61 | { 62 | case ROI.ROI_TYPE_RECTANGLE2: 63 | roi = new ROIRectangle2(); 64 | (roi as ROIRectangle2).MakeROI(CenterRow, CenterCol, Phi, Length, Width); 65 | break; 66 | case ROI.ROI_TYPE_CIRCLE: 67 | roi = new ROICircle(); 68 | (roi as ROICircle).MakeROI(CenterRow, CenterCol, Radius); 69 | break; 70 | } 71 | if (roi != null) roi.ID = this.ID; 72 | return roi; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /ViewROI/ViewROI.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ViewROI", "ViewROI.csproj", "{C4F5C5DE-7EA8-47FE-8218-48138F48965F}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {C4F5C5DE-7EA8-47FE-8218-48138F48965F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 13 | {C4F5C5DE-7EA8-47FE-8218-48138F48965F}.Debug|Any CPU.Build.0 = Debug|Any CPU 14 | {C4F5C5DE-7EA8-47FE-8218-48138F48965F}.Release|Any CPU.ActiveCfg = Release|Any CPU 15 | {C4F5C5DE-7EA8-47FE-8218-48138F48965F}.Release|Any CPU.Build.0 = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | --------------------------------------------------------------------------------