Commit 84424b84 顾剑亮

create calcsize

1 个父辈 c03cb254
正在显示 123 个修改的文件 包含 1718 行增加36 行删除
此文件类型无法预览

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30104.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalcSize", "CalcSize\CalcSize.csproj", "{1ECDA4E0-E1BF-4B1C-9A1F-E012D7590358}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1ECDA4E0-E1BF-4B1C-9A1F-E012D7590358}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1ECDA4E0-E1BF-4B1C-9A1F-E012D7590358}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1ECDA4E0-E1BF-4B1C-9A1F-E012D7590358}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1ECDA4E0-E1BF-4B1C-9A1F-E012D7590358}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {805A3288-D753-4EE6-8E0B-F92FC95A4436}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>1ecda4e0-e1bf-4b1c-9a1f-e012d7590358</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CalcSize</RootNamespace>
<AssemblyName>CalcSize</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Xml.Linq"/>
<Reference Include="System.Data.DataSetExtensions"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="System.Data"/>
<Reference Include="System.Net.Http"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Asa
{
public class CalcSize
{
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CalcSize")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CalcSize")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("1ecda4e0-e1bf-4b1c-9a1f-e012d7590358")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Drawing.Printing; using System.Drawing.Printing;
using System.Linq; using System.Linq;
...@@ -20,6 +21,7 @@ namespace Asa ...@@ -20,6 +21,7 @@ namespace Asa
private const int HEIGHT = 2816; private const int HEIGHT = 2816;
private const int HEAD = 65536; private const int HEAD = 65536;
/// <summary> /// <summary>
/// 窗宽 /// 窗宽
/// </summary> /// </summary>
...@@ -140,58 +142,232 @@ namespace Asa ...@@ -140,58 +142,232 @@ namespace Asa
} }
public Bitmap Get16bImage()
{
int count = WIDTH * HEIGHT;
byte[] gray = new byte[count * 2];
Array.Copy(src, HEAD, gray, 0, gray.Length);
Bitmap bmp = new Bitmap(WIDTH, HEIGHT, System.Drawing.Imaging.PixelFormat.Format16bppGrayScale);
System.Drawing.Imaging.BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, WIDTH, HEIGHT), System.Drawing.Imaging.ImageLockMode.ReadWrite, bmp.PixelFormat);
Marshal.Copy(gray, 0, bmpData.Scan0, bmpData.Stride * HEIGHT);
bmp.UnlockBits(bmpData);
return bmp;
}
internal void Process([In, Out] int nEventID, [In, Out] API.CR_Event pEvent)
{
Debug.Print("nEventID=" + nEventID);
}
public void GetInfo()
{
int idx = 1;
int rtn;
//CCallbackImp pCallback = new CCallbackImp();
//rtn = API.CR_RegisterEventCallback(pCallback);
API.CallbackDelegate callback = Process;
rtn = API.CR_RegisterEventCallback(callback);
rtn = API.CR_Connect(idx);
//rtn = API.CR_GetSystemInformation(idx, out API.CR_SystemInfo pSystemInformation);
//rtn = API.CR_GetDetectorIndexAndIPAddress(out API.CR_DetrIdxAndIPAddr pDetrIdxAndIPAddr, out int pDetrNum);
//int len = Array.FindIndex(pDetrIdxAndIPAddr.szIPAddr, b => b == 0);
//string s = Encoding.ASCII.GetString(pDetrIdxAndIPAddr.szIPAddr, 0, len);
rtn = API.CR_ResetDetector(idx, false);
API.CR_ModeInfo[] pModeInfo = new API.CR_ModeInfo[16];
for (int i = 0; i < pModeInfo.Length; i++)
pModeInfo[i] = new API.CR_ModeInfo();
rtn = API.CR_GetApplicationMode(idx, pModeInfo, out int pModeNum);
//IntPtr ptr = new IntPtr();
//rtn = API.CR_GetApplicationMode(idx, out ptr, out pModeNum);
//IntPtr infosIntptr = Marshal.AllocHGlobal(size * pModeNum);
//API.CR_ModeInfo[] infos = new API.CR_ModeInfo[pModeNum];
//for (int i = 0; i < pModeNum; i++)
//{
// IntPtr aaa = new IntPtr((ptr.ToInt64() + i * size));
// infos[i] = (API.CR_ModeInfo)Marshal.PtrToStructure(aaa, typeof(API.CR_ModeInfo));
//}
//Marshal.FreeHGlobal(ptr);
//DeviceInfoList[i] = (DeviceInfo)Marshal.PtrToStructure(pPonitor, typeof(DeviceInfo));
//API.CR_ModeInfo[] pModeInfo = new API.CR_ModeInfo[pModeNum];
//Marshal.PtrToStructure(ptr, pModeInfo[0]);
//object obj = Marshal.PtrToStructure(ptr, typeof(API.CR_ModeInfo));
//pModeInfo = (API.CR_ModeInfo[])obj;
//byte[] des = new byte[1];
//Marshal.Copy(ptr, des, 0, des.Length);
rtn = API.CR_SetApplicationMode(idx, pModeInfo[2].nModeID);
byte[] buff = new byte[WIDTH * HEIGHT * 2 + HEAD];
rtn = API.CR_StartAcquisition(idx, 1, ref buff);
System.Threading.Thread.Sleep(2000);
rtn = API.CR_StopAcquisition(idx);
rtn = API.CR_Disconnect(idx);
}
}
internal class CCallbackImp : API.ICallback
{
internal override void Process(int nEventID, IntPtr pEvent)
{
Debug.Print("nEventID=" + nEventID);
}
} }
internal static class API internal static class API
{ {
//CARERAY_API_PORT int CR_GetDetectorIndexAndIPAddress(CR_DetrIdxAndIPAddr* pDetrIdxAndIPAddr, int* pDetrNum);
[DllImport("CRInterface.dll")] [DllImport("CRInterface.dll")]
public static extern int CR_Connect(int nDetrIndex); internal static extern int CR_Connect(int nDetrIndex);
[DllImport("CRInterface.dll")]
internal static extern int CR_Disconnect(int nDetrIndex);
[DllImport("CRInterface.dll")]
internal static extern int CR_GetSystemInformation(int nDetrIndex, out CR_SystemInfo pSystemInformation);
[DllImport("CRInterface.dll")]
internal static extern int CR_ResetDetector(int nDetrIndex, bool needReboot);
[DllImport("CRInterface.dll")]
internal static extern int CR_StartAcquisition(int nDetrIndex, int nFrameNum, ref byte[] pBuffer, int nNumFrmReqFromDetr = -1); // nNumFrmReqFromDetr == -1 means that detector sends out frames continuously until StopAcquisition() is received.
[DllImport("CRInterface.dll")]
internal static extern int CR_StopAcquisition(int nDetrIndex);
[DllImport("CRInterface.dll")]
internal static extern int CR_RegisterEventCallback(CallbackDelegate pCallback);
//internal static extern int CR_RegisterEventCallback(IntPtr pCallback);
[DllImport("CRInterface.dll")]
internal static extern int CR_SetApplicationMode(int nDetrIndex, int nModeIndex);
//[DllImport("CRInterface.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
[DllImport("CRInterface.dll")]
internal static extern int CR_GetApplicationMode(int nDetrIndex, [In, Out] CR_ModeInfo[] pModeInfo, out int pModeNum);
[DllImport("CRInterface.dll")] [DllImport("CRInterface.dll")]
public static extern int CR_Disconnect(int nDetrIndex); internal static extern int CR_GetDetectorIndexAndIPAddress(out CR_DetrIdxAndIPAddr pDetrIdxAndIPAddr, out int pDetrNum);
//CARERAY_API_PORT int CR_ResetDetector(int nDetrIndex, bool needReboot);
//CARERAY_API_PORT int CR_DoSelfTest(int nDetrIndex);
//CARERAY_API_PORT int CR_GetSystemInformation(int nDetrIndex, CR_SystemInfo* pSystemInformation);
//CARERAY_API_PORT int CR_GetApplicationMode(int nDetrIndex, CR_ModeInfo* pModeInfo, int* pModeNum);
//CARERAY_API_PORT int CR_SetApplicationMode(int nDetrIndex, int nModeIndex);
//CARERAY_API_PORT int CR_SetApplicationModeWithParam(int nDetrIndex, int nModeIndex, float* pFrameRate, int* pExposureTime, int nTriggType, int nGainIndex); //CARERAY_API_PORT int CR_SetApplicationModeWithParam(int nDetrIndex, int nModeIndex, float* pFrameRate, int* pExposureTime, int nTriggType, int nGainIndex);
//CARERAY_API_PORT int CR_StartAcquisition(int nDetrIndex, int nFrameNum, void* pBuffer, int nNumFrmReqFromDetr = -1); // nNumFrmReqFromDetr == -1 means that detector sends out frames continuously until StopAcquisition() is received.
//CARERAY_API_PORT int CR_StopAcquisition(int nDetrIndex);
//CARERAY_API_PORT int CR_GetDetrStatus(int nDetrIndex, CR_DetrStatus* pDetrStatus); //CARERAY_API_PORT int CR_GetDetrStatus(int nDetrIndex, CR_DetrStatus* pDetrStatus);
//CARERAY_API_PORT int CR_StartDarkCalibration(int nDetrIndex); //CARERAY_API_PORT int CR_StartDarkCalibration(int nDetrIndex);
//CARERAY_API_PORT int CR_StartGainCalibration(int nDetrIndex); //CARERAY_API_PORT int CR_StartGainCalibration(int nDetrIndex);
//CARERAY_API_PORT int CR_StopCalibration(int nDetrIndex); //CARERAY_API_PORT int CR_StopCalibration(int nDetrIndex);
//CARERAY_API_PORT int CR_QueryCalibrationStatus(int nDetrIndex, CR_CalibrationInfo* pCalProgInfo); //CARERAY_API_PORT int CR_QueryCalibrationStatus(int nDetrIndex, CR_CalibrationInfo* pCalProgInfo);
//CARERAY_API_PORT int CR_RegisterEventCallback(int nDetrIndex, ICallback* pCallback);
internal delegate void CallbackDelegate([In, Out] int nEventID, [In, Out] CR_Event pEvent);
internal abstract class ICallback
{
internal abstract void Process(int nEventID, IntPtr pEvent);
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct CR_Event
{
internal int nDetrIndex;
internal int nWidth; // Same as CR_ModeInfo.nImageWidth, see A.4
internal int nHeight; // Same as CR_ModeInfo.nImageHeight, see A.4
internal int nPixelDepth;
//[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15925248)]
//internal byte[] pData; // Event-related data
internal IntPtr pData;
}
struct CR_SystemInfo [StructLayout(LayoutKind.Sequential)]
internal struct CR_SystemInfo
{ {
uint nRawImageWidth; internal uint nRawImageWidth;
uint nRawImageHeight; internal uint nRawImageHeight;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
byte[] szHardwareVersion; internal byte[] szHardwareVersion;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
byte[] szSerialNumber; internal byte[] szSerialNumber;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
byte[] szSoftwareVersion; internal byte[] szSoftwareVersion;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
byte[] szFirmwareVersion; internal byte[] szFirmwareVersion;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
byte[] szDetrMachineID; internal byte[] szDetrMachineID;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
byte[] szDetrDesc; internal byte[] szDetrDesc;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)]
byte[] szReserved; internal byte[] szReserved;
} }
}
[StructLayout(LayoutKind.Sequential)]
internal struct CR_ModeInfo
{
internal int nModeID; // Application mode ID
internal int nImageWidth;
internal int nImageHeight;
internal int nCutoffX;
internal int nCutoffY;
internal int nBinX; // Binning scheme along X direction
internal int nBinY; // Binning scheme along Y direction
internal float fMaxFrmRate; // Maximal frame rate in fps
internal int nMaxExpTime; // Maximal exposure time in ms
internal int nPixelDepth; // Pixel depth in bits
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
internal int[] nTrigTypes;
internal int nTrigTypeNum; // 0 - 15
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
internal int[] nGainLevels;
internal int nGainLevelNum; // 0 - 15
internal int nDefaultTrigType; // Default trigger type
internal int nDefaultGainLevel; // Default gain level
internal int nRoiX;
internal int nRoiY;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
internal byte[] szDesc; // Additional description
}
[StructLayout(LayoutKind.Sequential)]
internal struct CR_DetrIdxAndIPAddr
{
internal int nIdx; // Detector index
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
internal byte[] szIPAddr; // Associated IP address
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
internal byte[] szReserved;
}
}
} }
...@@ -11,3 +11,4 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\C ...@@ -11,3 +11,4 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\C
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csproj.CoreCompileInputs.cache D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.dll D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.pdb D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csprojAssemblyReference.cache
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
...@@ -115,11 +116,22 @@ ...@@ -115,11 +116,22 @@
this.label2.TabIndex = 5; this.label2.TabIndex = 5;
this.label2.Text = "窗位"; this.label2.Text = "窗位";
// //
// button2
//
this.button2.Location = new System.Drawing.Point(23, 230);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 6;
this.button2.Text = "button2";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.button2);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Controls.Add(this.numericUpDown2); this.Controls.Add(this.numericUpDown2);
...@@ -128,6 +140,7 @@ ...@@ -128,6 +140,7 @@
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Name = "Form1"; this.Name = "Form1";
this.Text = "Form1"; this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
...@@ -144,6 +157,7 @@ ...@@ -144,6 +157,7 @@
private System.Windows.Forms.NumericUpDown numericUpDown2; private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button2;
} }
} }
...@@ -19,18 +19,30 @@ namespace CarerayImage_Test ...@@ -19,18 +19,30 @@ namespace CarerayImage_Test
InitializeComponent(); InitializeComponent();
} }
private void Form1_Load(object sender, EventArgs e)
{
careray = new Asa.CarerayImage();
}
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
OpenFileDialog dlg = new OpenFileDialog { Filter = "RAW|*.raw" }; OpenFileDialog dlg = new OpenFileDialog { Filter = "RAW|*.raw" };
if (dlg.ShowDialog() == DialogResult.Cancel) return; if (dlg.ShowDialog() == DialogResult.Cancel) return;
careray = new Asa.CarerayImage();
careray.LoadRAW(dlg.FileName); careray.LoadRAW(dlg.FileName);
pictureBox1.Image = careray.Get48bImage(); //pictureBox1.Image = careray.Get48bImage();
Bitmap bmp = careray.Get48bImage();
pictureBox1.Image = bmp;
//Bitmap bmp = careray.Get16bImage();
bmp.Save(@"C:\Users\neotel\Desktop\20200520X-ray\11.png", System.Drawing.Imaging.ImageFormat.Png);
//bmp.Save(@"C:\Users\neotel\Desktop\20200520X-ray\11.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
} }
private void numericUpDown1_ValueChanged(object sender, EventArgs e) private void numericUpDown1_ValueChanged(object sender, EventArgs e)
...@@ -44,5 +56,12 @@ namespace CarerayImage_Test ...@@ -44,5 +56,12 @@ namespace CarerayImage_Test
careray.WindowLevel = Convert.ToInt32(numericUpDown2.Value); careray.WindowLevel = Convert.ToInt32(numericUpDown2.Value);
pictureBox1.Image = careray.Get48bImage(); pictureBox1.Image = careray.Get48bImage();
} }
private void button2_Click(object sender, EventArgs e)
{
careray.GetInfo();
}
} }
} }
;IP address of the Server
ServerAddr = 127.0.0.1
;Base port number of the Server
;ServerBasePort must be an odd number
ServerBasePort = 3009
;Possible follow-up action to the Server executable when launching API
;Specify ServerAutoLaunchOpt as one of [ 0 : do not launch Server | 1 : automatically launch Server without a console window | 2 : automatically launch Server with a console window ]
ServerAutoLaunchOpt = 1
[General]
200001=Warning: Invalid error ID: {1}.
200002=Warning: {1} field(s) expected, but only {2} field(s) provided.
200003=Warning: NULL pointer detected at {1}.
300004=Error: Failed to open file [{1}].
300005=Error: Failed to write file [{1}].
300006=Error: Failed to allocate buffer.
300007=Error: No corresponding message.
[Detector]
301001=Error: Invalid command ID.
301002=Error: Invalid parameter {1} in function {2}.
301003=Error: Input value expected in function {1}.
301004=Error: Missing parameter \"{1}\" in function {2}.
301101=Error: Application mode undefined in function {1}.
301102=Error: Synchronization mode undefined in function {1}.
301201=Error: Fail to set detector version {1}.
301202=Error: Fail to set detector date and time.
301203=Error: Detector has unsent images.
301204=Error: Application mode cannot be changed during the course of image transfer. Call StopAquisition before switching application mode.
301205=Error: Fail to access FPGA register in line {1} in function {2}.
301206=Error: Fail to stop acquisition in function {1} line {2}.
301207=Error: Fail to get detector machine ID.
301208=Error: Fail to set application mode in line {1} in function {2}.
301209=Error: Fail to set synchronization mode in line {1} in function {2}.
301210=Error: Fail to set exposure time in line {1} in function {2}.
301301=Error: Wrong parameter \"frmtype\" in function {1}. Actual value is {2}, while the expected value is {3}, {4} or {5}.
301302=Error: Wrong value of \"{1}\" in function {2}. Actual value is {3}, while the expected value is smaller than or equal to {4}.
301303=Error: Wrong value of \"{1}\" in function {2}. Actual value is {3}, while the expected value is smaller than {4}.
301304=Error: unsupported power mode {1}.
301305=Error: invalid power mode {1}.
301306=Error: Exposure time {1} is larger than the maximun limit {2} in mode {3}.
301307=Error: Frame rate {1} is larger than the maximun limit {2} in mode {3}.
[Command]
//?02001=
[Common]
//?03001=
[Data]
//?04001=
204001=Warning: Fail to load calibration data [{1}], please make sure the related calibration [{2}] is performed.
304001=Error: Calibration directory {1} doesn't exist.
304002=Error: Calibration file {1} doesn't exist.
304003=Error: Invalid calibration file size, current is {1}, expected {2}.
304004=Error: Fail to parse defect info from defect file {1}, current application mode is {2}, gain is {3}
[Network]
//?05001=
[ImageProcessing]
//?06001=
206001=Warning: Fail to perform offset correction on frame {1}.
206002=Warning: Fail to perform gain correction on frame {1}.
206003=Warning: Fail to perform defect correction on frame {1}.
206004=Warning: Defect correction takes quite a long time, so it is cancelled in current application mode.
206005=Warning: Fail to save frame to disk.
206006=Warning: Detect frame lost. the lost frame id's range is [{1} {2}].
[CRInterface]
307001=Error: Empty string to send to Server from API in ProcessCmd.
307002=Error: Fail to receive a command reply in ProcessCmd in API.
307003=Error: Detector unreachable.
307004=Error: Server unreachable when {1}.
307005=Error: Unsupported property "{1}" value {2} in selected mode.
[SQLite]
408001=Fatal Error: Failed to open the database file.
308001=Error: Failed to do database operation.
308002=Error: Empty SQL statement.
308003=Error: Failed to prepare SQL statement.
308004=Error: Failed to execute SQL statement.
308005=Error: Failed to finalize SQL statement.
308006=Error: Failed to begin SQL transaction.
308007=Error: Failed to commit SQL transaction.
308008=Error: Failed to rollback SQL transaction.
308009=Error: Wrong password.
[IntlMessage]
309001=Error: Line {1} of {2}, unbalanced brackets.
309002=Error: Line {1} of {2}, expected exactly one pair of square brackets.
309003=Error: Line {1} of {2}, section names should not contain white space(s).
309004=Error: Line {1} of {2}, expected an equal sign that separates a key name and a message string.
309005=Error: Line {1} of {2}, expected a key name.
309006=Error: Line {1} of {2}, key names must be formed with digits.
309007=Error: Line {1} of {2}, specifier enclosed by curly brackets must be formed with digits.
309008=Error: Line {1} of {2}, duplicated key name {3}.
309009=Error: Line {1} of {2}, unidentified line.
309010=Error: Line {1} of {2}, key name {3} not found in {4}.
309011=Error: Key name {1} appearing in {2}, but not found in {3}.
[Server]
210001=Warning: Calibration was terminated manually.
210002=Warning: {1} defect over limit, actual value is {2}, while the expected value is less than {3}.
210003=Warning: Detector {1} already disconnected.
310001=Error: Detector unreachable.
310002=Error: Server is in calibration state.
310003=Error: Path {1} does not exist.
310004=Error: File {1} does not exist.
310005=Error: Fail to open file {1} when {2}.
310006=Error: API unreachable when {1}.
310007=Error: {1} happend when verifying file {2}
310008=Error: Current file {1} in Server is newer.
310009=Error: Disk for storing images is used up.
310010=Error: Invalid detector index {1}.
410001=Fatal Error: Duplicated machine ID {1} for {2}.
[CDetr]
311001=Error: Detector {1} is in calibration state.
311002=Error: Detector {1} offline, execute "CR_Connect" first.
\ No newline at end of file \ No newline at end of file
[General]
200001=警告:非法的错误ID号{1}。
200002=警告:应该提供{1}个域,但实际只提供了{2}个。
200003=警告:在{1}中发现空指针。
300004=错误:无法打开文件[{1}].
300005=错误:无法写入文件[{1}].
300006=错误:无法分配内存。
300007=错误:无对应信息。
[Detector]
301001=错误:非法的命令ID号。
301002=错误:函数{2}中传入了非法入参{1}。
301003=错误:函数{1}应有入参。
301004=错误:函数{2}应有入参{1}。
301101=错误:函数{1}中传入了未定义的工作模式。
301102=错误:函数{1}中传入了未定义的同步模式。
301201=错误:无法设置探测器版本{1}。
301202=错误:无法设置探测器的日期和时间。
301203=错误:探测器内部保存了尚未发出的图像。
301204=错误:图像传输过程中不能切换探测器的工作模式。先调用StopAquisition命令终止取图,然后再切换探测器的工作模式。
301205=错误:无法访问FPGA的寄存器。错误出现在函数{2}中第{1}行。
301206=错误:无法停止取图。错误出现在函数{1}中第{2}行。
301207=错误:无法获取探测器machine ID号。
301208=错误:无法设置探测器工作模式.错误出现在函数{2}中第{1}行。
301209=错误:无法设置同步模式。错误出现在函数{2}中第{1}行。
301210=错误:无法设置曝光积分时间。错误出现在函数{2}中第{1}行。
301301=错误:函数{1}中发现非法入参\"frmtype\"。合法值为{3},{4}或者{5},而实际数值为{2}。
301302=错误:函数{2}中发现非法入参\"{1}\"。合法值应该小于等于{4},但实际值为{3}。
301303=错误:函数{2}中发现非法入参\"{1}\"。合法值应该小于{4},但实际值为{3}。
301304=错误:非法功耗模式{1}。
301305=错误:非法功耗模式{1}。
301306=错误: 积分时间 {1} 超过了模式 {3} 中允许的最大值 {2}.
301307=错误: 帧率 {1} 超过了模式 {3} 中允许的最大值 {2}。
[Command]
//?02001=
[Common]
//?03001=
[Data]
//?04001=
204001=警告:无法加载校准文件[{1}]。请确保已经执行了相关的[{2}]校准。
304001=错误:校准路径{1}不存在。
304002=错误:校准文件{1}不存在。
304003=错误:校准文件大小有误,实际大小是{1},期望值是{2}。
304004=错误:无法解析缺陷文件{1},当前的工作模式是{2},gain值是{3}。
[Network]
//?05001=
[ImageProcessing]
//?06001=
206001=警告:无法对第{1}帧进行暗场矫正。
206002=警告:无法对第{1}帧进行增益矫正。
206003=警告:无法对第{1}帧进行缺陷矫正。
206004=警告:鉴于缺陷矫正耗时过长,在当前工作模式下被跳过。
206005=警告:无法将图像帧存盘。
206006=警告:出现丢帧。丢失的帧ID范围是[{1} {2}]。
[CRInterface]
307001=错误:API端的ProcessCmd向Server发送了空字符串。
307002=错误:API端的ProcessCmd未收到命令回复。
307003=错误:无法访问探测器。
307004=错误:在{1}过程中无法访问Server。
307005=错误:被选工作模式的"{1}"属性不支持数值{2}。
[SQLite]
408001=致命错误:无法打开数据库文件。
308001=错误:无法对数据库进行操作。
308002=错误:空SQL语句。
308003=错误:无法准备SQL语句。
308004=错误:无法执行SQL语句。
308005=错误:无法完成SQL语句。
308006=错误:无法启动SQL事务。
308007=错误:无法提交SQL事务。
308008=错误:无法回滚SQL事务。
308009=错误:密码错误。
[IntlMessage]
309001=错误:{2}中第{1}行,括号不对称。
309002=错误:{2}中第{1}行,中括号只能出现一对。
309003=错误:{2}中第{1}行,段名中不能含有空格。
309004=错误:{2}中第{1}行,缺少用来分割索引号和信息的等号。
309005=错误:{2}中第{1}行,缺少索引号。
309006=错误:{2}中第{1}行,索引号必须仅由数字组成。
309007=错误:{2}中第{1}行,花括号内的占位符必须仅由数字组成。
309008=错误:{2}中第{1}行,索引号{3}重定义。
309009=错误:{2}中第{1}行,该行无法识别。
309010=错误:{2}中第{1}行,文件{4}中未能找到索引号{3}。
309011=错误:索引号{1}出现在{2}中,但没有出现在{3}中。
[Server]
210001=警告:校准流程已被手动终止。
210002=警告:{1}缺陷超标。该数值应该小于{3},但实际数值是{2}。
210003=警告:探测器{1}已经断连。
310001=错误:无法访问探测器。
310002=错误:Server正处在校准流程中。
310003=错误:路径{1}不存在。
310004=错误:文件{1}不存在。
310005=错误:在{2}过程中无法打开文件{1}。
310006=错误:在{1}过程中无法访问API。
310007=错误:在确认文件{2}时{1}出现了。
310008=错误:Server端的当前文件{1}更新。
310009=错误:内存不足,无法继续存图。
310010=错误:未连接探测器。可以调用Connect命令连接探测器。
410001=致命错误:探测器{2}的machine ID号重复{1}。
[CDetr]
311001=错误:探测器{1}正处在校准流程中。
311002=错误:未连接探测器{1}。可以调用CR_Connect命令连接探测器。
# 设置root logger为DEBUG级别,使用了ca和fa两个Appender
# log4j.rootLogger=DEBUG, ca, fa
log4j.rootLogger=DEBUG,fa
#test version
#对Appender fa进行设置:
# 这是一个文件类型的Appender,
# 其输出文件(File)为./output.log,
# 输出方式(Append)为覆盖方式,
# 输出格式(layout)为PatternLayout
# 输出到指定文件
#log4j.appender.fa=org.apache.log4j.FileAppender
#log4j.appender.fa.File=./log/output.log
# 按照文件名=时间输出
log4j.appender.fa=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fa.DatePattern='./log/client-'yyyy-MM-dd'.log'
log4j.appender.fa.Append=true
log4j.appender.fa.layout=org.apache.log4j.PatternLayout
log4j.appender.fa.layout.ConversionPattern=%d | %-5p | [%t] %m%n
#对Appender ca进行设置:
# 这是一个控制台类型的Appender
# 输出格式(layout)为PatternLayout
log4j.appender.ca=org.apache.log4j.ConsoleAppender
log4j.appender.ca.layout=org.apache.log4j.PatternLayout
log4j.appender.ca.layout.ConversionPattern=%d | %-5p | [%t] | %m%n
log4j.logger.error=DEBUG, fa2
log4j.additivity.error=true
log4j.appender.fa2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fa2.DatePattern='./log/'yyyy-MM-dd'_error.log'
log4j.appender.fa2.Append=true
log4j.appender.fa2.layout=org.apache.log4j.PatternLayout
log4j.appender.fa2.layout.ConversionPattern=%d | %-5p | [%t] | - %m(%l [%M])%n
\ No newline at end of file \ No newline at end of file
# 设置root logger为DEBUG级别,使用了ca和fa两个Appender
# log4j.rootLogger=DEBUG, ca, fa
log4j.rootLogger=DEBUG,fa
#test version
#对Appender fa进行设置:
# 这是一个文件类型的Appender,
# 其输出文件(File)为./output.log,
# 输出方式(Append)为覆盖方式,
# 输出格式(layout)为PatternLayout
# 输出到指定文件
#log4j.appender.fa=org.apache.log4j.FileAppender
#log4j.appender.fa.File=./log/output.log
# 按照文件名=时间输出
log4j.appender.fa=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fa.DatePattern='./log/server-'yyyy-MM-dd'.log'
log4j.appender.fa.Append=true
log4j.appender.fa.layout=org.apache.log4j.PatternLayout
log4j.appender.fa.layout.ConversionPattern=%d | %-5p | [%t] %m%n
#对Appender ca进行设置:
# 这是一个控制台类型的Appender
# 输出格式(layout)为PatternLayout
log4j.appender.ca=org.apache.log4j.ConsoleAppender
log4j.appender.ca.layout=org.apache.log4j.PatternLayout
log4j.appender.ca.layout.ConversionPattern=%d | %-5p | [%t] | %m%n
log4j.logger.error=DEBUG, fa2
log4j.additivity.error=true
log4j.appender.fa2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.fa2.DatePattern='./log/'yyyy-MM-dd'_error.log'
log4j.appender.fa2.Append=true
log4j.appender.fa2.layout=org.apache.log4j.PatternLayout
log4j.appender.fa2.layout.ConversionPattern=%d | %-5p | [%t] | - %m(%l [%M])%n
\ No newline at end of file \ No newline at end of file
此文件类型无法预览

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30104.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CountImage", "CountImage\CountImage.csproj", "{03074B6D-A69F-4B92-BA46-9FBD8327AE7A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{03074B6D-A69F-4B92-BA46-9FBD8327AE7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03074B6D-A69F-4B92-BA46-9FBD8327AE7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03074B6D-A69F-4B92-BA46-9FBD8327AE7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03074B6D-A69F-4B92-BA46-9FBD8327AE7A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {36797770-1F2C-4FEB-872A-805EFA5ECBBE}
EndGlobalSection
EndGlobal
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Asa
{
public class CountImage
{
public CountImage()
{
}
public bool GetCount(out int count)
{
count = 4000;
return true;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>03074b6d-a69f-4b92-ba46-9fbd8327ae7a</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CountImage</RootNamespace>
<AssemblyName>CountImage</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Xml.Linq"/>
<Reference Include="System.Data.DataSetExtensions"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="System.Data"/>
<Reference Include="System.Net.Http"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CountImage")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CountImage")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("03074b6d-a69f-4b92-ba46-9fbd8327ae7a")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
906e738292f289a48725e8cb2e91dcc43fc5bdfc 1032e896ac36a0388b620b7706f540c886281cdf
...@@ -12,3 +12,18 @@ C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csproj.CoreCo ...@@ -12,3 +12,18 @@ C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csproj.CoreCo
C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csproj.CopyComplete C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csproj.CopyComplete
C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\Asa.PrintLabel.dll C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\Asa.PrintLabel.dll
C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\Asa.PrintLabel.pdb C:\Users\neotel\Desktop\PrintLabel\PrintLabel\obj\Debug\Asa.PrintLabel.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\Asa.PrintLabel.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\Asa.PrintLabel.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\zxing.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\zxing.presentation.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\zxing.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\zxing.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\zxing.presentation.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\bin\Debug\zxing.presentation.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\obj\Debug\PrintLabel.FrmLabel.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csproj.GenerateResource.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\obj\Debug\PrintLabel.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\obj\Debug\Asa.PrintLabel.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel\obj\Debug\Asa.PrintLabel.pdb
eb586f01730e5c503af9815f397e905d51d249de bd3c393e8da811c4268511dab8f8dccbaa28d316
...@@ -14,3 +14,19 @@ C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csp ...@@ -14,3 +14,19 @@ C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csp
C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csproj.CopyComplete C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csproj.CopyComplete
C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.exe C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.exe
C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.pdb C:\Users\neotel\Desktop\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\PrintLabel_Test.exe.config
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\PrintLabel_Test.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\PrintLabel_Test.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\Asa.PrintLabel.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\zxing.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\Asa.PrintLabel.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\zxing.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\bin\Debug\zxing.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.Form1.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.Properties.Resources.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csproj.GenerateResource.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\PrintLabel\PrintLabel_Test\obj\Debug\PrintLabel_Test.pdb
...@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.29920.165 ...@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.29920.165
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X-Ray Controller", "X-Ray Controller\X-Ray Controller.csproj", "{FABBED13-18E1-4525-9ACC-E20F8A4032C6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X-Ray Controller", "X-Ray Controller\X-Ray Controller.csproj", "{FABBED13-18E1-4525-9ACC-E20F8A4032C6}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X-Ray_Test", "X-Ray_Test\X-Ray_Test.csproj", "{29C10B34-444D-4EAA-99CB-CA18DEF3D115}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -15,6 +17,10 @@ Global ...@@ -15,6 +17,10 @@ Global
{FABBED13-18E1-4525-9ACC-E20F8A4032C6}.Debug|Any CPU.Build.0 = Debug|Any CPU {FABBED13-18E1-4525-9ACC-E20F8A4032C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FABBED13-18E1-4525-9ACC-E20F8A4032C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {FABBED13-18E1-4525-9ACC-E20F8A4032C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FABBED13-18E1-4525-9ACC-E20F8A4032C6}.Release|Any CPU.Build.0 = Release|Any CPU {FABBED13-18E1-4525-9ACC-E20F8A4032C6}.Release|Any CPU.Build.0 = Release|Any CPU
{29C10B34-444D-4EAA-99CB-CA18DEF3D115}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29C10B34-444D-4EAA-99CB-CA18DEF3D115}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29C10B34-444D-4EAA-99CB-CA18DEF3D115}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29C10B34-444D-4EAA-99CB-CA18DEF3D115}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -67,8 +67,9 @@ namespace Asa ...@@ -67,8 +67,9 @@ namespace Asa
/// 打开设备 /// 打开设备
/// </summary> /// </summary>
/// <param name="portName">串口名称</param> /// <param name="portName">串口名称</param>
/// <param name="date">日期</param>
/// <returns></returns> /// <returns></returns>
public bool Open(string portName) public bool Open(string portName, string date)
{ {
port.PortName = portName; port.PortName = portName;
try try
...@@ -87,10 +88,11 @@ namespace Asa ...@@ -87,10 +88,11 @@ namespace Asa
/// <summary> /// <summary>
/// 关闭设备 /// 关闭设备
/// </summary> /// </summary>
public void Close() /// <param name="date">日期</param>
public void Close(out string date)
{ {
port.Close(); port.Close();
System.IO.File.WriteAllText(LAST_DATE, DateTime.Now.ToString()); date = DateTime.Now.ToString();
} }
/// <summary> /// <summary>
...@@ -121,14 +123,24 @@ namespace Asa ...@@ -121,14 +123,24 @@ namespace Asa
tWarmUp.Start(days); tWarmUp.Start(days);
} }
public void Start() /// <summary>
/// 启动
/// </summary>
/// <param name="voltage">电压</param>
/// <param name="current">电流</param>
public void Start(string voltage, string current)
{ {
Send("VP" + "10"); bool rtn = Send("VP" + voltage);
Send("CP" + "1"); rtn = Send("CP" + current);
} }
/// <summary>
/// 停止
/// </summary>
public void Stop() public void Stop()
{ {
bool rtn = Send("VP0");
rtn = Send("CP0");
} }
......
...@@ -20,6 +20,16 @@ ...@@ -20,6 +20,16 @@
日志事件 日志事件
</summary> </summary>
</member> </member>
<member name="T:Asa.X_Ray.WarmUpCompleteEvent">
<summary>
预热事件委托
</summary>
</member>
<member name="F:Asa.X_Ray.WarmUpComplete">
<summary>
预热事件
</summary>
</member>
<member name="M:Asa.X_Ray.#ctor"> <member name="M:Asa.X_Ray.#ctor">
<summary> <summary>
X-ray Source X-ray Source
...@@ -30,22 +40,42 @@ ...@@ -30,22 +40,42 @@
打开或关闭状态 打开或关闭状态
</summary> </summary>
</member> </member>
<member name="M:Asa.X_Ray.Open(System.String)"> <member name="M:Asa.X_Ray.Open(System.String,System.String)">
<summary> <summary>
打开设备 打开设备
</summary> </summary>
<param name="portName">串口名称</param> <param name="portName">串口名称</param>
<param name="date">日期</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Asa.X_Ray.Close"> <member name="M:Asa.X_Ray.Close(System.String@)">
<summary> <summary>
关闭设备 关闭设备
</summary> </summary>
<param name="date">日期</param>
</member> </member>
<member name="M:Asa.X_Ray.WarmUp"> <member name="M:Asa.X_Ray.WarmUp">
<summary> <summary>
预热 预热
</summary> </summary>
</member> </member>
<member name="M:Asa.X_Ray.Start(System.String,System.String)">
<summary>
启动
</summary>
<param name="voltage">电压</param>
<param name="current">电流</param>
</member>
<member name="M:Asa.X_Ray.Stop">
<summary>
停止
</summary>
</member>
<member name="M:Asa.X_Ray.WarmUpProcess(System.Object)">
<summary>
预热处理线程
</summary>
<param name="obj">天数</param>
</member>
</members> </members>
</doc> </doc>
...@@ -4,3 +4,9 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controll ...@@ -4,3 +4,9 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controll
D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.dll D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.pdb D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controller\bin\Debug\X-Ray.xml D:\OneDrive - 上海挚锦科技有限公司\SMD\X-Ray Controller\X-Ray Controller\bin\Debug\X-Ray.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\bin\Debug\X-Ray.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\bin\Debug\X-Ray.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\bin\Debug\X-Ray.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray Controller.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.pdb
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
\ No newline at end of file \ No newline at end of file
namespace X_Ray_Test
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(90, 12);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 21);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "COM1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(90, 39);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "打开";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(171, 39);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 2;
this.button2.Text = "关闭";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(90, 169);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 3;
this.button3.Text = "启动";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(171, 169);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 23);
this.button4.TabIndex = 4;
this.button4.Text = "停止";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// numericUpDown1
//
this.numericUpDown1.DecimalPlaces = 2;
this.numericUpDown1.Location = new System.Drawing.Point(90, 115);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(120, 21);
this.numericUpDown1.TabIndex = 5;
//
// numericUpDown2
//
this.numericUpDown2.DecimalPlaces = 2;
this.numericUpDown2.Location = new System.Drawing.Point(90, 142);
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(120, 21);
this.numericUpDown2.TabIndex = 6;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(55, 119);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 7;
this.label1.Text = "电压";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(55, 146);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 8;
this.label2.Text = "电流";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(378, 288);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.numericUpDown2);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace X_Ray_Test
{
public partial class Form1 : Form
{
private Asa.X_Ray ray;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ray = new Asa.X_Ray();
}
private void button1_Click(object sender, EventArgs e)
{
ray.Open(textBox1.Text, DateTime.Now.ToString());
}
private void button2_Click(object sender, EventArgs e)
{
ray.Close(out string date);
}
private void button3_Click(object sender, EventArgs e)
{
ray.Start(numericUpDown1.Value.ToString(), numericUpDown2.Value.ToString());
}
private void button4_Click(object sender, EventArgs e)
{
ray.Stop();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace X_Ray_Test
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("X-Ray_Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("X-Ray_Test")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("29c10b34-444d-4eaa-99cb-ca18def3d115")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace X_Ray_Test.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("X_Ray_Test.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 覆盖当前线程的 CurrentUICulture 属性
/// 使用此强类型的资源类的资源查找。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace X_Ray_Test.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{29C10B34-444D-4EAA-99CB-CA18DEF3D115}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>X_Ray_Test</RootNamespace>
<AssemblyName>X-Ray_Test</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\X-Ray Controller\X-Ray Controller.csproj">
<Project>{fabbed13-18e1-4525-9acc-e20f8a4032c6}</Project>
<Name>X-Ray Controller</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0"?>
<doc>
<assembly>
<name>X-Ray</name>
</assembly>
<members>
<member name="T:Asa.X_Ray">
<summary>
X-ray Source (AVJ Technologies Company)
</summary>
</member>
<member name="T:Asa.X_Ray.LogEvent">
<summary>
日志事件委托
</summary>
<param name="log"></param>
</member>
<member name="F:Asa.X_Ray.LogOut">
<summary>
日志事件
</summary>
</member>
<member name="T:Asa.X_Ray.WarmUpCompleteEvent">
<summary>
预热事件委托
</summary>
</member>
<member name="F:Asa.X_Ray.WarmUpComplete">
<summary>
预热事件
</summary>
</member>
<member name="M:Asa.X_Ray.#ctor">
<summary>
X-ray Source
</summary>
</member>
<member name="P:Asa.X_Ray.IsOpen">
<summary>
打开或关闭状态
</summary>
</member>
<member name="M:Asa.X_Ray.Open(System.String,System.String)">
<summary>
打开设备
</summary>
<param name="portName">串口名称</param>
<param name="date">日期</param>
<returns></returns>
</member>
<member name="M:Asa.X_Ray.Close(System.String@)">
<summary>
关闭设备
</summary>
<param name="date">日期</param>
</member>
<member name="M:Asa.X_Ray.WarmUp">
<summary>
预热
</summary>
</member>
<member name="M:Asa.X_Ray.Start(System.String,System.String)">
<summary>
启动
</summary>
<param name="voltage">电压</param>
<param name="current">电流</param>
</member>
<member name="M:Asa.X_Ray.Stop">
<summary>
停止
</summary>
</member>
<member name="M:Asa.X_Ray.WarmUpProcess(System.Object)">
<summary>
预热处理线程
</summary>
<param name="obj">天数</param>
</member>
</members>
</doc>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
\ No newline at end of file \ No newline at end of file
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\bin\Debug\X-Ray_Test.exe.config
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\bin\Debug\X-Ray_Test.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\bin\Debug\X-Ray_Test.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\bin\Debug\X-Ray.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\bin\Debug\X-Ray.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\bin\Debug\X-Ray.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X-Ray_Test.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X_Ray_Test.Form1.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X_Ray_Test.Properties.Resources.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X-Ray_Test.csproj.GenerateResource.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X-Ray_Test.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X-Ray_Test.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X-Ray_Test.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray_Test\obj\Debug\X-Ray_Test.pdb
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!