commit 6510127a555eebb821db1d45f2e2b5c94296d026 Author: Administrator Date: Tue Nov 11 14:03:49 2025 +0800 添加项目文件。 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9491a2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,363 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd \ No newline at end of file diff --git a/CMO.dll b/CMO.dll new file mode 100644 index 0000000..ebba3f5 Binary files /dev/null and b/CMO.dll differ diff --git a/FuelRobot.sln b/FuelRobot.sln new file mode 100644 index 0000000..2b61d9d --- /dev/null +++ b/FuelRobot.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36408.4 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FuelRobot", "FuelRobot\FuelRobot.csproj", "{B193A4B3-4162-4CF5-88E1-E83CB9723B41}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B193A4B3-4162-4CF5-88E1-E83CB9723B41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B193A4B3-4162-4CF5-88E1-E83CB9723B41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B193A4B3-4162-4CF5-88E1-E83CB9723B41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B193A4B3-4162-4CF5-88E1-E83CB9723B41}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {068B8FA2-41E0-43E8-B272-82017ECF187B} + EndGlobalSection +EndGlobal diff --git a/FuelRobot/CITEC32bit.ico b/FuelRobot/CITEC32bit.ico new file mode 100644 index 0000000..efdeaa0 Binary files /dev/null and b/FuelRobot/CITEC32bit.ico differ diff --git a/FuelRobot/DoubleBufferedPanel.cs b/FuelRobot/DoubleBufferedPanel.cs new file mode 100644 index 0000000..74ffe12 --- /dev/null +++ b/FuelRobot/DoubleBufferedPanel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FuelRobot +{ + internal class DoubleBufferedPanel:Panel + { + public DoubleBufferedPanel() + { + // 在派生类中直接访问受保护的 DoubleBuffered 属性 + DoubleBuffered = true; + + // 开启优化绘制样式(减少闪烁的关键) + SetStyle( + ControlStyles.UserPaint | // 允许自定义绘制 + ControlStyles.AllPaintingInWmPaint | // 禁止擦除背景,减少闪烁 + ControlStyles.OptimizedDoubleBuffer, // 启用优化的双缓冲 + true + ); + UpdateStyles(); // 应用样式设置 + } + } +} diff --git a/FuelRobot/FuelRobot.csproj b/FuelRobot/FuelRobot.csproj new file mode 100644 index 0000000..860e4b4 --- /dev/null +++ b/FuelRobot/FuelRobot.csproj @@ -0,0 +1,38 @@ + + + + WinExe + net8.0-windows + enable + true + enable + x64 + CITEC32bit.ico + + + + + + + + + ..\CMO.dll + + + + + + True + True + ImageResource.resx + + + + + + ResXFileCodeGenerator + ImageResource.Designer.cs + + + + \ No newline at end of file diff --git a/FuelRobot/ImageResource.Designer.cs b/FuelRobot/ImageResource.Designer.cs new file mode 100644 index 0000000..582321d --- /dev/null +++ b/FuelRobot/ImageResource.Designer.cs @@ -0,0 +1,363 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace FuelRobot { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ImageResource { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ImageResource() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FuelRobot.ImageResource", typeof(ImageResource).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap _12英尺第一部分 { + get { + object obj = ResourceManager.GetObject("12英尺第一部分", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap _12英尺第一部分1 { + get { + object obj = ResourceManager.GetObject("12英尺第一部分1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap _12英尺第二部分1 { + get { + object obj = ResourceManager.GetObject("12英尺第二部分1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap CITEC32bit { + get { + object obj = ResourceManager.GetObject("CITEC32bit", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap CurrentOff { + get { + object obj = ResourceManager.GetObject("CurrentOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap CurrentOn { + get { + object obj = ResourceManager.GetObject("CurrentOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap EnableOff { + get { + object obj = ResourceManager.GetObject("EnableOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap EnableOn { + get { + object obj = ResourceManager.GetObject("EnableOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap FuelAssembleCursor { + get { + object obj = ResourceManager.GetObject("FuelAssembleCursor", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap HomeOff { + get { + object obj = ResourceManager.GetObject("HomeOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap HomeOn { + get { + object obj = ResourceManager.GetObject("HomeOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogDownOff { + get { + object obj = ResourceManager.GetObject("JogDownOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogDownOn { + get { + object obj = ResourceManager.GetObject("JogDownOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogLeftOff { + get { + object obj = ResourceManager.GetObject("JogLeftOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogLeftOn { + get { + object obj = ResourceManager.GetObject("JogLeftOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogRightOff { + get { + object obj = ResourceManager.GetObject("JogRightOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogRightOn { + get { + object obj = ResourceManager.GetObject("JogRightOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogUpOff { + get { + object obj = ResourceManager.GetObject("JogUpOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap JogUpOn { + get { + object obj = ResourceManager.GetObject("JogUpOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap PositionOff { + get { + object obj = ResourceManager.GetObject("PositionOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap PositionOn { + get { + object obj = ResourceManager.GetObject("PositionOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap RunOff { + get { + object obj = ResourceManager.GetObject("RunOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap RunOn { + get { + object obj = ResourceManager.GetObject("RunOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap SwitchOff { + get { + object obj = ResourceManager.GetObject("SwitchOff", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap SwitchOn { + get { + object obj = ResourceManager.GetObject("SwitchOn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 第一部分 { + get { + object obj = ResourceManager.GetObject("第一部分", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 第三部分 { + get { + object obj = ResourceManager.GetObject("第三部分", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 第三部分1 { + get { + object obj = ResourceManager.GetObject("第三部分1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 第二部分 { + get { + object obj = ResourceManager.GetObject("第二部分", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap 第二部分1 { + get { + object obj = ResourceManager.GetObject("第二部分1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/FuelRobot/ImageResource.resx b/FuelRobot/ImageResource.resx new file mode 100644 index 0000000..deb8deb --- /dev/null +++ b/FuelRobot/ImageResource.resx @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\JogDownOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\CurrentOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\EnableOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\RunOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\FuelAssembleCursor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\第三部分.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\PositionOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\第一部分.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\JogUpOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\PositionOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\第二部分1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\HomeOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\JogRightOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\EnableOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\JogDownOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\12英尺第一部分1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\第二部分.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\CurrentOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\CITEC32bit.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\JogLeftOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\JogRightOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\JogUpOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\12英尺第一部分.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\JogLeftOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\SwitchOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\HomeOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\RunOff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\SwitchOn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\第三部分1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\12英尺第二部分1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/FuelRobot/MainForm.Designer.cs b/FuelRobot/MainForm.Designer.cs new file mode 100644 index 0000000..63249eb --- /dev/null +++ b/FuelRobot/MainForm.Designer.cs @@ -0,0 +1,1221 @@ +namespace FuelRobot +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + timerXAxisActualPosition = new System.Windows.Forms.Timer(components); + timerXAxisCurrent = new System.Windows.Forms.Timer(components); + timerXAxisHomeComplete = new System.Windows.Forms.Timer(components); + timerXAxisRunComplete = new System.Windows.Forms.Timer(components); + panelXAxisTitle = new Panel(); + labelXAxisTitle = new Label(); + panelXAxisContent = new Panel(); + pictureBoxXAxisSoftLowerLimit = new PictureBox(); + labelXAxisUnit7 = new Label(); + labelXAxisUnit6 = new Label(); + labelXAxisUnit5 = new Label(); + trackBarXAxisActualSpeed = new TrackBar(); + textBoxXAxisSoftLowerLimit = new TextBox(); + textBoxXAxisTargetPosition = new TextBox(); + textBoxXAxisSoftUpperLimit = new TextBox(); + pictureBoxXAxisSoftUpperLimit = new PictureBox(); + buttonXAxisJogDown = new Button(); + buttonXAxisJogUp = new Button(); + buttonXAxisRun = new Button(); + buttonXAxisHome = new Button(); + buttonXAxisEnable = new Button(); + textBoxXAxisActualPositon = new TextBox(); + labelXAxisUnit4 = new Label(); + labelXAxisUnit3 = new Label(); + labelXAxisUnit2 = new Label(); + labelXAxisUnit1 = new Label(); + panelXAxisCurrent = new Panel(); + labelXAxisUnit9 = new Label(); + labelXAxisUnit8 = new Label(); + textBoxXAxisActualCurrent = new TextBox(); + pictureBoxXAxisCurrent = new PictureBox(); + panelYAxisCurrent = new Panel(); + labelYAxisUnit9 = new Label(); + labelYAxisUnit8 = new Label(); + textBoxYAxisActualCurrent = new TextBox(); + pictureBoxYAxisCurrent = new PictureBox(); + panelYAxisContent = new Panel(); + pictureBoxYAxisSoftLowerLimit = new PictureBox(); + labelYAxisUnit7 = new Label(); + labelYAxisUnit6 = new Label(); + labelYAxisUnit5 = new Label(); + trackBarYAxisActualSpeed = new TrackBar(); + textBoxYAxisSoftLowerLimit = new TextBox(); + textBoxYAxisTargetPosition = new TextBox(); + textBoxYAxisSoftUpperLimit = new TextBox(); + pictureBoxYAxisSoftUpperLimit = new PictureBox(); + buttonYAxisJogDown = new Button(); + buttonYAxisJogUp = new Button(); + buttonYAxisRun = new Button(); + buttonYAxisHome = new Button(); + buttonYAxisEnable = new Button(); + textBoxYAxisActualPositon = new TextBox(); + labelYAxisUnit4 = new Label(); + labelYAxisUnit3 = new Label(); + labelYAxisUnit2 = new Label(); + labelYAxisUnit1 = new Label(); + panelYAxisTitle = new Panel(); + labelYAxisTitle = new Label(); + timerYAxisActualPosition = new System.Windows.Forms.Timer(components); + timerYAxisCurrent = new System.Windows.Forms.Timer(components); + timerYAxisHomeComplete = new System.Windows.Forms.Timer(components); + timerYAxisRunComplete = new System.Windows.Forms.Timer(components); + panelFuelAssemble = new Panel(); + pictureBoxFuelAssembleCursor = new PictureBox(); + panelZAxisCurrent = new Panel(); + labelZAxisUnit9 = new Label(); + labelZAxisUnit8 = new Label(); + textBoxZAxisActualCurrent = new TextBox(); + pictureBoxZAxisCurrent = new PictureBox(); + panelZAxisContent = new Panel(); + pictureBoxZAxisSoftLowerLimit = new PictureBox(); + labelZAxisUnit7 = new Label(); + labelZAxisUnit6 = new Label(); + labelZAxisUnit5 = new Label(); + trackBarZAxisActualSpeed = new TrackBar(); + textBoxZAxisSoftLowerLimit = new TextBox(); + textBoxZAxisTargetPosition = new TextBox(); + textBoxZAxisSoftUpperLimit = new TextBox(); + pictureBoxZAxisSoftUpperLimit = new PictureBox(); + buttonZAxisJogDown = new Button(); + buttonZAxisJogUp = new Button(); + buttonZAxisRun = new Button(); + buttonZAxisHome = new Button(); + buttonZAxisEnable = new Button(); + textBoxZAxisActualPositon = new TextBox(); + labelZAxisUnit4 = new Label(); + labelZAxisUnit3 = new Label(); + labelZAxisUnit2 = new Label(); + labelZAxisUnit1 = new Label(); + panelZAxisTitle = new Panel(); + labelZAxisTitle = new Label(); + timerZAxisActualPosition = new System.Windows.Forms.Timer(components); + timerZAxisCurrent = new System.Windows.Forms.Timer(components); + timerZAxisHomeComplete = new System.Windows.Forms.Timer(components); + timerZAxisRunComplete = new System.Windows.Forms.Timer(components); + panel2 = new Panel(); + pictureBox1 = new PictureBox(); + texPicturePosition = new TextBox(); + pictureMoveBottomPanel = new Panel(); + panelXAxisTitle.SuspendLayout(); + panelXAxisContent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxXAxisSoftLowerLimit).BeginInit(); + ((System.ComponentModel.ISupportInitialize)trackBarXAxisActualSpeed).BeginInit(); + ((System.ComponentModel.ISupportInitialize)pictureBoxXAxisSoftUpperLimit).BeginInit(); + panelXAxisCurrent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxXAxisCurrent).BeginInit(); + panelYAxisCurrent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxYAxisCurrent).BeginInit(); + panelYAxisContent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxYAxisSoftLowerLimit).BeginInit(); + ((System.ComponentModel.ISupportInitialize)trackBarYAxisActualSpeed).BeginInit(); + ((System.ComponentModel.ISupportInitialize)pictureBoxYAxisSoftUpperLimit).BeginInit(); + panelYAxisTitle.SuspendLayout(); + panelFuelAssemble.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxFuelAssembleCursor).BeginInit(); + panelZAxisCurrent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxZAxisCurrent).BeginInit(); + panelZAxisContent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxZAxisSoftLowerLimit).BeginInit(); + ((System.ComponentModel.ISupportInitialize)trackBarZAxisActualSpeed).BeginInit(); + ((System.ComponentModel.ISupportInitialize)pictureBoxZAxisSoftUpperLimit).BeginInit(); + panelZAxisTitle.SuspendLayout(); + panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); + pictureMoveBottomPanel.SuspendLayout(); + SuspendLayout(); + // + // panelXAxisTitle + // + panelXAxisTitle.BackColor = Color.FromArgb(23, 76, 133); + panelXAxisTitle.BorderStyle = BorderStyle.Fixed3D; + panelXAxisTitle.Controls.Add(labelXAxisTitle); + panelXAxisTitle.Location = new Point(4, 5); + panelXAxisTitle.Name = "panelXAxisTitle"; + panelXAxisTitle.Size = new Size(365, 100); + panelXAxisTitle.TabIndex = 0; + // + // labelXAxisTitle + // + labelXAxisTitle.AutoSize = true; + labelXAxisTitle.BackColor = Color.Transparent; + labelXAxisTitle.Font = new Font("Times New Roman", 42F, FontStyle.Bold, GraphicsUnit.Point, 0); + labelXAxisTitle.ForeColor = SystemColors.Window; + labelXAxisTitle.Location = new Point(68, 15); + labelXAxisTitle.Name = "labelXAxisTitle"; + labelXAxisTitle.Size = new Size(238, 63); + labelXAxisTitle.TabIndex = 0; + labelXAxisTitle.Text = "X轴电机"; + // + // panelXAxisContent + // + panelXAxisContent.BackColor = Color.FromArgb(0, 170, 232); + panelXAxisContent.BorderStyle = BorderStyle.Fixed3D; + panelXAxisContent.Controls.Add(pictureBoxXAxisSoftLowerLimit); + panelXAxisContent.Controls.Add(labelXAxisUnit7); + panelXAxisContent.Controls.Add(labelXAxisUnit6); + panelXAxisContent.Controls.Add(labelXAxisUnit5); + panelXAxisContent.Controls.Add(trackBarXAxisActualSpeed); + panelXAxisContent.Controls.Add(textBoxXAxisSoftLowerLimit); + panelXAxisContent.Controls.Add(textBoxXAxisTargetPosition); + panelXAxisContent.Controls.Add(textBoxXAxisSoftUpperLimit); + panelXAxisContent.Controls.Add(pictureBoxXAxisSoftUpperLimit); + panelXAxisContent.Controls.Add(buttonXAxisJogDown); + panelXAxisContent.Controls.Add(buttonXAxisJogUp); + panelXAxisContent.Controls.Add(buttonXAxisRun); + panelXAxisContent.Controls.Add(buttonXAxisHome); + panelXAxisContent.Controls.Add(buttonXAxisEnable); + panelXAxisContent.Controls.Add(textBoxXAxisActualPositon); + panelXAxisContent.Controls.Add(labelXAxisUnit4); + panelXAxisContent.Controls.Add(labelXAxisUnit3); + panelXAxisContent.Controls.Add(labelXAxisUnit2); + panelXAxisContent.Controls.Add(labelXAxisUnit1); + panelXAxisContent.Font = new Font("宋体", 26.25F, FontStyle.Regular, GraphicsUnit.Point, 134); + panelXAxisContent.Location = new Point(4, 108); + panelXAxisContent.Name = "panelXAxisContent"; + panelXAxisContent.Size = new Size(365, 469); + panelXAxisContent.TabIndex = 1; + // + // pictureBoxXAxisSoftLowerLimit + // + pictureBoxXAxisSoftLowerLimit.Image = ImageResource.PositionOff; + pictureBoxXAxisSoftLowerLimit.Location = new Point(31, 311); + pictureBoxXAxisSoftLowerLimit.Name = "pictureBoxXAxisSoftLowerLimit"; + pictureBoxXAxisSoftLowerLimit.Size = new Size(72, 24); + pictureBoxXAxisSoftLowerLimit.TabIndex = 15; + pictureBoxXAxisSoftLowerLimit.TabStop = false; + // + // labelXAxisUnit7 + // + labelXAxisUnit7.AutoSize = true; + labelXAxisUnit7.Location = new Point(293, 413); + labelXAxisUnit7.Name = "labelXAxisUnit7"; + labelXAxisUnit7.Size = new Size(51, 35); + labelXAxisUnit7.TabIndex = 14; + labelXAxisUnit7.Text = "20"; + // + // labelXAxisUnit6 + // + labelXAxisUnit6.AutoSize = true; + labelXAxisUnit6.Location = new Point(153, 413); + labelXAxisUnit6.Name = "labelXAxisUnit6"; + labelXAxisUnit6.Size = new Size(51, 35); + labelXAxisUnit6.TabIndex = 13; + labelXAxisUnit6.Text = "12"; + // + // labelXAxisUnit5 + // + labelXAxisUnit5.AutoSize = true; + labelXAxisUnit5.Location = new Point(19, 413); + labelXAxisUnit5.Name = "labelXAxisUnit5"; + labelXAxisUnit5.Size = new Size(33, 35); + labelXAxisUnit5.TabIndex = 12; + labelXAxisUnit5.Text = "4"; + // + // trackBarXAxisActualSpeed + // + trackBarXAxisActualSpeed.Cursor = Cursors.Hand; + trackBarXAxisActualSpeed.LargeChange = 1; + trackBarXAxisActualSpeed.Location = new Point(21, 381); + trackBarXAxisActualSpeed.Maximum = 5; + trackBarXAxisActualSpeed.Minimum = 1; + trackBarXAxisActualSpeed.Name = "trackBarXAxisActualSpeed"; + trackBarXAxisActualSpeed.Size = new Size(311, 45); + trackBarXAxisActualSpeed.TabIndex = 11; + trackBarXAxisActualSpeed.Value = 1; + // + // textBoxXAxisSoftLowerLimit + // + textBoxXAxisSoftLowerLimit.Location = new Point(197, 301); + textBoxXAxisSoftLowerLimit.Name = "textBoxXAxisSoftLowerLimit"; + textBoxXAxisSoftLowerLimit.Size = new Size(103, 47); + textBoxXAxisSoftLowerLimit.TabIndex = 10; + textBoxXAxisSoftLowerLimit.Text = "-10"; + textBoxXAxisSoftLowerLimit.TextAlign = HorizontalAlignment.Right; + // + // textBoxXAxisTargetPosition + // + textBoxXAxisTargetPosition.Location = new Point(197, 221); + textBoxXAxisTargetPosition.Name = "textBoxXAxisTargetPosition"; + textBoxXAxisTargetPosition.Size = new Size(103, 47); + textBoxXAxisTargetPosition.TabIndex = 9; + textBoxXAxisTargetPosition.Text = "0"; + textBoxXAxisTargetPosition.TextAlign = HorizontalAlignment.Right; + // + // textBoxXAxisSoftUpperLimit + // + textBoxXAxisSoftUpperLimit.Location = new Point(197, 140); + textBoxXAxisSoftUpperLimit.Name = "textBoxXAxisSoftUpperLimit"; + textBoxXAxisSoftUpperLimit.Size = new Size(103, 47); + textBoxXAxisSoftUpperLimit.TabIndex = 8; + textBoxXAxisSoftUpperLimit.Text = "400"; + textBoxXAxisSoftUpperLimit.TextAlign = HorizontalAlignment.Right; + // + // pictureBoxXAxisSoftUpperLimit + // + pictureBoxXAxisSoftUpperLimit.Image = ImageResource.PositionOff; + pictureBoxXAxisSoftUpperLimit.Location = new Point(31, 155); + pictureBoxXAxisSoftUpperLimit.Name = "pictureBoxXAxisSoftUpperLimit"; + pictureBoxXAxisSoftUpperLimit.Size = new Size(72, 24); + pictureBoxXAxisSoftUpperLimit.TabIndex = 6; + pictureBoxXAxisSoftUpperLimit.TabStop = false; + // + // buttonXAxisJogDown + // + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + buttonXAxisJogDown.Location = new Point(112, 288); + buttonXAxisJogDown.Name = "buttonXAxisJogDown"; + buttonXAxisJogDown.Size = new Size(72, 72); + buttonXAxisJogDown.TabIndex = 5; + buttonXAxisJogDown.Text = " "; + buttonXAxisJogDown.UseVisualStyleBackColor = true; + // + // buttonXAxisJogUp + // + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogUp.Location = new Point(112, 128); + buttonXAxisJogUp.Name = "buttonXAxisJogUp"; + buttonXAxisJogUp.Size = new Size(72, 72); + buttonXAxisJogUp.TabIndex = 4; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogUp.UseVisualStyleBackColor = true; + // + // buttonXAxisRun + // + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisRun.Location = new Point(112, 208); + buttonXAxisRun.Name = "buttonXAxisRun"; + buttonXAxisRun.Size = new Size(72, 72); + buttonXAxisRun.TabIndex = 3; + buttonXAxisRun.Text = " "; + buttonXAxisRun.UseVisualStyleBackColor = true; + // + // buttonXAxisHome + // + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisHome.Location = new Point(32, 208); + buttonXAxisHome.Name = "buttonXAxisHome"; + buttonXAxisHome.Size = new Size(72, 72); + buttonXAxisHome.TabIndex = 2; + buttonXAxisHome.Text = " "; + buttonXAxisHome.UseVisualStyleBackColor = true; + // + // buttonXAxisEnable + // + buttonXAxisEnable.Image = ImageResource.EnableOff; + buttonXAxisEnable.Location = new Point(248, 21); + buttonXAxisEnable.Name = "buttonXAxisEnable"; + buttonXAxisEnable.Size = new Size(84, 94); + buttonXAxisEnable.TabIndex = 1; + buttonXAxisEnable.Text = " "; + buttonXAxisEnable.UseVisualStyleBackColor = true; + // + // textBoxXAxisActualPositon + // + textBoxXAxisActualPositon.Font = new Font("宋体", 36F, FontStyle.Regular, GraphicsUnit.Point, 134); + textBoxXAxisActualPositon.Location = new Point(26, 53); + textBoxXAxisActualPositon.Name = "textBoxXAxisActualPositon"; + textBoxXAxisActualPositon.Size = new Size(158, 62); + textBoxXAxisActualPositon.TabIndex = 0; + textBoxXAxisActualPositon.Text = "0"; + // + // labelXAxisUnit4 + // + labelXAxisUnit4.AutoSize = true; + labelXAxisUnit4.Location = new Point(304, 304); + labelXAxisUnit4.Name = "labelXAxisUnit4"; + labelXAxisUnit4.Size = new Size(51, 35); + labelXAxisUnit4.TabIndex = 0; + labelXAxisUnit4.Text = "mm"; + // + // labelXAxisUnit3 + // + labelXAxisUnit3.AutoSize = true; + labelXAxisUnit3.Location = new Point(304, 224); + labelXAxisUnit3.Name = "labelXAxisUnit3"; + labelXAxisUnit3.Size = new Size(51, 35); + labelXAxisUnit3.TabIndex = 0; + labelXAxisUnit3.Text = "mm"; + // + // labelXAxisUnit2 + // + labelXAxisUnit2.AutoSize = true; + labelXAxisUnit2.Location = new Point(304, 144); + labelXAxisUnit2.Name = "labelXAxisUnit2"; + labelXAxisUnit2.Size = new Size(51, 35); + labelXAxisUnit2.TabIndex = 0; + labelXAxisUnit2.Text = "mm"; + // + // labelXAxisUnit1 + // + labelXAxisUnit1.AutoSize = true; + labelXAxisUnit1.Location = new Point(186, 67); + labelXAxisUnit1.Name = "labelXAxisUnit1"; + labelXAxisUnit1.Size = new Size(51, 35); + labelXAxisUnit1.TabIndex = 0; + labelXAxisUnit1.Text = "mm"; + // + // panelXAxisCurrent + // + panelXAxisCurrent.BackColor = Color.FromArgb(128, 255, 255); + panelXAxisCurrent.BorderStyle = BorderStyle.Fixed3D; + panelXAxisCurrent.Controls.Add(labelXAxisUnit9); + panelXAxisCurrent.Controls.Add(labelXAxisUnit8); + panelXAxisCurrent.Controls.Add(textBoxXAxisActualCurrent); + panelXAxisCurrent.Controls.Add(pictureBoxXAxisCurrent); + panelXAxisCurrent.Font = new Font("宋体", 26.25F, FontStyle.Regular, GraphicsUnit.Point, 134); + panelXAxisCurrent.Location = new Point(4, 580); + panelXAxisCurrent.Name = "panelXAxisCurrent"; + panelXAxisCurrent.Size = new Size(365, 80); + panelXAxisCurrent.TabIndex = 2; + // + // labelXAxisUnit9 + // + labelXAxisUnit9.AutoSize = true; + labelXAxisUnit9.Location = new Point(245, 19); + labelXAxisUnit9.Name = "labelXAxisUnit9"; + labelXAxisUnit9.Size = new Size(33, 35); + labelXAxisUnit9.TabIndex = 14; + labelXAxisUnit9.Text = "A"; + // + // labelXAxisUnit8 + // + labelXAxisUnit8.AutoSize = true; + labelXAxisUnit8.Location = new Point(6, 19); + labelXAxisUnit8.Name = "labelXAxisUnit8"; + labelXAxisUnit8.Size = new Size(85, 35); + labelXAxisUnit8.TabIndex = 15; + labelXAxisUnit8.Text = "电流"; + // + // textBoxXAxisActualCurrent + // + textBoxXAxisActualCurrent.Location = new Point(102, 14); + textBoxXAxisActualCurrent.Name = "textBoxXAxisActualCurrent"; + textBoxXAxisActualCurrent.Size = new Size(140, 47); + textBoxXAxisActualCurrent.TabIndex = 10; + textBoxXAxisActualCurrent.Text = "0"; + textBoxXAxisActualCurrent.TextAlign = HorizontalAlignment.Right; + // + // pictureBoxXAxisCurrent + // + pictureBoxXAxisCurrent.Image = ImageResource.CurrentOff; + pictureBoxXAxisCurrent.Location = new Point(291, 10); + pictureBoxXAxisCurrent.Name = "pictureBoxXAxisCurrent"; + pictureBoxXAxisCurrent.Size = new Size(52, 52); + pictureBoxXAxisCurrent.TabIndex = 7; + pictureBoxXAxisCurrent.TabStop = false; + // + // panelYAxisCurrent + // + panelYAxisCurrent.BackColor = Color.FromArgb(128, 255, 255); + panelYAxisCurrent.BorderStyle = BorderStyle.Fixed3D; + panelYAxisCurrent.Controls.Add(labelYAxisUnit9); + panelYAxisCurrent.Controls.Add(labelYAxisUnit8); + panelYAxisCurrent.Controls.Add(textBoxYAxisActualCurrent); + panelYAxisCurrent.Controls.Add(pictureBoxYAxisCurrent); + panelYAxisCurrent.Font = new Font("宋体", 26.25F, FontStyle.Regular, GraphicsUnit.Point, 134); + panelYAxisCurrent.Location = new Point(371, 580); + panelYAxisCurrent.Name = "panelYAxisCurrent"; + panelYAxisCurrent.Size = new Size(365, 80); + panelYAxisCurrent.TabIndex = 5; + // + // labelYAxisUnit9 + // + labelYAxisUnit9.AutoSize = true; + labelYAxisUnit9.Location = new Point(245, 19); + labelYAxisUnit9.Name = "labelYAxisUnit9"; + labelYAxisUnit9.Size = new Size(33, 35); + labelYAxisUnit9.TabIndex = 14; + labelYAxisUnit9.Text = "A"; + // + // labelYAxisUnit8 + // + labelYAxisUnit8.AutoSize = true; + labelYAxisUnit8.Location = new Point(6, 19); + labelYAxisUnit8.Name = "labelYAxisUnit8"; + labelYAxisUnit8.Size = new Size(85, 35); + labelYAxisUnit8.TabIndex = 15; + labelYAxisUnit8.Text = "电流"; + // + // textBoxYAxisActualCurrent + // + textBoxYAxisActualCurrent.Location = new Point(102, 14); + textBoxYAxisActualCurrent.Name = "textBoxYAxisActualCurrent"; + textBoxYAxisActualCurrent.Size = new Size(140, 47); + textBoxYAxisActualCurrent.TabIndex = 10; + textBoxYAxisActualCurrent.Text = "0"; + textBoxYAxisActualCurrent.TextAlign = HorizontalAlignment.Right; + // + // pictureBoxYAxisCurrent + // + pictureBoxYAxisCurrent.Image = ImageResource.CurrentOff; + pictureBoxYAxisCurrent.Location = new Point(291, 10); + pictureBoxYAxisCurrent.Name = "pictureBoxYAxisCurrent"; + pictureBoxYAxisCurrent.Size = new Size(52, 52); + pictureBoxYAxisCurrent.TabIndex = 7; + pictureBoxYAxisCurrent.TabStop = false; + // + // panelYAxisContent + // + panelYAxisContent.BackColor = Color.FromArgb(0, 170, 232); + panelYAxisContent.BorderStyle = BorderStyle.Fixed3D; + panelYAxisContent.Controls.Add(pictureBoxYAxisSoftLowerLimit); + panelYAxisContent.Controls.Add(labelYAxisUnit7); + panelYAxisContent.Controls.Add(labelYAxisUnit6); + panelYAxisContent.Controls.Add(labelYAxisUnit5); + panelYAxisContent.Controls.Add(trackBarYAxisActualSpeed); + panelYAxisContent.Controls.Add(textBoxYAxisSoftLowerLimit); + panelYAxisContent.Controls.Add(textBoxYAxisTargetPosition); + panelYAxisContent.Controls.Add(textBoxYAxisSoftUpperLimit); + panelYAxisContent.Controls.Add(pictureBoxYAxisSoftUpperLimit); + panelYAxisContent.Controls.Add(buttonYAxisJogDown); + panelYAxisContent.Controls.Add(buttonYAxisJogUp); + panelYAxisContent.Controls.Add(buttonYAxisRun); + panelYAxisContent.Controls.Add(buttonYAxisHome); + panelYAxisContent.Controls.Add(buttonYAxisEnable); + panelYAxisContent.Controls.Add(textBoxYAxisActualPositon); + panelYAxisContent.Controls.Add(labelYAxisUnit4); + panelYAxisContent.Controls.Add(labelYAxisUnit3); + panelYAxisContent.Controls.Add(labelYAxisUnit2); + panelYAxisContent.Controls.Add(labelYAxisUnit1); + panelYAxisContent.Font = new Font("宋体", 26.25F, FontStyle.Regular, GraphicsUnit.Point, 134); + panelYAxisContent.Location = new Point(371, 108); + panelYAxisContent.Name = "panelYAxisContent"; + panelYAxisContent.Size = new Size(365, 469); + panelYAxisContent.TabIndex = 4; + // + // pictureBoxYAxisSoftLowerLimit + // + pictureBoxYAxisSoftLowerLimit.Image = ImageResource.PositionOff; + pictureBoxYAxisSoftLowerLimit.Location = new Point(31, 311); + pictureBoxYAxisSoftLowerLimit.Name = "pictureBoxYAxisSoftLowerLimit"; + pictureBoxYAxisSoftLowerLimit.Size = new Size(72, 24); + pictureBoxYAxisSoftLowerLimit.TabIndex = 15; + pictureBoxYAxisSoftLowerLimit.TabStop = false; + // + // labelYAxisUnit7 + // + labelYAxisUnit7.AutoSize = true; + labelYAxisUnit7.Location = new Point(293, 413); + labelYAxisUnit7.Name = "labelYAxisUnit7"; + labelYAxisUnit7.Size = new Size(51, 35); + labelYAxisUnit7.TabIndex = 14; + labelYAxisUnit7.Text = "20"; + // + // labelYAxisUnit6 + // + labelYAxisUnit6.AutoSize = true; + labelYAxisUnit6.Location = new Point(153, 413); + labelYAxisUnit6.Name = "labelYAxisUnit6"; + labelYAxisUnit6.Size = new Size(51, 35); + labelYAxisUnit6.TabIndex = 13; + labelYAxisUnit6.Text = "12"; + // + // labelYAxisUnit5 + // + labelYAxisUnit5.AutoSize = true; + labelYAxisUnit5.Location = new Point(19, 413); + labelYAxisUnit5.Name = "labelYAxisUnit5"; + labelYAxisUnit5.Size = new Size(33, 35); + labelYAxisUnit5.TabIndex = 12; + labelYAxisUnit5.Text = "4"; + // + // trackBarYAxisActualSpeed + // + trackBarYAxisActualSpeed.Cursor = Cursors.Hand; + trackBarYAxisActualSpeed.LargeChange = 1; + trackBarYAxisActualSpeed.Location = new Point(21, 381); + trackBarYAxisActualSpeed.Maximum = 5; + trackBarYAxisActualSpeed.Minimum = 1; + trackBarYAxisActualSpeed.Name = "trackBarYAxisActualSpeed"; + trackBarYAxisActualSpeed.Size = new Size(311, 45); + trackBarYAxisActualSpeed.TabIndex = 11; + trackBarYAxisActualSpeed.Value = 1; + // + // textBoxYAxisSoftLowerLimit + // + textBoxYAxisSoftLowerLimit.Location = new Point(197, 301); + textBoxYAxisSoftLowerLimit.Name = "textBoxYAxisSoftLowerLimit"; + textBoxYAxisSoftLowerLimit.Size = new Size(103, 47); + textBoxYAxisSoftLowerLimit.TabIndex = 10; + textBoxYAxisSoftLowerLimit.Text = "-10"; + textBoxYAxisSoftLowerLimit.TextAlign = HorizontalAlignment.Right; + // + // textBoxYAxisTargetPosition + // + textBoxYAxisTargetPosition.Location = new Point(197, 221); + textBoxYAxisTargetPosition.Name = "textBoxYAxisTargetPosition"; + textBoxYAxisTargetPosition.Size = new Size(103, 47); + textBoxYAxisTargetPosition.TabIndex = 9; + textBoxYAxisTargetPosition.Text = "0"; + textBoxYAxisTargetPosition.TextAlign = HorizontalAlignment.Right; + // + // textBoxYAxisSoftUpperLimit + // + textBoxYAxisSoftUpperLimit.Location = new Point(197, 140); + textBoxYAxisSoftUpperLimit.Name = "textBoxYAxisSoftUpperLimit"; + textBoxYAxisSoftUpperLimit.Size = new Size(103, 47); + textBoxYAxisSoftUpperLimit.TabIndex = 8; + textBoxYAxisSoftUpperLimit.Text = "200"; + textBoxYAxisSoftUpperLimit.TextAlign = HorizontalAlignment.Right; + // + // pictureBoxYAxisSoftUpperLimit + // + pictureBoxYAxisSoftUpperLimit.Image = ImageResource.PositionOff; + pictureBoxYAxisSoftUpperLimit.Location = new Point(31, 155); + pictureBoxYAxisSoftUpperLimit.Name = "pictureBoxYAxisSoftUpperLimit"; + pictureBoxYAxisSoftUpperLimit.Size = new Size(72, 24); + pictureBoxYAxisSoftUpperLimit.TabIndex = 6; + pictureBoxYAxisSoftUpperLimit.TabStop = false; + // + // buttonYAxisJogDown + // + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + buttonYAxisJogDown.Location = new Point(112, 288); + buttonYAxisJogDown.Name = "buttonYAxisJogDown"; + buttonYAxisJogDown.Size = new Size(72, 72); + buttonYAxisJogDown.TabIndex = 5; + buttonYAxisJogDown.Text = " "; + buttonYAxisJogDown.UseVisualStyleBackColor = true; + // + // buttonYAxisJogUp + // + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogUp.Location = new Point(112, 128); + buttonYAxisJogUp.Name = "buttonYAxisJogUp"; + buttonYAxisJogUp.Size = new Size(72, 72); + buttonYAxisJogUp.TabIndex = 4; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogUp.UseVisualStyleBackColor = true; + // + // buttonYAxisRun + // + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisRun.Location = new Point(112, 208); + buttonYAxisRun.Name = "buttonYAxisRun"; + buttonYAxisRun.Size = new Size(72, 72); + buttonYAxisRun.TabIndex = 3; + buttonYAxisRun.Text = " "; + buttonYAxisRun.UseVisualStyleBackColor = true; + // + // buttonYAxisHome + // + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisHome.Location = new Point(32, 208); + buttonYAxisHome.Name = "buttonYAxisHome"; + buttonYAxisHome.Size = new Size(72, 72); + buttonYAxisHome.TabIndex = 2; + buttonYAxisHome.Text = " "; + buttonYAxisHome.UseVisualStyleBackColor = true; + // + // buttonYAxisEnable + // + buttonYAxisEnable.Image = ImageResource.EnableOff; + buttonYAxisEnable.Location = new Point(248, 21); + buttonYAxisEnable.Name = "buttonYAxisEnable"; + buttonYAxisEnable.Size = new Size(84, 94); + buttonYAxisEnable.TabIndex = 1; + buttonYAxisEnable.Text = " "; + buttonYAxisEnable.UseVisualStyleBackColor = true; + // + // textBoxYAxisActualPositon + // + textBoxYAxisActualPositon.Font = new Font("宋体", 36F, FontStyle.Regular, GraphicsUnit.Point, 134); + textBoxYAxisActualPositon.Location = new Point(26, 53); + textBoxYAxisActualPositon.Name = "textBoxYAxisActualPositon"; + textBoxYAxisActualPositon.Size = new Size(158, 62); + textBoxYAxisActualPositon.TabIndex = 0; + textBoxYAxisActualPositon.Text = "0"; + // + // labelYAxisUnit4 + // + labelYAxisUnit4.AutoSize = true; + labelYAxisUnit4.Location = new Point(304, 304); + labelYAxisUnit4.Name = "labelYAxisUnit4"; + labelYAxisUnit4.Size = new Size(51, 35); + labelYAxisUnit4.TabIndex = 0; + labelYAxisUnit4.Text = "mm"; + // + // labelYAxisUnit3 + // + labelYAxisUnit3.AutoSize = true; + labelYAxisUnit3.Location = new Point(304, 224); + labelYAxisUnit3.Name = "labelYAxisUnit3"; + labelYAxisUnit3.Size = new Size(51, 35); + labelYAxisUnit3.TabIndex = 0; + labelYAxisUnit3.Text = "mm"; + // + // labelYAxisUnit2 + // + labelYAxisUnit2.AutoSize = true; + labelYAxisUnit2.Location = new Point(304, 144); + labelYAxisUnit2.Name = "labelYAxisUnit2"; + labelYAxisUnit2.Size = new Size(51, 35); + labelYAxisUnit2.TabIndex = 0; + labelYAxisUnit2.Text = "mm"; + // + // labelYAxisUnit1 + // + labelYAxisUnit1.AutoSize = true; + labelYAxisUnit1.Location = new Point(186, 67); + labelYAxisUnit1.Name = "labelYAxisUnit1"; + labelYAxisUnit1.Size = new Size(51, 35); + labelYAxisUnit1.TabIndex = 0; + labelYAxisUnit1.Text = "mm"; + // + // panelYAxisTitle + // + panelYAxisTitle.BackColor = Color.FromArgb(23, 76, 133); + panelYAxisTitle.BorderStyle = BorderStyle.Fixed3D; + panelYAxisTitle.Controls.Add(labelYAxisTitle); + panelYAxisTitle.Location = new Point(371, 5); + panelYAxisTitle.Name = "panelYAxisTitle"; + panelYAxisTitle.Size = new Size(365, 100); + panelYAxisTitle.TabIndex = 3; + // + // labelYAxisTitle + // + labelYAxisTitle.AutoSize = true; + labelYAxisTitle.BackColor = Color.Transparent; + labelYAxisTitle.Font = new Font("Times New Roman", 42F, FontStyle.Bold, GraphicsUnit.Point, 0); + labelYAxisTitle.ForeColor = SystemColors.Window; + labelYAxisTitle.Location = new Point(68, 15); + labelYAxisTitle.Name = "labelYAxisTitle"; + labelYAxisTitle.Size = new Size(238, 63); + labelYAxisTitle.TabIndex = 0; + labelYAxisTitle.Text = "Y轴电机"; + // + // panelFuelAssemble + // + panelFuelAssemble.Controls.Add(pictureBoxFuelAssembleCursor); + panelFuelAssemble.Location = new Point(4, 664); + panelFuelAssemble.Name = "panelFuelAssemble"; + panelFuelAssemble.Size = new Size(852, 115); + panelFuelAssemble.TabIndex = 6; + // + // pictureBoxFuelAssembleCursor + // + pictureBoxFuelAssembleCursor.BackColor = Color.Transparent; + pictureBoxFuelAssembleCursor.Image = ImageResource.FuelAssembleCursor; + pictureBoxFuelAssembleCursor.Location = new Point(0, 13); + pictureBoxFuelAssembleCursor.Name = "pictureBoxFuelAssembleCursor"; + pictureBoxFuelAssembleCursor.Size = new Size(14, 100); + pictureBoxFuelAssembleCursor.TabIndex = 1; + pictureBoxFuelAssembleCursor.TabStop = false; + // + // panelZAxisCurrent + // + panelZAxisCurrent.BackColor = Color.FromArgb(128, 255, 255); + panelZAxisCurrent.BorderStyle = BorderStyle.Fixed3D; + panelZAxisCurrent.Controls.Add(labelZAxisUnit9); + panelZAxisCurrent.Controls.Add(labelZAxisUnit8); + panelZAxisCurrent.Controls.Add(textBoxZAxisActualCurrent); + panelZAxisCurrent.Controls.Add(pictureBoxZAxisCurrent); + panelZAxisCurrent.Font = new Font("宋体", 26.25F, FontStyle.Regular, GraphicsUnit.Point, 134); + panelZAxisCurrent.Location = new Point(738, 580); + panelZAxisCurrent.Name = "panelZAxisCurrent"; + panelZAxisCurrent.Size = new Size(365, 80); + panelZAxisCurrent.TabIndex = 9; + // + // labelZAxisUnit9 + // + labelZAxisUnit9.AutoSize = true; + labelZAxisUnit9.Location = new Point(245, 19); + labelZAxisUnit9.Name = "labelZAxisUnit9"; + labelZAxisUnit9.Size = new Size(33, 35); + labelZAxisUnit9.TabIndex = 14; + labelZAxisUnit9.Text = "A"; + // + // labelZAxisUnit8 + // + labelZAxisUnit8.AutoSize = true; + labelZAxisUnit8.Location = new Point(6, 19); + labelZAxisUnit8.Name = "labelZAxisUnit8"; + labelZAxisUnit8.Size = new Size(85, 35); + labelZAxisUnit8.TabIndex = 15; + labelZAxisUnit8.Text = "电流"; + // + // textBoxZAxisActualCurrent + // + textBoxZAxisActualCurrent.Location = new Point(102, 14); + textBoxZAxisActualCurrent.Name = "textBoxZAxisActualCurrent"; + textBoxZAxisActualCurrent.Size = new Size(140, 47); + textBoxZAxisActualCurrent.TabIndex = 10; + textBoxZAxisActualCurrent.Text = "0"; + textBoxZAxisActualCurrent.TextAlign = HorizontalAlignment.Right; + // + // pictureBoxZAxisCurrent + // + pictureBoxZAxisCurrent.Image = ImageResource.CurrentOff; + pictureBoxZAxisCurrent.Location = new Point(291, 10); + pictureBoxZAxisCurrent.Name = "pictureBoxZAxisCurrent"; + pictureBoxZAxisCurrent.Size = new Size(52, 52); + pictureBoxZAxisCurrent.TabIndex = 7; + pictureBoxZAxisCurrent.TabStop = false; + // + // panelZAxisContent + // + panelZAxisContent.BackColor = Color.FromArgb(0, 170, 232); + panelZAxisContent.BorderStyle = BorderStyle.Fixed3D; + panelZAxisContent.Controls.Add(pictureBoxZAxisSoftLowerLimit); + panelZAxisContent.Controls.Add(labelZAxisUnit7); + panelZAxisContent.Controls.Add(labelZAxisUnit6); + panelZAxisContent.Controls.Add(labelZAxisUnit5); + panelZAxisContent.Controls.Add(trackBarZAxisActualSpeed); + panelZAxisContent.Controls.Add(textBoxZAxisSoftLowerLimit); + panelZAxisContent.Controls.Add(textBoxZAxisTargetPosition); + panelZAxisContent.Controls.Add(textBoxZAxisSoftUpperLimit); + panelZAxisContent.Controls.Add(pictureBoxZAxisSoftUpperLimit); + panelZAxisContent.Controls.Add(buttonZAxisJogDown); + panelZAxisContent.Controls.Add(buttonZAxisJogUp); + panelZAxisContent.Controls.Add(buttonZAxisRun); + panelZAxisContent.Controls.Add(buttonZAxisHome); + panelZAxisContent.Controls.Add(buttonZAxisEnable); + panelZAxisContent.Controls.Add(textBoxZAxisActualPositon); + panelZAxisContent.Controls.Add(labelZAxisUnit4); + panelZAxisContent.Controls.Add(labelZAxisUnit3); + panelZAxisContent.Controls.Add(labelZAxisUnit2); + panelZAxisContent.Controls.Add(labelZAxisUnit1); + panelZAxisContent.Font = new Font("宋体", 26.25F, FontStyle.Regular, GraphicsUnit.Point, 134); + panelZAxisContent.Location = new Point(738, 108); + panelZAxisContent.Name = "panelZAxisContent"; + panelZAxisContent.Size = new Size(365, 469); + panelZAxisContent.TabIndex = 8; + // + // pictureBoxZAxisSoftLowerLimit + // + pictureBoxZAxisSoftLowerLimit.Image = ImageResource.PositionOff; + pictureBoxZAxisSoftLowerLimit.Location = new Point(31, 311); + pictureBoxZAxisSoftLowerLimit.Name = "pictureBoxZAxisSoftLowerLimit"; + pictureBoxZAxisSoftLowerLimit.Size = new Size(72, 24); + pictureBoxZAxisSoftLowerLimit.TabIndex = 15; + pictureBoxZAxisSoftLowerLimit.TabStop = false; + // + // labelZAxisUnit7 + // + labelZAxisUnit7.AutoSize = true; + labelZAxisUnit7.Location = new Point(293, 413); + labelZAxisUnit7.Name = "labelZAxisUnit7"; + labelZAxisUnit7.Size = new Size(51, 35); + labelZAxisUnit7.TabIndex = 14; + labelZAxisUnit7.Text = "20"; + // + // labelZAxisUnit6 + // + labelZAxisUnit6.AutoSize = true; + labelZAxisUnit6.Location = new Point(153, 413); + labelZAxisUnit6.Name = "labelZAxisUnit6"; + labelZAxisUnit6.Size = new Size(51, 35); + labelZAxisUnit6.TabIndex = 13; + labelZAxisUnit6.Text = "12"; + // + // labelZAxisUnit5 + // + labelZAxisUnit5.AutoSize = true; + labelZAxisUnit5.Location = new Point(19, 413); + labelZAxisUnit5.Name = "labelZAxisUnit5"; + labelZAxisUnit5.Size = new Size(33, 35); + labelZAxisUnit5.TabIndex = 12; + labelZAxisUnit5.Text = "4"; + // + // trackBarZAxisActualSpeed + // + trackBarZAxisActualSpeed.Cursor = Cursors.Hand; + trackBarZAxisActualSpeed.LargeChange = 1; + trackBarZAxisActualSpeed.Location = new Point(21, 381); + trackBarZAxisActualSpeed.Maximum = 5; + trackBarZAxisActualSpeed.Minimum = 1; + trackBarZAxisActualSpeed.Name = "trackBarZAxisActualSpeed"; + trackBarZAxisActualSpeed.Size = new Size(311, 45); + trackBarZAxisActualSpeed.TabIndex = 11; + trackBarZAxisActualSpeed.Value = 1; + // + // textBoxZAxisSoftLowerLimit + // + textBoxZAxisSoftLowerLimit.Location = new Point(197, 301); + textBoxZAxisSoftLowerLimit.Name = "textBoxZAxisSoftLowerLimit"; + textBoxZAxisSoftLowerLimit.Size = new Size(103, 47); + textBoxZAxisSoftLowerLimit.TabIndex = 10; + textBoxZAxisSoftLowerLimit.Text = "-10"; + textBoxZAxisSoftLowerLimit.TextAlign = HorizontalAlignment.Right; + // + // textBoxZAxisTargetPosition + // + textBoxZAxisTargetPosition.Location = new Point(197, 221); + textBoxZAxisTargetPosition.Name = "textBoxZAxisTargetPosition"; + textBoxZAxisTargetPosition.Size = new Size(103, 47); + textBoxZAxisTargetPosition.TabIndex = 9; + textBoxZAxisTargetPosition.Text = "0"; + textBoxZAxisTargetPosition.TextAlign = HorizontalAlignment.Right; + // + // textBoxZAxisSoftUpperLimit + // + textBoxZAxisSoftUpperLimit.Location = new Point(197, 140); + textBoxZAxisSoftUpperLimit.Name = "textBoxZAxisSoftUpperLimit"; + textBoxZAxisSoftUpperLimit.Size = new Size(103, 47); + textBoxZAxisSoftUpperLimit.TabIndex = 8; + textBoxZAxisSoftUpperLimit.Text = "300"; + textBoxZAxisSoftUpperLimit.TextAlign = HorizontalAlignment.Right; + // + // pictureBoxZAxisSoftUpperLimit + // + pictureBoxZAxisSoftUpperLimit.Image = ImageResource.PositionOff; + pictureBoxZAxisSoftUpperLimit.Location = new Point(31, 155); + pictureBoxZAxisSoftUpperLimit.Name = "pictureBoxZAxisSoftUpperLimit"; + pictureBoxZAxisSoftUpperLimit.Size = new Size(72, 24); + pictureBoxZAxisSoftUpperLimit.TabIndex = 6; + pictureBoxZAxisSoftUpperLimit.TabStop = false; + // + // buttonZAxisJogDown + // + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + buttonZAxisJogDown.Location = new Point(112, 288); + buttonZAxisJogDown.Name = "buttonZAxisJogDown"; + buttonZAxisJogDown.Size = new Size(72, 72); + buttonZAxisJogDown.TabIndex = 5; + buttonZAxisJogDown.Text = " "; + buttonZAxisJogDown.UseVisualStyleBackColor = true; + // + // buttonZAxisJogUp + // + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogUp.Location = new Point(112, 128); + buttonZAxisJogUp.Name = "buttonZAxisJogUp"; + buttonZAxisJogUp.Size = new Size(72, 72); + buttonZAxisJogUp.TabIndex = 4; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogUp.UseVisualStyleBackColor = true; + // + // buttonZAxisRun + // + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisRun.Location = new Point(112, 208); + buttonZAxisRun.Name = "buttonZAxisRun"; + buttonZAxisRun.Size = new Size(72, 72); + buttonZAxisRun.TabIndex = 3; + buttonZAxisRun.Text = " "; + buttonZAxisRun.UseVisualStyleBackColor = true; + // + // buttonZAxisHome + // + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisHome.Location = new Point(32, 208); + buttonZAxisHome.Name = "buttonZAxisHome"; + buttonZAxisHome.Size = new Size(72, 72); + buttonZAxisHome.TabIndex = 2; + buttonZAxisHome.Text = " "; + buttonZAxisHome.UseVisualStyleBackColor = true; + // + // buttonZAxisEnable + // + buttonZAxisEnable.Image = ImageResource.EnableOff; + buttonZAxisEnable.Location = new Point(248, 21); + buttonZAxisEnable.Name = "buttonZAxisEnable"; + buttonZAxisEnable.Size = new Size(84, 94); + buttonZAxisEnable.TabIndex = 1; + buttonZAxisEnable.Text = " "; + buttonZAxisEnable.UseVisualStyleBackColor = true; + // + // textBoxZAxisActualPositon + // + textBoxZAxisActualPositon.Font = new Font("宋体", 36F, FontStyle.Regular, GraphicsUnit.Point, 134); + textBoxZAxisActualPositon.Location = new Point(26, 53); + textBoxZAxisActualPositon.Name = "textBoxZAxisActualPositon"; + textBoxZAxisActualPositon.Size = new Size(158, 62); + textBoxZAxisActualPositon.TabIndex = 0; + textBoxZAxisActualPositon.Text = "0"; + // + // labelZAxisUnit4 + // + labelZAxisUnit4.AutoSize = true; + labelZAxisUnit4.Location = new Point(304, 304); + labelZAxisUnit4.Name = "labelZAxisUnit4"; + labelZAxisUnit4.Size = new Size(51, 35); + labelZAxisUnit4.TabIndex = 0; + labelZAxisUnit4.Text = "mm"; + // + // labelZAxisUnit3 + // + labelZAxisUnit3.AutoSize = true; + labelZAxisUnit3.Location = new Point(304, 224); + labelZAxisUnit3.Name = "labelZAxisUnit3"; + labelZAxisUnit3.Size = new Size(51, 35); + labelZAxisUnit3.TabIndex = 0; + labelZAxisUnit3.Text = "mm"; + // + // labelZAxisUnit2 + // + labelZAxisUnit2.AutoSize = true; + labelZAxisUnit2.Location = new Point(304, 144); + labelZAxisUnit2.Name = "labelZAxisUnit2"; + labelZAxisUnit2.Size = new Size(51, 35); + labelZAxisUnit2.TabIndex = 0; + labelZAxisUnit2.Text = "mm"; + // + // labelZAxisUnit1 + // + labelZAxisUnit1.AutoSize = true; + labelZAxisUnit1.Location = new Point(186, 67); + labelZAxisUnit1.Name = "labelZAxisUnit1"; + labelZAxisUnit1.Size = new Size(51, 35); + labelZAxisUnit1.TabIndex = 0; + labelZAxisUnit1.Text = "mm"; + // + // panelZAxisTitle + // + panelZAxisTitle.BackColor = Color.FromArgb(23, 76, 133); + panelZAxisTitle.BorderStyle = BorderStyle.Fixed3D; + panelZAxisTitle.Controls.Add(labelZAxisTitle); + panelZAxisTitle.Location = new Point(738, 5); + panelZAxisTitle.Name = "panelZAxisTitle"; + panelZAxisTitle.Size = new Size(365, 100); + panelZAxisTitle.TabIndex = 7; + // + // labelZAxisTitle + // + labelZAxisTitle.AutoSize = true; + labelZAxisTitle.BackColor = Color.Transparent; + labelZAxisTitle.Font = new Font("Times New Roman", 42F, FontStyle.Bold, GraphicsUnit.Point, 0); + labelZAxisTitle.ForeColor = SystemColors.Window; + labelZAxisTitle.Location = new Point(68, 15); + labelZAxisTitle.Name = "labelZAxisTitle"; + labelZAxisTitle.Size = new Size(235, 63); + labelZAxisTitle.TabIndex = 0; + labelZAxisTitle.Text = "Z轴电机"; + // + // panel2 + // + panel2.BackColor = Color.Transparent; + panel2.BackgroundImage = ImageResource.第二部分1; + panel2.BackgroundImageLayout = ImageLayout.Stretch; + panel2.Controls.Add(pictureBox1); + panel2.Location = new Point(44, 95); + panel2.Name = "panel2"; + panel2.Size = new Size(194, 358); + panel2.TabIndex = 0; + // + // pictureBox1 + // + pictureBox1.BackColor = Color.Transparent; + pictureBox1.BackgroundImage = ImageResource.第三部分1; + pictureBox1.BackgroundImageLayout = ImageLayout.Stretch; + pictureBox1.Location = new Point(51, 49); + pictureBox1.Name = "pictureBox1"; + pictureBox1.Size = new Size(111, 250); + pictureBox1.TabIndex = 0; + pictureBox1.TabStop = false; + // + // texPicturePosition + // + texPicturePosition.Location = new Point(408, 32); + texPicturePosition.Name = "texPicturePosition"; + texPicturePosition.Size = new Size(100, 23); + texPicturePosition.TabIndex = 1; + // + // pictureMoveBottomPanel + // + pictureMoveBottomPanel.BackColor = Color.FromArgb(0, 170, 232); + pictureMoveBottomPanel.BackgroundImage = ImageResource.第一部分; + pictureMoveBottomPanel.BackgroundImageLayout = ImageLayout.Center; + pictureMoveBottomPanel.Controls.Add(texPicturePosition); + pictureMoveBottomPanel.Controls.Add(panel2); + pictureMoveBottomPanel.Location = new Point(1109, 5); + pictureMoveBottomPanel.Name = "pictureMoveBottomPanel"; + pictureMoveBottomPanel.Size = new Size(551, 447); + pictureMoveBottomPanel.TabIndex = 10; + // + // MainForm + // + AutoScaleDimensions = new SizeF(7F, 17F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1924, 1061); + Controls.Add(pictureMoveBottomPanel); + Controls.Add(panelZAxisCurrent); + Controls.Add(panelZAxisContent); + Controls.Add(panelZAxisTitle); + Controls.Add(panelFuelAssemble); + Controls.Add(panelYAxisCurrent); + Controls.Add(panelYAxisContent); + Controls.Add(panelYAxisTitle); + Controls.Add(panelXAxisCurrent); + Controls.Add(panelXAxisContent); + Controls.Add(panelXAxisTitle); + Icon = (Icon)resources.GetObject("$this.Icon"); + Name = "MainForm"; + StartPosition = FormStartPosition.CenterScreen; + Text = "燃料组件池边检查项目X轴Y轴Z轴电机单轴测试"; + Load += MainForm_Load; + panelXAxisTitle.ResumeLayout(false); + panelXAxisTitle.PerformLayout(); + panelXAxisContent.ResumeLayout(false); + panelXAxisContent.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxXAxisSoftLowerLimit).EndInit(); + ((System.ComponentModel.ISupportInitialize)trackBarXAxisActualSpeed).EndInit(); + ((System.ComponentModel.ISupportInitialize)pictureBoxXAxisSoftUpperLimit).EndInit(); + panelXAxisCurrent.ResumeLayout(false); + panelXAxisCurrent.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxXAxisCurrent).EndInit(); + panelYAxisCurrent.ResumeLayout(false); + panelYAxisCurrent.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxYAxisCurrent).EndInit(); + panelYAxisContent.ResumeLayout(false); + panelYAxisContent.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxYAxisSoftLowerLimit).EndInit(); + ((System.ComponentModel.ISupportInitialize)trackBarYAxisActualSpeed).EndInit(); + ((System.ComponentModel.ISupportInitialize)pictureBoxYAxisSoftUpperLimit).EndInit(); + panelYAxisTitle.ResumeLayout(false); + panelYAxisTitle.PerformLayout(); + panelFuelAssemble.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)pictureBoxFuelAssembleCursor).EndInit(); + panelZAxisCurrent.ResumeLayout(false); + panelZAxisCurrent.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxZAxisCurrent).EndInit(); + panelZAxisContent.ResumeLayout(false); + panelZAxisContent.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)pictureBoxZAxisSoftLowerLimit).EndInit(); + ((System.ComponentModel.ISupportInitialize)trackBarZAxisActualSpeed).EndInit(); + ((System.ComponentModel.ISupportInitialize)pictureBoxZAxisSoftUpperLimit).EndInit(); + panelZAxisTitle.ResumeLayout(false); + panelZAxisTitle.PerformLayout(); + panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); + pictureMoveBottomPanel.ResumeLayout(false); + pictureMoveBottomPanel.PerformLayout(); + ResumeLayout(false); + } + + #endregion + + private System.Windows.Forms.Timer timerXAxisActualPosition; + private System.Windows.Forms.Timer timerXAxisCurrent; + private System.Windows.Forms.Timer timerXAxisHomeComplete; + private System.Windows.Forms.Timer timerXAxisRunComplete; + private Panel panelXAxisTitle; + private Label labelXAxisTitle; + private Panel panelXAxisContent; + private Panel panelXAxisCurrent; + private TextBox textBoxXAxisActualPositon; + private Button buttonXAxisHome; + private Button buttonXAxisEnable; + private Label labelXAxisUnit1; + private PictureBox pictureBoxXAxisCurrent; + private PictureBox pictureBoxXAxisSoftUpperLimit; + private Button buttonXAxisJogDown; + private Button buttonXAxisJogUp; + private Button buttonXAxisRun; + private TextBox textBoxXAxisSoftLowerLimit; + private TextBox textBoxXAxisTargetPosition; + private TextBox textBoxXAxisSoftUpperLimit; + private Label labelXAxisUnit7; + private Label labelXAxisUnit6; + private Label labelXAxisUnit5; + private TrackBar trackBarXAxisActualSpeed; + private Label labelXAxisUnit4; + private Label labelXAxisUnit3; + private Label labelXAxisUnit2; + private Label labelXAxisUnit9; + private Label labelXAxisUnit8; + private TextBox textBoxXAxisActualCurrent; + private PictureBox pictureBoxXAxisSoftLowerLimit; + private Panel panelYAxisCurrent; + private Label labelYAxisUnit9; + private Label labelYAxisUnit8; + private TextBox textBoxYAxisActualCurrent; + private PictureBox pictureBoxYAxisCurrent; + private Panel panelYAxisContent; + private PictureBox pictureBoxYAxisSoftLowerLimit; + private Label labelYAxisUnit7; + private Label labelYAxisUnit6; + private Label labelYAxisUnit5; + private TrackBar trackBarYAxisActualSpeed; + private TextBox textBoxYAxisSoftLowerLimit; + private TextBox textBoxYAxisTargetPosition; + private TextBox textBoxYAxisSoftUpperLimit; + private PictureBox pictureBoxYAxisSoftUpperLimit; + private Button buttonYAxisJogDown; + private Button buttonYAxisJogUp; + private Button buttonYAxisRun; + private Button buttonYAxisHome; + private Button buttonYAxisEnable; + private TextBox textBoxYAxisActualPositon; + private Label labelYAxisUnit4; + private Label labelYAxisUnit3; + private Label labelYAxisUnit2; + private Label labelYAxisUnit1; + private Panel panelYAxisTitle; + private Label labelYAxisTitle; + private System.Windows.Forms.Timer timerYAxisActualPosition; + private System.Windows.Forms.Timer timerYAxisCurrent; + private System.Windows.Forms.Timer timerYAxisHomeComplete; + private System.Windows.Forms.Timer timerYAxisRunComplete; + private Panel panelFuelAssemble; + private PictureBox pictureBoxFuelAssembleCursor; + private Panel panelZAxisCurrent; + private Label labelZAxisUnit9; + private Label labelZAxisUnit8; + private TextBox textBoxZAxisActualCurrent; + private PictureBox pictureBoxZAxisCurrent; + private Panel panelZAxisContent; + private PictureBox pictureBoxZAxisSoftLowerLimit; + private Label labelZAxisUnit7; + private Label labelZAxisUnit6; + private Label labelZAxisUnit5; + private TrackBar trackBarZAxisActualSpeed; + private TextBox textBoxZAxisSoftLowerLimit; + private TextBox textBoxZAxisTargetPosition; + private TextBox textBoxZAxisSoftUpperLimit; + private PictureBox pictureBoxZAxisSoftUpperLimit; + private Button buttonZAxisJogDown; + private Button buttonZAxisJogUp; + private Button buttonZAxisRun; + private Button buttonZAxisHome; + private Button buttonZAxisEnable; + private TextBox textBoxZAxisActualPositon; + private Label labelZAxisUnit4; + private Label labelZAxisUnit3; + private Label labelZAxisUnit2; + private Label labelZAxisUnit1; + private Panel panelZAxisTitle; + private Label labelZAxisTitle; + private System.Windows.Forms.Timer timerZAxisActualPosition; + private System.Windows.Forms.Timer timerZAxisCurrent; + private System.Windows.Forms.Timer timerZAxisHomeComplete; + private System.Windows.Forms.Timer timerZAxisRunComplete; + private Panel panel2; + private PictureBox pictureBox1; + private TextBox texPicturePosition; + private Panel pictureMoveBottomPanel; + } +} diff --git a/FuelRobot/MainForm.cs b/FuelRobot/MainForm.cs new file mode 100644 index 0000000..7fd8590 --- /dev/null +++ b/FuelRobot/MainForm.cs @@ -0,0 +1,2576 @@ +using CMLCOMLib; +using System; +using System.Text.RegularExpressions; +using System.Windows.Forms; + +namespace FuelRobot +{ + public partial class MainForm : Form + { + //123 + // 33飺17ɫ(60px) + 16ɫ(17px) + private int[] intFuelAssembleBlockWidths = new int[33]; + private Color[] colorFuelAssembleBlockColors = new Color[33]; + private Color[] colorFuelAssembleOriginalColors = new Color[33]; + private int intFuelAssembleHighlightedBlock = -1; + + // ضɫıźͶӦɫ + // ɫŴ116 + private int[] intFuelAssembleGreenBlocks = { 1, 2, 5, 7, 8, 10, 11, 13, 16 }; // 1257810111316ɫ + private int[] intFuelAssembleRedBlocks = { 3, 14 }; // 314ɫ + private int[] intFuelAssembleBlueBlocks = { 4, 6, 9, 12, 15 }; // 4691215ɫ + + // קõ + private bool boolIsDragging = false; + private Point pointDragStartPoint; + + private canOpenObj canOpenObjAxis = new canOpenObj(); + + const int XAxis_CAN_ADDRESS = 1; + const int YAxis_CAN_ADDRESS = 2; + const int ZAxis_CAN_ADDRESS = 3; + + private AmpObj ampObjXAxis = new AmpObj(); + private ProfileSettingsObj profileSettingsObjXAxis = new ProfileSettingsObj(); + private HomeSettingsObj homeSettingsObjXAxis = new HomeSettingsObj(); + private CurrentLoopSettingsObj currentLoopSettingsObjXAxis = new CurrentLoopSettingsObj(); + + private AmpObj ampObjYAxis = new AmpObj(); + private ProfileSettingsObj profileSettingsObjYAxis = new ProfileSettingsObj(); + private HomeSettingsObj homeSettingsObjYAxis = new HomeSettingsObj(); + private CurrentLoopSettingsObj currentLoopSettingsObjYAxis = new CurrentLoopSettingsObj(); + + private AmpObj ampObjZAxis = new AmpObj(); + private ProfileSettingsObj profileSettingsObjZAxis = new ProfileSettingsObj(); + private HomeSettingsObj homeSettingsObjZAxis = new HomeSettingsObj(); + private CurrentLoopSettingsObj currentLoopSettingsObjZAxis = new CurrentLoopSettingsObj(); + + private double doubleXAxisSpeed = 4; + private double doubleXAxisHomeSpeed = 4; + private double doubleXAxisSoftUpperLimit = 400; + private double doubleXAxisSoftLowerLimit = -10; + private double doubleXAxisActualPositon = 0; + private double doubleXAxisTargetPosition = 0; + private double doubleXAxisCurrentLimit = 5;//λA + + private double doubleYAxisSpeed = 4; + private double doubleYAxisHomeSpeed = 4; + private double doubleYAxisSoftUpperLimit = 400; + private double doubleYAxisSoftLowerLimit = -10; + private double doubleYAxisActualPositon = 0; + private double doubleYAxisTargetPosition = 0; + private double doubleYAxisCurrentLimit = 5;//λA + + private double doubleZAxisSpeed = 4; + private double doubleZAxisHomeSpeed = 4; + private double doubleZAxisSoftUpperLimit = 400; + private double doubleZAxisSoftLowerLimit = -10; + private double doubleZAxisActualPositon = 0; + private double doubleZAxisTargetPosition = 0; + private double doubleZAxisCurrentLimit = 5;//λA + + // + // 1024*12/5=2457.6 + private double doubleXAxisCoefficient = 2457.6; + private double doubleYAxisCoefficient = 2457.6; + private double doubleZAxisCoefficient = 2457.6; + + public MainForm() + { + InitializeComponent(); + + InitPictureMoveMap(); + } + Dictionary dictionaryFuelAssembleCursor = new Dictionary +{ +// 7-45 1ÿ + 0.25 +{7, 0.00}, {8, 0.25}, {9, 0.50}, {10, 0.75}, {11, 1.00}, {12, 1.25}, {13, 1.50}, {14, 1.75}, +{15, 2.00}, {16, 2.25}, {17, 2.50}, {18, 2.75}, {19, 3.00}, {20, 3.25}, {21, 3.50}, {22, 3.75}, +{23, 4.00}, {24, 4.25}, {25, 4.50}, {26, 4.75}, {27, 5.00}, {28, 5.25}, {29, 5.50}, {30, 5.75}, +{31, 6.00}, {32, 6.25}, {33, 6.50}, {34, 6.75}, {35, 7.00}, {36, 7.25}, {37, 7.50}, {38, 7.75}, +{39, 8.00}, {40, 8.25}, {41, 8.50}, {42, 8.75}, {43, 9.00}, {44, 9.25}, {45, 9.50}, + +// 46-57 12ֵܲ 3.10.25/0.26 +{46, 9.76}, {47, 10.02}, {48, 10.28}, {49, 10.53}, {50, 10.79}, {51, 11.05}, +{52, 11.31}, {53, 11.57}, {54, 11.82}, {55, 12.08}, {56, 12.34}, {57, 12.60}, + +// 58-95 38ֵܲ 9.5ÿ + 0.25 +{58, 12.85}, {59, 13.10}, {60, 13.35}, {61, 13.60}, {62, 13.85}, {63, 14.10}, {64, 14.35}, {65, 14.60}, +{66, 14.85}, {67, 15.10}, {68, 15.35}, {69, 15.60}, {70, 15.85}, {71, 16.10}, {72, 16.35}, {73, 16.60}, +{74, 16.85}, {75, 17.10}, {76, 17.35}, {77, 17.60}, {78, 17.85}, {79, 18.10}, {80, 18.35}, {81, 18.60}, +{82, 18.85}, {83, 19.10}, {84, 19.35}, {85, 19.60}, {86, 19.85}, {87, 20.10}, {88, 20.35}, {89, 20.60}, +{90, 20.85}, {91, 21.10}, {92, 21.35}, {93, 21.60}, {94, 21.85}, {95, 22.10}, + +// 96-107 12ֵܲ 3.10.25/0.26 +{96, 22.36}, {97, 22.62}, {98, 22.87}, {99, 23.13}, {100, 23.39}, {101, 23.64}, +{102, 23.90}, {103, 24.16}, {104, 24.41}, {105, 24.67}, {106, 24.93}, {107, 25.20}, + +// 108-145 38ֵܲ 9.5ÿ + 0.25 +{108, 25.45}, {109, 25.70}, {110, 25.95}, {111, 26.20}, {112, 26.45}, {113, 26.70}, {114, 26.95}, {115, 27.20}, +{116, 27.45}, {117, 27.70}, {118, 27.95}, {119, 28.20}, {120, 28.45}, {121, 28.70}, {122, 28.95}, {123, 29.20}, +{124, 29.45}, {125, 29.70}, {126, 29.95}, {127, 30.20}, {128, 30.45}, {129, 30.70}, {130, 30.95}, {131, 31.20}, +{132, 31.45}, {133, 31.70}, {134, 31.95}, {135, 32.20}, {136, 32.45}, {137, 32.70}, {138, 32.95}, {139, 33.20}, +{140, 33.45}, {141, 33.70}, {142, 33.95}, {143, 34.20}, {144, 34.45}, {145, 34.70}, + +// 146-157 12ֵܲ 3.10.25/0.26 +{146, 34.96}, {147, 35.22}, {148, 35.47}, {149, 35.73}, {150, 35.99}, {151, 36.24}, +{152, 36.50}, {153, 36.76}, {154, 37.01}, {155, 37.27}, {156, 37.53}, {157, 37.80}, + +// 158-195 38ֵܲ 9.5ÿ + 0.25 +{158, 38.05}, {159, 38.30}, {160, 38.55}, {161, 38.80}, {162, 39.05}, {163, 39.30}, {164, 39.55}, {165, 39.80}, +{166, 40.05}, {167, 40.30}, {168, 40.55}, {169, 40.80}, {170, 41.05}, {171, 41.30}, {172, 41.55}, {173, 41.80}, +{174, 42.05}, {175, 42.30}, {176, 42.55}, {177, 42.80}, {178, 43.05}, {179, 43.30}, {180, 43.55}, {181, 43.80}, +{182, 44.05}, {183, 44.30}, {184, 44.55}, {185, 44.80}, {186, 45.05}, {187, 45.30}, {188, 45.55}, {189, 45.80}, +{190, 46.05}, {191, 46.30}, {192, 46.55}, {193, 46.80}, {194, 47.05}, {195, 47.30}, + +// 196-207 12ֵܲ 3.10.25/0.26 +{196, 47.56}, {197, 47.82}, {198, 48.07}, {199, 48.33}, {200, 48.59}, {201, 48.84}, +{202, 49.10}, {203, 49.36}, {204, 49.61}, {205, 49.87}, {206, 50.13}, {207, 50.40}, + +// 208-245 38ֵܲ 9.5ÿ + 0.25 +{208, 50.65}, {209, 50.90}, {210, 51.15}, {211, 51.40}, {212, 51.65}, {213, 51.90}, {214, 52.15}, {215, 52.40}, +{216, 52.65}, {217, 52.90}, {218, 53.15}, {219, 53.40}, {220, 53.65}, {221, 53.90}, {222, 54.15}, {223, 54.40}, +{224, 54.65}, {225, 54.90}, {226, 55.15}, {227, 55.40}, {228, 55.65}, {229, 55.90}, {230, 56.15}, {231, 56.40}, +{232, 56.65}, {233, 56.90}, {234, 57.15}, {235, 57.40}, {236, 57.65}, {237, 57.90}, {238, 58.15}, {239, 58.40}, +{240, 58.65}, {241, 58.90}, {242, 59.15}, {243, 59.40}, {244, 59.65}, {245, 59.90}, + +// 246-257 12ֵܲ 3.10.25/0.26 +{246, 60.16}, {247, 60.42}, {248, 60.67}, {249, 60.93}, {250, 61.19}, {251, 61.44}, +{252, 61.70}, {253, 61.96}, {254, 62.21}, {255, 62.47}, {256, 62.73}, {257, 63.00}, + +// 258-295 38ֵܲ 9.5ÿ + 0.25 +{258, 63.25}, {259, 63.50}, {260, 63.75}, {261, 64.00}, {262, 64.25}, {263, 64.50}, {264, 64.75}, {265, 65.00}, +{266, 65.25}, {267, 65.50}, {268, 65.75}, {269, 66.00}, {270, 66.25}, {271, 66.50}, {272, 66.75}, {273, 67.00}, +{274, 67.25}, {275, 67.50}, {276, 67.75}, {277, 68.00}, {278, 68.25}, {279, 68.50}, {280, 68.75}, {281, 69.00}, +{282, 69.25}, {283, 69.50}, {284, 69.75}, {285, 70.00}, {286, 70.25}, {287, 70.50}, {288, 70.75}, {289, 71.00}, +{290, 71.25}, {291, 71.50}, {292, 71.75}, {293, 72.00}, {294, 72.25}, {295, 72.50}, + +// 296-307 12ֵܲ 3.10.25/0.26 +{296, 72.76}, {297, 73.02}, {298, 73.27}, {299, 73.53}, {300, 73.79}, {301, 74.04}, +{302, 74.30}, {303, 74.56}, {304, 74.81}, {305, 75.07}, {306, 75.33}, {307, 75.60}, + +// 308-345 38ֵܲ 9.5ÿ + 0.25 +{308, 75.85}, {309, 76.10}, {310, 76.35}, {311, 76.60}, {312, 76.85}, {313, 77.10}, {314, 77.35}, {315, 77.60}, +{316, 77.85}, {317, 78.10}, {318, 78.35}, {319, 78.60}, {320, 78.85}, {321, 79.10}, {322, 79.35}, {323, 79.60}, +{324, 79.85}, {325, 80.10}, {326, 80.35}, {327, 80.60}, {328, 80.85}, {329, 81.10}, {330, 81.35}, {331, 81.60}, +{332, 81.85}, {333, 82.10}, {334, 82.35}, {335, 82.60}, {336, 82.85}, {337, 83.10}, {338, 83.35}, {339, 83.60}, +{340, 83.85}, {341, 84.10}, {342, 84.35}, {343, 84.60}, {344, 84.85}, {345, 85.10}, + +// 346-357 12ֵܲ 3.10.25/0.26 +{346, 85.36}, {347, 85.62}, {348, 85.87}, {349, 86.13}, {350, 86.39}, {351, 86.64}, +{352, 86.90}, {353, 87.16}, {354, 87.41}, {355, 87.67}, {356, 87.93}, {357, 88.20}, + +// 358-395 38ֵܲ 9.5ÿ + 0.25 +{358, 88.45}, {359, 88.70}, {360, 88.95}, {361, 89.20}, {362, 89.45}, {363, 89.70}, {364, 89.95}, {365, 90.20}, +{366, 90.45}, {367, 90.70}, {368, 90.95}, {369, 91.20}, {370, 91.45}, {371, 91.70}, {372, 91.95}, {373, 92.20}, +{374, 92.45}, {375, 92.70}, {376, 92.95}, {377, 93.20}, {378, 93.45}, {379, 93.70}, {380, 93.95}, {381, 94.20}, +{382, 94.45}, {383, 94.70}, {384, 94.95}, {385, 95.20}, {386, 95.45}, {387, 95.70}, {388, 95.95}, {389, 96.20}, +{390, 96.45}, {391, 96.70}, {392, 96.95}, {393, 97.20}, {394, 97.45}, {395, 97.70}, + +// 396-407 12ֵܲ 3.10.25/0.26 +{396, 97.96}, {397, 98.22}, {398, 98.47}, {399, 98.73}, {400, 98.99}, {401, 99.24}, +{402, 99.50}, {403, 99.76}, {404, 100.01}, {405, 100.27}, {406, 100.53}, {407, 100.80}, + +// 408-445 38ֵܲ 9.5ÿ + 0.25 +{408, 101.05}, {409, 101.30}, {410, 101.55}, {411, 101.80}, {412, 102.05}, {413, 102.30}, {414, 102.55}, {415, 102.80}, +{416, 103.05}, {417, 103.30}, {418, 103.55}, {419, 103.80}, {420, 104.05}, {421, 104.30}, {422, 104.55}, {423, 104.80}, +{424, 105.05}, {425, 105.30}, {426, 105.55}, {427, 105.80}, {428, 106.05}, {429, 106.30}, {430, 106.55}, {431, 106.80}, +{432, 107.05}, {433, 107.30}, {434, 107.55}, {435, 107.80}, {436, 108.05}, {437, 108.30}, {438, 108.55}, {439, 108.80}, +{440, 109.05}, {441, 109.30}, {442, 109.55}, {443, 109.80}, {444, 110.05}, {445, 110.30}, + +// 446-457 12ֵܲ 3.10.25/0.26 +{446, 110.56}, {447, 110.82}, {448, 111.07}, {449, 111.33}, {450, 111.59}, {451, 111.84}, +{452, 112.10}, {453, 112.36}, {454, 112.61}, {455, 112.87}, {456, 113.13}, {457, 113.40}, + +// 458-495 38ֵܲ 9.5ÿ + 0.25 +{458, 113.65}, {459, 113.90}, {460, 114.15}, {461, 114.40}, {462, 114.65}, {463, 114.90}, {464, 115.15}, {465, 115.40}, +{466, 115.65}, {467, 115.90}, {468, 116.15}, {469, 116.40}, {470, 116.65}, {471, 116.90}, {472, 117.15}, {473, 117.40}, +{474, 117.65}, {475, 117.90}, {476, 118.15}, {477, 118.40}, {478, 118.65}, {479, 118.90}, {480, 119.15}, {481, 119.40}, +{482, 119.65}, {483, 119.90}, {484, 120.15}, {485, 120.40}, {486, 120.65}, {487, 120.90}, {488, 121.15}, {489, 121.40}, +{490, 121.65}, {491, 121.90}, {492, 122.15}, {493, 122.40}, {494, 122.65}, {495, 122.90}, + +// 496-507 12ֵܲ 3.10.25/0.26 +{496, 123.16}, {497, 123.42}, {498, 123.67}, {499, 123.93}, {500, 124.19}, {501, 124.44}, +{502, 124.70}, {503, 124.96}, {504, 125.21}, {505, 125.47}, {506, 125.73}, {507, 126.00}, + +// 508-545 38ֵܲ 9.5ÿ + 0.25 +{508, 126.25}, {509, 126.50}, {510, 126.75}, {511, 127.00}, {512, 127.25}, {513, 127.50}, {514, 127.75}, {515, 128.00}, +{516, 128.25}, {517, 128.50}, {518, 128.75}, {519, 129.00}, {520, 129.25}, {521, 129.50}, {522, 129.75}, {523, 130.00}, +{524, 130.25}, {525, 130.50}, {526, 130.75}, {527, 131.00}, {528, 131.25}, {529, 131.50}, {530, 131.75}, {531, 132.00}, +{532, 132.25}, {533, 132.50}, {534, 132.75}, {535, 133.00}, {536, 133.25}, {537, 133.50}, {538, 133.75}, {539, 134.00}, +{540, 134.25}, {541, 134.50}, {542, 134.75}, {543, 135.00}, {544, 135.25}, {545, 135.50}, + +// 546-557 12ֵܲ 3.10.25/0.26 +{546, 135.76}, {547, 136.02}, {548, 136.27}, {549, 136.53}, {550, 136.79}, {551, 137.04}, +{552, 137.30}, {553, 137.56}, {554, 137.81}, {555, 138.07}, {556, 138.33}, {557, 138.60}, + +// 558-595 38ֵܲ 9.5ÿ + 0.25 +{558, 138.85}, {559, 139.10}, {560, 139.35}, {561, 139.60}, {562, 139.85}, {563, 140.10}, {564, 140.35}, {565, 140.60}, +{566, 140.85}, {567, 141.10}, {568, 141.35}, {569, 141.60}, {570, 141.85}, {571, 142.10}, {572, 142.35}, {573, 142.60}, +{574, 142.85}, {575, 143.10}, {576, 143.35}, {577, 143.60}, {578, 143.85}, {579, 144.10}, {580, 144.35}, {581, 144.60}, +{582, 144.85}, {583, 145.10}, {584, 145.35}, {585, 145.60}, {586, 145.85}, {587, 146.10}, {588, 146.35}, {589, 146.60}, +{590, 146.85}, {591, 147.10}, {592, 147.35}, {593, 147.60}, {594, 147.85}, {595, 148.10}, + +// 596-607 12ֵܲ 3.10.25/0.26 +{596, 148.36}, {597, 148.62}, {598, 148.87}, {599, 149.13}, {600, 149.39}, {601, 149.64}, +{602, 149.90}, {603, 150.16}, {604, 150.41}, {605, 150.67}, {606, 150.93}, {607, 151.20}, + +// 608-645 38ֵܲ 9.5ÿ + 0.25 +{608, 151.45}, {609, 151.70}, {610, 151.95}, {611, 152.20}, {612, 152.45}, {613, 152.70}, {614, 152.95}, {615, 153.20}, +{616, 153.45}, {617, 153.70}, {618, 153.95}, {619, 154.20}, {620, 154.45}, {621, 154.70}, {622, 154.95}, {623, 155.20}, +{624, 155.45}, {625, 155.70}, {626, 155.95}, {627, 156.20}, {628, 156.45}, {629, 156.70}, {630, 156.95}, {631, 157.20}, +{632, 157.45}, {633, 157.70}, {634, 157.95}, {635, 158.20}, {636, 158.45}, {637, 158.70}, {638, 158.95}, {639, 159.20}, +{640, 159.45}, {641, 159.70}, {642, 159.95}, {643, 160.20}, {644, 160.45}, {645, 160.70}, + +// 646-657 12ֵܲ 3.10.25/0.26 +{646, 160.96}, {647, 161.22}, {648, 161.47}, {649, 161.73}, {650, 161.99}, {651, 162.24}, +{652, 162.50}, {653, 162.76}, {654, 163.01}, {655, 163.27}, {656, 163.53}, {657, 163.80}, + +// 658-695 38ֵܲ 9.5ÿ + 0.25 +{658, 164.05}, {659, 164.30}, {660, 164.55}, {661, 164.80}, {662, 165.05}, {663, 165.30}, {664, 165.55}, {665, 165.80}, +{666, 166.05}, {667, 166.30}, {668, 166.55}, {669, 166.80}, {670, 167.05}, {671, 167.30}, {672, 167.55}, {673, 167.80}, +{674, 168.05}, {675, 168.30}, {676, 168.55}, {677, 168.80}, {678, 169.05}, {679, 169.30}, {680, 169.55}, {681, 169.80}, +{682, 170.05}, {683, 170.30}, {684, 170.55}, {685, 170.80}, {686, 171.05}, {687, 171.30}, {688, 171.55}, {689, 171.80}, +{690, 172.05}, {691, 172.30}, {692, 172.55}, {693, 172.80}, {694, 173.05}, {695, 173.30}, + +// 696-707 12ֵܲ 3.10.25/0.26 +{696, 173.56}, {697, 173.82}, {698, 174.07}, {699, 174.33}, {700, 174.59}, {701, 174.84}, +{702, 175.10}, {703, 175.36}, {704, 175.61}, {705, 175.87}, {706, 176.13}, {707, 176.40}, + +// 708-745 38ֵܲ 9.5ÿ + 0.25 +{708, 176.65}, {709, 176.90}, {710, 177.15}, {711, 177.40}, {712, 177.65}, {713, 177.90}, {714, 178.15}, {715, 178.40}, +{716, 178.65}, {717, 178.90}, {718, 179.15}, {719, 179.40}, {720, 179.65}, {721, 179.90}, {722, 180.15}, {723, 180.40}, +{724, 180.65}, {725, 180.90}, {726, 181.15}, {727, 181.40}, {728, 181.65}, {729, 181.90}, {730, 182.15}, {731, 182.40}, +{732, 182.65}, {733, 182.90}, {734, 183.15}, {735, 183.40}, {736, 183.65}, {737, 183.90}, {738, 184.15}, {739, 184.40}, +{740, 184.65}, {741, 184.90}, {742, 185.15}, {743, 185.40}, {744, 185.65}, {745, 185.90}, + +// 746-757 12ֵܲ 3.10.25/0.26 +{746, 186.16}, {747, 186.42}, {748, 186.67}, {749, 186.93}, {750, 187.19}, {751, 187.44}, +{752, 187.70}, {753, 187.96}, {754, 188.21}, {755, 188.47}, {756, 188.73}, {757, 189.00}, + +// 758-795 38ֵܲ 9.5ÿ + 0.25 +{758, 189.25}, {759, 189.50}, {760, 189.75}, {761, 190.00}, {762, 190.25}, {763, 190.50}, {764, 190.75}, {765, 191.00}, +{766, 191.25}, {767, 191.50}, {768, 191.75}, {769, 192.00}, {770, 192.25}, {771, 192.50}, {772, 192.75}, {773, 193.00}, +{774, 193.25}, {775, 193.50}, {776, 193.75}, {777, 194.00}, {778, 194.25}, {779, 194.50}, {780, 194.75}, {781, 195.00}, +{782, 195.25}, {783, 195.50}, {784, 195.75}, {785, 196.00}, {786, 196.25}, {787, 196.50}, {788, 196.75}, {789, 197.00}, +{790, 197.25}, {791, 197.50}, {792, 197.75}, {793, 198.00}, {794, 198.25}, {795, 198.50}, + +// 796-807 12ֵܲ 3.10.25/0.26 +{796, 198.76}, {797, 199.02}, {798, 199.27}, {799, 199.53}, {800, 199.79}, {801, 200.04}, +{802, 200.30}, {803, 200.56}, {804, 200.81}, {805, 201.07}, {806, 201.33}, {807, 201.60}, + +// 808-845 38ֵܲ 9.5ÿ + 0.25 +{808, 201.85}, {809, 202.10}, {810, 202.35}, {811, 202.60}, {812, 202.85}, {813, 203.10}, {814, 203.35}, {815, 203.60}, +{816, 203.85}, {817, 204.10}, {818, 204.35}, {819, 204.60}, {820, 204.85}, {821, 205.10}, {822, 205.35}, {823, 205.60}, +{824, 205.85}, {825, 206.10}, {826, 206.35}, {827, 206.60}, {828, 206.85}, {829, 207.10}, {830, 207.35}, {831, 207.60}, +{832, 207.85}, {833, 208.10}, {834, 208.35}, {835, 208.60}, {836, 208.85}, {837, 209.10}, {838, 209.35}, {839, 209.60}, +{840, 209.85}, {841, 210.10}, {842, 210.35}, {843, 210.60}, {844, 210.85}, {845, 211.10} +}; + Dictionary pictiureMoveMap = new Dictionary(); + private void InitPictureMoveMap() + { + double picturePosition = 0; + for(int i = 0; i <= 400; i++) + { + picturePosition = 44 + i * 0.55; + pictiureMoveMap.Add(i, picturePosition); + + } + + } + public static bool IsNumeric(string value) + { + return Regex.IsMatch(value, @"^[+-]?\d*[.]?\d*$"); + } + + + private void MainForm_Load(object sender, EventArgs e) + { + try + { + // ʼɫ + InitializeFuelAssembleBlocks(); + + // + CheckFuelAssembleHighlight(); + + // ȷܽռ¼ + this.KeyPreview = true; + this.KeyDown += MainForm_KeyDown; + + //ȼͷܽ갴¡ƶ̧¼ + pictureBoxFuelAssembleCursor.MouseDown += pictureBoxFuelAssembleCursor_MouseDown; + pictureBoxFuelAssembleCursor.MouseMove += pictureBoxFuelAssembleCursor_MouseMove; + pictureBoxFuelAssembleCursor.MouseUp += pictureBoxFuelAssembleCursor_MouseUp; + + panelFuelAssemble.Paint += panelFuelAssemble_Paint; + + this.MaximizeBox = false; + //?? + canOpenObjAxis.PortName = "copley0"; + canOpenObjAxis.BitRate = CML_BIT_RATES.BITRATE_250_Kbit_per_sec; + canOpenObjAxis.Initialize(); + + ampObjXAxis.Initialize(canOpenObjAxis, XAxis_CAN_ADDRESS); + ampObjXAxis.Enable(); + + ampObjYAxis.Initialize(canOpenObjAxis, YAxis_CAN_ADDRESS); + ampObjYAxis.Enable(); + + ampObjZAxis.Initialize(canOpenObjAxis, ZAxis_CAN_ADDRESS); + ampObjZAxis.Enable(); + + Thread.Sleep(3000); + + ampObjXAxis.Disable(); + ampObjYAxis.Disable(); + ampObjZAxis.Disable(); + + profileSettingsObjXAxis = ampObjXAxis.ProfileSettings; + profileSettingsObjXAxis.ProfileVel = doubleXAxisSpeed * doubleXAxisCoefficient; + profileSettingsObjXAxis.ProfileAccel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + profileSettingsObjXAxis.ProfileDecel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + ampObjXAxis.ProfileSettings = profileSettingsObjXAxis; + currentLoopSettingsObjXAxis = ampObjXAxis.CurrentLoopSettings; + currentLoopSettingsObjXAxis.CrntLoopContCrntLim = short.Parse((doubleXAxisCurrentLimit * 100).ToString()); + ampObjXAxis.CurrentLoopSettings = currentLoopSettingsObjXAxis; + + profileSettingsObjYAxis = ampObjYAxis.ProfileSettings; + profileSettingsObjYAxis.ProfileVel = doubleYAxisSpeed * doubleYAxisCoefficient; + profileSettingsObjYAxis.ProfileAccel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + profileSettingsObjYAxis.ProfileDecel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + ampObjYAxis.ProfileSettings = profileSettingsObjYAxis; + currentLoopSettingsObjYAxis = ampObjYAxis.CurrentLoopSettings; + currentLoopSettingsObjYAxis.CrntLoopContCrntLim = short.Parse((doubleYAxisCurrentLimit * 100).ToString()); + ampObjYAxis.CurrentLoopSettings = currentLoopSettingsObjYAxis; + + profileSettingsObjZAxis = ampObjZAxis.ProfileSettings; + profileSettingsObjZAxis.ProfileVel = doubleZAxisSpeed * doubleZAxisCoefficient; + profileSettingsObjZAxis.ProfileAccel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + profileSettingsObjZAxis.ProfileDecel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + ampObjZAxis.ProfileSettings = profileSettingsObjZAxis; + currentLoopSettingsObjZAxis = ampObjZAxis.CurrentLoopSettings; + currentLoopSettingsObjZAxis.CrntLoopContCrntLim = short.Parse((doubleZAxisCurrentLimit * 100).ToString()); + ampObjZAxis.CurrentLoopSettings = currentLoopSettingsObjZAxis; + + buttonXAxisEnable.Click += buttonXAxisEnable_Click; + buttonXAxisHome.Click += buttonXAxisHome_Click; + buttonXAxisRun.Click += buttonXAxisRun_Click; + buttonXAxisJogUp.MouseDown += buttonXAxisJogUp_MouseDown; + buttonXAxisJogUp.MouseUp += buttonXAxisJogUp_MouseUp; + buttonXAxisJogDown.MouseDown += buttonXAxisJogDown_MouseDown; + buttonXAxisJogDown.MouseUp += buttonXAxisJogDown_MouseUp; + + timerXAxisActualPosition.Tick += timerXAxisActualPosition_Tick; + timerXAxisCurrent.Tick += timerXAxisCurrent_Tick; + timerXAxisHomeComplete.Tick += timerXAxisHomeComplete_Tick; + timerXAxisRunComplete.Tick += timerXAxisRunComplete_Tick; + + timerXAxisActualPosition.Interval = 100; + timerXAxisCurrent.Interval = 500; + timerXAxisHomeComplete.Interval = 100; + timerXAxisRunComplete.Interval = 100; + + textBoxXAxisSoftUpperLimit.Leave += textBoxXAxisSoftUpperLimit_Leave; + textBoxXAxisSoftLowerLimit.Leave += textBoxXAxisSoftLowerLimit_Leave; + textBoxXAxisTargetPosition.Leave += textBoxXAxisTargetPosition_Leave; + trackBarXAxisActualSpeed.Scroll += trackBarXAxisActualSpeed_Scroll; + + buttonYAxisEnable.Click += buttonYAxisEnable_Click; + buttonYAxisHome.Click += buttonYAxisHome_Click; + buttonYAxisRun.Click += buttonYAxisRun_Click; + buttonYAxisJogUp.MouseDown += buttonYAxisJogUp_MouseDown; + buttonYAxisJogUp.MouseUp += buttonYAxisJogUp_MouseUp; + buttonYAxisJogDown.MouseDown += buttonYAxisJogDown_MouseDown; + buttonYAxisJogDown.MouseUp += buttonYAxisJogDown_MouseUp; + + timerYAxisActualPosition.Tick += timerYAxisActualPosition_Tick; + timerYAxisCurrent.Tick += timerYAxisCurrent_Tick; + timerYAxisHomeComplete.Tick += timerYAxisHomeComplete_Tick; + timerYAxisRunComplete.Tick += timerYAxisRunComplete_Tick; + + timerYAxisActualPosition.Interval = 100; + timerYAxisCurrent.Interval = 500; + timerYAxisHomeComplete.Interval = 100; + timerYAxisRunComplete.Interval = 100; + + textBoxYAxisSoftUpperLimit.Leave += textBoxYAxisSoftUpperLimit_Leave; + textBoxYAxisSoftLowerLimit.Leave += textBoxYAxisSoftLowerLimit_Leave; + textBoxYAxisTargetPosition.Leave += textBoxYAxisTargetPosition_Leave; + trackBarYAxisActualSpeed.Scroll += trackBarYAxisActualSpeed_Scroll; + + buttonZAxisEnable.Click += buttonZAxisEnable_Click; + buttonZAxisHome.Click += buttonZAxisHome_Click; + buttonZAxisRun.Click += buttonZAxisRun_Click; + buttonZAxisJogUp.MouseDown += buttonZAxisJogUp_MouseDown; + buttonZAxisJogUp.MouseUp += buttonZAxisJogUp_MouseUp; + buttonZAxisJogDown.MouseDown += buttonZAxisJogDown_MouseDown; + buttonZAxisJogDown.MouseUp += buttonZAxisJogDown_MouseUp; + + timerZAxisActualPosition.Tick += timerZAxisActualPosition_Tick; + timerZAxisCurrent.Tick += timerZAxisCurrent_Tick; + timerZAxisHomeComplete.Tick += timerZAxisHomeComplete_Tick; + timerZAxisRunComplete.Tick += timerZAxisRunComplete_Tick; + + timerZAxisActualPosition.Interval = 100; + timerZAxisCurrent.Interval = 500; + timerZAxisHomeComplete.Interval = 100; + timerZAxisRunComplete.Interval = 100; + + textBoxZAxisSoftUpperLimit.Leave += textBoxZAxisSoftUpperLimit_Leave; + textBoxZAxisSoftLowerLimit.Leave += textBoxZAxisSoftLowerLimit_Leave; + textBoxZAxisTargetPosition.Leave += textBoxZAxisTargetPosition_Leave; + trackBarZAxisActualSpeed.Scroll += trackBarZAxisActualSpeed_Scroll; + + timerXAxisActualPosition.Start(); + timerXAxisCurrent.Start(); + + timerYAxisActualPosition.Start(); + timerYAxisCurrent.Start(); + + timerZAxisActualPosition.Start(); + timerZAxisCurrent.Start(); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + //ʼɫ + private void InitializeFuelAssembleBlocks() + { + //33 + for (int i = 0; i < 33; i++) + { + //ǰóɫ + if (i % 2 == 0) // żΪɫ + { + //ðĿ + intFuelAssembleBlockWidths[i] = 38; + //ðɫΪɫ + colorFuelAssembleBlockColors[i] = Color.DarkGray; + colorFuelAssembleOriginalColors[i] = Color.DarkGray; + } + else // Ϊɫ + { + //϶Ϊ12 + intFuelAssembleBlockWidths[i] = 12; + //ð϶Ϊɫ + colorFuelAssembleBlockColors[i] = Color.LightGray; + colorFuelAssembleOriginalColors[i] = Color.LightGray; + } + } + } + + private void panelFuelAssemble_Paint(object? sender, PaintEventArgs e) + { + // xʾPanelеĺ꣬pictureboxwidth14 + int x = 7; + for (int i = 0; i < 33; i++) + { + // 1ʾPanelеĺ꣬2ʾPanelе꣬3ʾȣ4ʾ߶ + Rectangle rect = new Rectangle(x, 25, intFuelAssembleBlockWidths[i], 75); + using (SolidBrush brush = new SolidBrush(colorFuelAssembleBlockColors[i])) + { + e.Graphics.FillRectangle(brush, rect); + } + x += intFuelAssembleBlockWidths[i]; + } + } + + private void pictureBoxFuelAssembleCursor_MouseDown(object? sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + boolIsDragging = true; + pointDragStartPoint = e.Location; + pictureBoxFuelAssembleCursor.Capture = true; + } + } + + private void pictureBoxFuelAssembleCursor_MouseMove(object? sender, MouseEventArgs e) + { + if (boolIsDragging) + { + int newX = pictureBoxFuelAssembleCursor.Location.X + (e.X - pointDragStartPoint.X); + + // ƶΧ + if (newX < 0) + { + newX = 0; + } + + int intFuelAssembleTotalWidth = 0; + for (int i = 0; i < 33; i++) + { + intFuelAssembleTotalWidth += intFuelAssembleBlockWidths[i]; + } + + if (newX > intFuelAssembleTotalWidth) + { + newX = intFuelAssembleTotalWidth; + } + + pictureBoxFuelAssembleCursor.Location = new Point(newX, pictureBoxFuelAssembleCursor.Location.Y); + + // + CheckFuelAssembleHighlight(); + } + } + + private void pictureBoxFuelAssembleCursor_MouseUp(object? sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + boolIsDragging = false; + pictureBoxFuelAssembleCursor.Capture = false; + } + } + private void MainForm_KeyDown(object? sender, KeyEventArgs e) + { + int step = 1; // Сƶ + int newX = pictureBoxFuelAssembleCursor.Location.X; + + if (e.KeyCode == Keys.Left) + { + newX -= step; + } + else if (e.KeyCode == Keys.Right) + { + newX += step; + } + + // ƶΧ + if (newX < 0) newX = 0; + + int intFuelAssembleTotalWidth = 0; + for (int i = 0; i < 33; i++) + { + intFuelAssembleTotalWidth += intFuelAssembleBlockWidths[i]; + } + if (newX > intFuelAssembleTotalWidth) + { + newX = intFuelAssembleTotalWidth; + } + pictureBoxFuelAssembleCursor.Location = new Point(newX, pictureBoxFuelAssembleCursor.Location.Y); + + // + CheckFuelAssembleHighlight(); + } + + private void CheckFuelAssembleHighlight() + { + // PictureBoxĵX꣨Panel + int centerX = pictureBoxFuelAssembleCursor.Location.X + pictureBoxFuelAssembleCursor.Width / 2; + + // ĵڵķ飬pictureboxwidth14 + int x = 7; + int intFuelAssembleNewHighlightedBlock = -1; + + for (int i = 0; i < 33; i++) + { + if (centerX >= x && centerX < x + intFuelAssembleBlockWidths[i]) + { + intFuelAssembleNewHighlightedBlock = i; + break; + } + x += intFuelAssembleBlockWidths[i]; + } + + // ķı + if (intFuelAssembleNewHighlightedBlock != intFuelAssembleHighlightedBlock) + { + // ָ֮ǰɫ + if (intFuelAssembleHighlightedBlock >= 0 && intFuelAssembleHighlightedBlock < 33) + { + colorFuelAssembleBlockColors[intFuelAssembleHighlightedBlock] = colorFuelAssembleOriginalColors[intFuelAssembleHighlightedBlock]; + } + + // ¸ɫ + if (intFuelAssembleNewHighlightedBlock >= 0 && intFuelAssembleNewHighlightedBlock < 33) + { + // ֻɫ飨Żݹɫ + if (intFuelAssembleNewHighlightedBlock % 2 == 1) + { + // ǵڼɫ飨1ʼ + int lightGrayBlockNumber = (intFuelAssembleNewHighlightedBlock + 1) / 2; + + if (Array.IndexOf(intFuelAssembleGreenBlocks, lightGrayBlockNumber) >= 0) + { + colorFuelAssembleBlockColors[intFuelAssembleNewHighlightedBlock] = Color.Green; + } + else if (Array.IndexOf(intFuelAssembleRedBlocks, lightGrayBlockNumber) >= 0) + { + colorFuelAssembleBlockColors[intFuelAssembleNewHighlightedBlock] = Color.Red; + } + else if (Array.IndexOf(intFuelAssembleBlueBlocks, lightGrayBlockNumber) >= 0) + { + colorFuelAssembleBlockColors[intFuelAssembleNewHighlightedBlock] = Color.Blue; + } + else + { + // ɫ鱣ԭɫ + colorFuelAssembleBlockColors[intFuelAssembleNewHighlightedBlock] = Color.LightGray; + } + } + } + intFuelAssembleHighlightedBlock = intFuelAssembleNewHighlightedBlock; + + // ػPanel + panelFuelAssemble.Invalidate(); + } + } + + private void textBoxXAxisSoftUpperLimit_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxXAxisSoftUpperLimit.Text.Trim()) || textBoxXAxisSoftUpperLimit.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxXAxisSoftUpperLimit.Text = "400"; + doubleXAxisSoftUpperLimit = 400; + } + else + { + doubleXAxisSoftUpperLimit = double.Parse(textBoxXAxisSoftUpperLimit.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxYAxisSoftUpperLimit_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxYAxisSoftUpperLimit.Text.Trim()) || textBoxYAxisSoftUpperLimit.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxYAxisSoftUpperLimit.Text = "400"; + doubleYAxisSoftUpperLimit = 400; + } + else + { + doubleYAxisSoftUpperLimit = double.Parse(textBoxYAxisSoftUpperLimit.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxZAxisSoftUpperLimit_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxZAxisSoftUpperLimit.Text.Trim()) || textBoxZAxisSoftUpperLimit.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxZAxisSoftUpperLimit.Text = "400"; + doubleZAxisSoftUpperLimit = 400; + } + else + { + doubleZAxisSoftUpperLimit = double.Parse(textBoxZAxisSoftUpperLimit.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxXAxisSoftLowerLimit_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxXAxisSoftLowerLimit.Text.Trim()) || textBoxXAxisSoftLowerLimit.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxXAxisSoftLowerLimit.Text = "-10"; + doubleXAxisSoftLowerLimit = -10; + } + else + { + doubleXAxisSoftLowerLimit = double.Parse(textBoxXAxisSoftLowerLimit.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxYAxisSoftLowerLimit_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxYAxisSoftLowerLimit.Text.Trim()) || textBoxYAxisSoftLowerLimit.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxYAxisSoftLowerLimit.Text = "-10"; + doubleYAxisSoftLowerLimit = -10; + } + else + { + doubleYAxisSoftLowerLimit = double.Parse(textBoxYAxisSoftLowerLimit.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxZAxisSoftLowerLimit_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxZAxisSoftLowerLimit.Text.Trim()) || textBoxZAxisSoftLowerLimit.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxZAxisSoftLowerLimit.Text = "-10"; + doubleZAxisSoftLowerLimit = -10; + } + else + { + doubleZAxisSoftLowerLimit = double.Parse(textBoxZAxisSoftLowerLimit.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxXAxisTargetPosition_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxXAxisTargetPosition.Text.Trim()) || textBoxXAxisTargetPosition.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxXAxisTargetPosition.Text = "0"; + doubleXAxisTargetPosition = 0; + } + else + { + doubleXAxisTargetPosition = double.Parse(textBoxXAxisTargetPosition.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxYAxisTargetPosition_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxYAxisTargetPosition.Text.Trim()) || textBoxYAxisTargetPosition.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxYAxisTargetPosition.Text = "0"; + doubleYAxisTargetPosition = 0; + } + else + { + doubleYAxisTargetPosition = double.Parse(textBoxYAxisTargetPosition.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void textBoxZAxisTargetPosition_Leave(object? sender, EventArgs e) + { + try + { + if (!IsNumeric(textBoxZAxisTargetPosition.Text.Trim()) || textBoxZAxisTargetPosition.Text == "") + { + MessageBox.Show("ȷݣ", "", MessageBoxButtons.OK); + textBoxZAxisTargetPosition.Text = "0"; + doubleZAxisTargetPosition = 0; + } + else + { + doubleZAxisTargetPosition = double.Parse(textBoxZAxisTargetPosition.Text); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerXAxisActualPosition_Tick(object? sender, EventArgs e) + { + try + { + doubleXAxisActualPositon = Math.Round((ampObjXAxis.PositionActual / doubleXAxisCoefficient), 1); + textBoxXAxisActualPositon.Text = doubleXAxisActualPositon.ToString(); + texPicturePosition.Text = Math.Round((ampObjXAxis.PositionActual / doubleXAxisCoefficient)).ToString(); + int value = (int)Math.Round((ampObjXAxis.PositionActual / doubleXAxisCoefficient)); + panel2.Left = (int)pictiureMoveMap[value]; + panel2.Invalidate(); + pictureBoxXAxisSoftUpperLimit.Image = ImageResource.PositionOff; + pictureBoxXAxisSoftLowerLimit.Image = ImageResource.PositionOff; + + if (buttonXAxisJogUp.Text == " " && doubleXAxisActualPositon >= doubleXAxisSoftUpperLimit) + { + timerXAxisActualPosition.Stop(); + timerXAxisCurrent.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxXAxisSoftUpperLimit.Image = ImageResource.PositionOn; + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = false; + buttonXAxisJogDown.Enabled = true; + } + + if (buttonXAxisJogDown.Text == " " && doubleXAxisActualPositon <= doubleXAxisSoftLowerLimit) + { + timerXAxisActualPosition.Stop(); + timerXAxisCurrent.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxXAxisSoftLowerLimit.Image = ImageResource.PositionOn; + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = false; + } + + if (buttonXAxisRun.Text == " " && doubleXAxisActualPositon >= doubleXAxisSoftUpperLimit) + { + timerXAxisActualPosition.Stop(); + timerXAxisCurrent.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxXAxisSoftUpperLimit.Image = ImageResource.PositionOn; + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = false; + buttonXAxisJogDown.Enabled = true; + } + + if (buttonXAxisRun.Text == " " && doubleXAxisActualPositon <= doubleXAxisSoftLowerLimit) + { + timerXAxisActualPosition.Stop(); + timerXAxisCurrent.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxXAxisSoftLowerLimit.Image = ImageResource.PositionOn; + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = false; + } + + //foreach (KeyValuePair kv in dictionaryFuelAssembleCursor) + //{ + // if(doubleXAxisActualPositon) + //} + for (int i = 7; i < 845; i++) + { + if (doubleXAxisActualPositon >= dictionaryFuelAssembleCursor[i] && doubleXAxisActualPositon <= dictionaryFuelAssembleCursor[i + 1]) + { + pictureBoxFuelAssembleCursor.Location = new Point(i - 7, pictureBoxFuelAssembleCursor.Location.Y); + CheckFuelAssembleHighlight(); + } + } + + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerYAxisActualPosition_Tick(object? sender, EventArgs e) + { + try + { + doubleYAxisActualPositon = Math.Round((ampObjYAxis.PositionActual / doubleYAxisCoefficient), 1); + textBoxYAxisActualPositon.Text = doubleYAxisActualPositon.ToString(); + + pictureBoxYAxisSoftUpperLimit.Image = ImageResource.PositionOff; + pictureBoxYAxisSoftLowerLimit.Image = ImageResource.PositionOff; + + if (buttonYAxisJogUp.Text == " " && doubleYAxisActualPositon >= doubleYAxisSoftUpperLimit) + { + timerYAxisActualPosition.Stop(); + timerYAxisCurrent.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxYAxisSoftUpperLimit.Image = ImageResource.PositionOn; + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = false; + buttonYAxisJogDown.Enabled = true; + } + + if (buttonYAxisJogDown.Text == " " && doubleYAxisActualPositon <= doubleYAxisSoftLowerLimit) + { + timerYAxisActualPosition.Stop(); + timerYAxisCurrent.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxYAxisSoftLowerLimit.Image = ImageResource.PositionOn; + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = false; + } + + if (buttonYAxisRun.Text == " " && doubleYAxisActualPositon >= doubleYAxisSoftUpperLimit) + { + timerYAxisActualPosition.Stop(); + timerYAxisCurrent.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxYAxisSoftUpperLimit.Image = ImageResource.PositionOn; + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = false; + buttonYAxisJogDown.Enabled = true; + } + + if (buttonYAxisRun.Text == " " && doubleYAxisActualPositon <= doubleYAxisSoftLowerLimit) + { + timerYAxisActualPosition.Stop(); + timerYAxisCurrent.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxYAxisSoftLowerLimit.Image = ImageResource.PositionOn; + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = false; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerZAxisActualPosition_Tick(object? sender, EventArgs e) + { + try + { + doubleZAxisActualPositon = Math.Round((ampObjZAxis.PositionActual / doubleZAxisCoefficient), 1); + textBoxZAxisActualPositon.Text = doubleZAxisActualPositon.ToString(); + + pictureBoxZAxisSoftUpperLimit.Image = ImageResource.PositionOff; + pictureBoxZAxisSoftLowerLimit.Image = ImageResource.PositionOff; + + if (buttonZAxisJogUp.Text == " " && doubleZAxisActualPositon >= doubleZAxisSoftUpperLimit) + { + timerZAxisActualPosition.Stop(); + timerZAxisCurrent.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxZAxisSoftUpperLimit.Image = ImageResource.PositionOn; + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = false; + buttonZAxisJogDown.Enabled = true; + } + + if (buttonZAxisJogDown.Text == " " && doubleZAxisActualPositon <= doubleZAxisSoftLowerLimit) + { + timerZAxisActualPosition.Stop(); + timerZAxisCurrent.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxZAxisSoftLowerLimit.Image = ImageResource.PositionOn; + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = false; + } + + if (buttonZAxisRun.Text == " " && doubleZAxisActualPositon >= doubleZAxisSoftUpperLimit) + { + timerZAxisActualPosition.Stop(); + timerZAxisCurrent.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxZAxisSoftUpperLimit.Image = ImageResource.PositionOn; + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = false; + buttonZAxisJogDown.Enabled = true; + } + + if (buttonZAxisRun.Text == " " && doubleZAxisActualPositon <= doubleZAxisSoftLowerLimit) + { + timerZAxisActualPosition.Stop(); + timerZAxisCurrent.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + Thread.Sleep(500); + + pictureBoxZAxisSoftLowerLimit.Image = ImageResource.PositionOn; + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = false; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerXAxisCurrent_Tick(object? sender, EventArgs e) + { + try + { + textBoxXAxisActualCurrent.Text = ((double)Math.Abs(ampObjXAxis.CurrentActual * 10) / 1000).ToString("0.00"); + if (((double)Math.Abs(ampObjXAxis.CurrentActual * 10) / 1000) > doubleXAxisCurrentLimit) + { + pictureBoxXAxisCurrent.Image = ImageResource.CurrentOn; + } + else + { + pictureBoxXAxisCurrent.Image = ImageResource.CurrentOff; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerYAxisCurrent_Tick(object? sender, EventArgs e) + { + try + { + textBoxYAxisActualCurrent.Text = ((double)Math.Abs(ampObjYAxis.CurrentActual * 10) / 1000).ToString("0.00"); + if (((double)Math.Abs(ampObjYAxis.CurrentActual * 10) / 1000) > doubleYAxisCurrentLimit) + { + pictureBoxYAxisCurrent.Image = ImageResource.CurrentOn; + } + else + { + pictureBoxYAxisCurrent.Image = ImageResource.CurrentOff; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerZAxisCurrent_Tick(object? sender, EventArgs e) + { + try + { + textBoxZAxisActualCurrent.Text = ((double)Math.Abs(ampObjZAxis.CurrentActual * 10) / 1000).ToString("0.00"); + if (((double)Math.Abs(ampObjZAxis.CurrentActual * 10) / 1000) > doubleZAxisCurrentLimit) + { + pictureBoxZAxisCurrent.Image = ImageResource.CurrentOn; + } + else + { + pictureBoxZAxisCurrent.Image = ImageResource.CurrentOff; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void trackBarXAxisActualSpeed_Scroll(object? sender, EventArgs e) + { + try + { + if (trackBarZAxisActualSpeed.Value == 1) + { + doubleXAxisSpeed = 4; + } + if (trackBarXAxisActualSpeed.Value == 2) + { + doubleXAxisSpeed = 8; + } + if (trackBarXAxisActualSpeed.Value == 3) + { + doubleXAxisSpeed = 12; + } + if (trackBarXAxisActualSpeed.Value == 4) + { + doubleXAxisSpeed = 16; + } + if (trackBarXAxisActualSpeed.Value == 5) + { + doubleXAxisSpeed = 20; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void trackBarYAxisActualSpeed_Scroll(object? sender, EventArgs e) + { + try + { + if (trackBarYAxisActualSpeed.Value == 1) + { + doubleYAxisSpeed = 4; + } + if (trackBarYAxisActualSpeed.Value == 2) + { + doubleYAxisSpeed = 8; + } + if (trackBarYAxisActualSpeed.Value == 3) + { + doubleYAxisSpeed = 12; + } + if (trackBarYAxisActualSpeed.Value == 4) + { + doubleYAxisSpeed = 16; + } + if (trackBarYAxisActualSpeed.Value == 5) + { + doubleYAxisSpeed = 20; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void trackBarZAxisActualSpeed_Scroll(object? sender, EventArgs e) + { + try + { + if (trackBarZAxisActualSpeed.Value == 1) + { + doubleZAxisSpeed = 4; + } + if (trackBarZAxisActualSpeed.Value == 2) + { + doubleZAxisSpeed = 8; + } + if (trackBarZAxisActualSpeed.Value == 3) + { + doubleZAxisSpeed = 12; + } + if (trackBarZAxisActualSpeed.Value == 4) + { + doubleZAxisSpeed = 16; + } + if (trackBarZAxisActualSpeed.Value == 5) + { + doubleZAxisSpeed = 20; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonXAxisEnable_Click(object? sender, EventArgs e) + { + try + { + if (buttonXAxisEnable.Text == " ") + { + buttonXAxisEnable.Text = " "; + buttonXAxisEnable.Image = ImageResource.EnableOn; + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = true; + } + else + { + buttonXAxisEnable.Text = " "; + buttonXAxisEnable.Image = ImageResource.EnableOff; + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = false; + buttonXAxisJogDown.Enabled = false; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonYAxisEnable_Click(object? sender, EventArgs e) + { + try + { + if (buttonYAxisEnable.Text == " ") + { + buttonYAxisEnable.Text = " "; + buttonYAxisEnable.Image = ImageResource.EnableOn; + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = true; + } + else + { + buttonYAxisEnable.Text = " "; + buttonYAxisEnable.Image = ImageResource.EnableOff; + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = false; + buttonYAxisJogDown.Enabled = false; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonZAxisEnable_Click(object? sender, EventArgs e) + { + try + { + if (buttonZAxisEnable.Text == " ") + { + buttonZAxisEnable.Text = " "; + buttonZAxisEnable.Image = ImageResource.EnableOn; + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = true; + } + else + { + buttonZAxisEnable.Text = " "; + buttonZAxisEnable.Image = ImageResource.EnableOff; + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = false; + buttonZAxisJogDown.Enabled = false; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonXAxisHome_Click(object? sender, EventArgs e) + { + try + { + if (buttonXAxisHome.Text == " ") + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOn; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = false; + buttonXAxisJogDown.Enabled = false; + + homeSettingsObjXAxis = ampObjXAxis.HomeSettings; + homeSettingsObjXAxis.HomeVelFast = doubleXAxisHomeSpeed * doubleXAxisCoefficient; + homeSettingsObjXAxis.HomeVelSlow = doubleXAxisHomeSpeed * doubleXAxisCoefficient; + homeSettingsObjXAxis.HomeAccel = doubleXAxisHomeSpeed * doubleXAxisCoefficient * 3; + + homeSettingsObjXAxis.HomeMethod = CML_HOME_METHOD.CHOME_NEGATIVE_LIMIT; + //ʱƫϵڴHomeOffset + homeSettingsObjXAxis.HomeOffset = 10 * doubleXAxisCoefficient; + ampObjXAxis.HomeSettings = homeSettingsObjXAxis; + + ampObjXAxis.Enable(); + ampObjXAxis.GoHome(); + + timerXAxisHomeComplete.Start(); + + timerXAxisActualPosition.Start(); + timerXAxisCurrent.Start(); + } + else + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = true; + + timerXAxisHomeComplete.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + Thread.Sleep(500); + + ampObjXAxis.Disable(); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonYAxisHome_Click(object? sender, EventArgs e) + { + try + { + if (buttonYAxisHome.Text == " ") + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOn; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = false; + buttonYAxisJogDown.Enabled = false; + + homeSettingsObjYAxis = ampObjYAxis.HomeSettings; + homeSettingsObjYAxis.HomeVelFast = doubleYAxisHomeSpeed * doubleYAxisCoefficient; + homeSettingsObjYAxis.HomeVelSlow = doubleYAxisHomeSpeed * doubleYAxisCoefficient; + homeSettingsObjYAxis.HomeAccel = doubleYAxisHomeSpeed * doubleYAxisCoefficient * 3; + + homeSettingsObjYAxis.HomeMethod = CML_HOME_METHOD.CHOME_NEGATIVE_LIMIT; + //ʱƫϵڴHomeOffset + homeSettingsObjYAxis.HomeOffset = 10 * doubleYAxisCoefficient; + ampObjYAxis.HomeSettings = homeSettingsObjYAxis; + + ampObjYAxis.Enable(); + ampObjYAxis.GoHome(); + + timerYAxisHomeComplete.Start(); + + timerYAxisActualPosition.Start(); + timerYAxisCurrent.Start(); + } + else + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = true; + + timerYAxisHomeComplete.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + Thread.Sleep(500); + + ampObjYAxis.Disable(); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonZAxisHome_Click(object? sender, EventArgs e) + { + try + { + if (buttonZAxisHome.Text == " ") + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOn; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = false; + buttonZAxisJogDown.Enabled = false; + + homeSettingsObjZAxis = ampObjZAxis.HomeSettings; + homeSettingsObjZAxis.HomeVelFast = doubleZAxisHomeSpeed * doubleZAxisCoefficient; + homeSettingsObjZAxis.HomeVelSlow = doubleZAxisHomeSpeed * doubleZAxisCoefficient; + homeSettingsObjZAxis.HomeAccel = doubleZAxisHomeSpeed * doubleZAxisCoefficient * 3; + + homeSettingsObjZAxis.HomeMethod = CML_HOME_METHOD.CHOME_NEGATIVE_LIMIT; + //ʱƫϵڴHomeOffset + homeSettingsObjZAxis.HomeOffset = 10 * doubleZAxisCoefficient; + ampObjZAxis.HomeSettings = homeSettingsObjZAxis; + + ampObjZAxis.Enable(); + ampObjZAxis.GoHome(); + + timerZAxisHomeComplete.Start(); + + timerZAxisActualPosition.Start(); + timerZAxisCurrent.Start(); + } + else + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = true; + + timerZAxisHomeComplete.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + Thread.Sleep(500); + + ampObjZAxis.Disable(); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerXAxisHomeComplete_Tick(object? sender, EventArgs e) + { + try + { + if (ampObjXAxis.IsReferenced) + { + timerXAxisHomeComplete.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = true; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerYAxisHomeComplete_Tick(object? sender, EventArgs e) + { + try + { + if (ampObjYAxis.IsReferenced) + { + timerYAxisHomeComplete.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = true; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerZAxisHomeComplete_Tick(object? sender, EventArgs e) + { + try + { + if (ampObjZAxis.IsReferenced) + { + timerZAxisHomeComplete.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = true; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonXAxisRun_Click(object? sender, EventArgs e) + { + try + { + if (buttonXAxisRun.Text == " ") + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOn; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = false; + buttonXAxisJogDown.Enabled = false; + + profileSettingsObjXAxis.ProfileVel = doubleXAxisSpeed * doubleXAxisCoefficient; + profileSettingsObjXAxis.ProfileAccel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + profileSettingsObjXAxis.ProfileDecel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + profileSettingsObjXAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_TRAP; + ampObjXAxis.ProfileSettings = profileSettingsObjXAxis; + + ampObjXAxis.Enable(); + ampObjXAxis.MoveAbs(doubleXAxisTargetPosition * doubleXAxisCoefficient); + + timerXAxisRunComplete.Start(); + + timerXAxisActualPosition.Start(); + timerXAxisCurrent.Start(); + } + else + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = true; + + timerXAxisRunComplete.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + + ampObjXAxis.QuickStop(); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonYAxisRun_Click(object? sender, EventArgs e) + { + try + { + if (buttonYAxisRun.Text == " ") + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOn; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = false; + buttonYAxisJogDown.Enabled = false; + + profileSettingsObjYAxis.ProfileVel = doubleYAxisSpeed * doubleYAxisCoefficient; + profileSettingsObjYAxis.ProfileAccel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + profileSettingsObjYAxis.ProfileDecel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + profileSettingsObjYAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_TRAP; + ampObjYAxis.ProfileSettings = profileSettingsObjYAxis; + + ampObjYAxis.Enable(); + ampObjYAxis.MoveAbs(doubleYAxisTargetPosition * doubleYAxisCoefficient); + + timerYAxisRunComplete.Start(); + + timerYAxisActualPosition.Start(); + timerYAxisCurrent.Start(); + } + else + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = true; + + timerYAxisRunComplete.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonZAxisRun_Click(object? sender, EventArgs e) + { + try + { + if (buttonZAxisRun.Text == " ") + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOn; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = false; + buttonZAxisJogDown.Enabled = false; + + profileSettingsObjZAxis.ProfileVel = doubleZAxisSpeed * doubleZAxisCoefficient; + profileSettingsObjZAxis.ProfileAccel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + profileSettingsObjZAxis.ProfileDecel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + profileSettingsObjZAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_TRAP; + ampObjZAxis.ProfileSettings = profileSettingsObjZAxis; + + ampObjZAxis.Enable(); + ampObjZAxis.MoveAbs(doubleZAxisTargetPosition * doubleZAxisCoefficient); + + timerZAxisRunComplete.Start(); + + timerZAxisActualPosition.Start(); + timerZAxisCurrent.Start(); + } + else + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = true; + + timerZAxisRunComplete.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerXAxisRunComplete_Tick(object? sender, EventArgs e) + { + try + { + if (Math.Round((ampObjXAxis.PositionActual / doubleXAxisCoefficient), 1) > (doubleXAxisTargetPosition - 0.1) && Math.Round((ampObjXAxis.PositionActual / doubleXAxisCoefficient), 1) < (doubleXAxisTargetPosition + 0.1)) + { + timerXAxisRunComplete.Stop(); + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = true; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerYAxisRunComplete_Tick(object? sender, EventArgs e) + { + try + { + if (Math.Round((ampObjYAxis.PositionActual / doubleYAxisCoefficient), 1) > (doubleYAxisTargetPosition - 0.1) && Math.Round((ampObjYAxis.PositionActual / doubleYAxisCoefficient), 1) < (doubleYAxisTargetPosition + 0.1)) + { + timerYAxisRunComplete.Stop(); + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = true; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void timerZAxisRunComplete_Tick(object? sender, EventArgs e) + { + try + { + if (Math.Round((ampObjZAxis.PositionActual / doubleZAxisCoefficient), 1) > (doubleZAxisTargetPosition - 0.1) && Math.Round((ampObjZAxis.PositionActual / doubleZAxisCoefficient), 1) < (doubleZAxisTargetPosition + 0.1)) + { + timerZAxisRunComplete.Stop(); + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = true; + } + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonXAxisJogUp_MouseDown(object? sender, MouseEventArgs e) + { + try + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOn; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = false; + + profileSettingsObjXAxis.ProfileVel = doubleXAxisSpeed * doubleXAxisCoefficient; + profileSettingsObjXAxis.ProfileAccel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + profileSettingsObjXAxis.ProfileDecel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + profileSettingsObjXAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_VELOCITY; + ampObjXAxis.ProfileSettings = profileSettingsObjXAxis; + + ampObjXAxis.Enable(); + ampObjXAxis.MoveAbs(1); + + timerXAxisActualPosition.Start(); + timerXAxisCurrent.Start(); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonYAxisJogUp_MouseDown(object? sender, MouseEventArgs e) + { + try + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOn; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = false; + + profileSettingsObjYAxis.ProfileVel = doubleYAxisSpeed * doubleYAxisCoefficient; + profileSettingsObjYAxis.ProfileAccel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + profileSettingsObjYAxis.ProfileDecel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + profileSettingsObjYAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_VELOCITY; + ampObjYAxis.ProfileSettings = profileSettingsObjYAxis; + + ampObjYAxis.Enable(); + ampObjYAxis.MoveAbs(1); + + timerYAxisActualPosition.Start(); + timerYAxisCurrent.Start(); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonZAxisJogUp_MouseDown(object? sender, MouseEventArgs e) + { + try + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOn; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = false; + + profileSettingsObjZAxis.ProfileVel = doubleZAxisSpeed * doubleZAxisCoefficient; + profileSettingsObjZAxis.ProfileAccel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + profileSettingsObjZAxis.ProfileDecel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + profileSettingsObjZAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_VELOCITY; + ampObjZAxis.ProfileSettings = profileSettingsObjZAxis; + + ampObjZAxis.Enable(); + ampObjZAxis.MoveAbs(1); + + timerZAxisActualPosition.Start(); + timerZAxisCurrent.Start(); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonXAxisJogUp_MouseUp(object? sender, MouseEventArgs e) + { + try + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = true; + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + Thread.Sleep(500); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonYAxisJogUp_MouseUp(object? sender, MouseEventArgs e) + { + try + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = true; + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + Thread.Sleep(500); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonZAxisJogUp_MouseUp(object? sender, MouseEventArgs e) + { + try + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = true; + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + Thread.Sleep(500); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonXAxisJogDown_MouseDown(object? sender, MouseEventArgs e) + { + try + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOn; + + buttonXAxisHome.Enabled = false; + buttonXAxisRun.Enabled = false; + buttonXAxisJogUp.Enabled = false; + buttonXAxisJogDown.Enabled = true; + + profileSettingsObjXAxis.ProfileVel = doubleXAxisSpeed * doubleXAxisCoefficient; + profileSettingsObjXAxis.ProfileAccel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + profileSettingsObjXAxis.ProfileDecel = doubleXAxisSpeed * doubleXAxisCoefficient * 3; + profileSettingsObjXAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_VELOCITY; + ampObjXAxis.ProfileSettings = profileSettingsObjXAxis; + + ampObjXAxis.Enable(); + ampObjXAxis.MoveAbs(-1); + + timerXAxisActualPosition.Start(); + timerXAxisCurrent.Start(); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonYAxisJogDown_MouseDown(object? sender, MouseEventArgs e) + { + try + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOn; + + buttonYAxisHome.Enabled = false; + buttonYAxisRun.Enabled = false; + buttonYAxisJogUp.Enabled = false; + buttonYAxisJogDown.Enabled = true; + + profileSettingsObjYAxis.ProfileVel = doubleYAxisSpeed * doubleYAxisCoefficient; + profileSettingsObjYAxis.ProfileAccel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + profileSettingsObjYAxis.ProfileDecel = doubleYAxisSpeed * doubleYAxisCoefficient * 3; + profileSettingsObjYAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_VELOCITY; + ampObjYAxis.ProfileSettings = profileSettingsObjYAxis; + + ampObjYAxis.Enable(); + ampObjYAxis.MoveAbs(-1); + + timerYAxisActualPosition.Start(); + timerYAxisCurrent.Start(); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonZAxisJogDown_MouseDown(object? sender, MouseEventArgs e) + { + try + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOn; + + buttonZAxisHome.Enabled = false; + buttonZAxisRun.Enabled = false; + buttonZAxisJogUp.Enabled = false; + buttonZAxisJogDown.Enabled = true; + + profileSettingsObjZAxis.ProfileVel = doubleZAxisSpeed * doubleZAxisCoefficient; + profileSettingsObjZAxis.ProfileAccel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + profileSettingsObjZAxis.ProfileDecel = doubleZAxisSpeed * doubleZAxisCoefficient * 3; + profileSettingsObjZAxis.ProfileType = CML_PROFILE_TYPE.PROFILE_VELOCITY; + ampObjZAxis.ProfileSettings = profileSettingsObjZAxis; + + ampObjZAxis.Enable(); + ampObjZAxis.MoveAbs(-1); + + timerZAxisActualPosition.Start(); + timerZAxisCurrent.Start(); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonXAxisJogDown_MouseUp(object? sender, MouseEventArgs e) + { + try + { + buttonXAxisHome.Text = " "; + buttonXAxisRun.Text = " "; + buttonXAxisJogUp.Text = " "; + buttonXAxisJogDown.Text = " "; + + buttonXAxisHome.Image = ImageResource.HomeOff; + buttonXAxisRun.Image = ImageResource.RunOff; + buttonXAxisJogUp.Image = ImageResource.JogUpOff; + buttonXAxisJogDown.Image = ImageResource.JogDownOff; + + buttonXAxisHome.Enabled = true; + buttonXAxisRun.Enabled = true; + buttonXAxisJogUp.Enabled = true; + buttonXAxisJogDown.Enabled = true; + + ampObjXAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjXAxis.QuickStop(); + + Thread.Sleep(500); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonYAxisJogDown_MouseUp(object? sender, MouseEventArgs e) + { + try + { + buttonYAxisHome.Text = " "; + buttonYAxisRun.Text = " "; + buttonYAxisJogUp.Text = " "; + buttonYAxisJogDown.Text = " "; + + buttonYAxisHome.Image = ImageResource.HomeOff; + buttonYAxisRun.Image = ImageResource.RunOff; + buttonYAxisJogUp.Image = ImageResource.JogUpOff; + buttonYAxisJogDown.Image = ImageResource.JogDownOff; + + buttonYAxisHome.Enabled = true; + buttonYAxisRun.Enabled = true; + buttonYAxisJogUp.Enabled = true; + buttonYAxisJogDown.Enabled = true; + + ampObjYAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjYAxis.QuickStop(); + + Thread.Sleep(500); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + private void buttonZAxisJogDown_MouseUp(object? sender, MouseEventArgs e) + { + try + { + buttonZAxisHome.Text = " "; + buttonZAxisRun.Text = " "; + buttonZAxisJogUp.Text = " "; + buttonZAxisJogDown.Text = " "; + + buttonZAxisHome.Image = ImageResource.HomeOff; + buttonZAxisRun.Image = ImageResource.RunOff; + buttonZAxisJogUp.Image = ImageResource.JogUpOff; + buttonZAxisJogDown.Image = ImageResource.JogDownOff; + + buttonZAxisHome.Enabled = true; + buttonZAxisRun.Enabled = true; + buttonZAxisJogUp.Enabled = true; + buttonZAxisJogDown.Enabled = true; + + ampObjZAxis.QuickStopMode = CML_QUICK_STOP_MODE.QSTOP_DECEL; + ampObjZAxis.QuickStop(); + + Thread.Sleep(500); + } + catch (Exception error) + { + MessageBox.Show(error.Message, "", MessageBoxButtons.OK); + Application.Exit(); + } + } + + } +} diff --git a/FuelRobot/MainForm.resx b/FuelRobot/MainForm.resx new file mode 100644 index 0000000..0183f05 --- /dev/null +++ b/FuelRobot/MainForm.resx @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 214, 17 + + + 373, 17 + + + 580, 17 + + + 774, 17 + + + 970, 17 + + + 17, 55 + + + 223, 55 + + + 416, 55 + + + 612, 55 + + + 770, 55 + + + 976, 55 + + + 120 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAgBAAAMQOAADEDgAAAAAAAAAA + AAD///////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//////////////////////////////////// + /////////////////////////////////////////////+bY2P/axMT/2sTE/9rExP/axMT/2sTE/9rE + xP/axMT/2sTE/9rExP/axMT/2sTE/9rExP/n2tr////////////+/v7///////////////////////// + ////////////////////////////////////////////////////////+/n5/8Wjo//Mr6//8uvs/9vG + xv/9/Pz/0re4///////Mrq7/vZWW/+HP0P/m2Nn/vpeY/+ja2v////////////7+/v////////////// + ////////////////////////////////////////9PT9/8vN9v/29v3////////////Hpqb/zbCx/86x + sv/cx8f/toqL//v5+f+ia2z//////59mZ//fzMz/9O7u/5tgYf/z7e3/yamq/////////////v7+//// + //////////////////////////////////////////////Hy/P84RN7/GibZ/1Fb4v/8/f7//////8Of + oP/UvLz/3cnK/93Kyv+2iov/+/n5/6Nsbf//////nWNk/8inqP/v5ub/m2Bh//r4+P/Vvb3///////// + ///+/v7/////////////////////////////////////////////////uL7z/x8x2/8hM9z/HzHb/8PH + 9P//////9/Pz/7WKiv+6kZL/7eTl/9K4uP+7lJT/sIKC/82vr//AnJ3/tYqK/+LQ0f/Zw8P/s4WG/9nD + w/////////////7+/v////////////////////////////////////////////////+zuvP/Izrc/yQ7 + 3f8kO93/cYDo//////////////////////////////////////////////////////////////////// + /////////////////////////v7+//////////////////T0/f+gpe//eIDp/5Oa7f/m5/r//////9Xa + +P8mQd7/J0Pf/ydD3/8yTOD/9vf9///////////////////////v8Pz/19n4/+Xn+//+/v7///////// + ///////////////////////////////////+/v7////////////q7Pv/P0/g/0JR4f+nrvH/w8f1/56m + 7/+xt/L/9vf9/z1b4v8qS+D/Lk7h/yhJ3/++yPX////////////q6/v/anXm/09a4v9JVeL/IzLb/z1L + 4P+gqO//+fn+//////////////////////////////////7+/v///////////3GC6P9FWuL/7/H8/4mT + 7P9BUOD/eILp/5yk7v+8xPP/hpvt/y1T4f9HaOT/RWbk/32U7P//////8PL8/46Y7P/p6/v/4+n7/+3w + /P/y8/3/nKXu/y1A3v9KWuL/3eD5/////////////////////////////v7+///////z9fz/MVDg/666 + 8v+dqfD/VGjl//L0/P///////Pz+/8fO9f/I0vb/MFri/zJc4/+SqPD/Q2nl//z8/v/Hzvb/t8b0/3qU + 7P9+mO3/Xn7o/1Z55/+8y/X/5+n7/1Nn5P8zTOD/09n4///////////////////////+/v7//////9rh + +f8sUuH/4+j6/09r5f/P1/f///////////////////////j5/f9kiOr/MWHk/77N9v85Z+X/0dz4/9Td + +P/T3Pj/////////////////1d75/1B56P+CoO7/8fT8/1ty5v85VuL/5en6//////////////////7+ + /v//////1d34/zRg5P/r7/z/RWvl//X3/f///////////////////////////7PH9f80aeX/obrz/4in + 7/+RrvH/9Pf9////////////////////////////9Pf9/2SM6/+Co+7/7vH8/0Zl5P9ee+j//Pz+//// + /////////v7+///////i6fv/Nmrl/+ft+/9Oe+j/9fj9////////////////////////////7PL8/zp0 + 5/99ou//4On6/1OF6v/9/f7/////////////////////////////////8vb9/1GD6v+wyPX/yNP3/y9Z + 4/+xwfT////////////+/v7///////j6/f9De+j/ztz4/2WT7P/g6fv////////////+/v7/tc32/+Ps + +//+/v7/VIvr/1eN7P/+/v7/dKDu/9Lh+f//////////////////////////////////////xtj4/0eC + 6v/w9fz/cJLs/0945//7+/7///////7+/v///////////3ak7/+XuvP/n8H0/6XF9f////////////// + ///4+v7/hrDx/3uq8P9IiOr/QYTq//L2/f/S4vn/hbDx//////////////////////////////////// + ///+/v7/ZZru/6HC9P/N2vj/NGrl/8fW+P///////v7+////////////wtj4/1SV7f/j7vv/YKHv//j7 + /v/////////////////+/v//sM32/0aN7P9Okuz/6PH8/////v94rPD/7/X9//////////////////// + //////////////////+ry/b/X53u//r8/v9Pg+r/hqrw///////+/v7////////////8/f7/Zqfw/63Q + 9v+dy/b/lsr1////////////////////////////9Pj9//v8/v///////////9Hk+v+iyfX///////// + /////////////////////////////9rq+/9Fku3/7PT8/36o8P9YkOz//v7+//7+/v////////////// + ///Y6vv/S6Pw/9rt+/9ov/T/oNn4///+/v////////////H6/f/u9/3//////////////////////4i+ + 8//1+f3/////////////////////////////////7fT9/0WZ7v/a6/v/m770/0aJ6//0+P3//v7+//// + //////////////////+u2/n/R7Hy/9nw/P940Pf/WMj2/63m+/+s5fr/peD5/+Pz/P////////////// + ////////3u77/57Q9v/////////////////////////////////m8/z/OaDv/9ns+/+ixvX/Q43s/+ny + /P/+/v7///////////////////////////+p3/n/MbXz/6Tf+f/a9Pz/qeb7/73r+/+e3Pn/+fz+//// + ////////////////////////ndT3/9vw+////////////////////////////7vi+v8zqPH/7vf9/5bD + 9f9Glu3/6vP8//7+/v/////////////////////////////////b8/z/ZM74/zPA9v9Jx/f/bNH4/+v4 + /f/////////////////////////////////7/f7/g9D3/+74/f/////////////////9/v7/WcH1/17C + 9f/+////arPy/0mi8P/3+/3//v7+/////////////////////////////////////////////v7+//3+ + /v////////////////////////////////////////////z9/v/O6vv/gNX4/8Hr+//8/v7/8Pr+/3XS + +P8gtvT/1fD8/93w/P81pvH/abz0/////v/+/v7///////////////////////////////////////// + /////////////////////////////////////////////////////////////+j1/f+r3/n/oeL6/1TM + 9/8vwvb/U8z4/9Lx/P/2+/7/V7/0/yar8f/B5vr///////7+/v////////////////////////////// + //////////////////////////////////////////////////////////////////////////////L6 + /v+I1/j/jtr5/8ru/P/W8v3/q+T6/0DA9f8YsvT/i9f4/////////////v7+//////////////////// + //////////////////////////////////////////////////////////////////////////////// + ///////////////////R8fz/b9P4/zPD9/8twvb/W8/3/8Hs/P/////////////////+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+ + /v/+/v7//v7+//////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + ////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= + + + \ No newline at end of file diff --git a/FuelRobot/Program.cs b/FuelRobot/Program.cs new file mode 100644 index 0000000..5e4322b --- /dev/null +++ b/FuelRobot/Program.cs @@ -0,0 +1,17 @@ +namespace FuelRobot +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + // To customize application configuration such as set high DPI settings or default font, + // see https://aka.ms/applicationconfiguration. + ApplicationConfiguration.Initialize(); + Application.Run(new MainForm()); + } + } +} \ No newline at end of file diff --git a/FuelRobot/Resources/12英尺第一部分.png b/FuelRobot/Resources/12英尺第一部分.png new file mode 100644 index 0000000..655b424 Binary files /dev/null and b/FuelRobot/Resources/12英尺第一部分.png differ diff --git a/FuelRobot/Resources/12英尺第一部分1.png b/FuelRobot/Resources/12英尺第一部分1.png new file mode 100644 index 0000000..655b424 Binary files /dev/null and b/FuelRobot/Resources/12英尺第一部分1.png differ diff --git a/FuelRobot/Resources/12英尺第二部分1.png b/FuelRobot/Resources/12英尺第二部分1.png new file mode 100644 index 0000000..2f33b97 Binary files /dev/null and b/FuelRobot/Resources/12英尺第二部分1.png differ diff --git a/FuelRobot/Resources/CITEC32bit.ico b/FuelRobot/Resources/CITEC32bit.ico new file mode 100644 index 0000000..efdeaa0 Binary files /dev/null and b/FuelRobot/Resources/CITEC32bit.ico differ diff --git a/FuelRobot/Resources/CurrentOff.png b/FuelRobot/Resources/CurrentOff.png new file mode 100644 index 0000000..279781f Binary files /dev/null and b/FuelRobot/Resources/CurrentOff.png differ diff --git a/FuelRobot/Resources/CurrentOn.png b/FuelRobot/Resources/CurrentOn.png new file mode 100644 index 0000000..dd37b7b Binary files /dev/null and b/FuelRobot/Resources/CurrentOn.png differ diff --git a/FuelRobot/Resources/EnableOff.png b/FuelRobot/Resources/EnableOff.png new file mode 100644 index 0000000..e222678 Binary files /dev/null and b/FuelRobot/Resources/EnableOff.png differ diff --git a/FuelRobot/Resources/EnableOn.png b/FuelRobot/Resources/EnableOn.png new file mode 100644 index 0000000..20b4cfd Binary files /dev/null and b/FuelRobot/Resources/EnableOn.png differ diff --git a/FuelRobot/Resources/FuelAssembleCursor.png b/FuelRobot/Resources/FuelAssembleCursor.png new file mode 100644 index 0000000..f800ac5 Binary files /dev/null and b/FuelRobot/Resources/FuelAssembleCursor.png differ diff --git a/FuelRobot/Resources/HomeOff.png b/FuelRobot/Resources/HomeOff.png new file mode 100644 index 0000000..57fdfd0 Binary files /dev/null and b/FuelRobot/Resources/HomeOff.png differ diff --git a/FuelRobot/Resources/HomeOn.png b/FuelRobot/Resources/HomeOn.png new file mode 100644 index 0000000..e4f8e77 Binary files /dev/null and b/FuelRobot/Resources/HomeOn.png differ diff --git a/FuelRobot/Resources/JogDownOff.png b/FuelRobot/Resources/JogDownOff.png new file mode 100644 index 0000000..d564e20 Binary files /dev/null and b/FuelRobot/Resources/JogDownOff.png differ diff --git a/FuelRobot/Resources/JogDownOn.png b/FuelRobot/Resources/JogDownOn.png new file mode 100644 index 0000000..9539cf2 Binary files /dev/null and b/FuelRobot/Resources/JogDownOn.png differ diff --git a/FuelRobot/Resources/JogLeftOff.png b/FuelRobot/Resources/JogLeftOff.png new file mode 100644 index 0000000..56cefc2 Binary files /dev/null and b/FuelRobot/Resources/JogLeftOff.png differ diff --git a/FuelRobot/Resources/JogLeftOn.png b/FuelRobot/Resources/JogLeftOn.png new file mode 100644 index 0000000..c0de79a Binary files /dev/null and b/FuelRobot/Resources/JogLeftOn.png differ diff --git a/FuelRobot/Resources/JogRightOff.png b/FuelRobot/Resources/JogRightOff.png new file mode 100644 index 0000000..8078b63 Binary files /dev/null and b/FuelRobot/Resources/JogRightOff.png differ diff --git a/FuelRobot/Resources/JogRightOn.png b/FuelRobot/Resources/JogRightOn.png new file mode 100644 index 0000000..d5286b3 Binary files /dev/null and b/FuelRobot/Resources/JogRightOn.png differ diff --git a/FuelRobot/Resources/JogUpOff.png b/FuelRobot/Resources/JogUpOff.png new file mode 100644 index 0000000..e9e2109 Binary files /dev/null and b/FuelRobot/Resources/JogUpOff.png differ diff --git a/FuelRobot/Resources/JogUpOn.png b/FuelRobot/Resources/JogUpOn.png new file mode 100644 index 0000000..1171378 Binary files /dev/null and b/FuelRobot/Resources/JogUpOn.png differ diff --git a/FuelRobot/Resources/PositionOff.png b/FuelRobot/Resources/PositionOff.png new file mode 100644 index 0000000..4f45e2d Binary files /dev/null and b/FuelRobot/Resources/PositionOff.png differ diff --git a/FuelRobot/Resources/PositionOn.png b/FuelRobot/Resources/PositionOn.png new file mode 100644 index 0000000..0bdf05d Binary files /dev/null and b/FuelRobot/Resources/PositionOn.png differ diff --git a/FuelRobot/Resources/RunOff.png b/FuelRobot/Resources/RunOff.png new file mode 100644 index 0000000..43710c3 Binary files /dev/null and b/FuelRobot/Resources/RunOff.png differ diff --git a/FuelRobot/Resources/RunOn.png b/FuelRobot/Resources/RunOn.png new file mode 100644 index 0000000..140df14 Binary files /dev/null and b/FuelRobot/Resources/RunOn.png differ diff --git a/FuelRobot/Resources/SwitchOff.png b/FuelRobot/Resources/SwitchOff.png new file mode 100644 index 0000000..cdcfa74 Binary files /dev/null and b/FuelRobot/Resources/SwitchOff.png differ diff --git a/FuelRobot/Resources/SwitchOn.png b/FuelRobot/Resources/SwitchOn.png new file mode 100644 index 0000000..e678985 Binary files /dev/null and b/FuelRobot/Resources/SwitchOn.png differ diff --git a/FuelRobot/Resources/Y轴.png b/FuelRobot/Resources/Y轴.png new file mode 100644 index 0000000..4472cb2 Binary files /dev/null and b/FuelRobot/Resources/Y轴.png differ diff --git a/FuelRobot/Resources/remove.photos-removed-background.png b/FuelRobot/Resources/remove.photos-removed-background.png new file mode 100644 index 0000000..e283d5b Binary files /dev/null and b/FuelRobot/Resources/remove.photos-removed-background.png differ diff --git a/FuelRobot/Resources/基座.png b/FuelRobot/Resources/基座.png new file mode 100644 index 0000000..b68308e Binary files /dev/null and b/FuelRobot/Resources/基座.png differ diff --git a/FuelRobot/Resources/第一部分.png b/FuelRobot/Resources/第一部分.png new file mode 100644 index 0000000..d403662 Binary files /dev/null and b/FuelRobot/Resources/第一部分.png differ diff --git a/FuelRobot/Resources/第三部分.png b/FuelRobot/Resources/第三部分.png new file mode 100644 index 0000000..d026f52 Binary files /dev/null and b/FuelRobot/Resources/第三部分.png differ diff --git a/FuelRobot/Resources/第三部分1.png b/FuelRobot/Resources/第三部分1.png new file mode 100644 index 0000000..d026f52 Binary files /dev/null and b/FuelRobot/Resources/第三部分1.png differ diff --git a/FuelRobot/Resources/第二部分.png b/FuelRobot/Resources/第二部分.png new file mode 100644 index 0000000..4a60e7c Binary files /dev/null and b/FuelRobot/Resources/第二部分.png differ diff --git a/FuelRobot/Resources/第二部分1.png b/FuelRobot/Resources/第二部分1.png new file mode 100644 index 0000000..4a60e7c Binary files /dev/null and b/FuelRobot/Resources/第二部分1.png differ diff --git a/FuelRobot/Resources/轴X.png b/FuelRobot/Resources/轴X.png new file mode 100644 index 0000000..0538eeb Binary files /dev/null and b/FuelRobot/Resources/轴X.png differ diff --git a/FuelRobot/panelControl.Designer.cs b/FuelRobot/panelControl.Designer.cs new file mode 100644 index 0000000..bccac01 --- /dev/null +++ b/FuelRobot/panelControl.Designer.cs @@ -0,0 +1,37 @@ +namespace FuelRobot +{ + partial class panelControl + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/FuelRobot/panelControl.cs b/FuelRobot/panelControl.cs new file mode 100644 index 0000000..c708a8b --- /dev/null +++ b/FuelRobot/panelControl.cs @@ -0,0 +1,25 @@ +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 FuelRobot +{ + public partial class panelControl : UserControl + { + public panelControl() + { + InitializeComponent(); + DoubleBuffered = true; + SetStyle(ControlStyles.UserPaint | + ControlStyles.AllPaintingInWmPaint | + ControlStyles.OptimizedDoubleBuffer, true); + UpdateStyles(); + } + } +} diff --git a/FuelRobot/panelControl.resx b/FuelRobot/panelControl.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/FuelRobot/panelControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..061d105 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# 2025年9月1日燃料组件池边检查项目X轴Y轴Z轴电机三轴测试-Net架构 \ No newline at end of file