Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 31d0d1dec0 | |||
| 48176e79b4 | |||
| 63db9dc28f | |||
| f7ed15b18d | |||
| 6d9778a685 | |||
| e63e78c30e |
File diff suppressed because one or more lines are too long
+85
-1
@@ -11,12 +11,96 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Binder" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.CommandLine" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.EnvironmentVariables" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.FileExtensions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Physical" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging.Debug" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Options.ConfigurationExtensions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Json" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Hosting.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
+64
-58
@@ -43,83 +43,89 @@
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.8.0.0\lib\net462\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Binder.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Binder.8.0.2\lib\net462\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.CommandLine, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.CommandLine.7.0.0\lib\net462\Microsoft.Extensions.Configuration.CommandLine.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.CommandLine, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.CommandLine.8.0.0\lib\net462\Microsoft.Extensions.Configuration.CommandLine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.7.0.0\lib\net462\Microsoft.Extensions.Configuration.EnvironmentVariables.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.8.0.0\lib\net462\Microsoft.Extensions.Configuration.EnvironmentVariables.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.FileExtensions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.FileExtensions.8.0.1\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Json.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Json.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Json, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Json.8.0.1\lib\net462\Microsoft.Extensions.Configuration.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.UserSecrets.7.0.0\lib\net462\Microsoft.Extensions.Configuration.UserSecrets.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.UserSecrets.8.0.1\lib\net462\Microsoft.Extensions.Configuration.UserSecrets.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.8.0.1\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileProviders.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Diagnostics, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Diagnostics.8.0.1\lib\net462\Microsoft.Extensions.Diagnostics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileProviders.Physical.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Physical.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Diagnostics.Abstractions, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Diagnostics.Abstractions.8.0.1\lib\net462\Microsoft.Extensions.Diagnostics.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileSystemGlobbing.7.0.0\lib\net462\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileProviders.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Hosting, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Hosting.7.0.0\lib\net462\Microsoft.Extensions.Hosting.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileProviders.Physical.8.0.0\lib\net462\Microsoft.Extensions.FileProviders.Physical.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Hosting.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Hosting.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Hosting.Abstractions.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.FileSystemGlobbing.8.0.0\lib\net462\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.7.0.0\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Hosting, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Hosting.8.0.1\lib\net462\Microsoft.Extensions.Hosting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Hosting.Abstractions, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Hosting.Abstractions.8.0.1\lib\net462\Microsoft.Extensions.Hosting.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Configuration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Logging.Configuration.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Logging, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.8.0.1\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Console, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Console.7.0.0\lib\net462\Microsoft.Extensions.Logging.Console.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.8.0.2\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Debug, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Debug.7.0.0\lib\net462\Microsoft.Extensions.Logging.Debug.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Configuration, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Configuration.8.0.1\lib\net462\Microsoft.Extensions.Logging.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.EventLog, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.EventLog.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventLog.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Console, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Console.8.0.1\lib\net462\Microsoft.Extensions.Logging.Console.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.EventSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.EventSource.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventSource.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Debug, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Debug.8.0.1\lib\net462\Microsoft.Extensions.Logging.Debug.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.7.0.0\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Logging.EventLog, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.EventLog.8.0.1\lib\net462\Microsoft.Extensions.Logging.EventLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.7.0.0\lib\net462\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Logging.EventSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.EventSource.8.0.1\lib\net462\Microsoft.Extensions.Logging.EventSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Primitives.7.0.0\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
<Reference Include="Microsoft.Extensions.Options, Version=8.0.0.2, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.8.0.2\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options.ConfigurationExtensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.8.0.0\lib\net462\Microsoft.Extensions.Options.ConfigurationExtensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Primitives.8.0.0\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MQTTnet, Version=4.3.3.952, Culture=neutral, PublicKeyToken=fdb7629f2e364a63, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MQTTnet.4.3.3.952\lib\net461\MQTTnet.dll</HintPath>
|
||||
@@ -160,8 +166,8 @@
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.7.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
@@ -183,11 +189,11 @@
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.7.0.0\lib\net462\System.Text.Json.dll</HintPath>
|
||||
<Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
|
||||
+31
-29
@@ -1,31 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.Binder" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.CommandLine" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.Json" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.UserSecrets" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.FileProviders.Abstractions" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.FileProviders.Physical" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.FileSystemGlobbing" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Hosting" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Hosting.Abstractions" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Configuration" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Console" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Debug" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.EventLog" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.EventSource" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Options" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="7.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.Binder" version="8.0.2" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.CommandLine" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.EnvironmentVariables" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.Json" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Configuration.UserSecrets" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.2" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Diagnostics" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Diagnostics.Abstractions" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.FileProviders.Abstractions" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.FileProviders.Physical" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.FileSystemGlobbing" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Hosting" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Hosting.Abstractions" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.2" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Configuration" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Console" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.Debug" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.EventLog" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Logging.EventSource" version="8.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Options" version="8.0.2" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Options.ConfigurationExtensions" version="8.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="8.0.0" targetFramework="net462" />
|
||||
<package id="MQTTnet" version="4.3.3.952" targetFramework="net462" />
|
||||
<package id="MQTTnet.Extensions.ManagedClient" version="4.3.3.952" targetFramework="net462" />
|
||||
<package id="MTConnect.NET" version="6.5.1" targetFramework="net462" />
|
||||
@@ -38,15 +40,15 @@
|
||||
<package id="MTConnect.NET-TLS" version="6.5.1" targetFramework="net462" />
|
||||
<package id="MTConnect.NET-XML" version="6.5.1" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="7.0.0" targetFramework="net462" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net462" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encodings.Web" version="7.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Json" version="7.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
<package id="YamlDotNet" version="13.7.1" targetFramework="net462" />
|
||||
|
||||
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestAppCitizen", "RestAppCi
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTConnect", "MTConnect\MTConnect.csproj", "{C33D677A-DDAB-41EF-831F-DC9401BC573E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shelly", "Shelly\Shelly.csproj", "{C67A4DD0-C11D-428A-951E-C83BA143DBB4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -34,6 +36,12 @@ Global
|
||||
{C33D677A-DDAB-41EF-831F-DC9401BC573E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C33D677A-DDAB-41EF-831F-DC9401BC573E}.Remote_DEBUG|Any CPU.ActiveCfg = Remote_DEBUG|Any CPU
|
||||
{C33D677A-DDAB-41EF-831F-DC9401BC573E}.Remote_DEBUG|Any CPU.Build.0 = Remote_DEBUG|Any CPU
|
||||
{C67A4DD0-C11D-428A-951E-C83BA143DBB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C67A4DD0-C11D-428A-951E-C83BA143DBB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C67A4DD0-C11D-428A-951E-C83BA143DBB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C67A4DD0-C11D-428A-951E-C83BA143DBB4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C67A4DD0-C11D-428A-951E-C83BA143DBB4}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C67A4DD0-C11D-428A-951E-C83BA143DBB4}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using Shelly.DTO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Clients
|
||||
{
|
||||
public interface IShelly1
|
||||
{
|
||||
Task<ShellyResult<ShellyGen2StatusDto>> GetStatus(CancellationToken cancellationToken, TimeSpan? timeout = null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Shelly.DTO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Clients
|
||||
{
|
||||
public interface IShelly1Pm
|
||||
{
|
||||
Task<ShellyResult<Shelly1PmStatusDto>> GetStatus(CancellationToken cancellationToken, TimeSpan? timeout = null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using Flurl;
|
||||
using Shelly.DTO;
|
||||
using Shelly.Options;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Clients
|
||||
{
|
||||
public class Shelly1Client : ShellyClientBase, IShelly1
|
||||
{
|
||||
public Shelly1Client(HttpClient httpClient, Shelly1Options shelly1Options) : base(httpClient, shelly1Options)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<ShellyResult<ShellyGen2StatusDto>> GetStatus(CancellationToken cancellationToken, TimeSpan? timeout = null)
|
||||
{
|
||||
var endpoint = ServerUri.AppendPathSegment("status");
|
||||
var requestMessage = new HttpRequestMessage(HttpMethod.Get, endpoint);
|
||||
return await ExecuteRequestAsync<ShellyGen2StatusDto>(requestMessage, cancellationToken, timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using Flurl;
|
||||
using Shelly.DTO;
|
||||
using Shelly.Options;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Clients
|
||||
{
|
||||
public class Shelly1PmClient : ShellyClientBase, IShelly1Pm
|
||||
{
|
||||
public Shelly1PmClient(HttpClient httpClient, Shelly1PmOptions shellyOptions) : base(httpClient, shellyOptions)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<ShellyResult<Shelly1PmStatusDto>> GetStatus(CancellationToken cancellationToken, TimeSpan? timeout = null)
|
||||
{
|
||||
var endpoint = ServerUri.AppendPathSegment("Shelly.GetStatus");
|
||||
var requestMessage = new HttpRequestMessage(HttpMethod.Get, endpoint);
|
||||
return await ExecuteRequestAsync<Shelly1PmStatusDto>(requestMessage, cancellationToken, timeout);
|
||||
}
|
||||
|
||||
public async Task<ShellyResult<DTO.Shelly1PM.SwitchDto>> GetSwitchStatus(CancellationToken cancellationToken, int id, TimeSpan? timeout = null)
|
||||
{
|
||||
var endpoint = ServerUri.AppendPathSegment("Switch.GetStatus").AppendQueryParam("id",id);
|
||||
var requestMessage = new HttpRequestMessage(HttpMethod.Get, endpoint);
|
||||
return await ExecuteRequestAsync<DTO.Shelly1PM.SwitchDto>(requestMessage, cancellationToken, timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Shelly.Options;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Shelly.Clients
|
||||
{
|
||||
public abstract class ShellyClientBase
|
||||
{
|
||||
protected readonly HttpClient ShellyHttpClient;
|
||||
private readonly IShellyCommonOptions _shellyCommonOptions;
|
||||
protected readonly Uri ServerUri;
|
||||
|
||||
protected TimeSpan DefaultTimeout = TimeSpan.FromSeconds(5);
|
||||
|
||||
public ShellyClientBase(HttpClient httpClient, IShellyCommonOptions shellyCommonOptions)
|
||||
{
|
||||
if (httpClient == null) throw new ArgumentNullException(nameof(httpClient));
|
||||
if (shellyCommonOptions == null) throw new ArgumentNullException(nameof(shellyCommonOptions));
|
||||
|
||||
|
||||
ShellyHttpClient = httpClient;
|
||||
_shellyCommonOptions = shellyCommonOptions;
|
||||
ServerUri = shellyCommonOptions.ServerUri;
|
||||
|
||||
if (shellyCommonOptions.DefaultTimeout.HasValue)
|
||||
{
|
||||
DefaultTimeout = shellyCommonOptions.DefaultTimeout.Value;
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task<ShellyResult<T>> ExecuteRequestAsync<T>(HttpRequestMessage httpRequestMessage,
|
||||
CancellationToken cancellationToken, TimeSpan? timeout = null)
|
||||
{
|
||||
timeout = timeout ?? DefaultTimeout;
|
||||
|
||||
using (var timeoutTokenSource = new CancellationTokenSource(timeout.Value))
|
||||
{
|
||||
var authenticationString = $"{_shellyCommonOptions.UserName}:{_shellyCommonOptions.Password}";
|
||||
var base64EncodedAuthenticationString = Convert.ToBase64String(Encoding.ASCII.GetBytes(authenticationString));
|
||||
|
||||
httpRequestMessage.Headers.Authorization = new AuthenticationHeaderValue("Basic", base64EncodedAuthenticationString);
|
||||
|
||||
var linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(timeoutTokenSource.Token, cancellationToken);
|
||||
var response = await ShellyHttpClient.SendAsync(httpRequestMessage, linkedTokenSource.Token);
|
||||
|
||||
if (response.StatusCode == 0)
|
||||
{
|
||||
// Status code of 0 means timeout reached
|
||||
return ShellyResult<T>.TransientFailure("Device did not respond within timeout period");
|
||||
}
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.ServiceUnavailable)
|
||||
{
|
||||
return ShellyResult<T>.TransientFailure("Device responded with ServiceUnavailable");
|
||||
}
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.NotFound)
|
||||
{
|
||||
return ShellyResult<T>.Success(default, "Device responded with NotFound");
|
||||
}
|
||||
|
||||
if (response.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
return ShellyResult<T>.Failure($"Device responded with http status code {response.StatusCode}");
|
||||
}
|
||||
|
||||
return await HandleOkResponse<T>(response);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual async Task<ShellyResult<T>> HandleOkResponse<T>(HttpResponseMessage response)
|
||||
{
|
||||
var readAsStringAsync = await response.Content.ReadAsStringAsync();
|
||||
var shelly1Status = JsonConvert.DeserializeObject<T>(readAsStringAsync);
|
||||
return ShellyResult<T>.Success(shelly1Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO.Shelly1PM
|
||||
{
|
||||
public class BaseServiceDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Connection State
|
||||
/// </summary>
|
||||
[JsonProperty("connected")]
|
||||
public bool Connected { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Newtonsoft.Json;
|
||||
using Shelly.DTO.Shelly1PM;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
public class CloudDto :BaseServiceDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Define if service is enabled
|
||||
/// </summary>
|
||||
[JsonProperty("enabled")]
|
||||
public bool Enabled { get; set; } = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO.Shelly1PM
|
||||
{
|
||||
/// <summary>
|
||||
/// Energy Info
|
||||
/// </summary>
|
||||
public class EnergyDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Total returned energy consumed in Watt-hours
|
||||
/// </summary>
|
||||
[JsonProperty("total")]
|
||||
public double Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returned energy in Milliwatt-hours for the last three complete minutes. The 0-th element indicates the counts accumulated during the minute preceding minute_ts. Present only if the device clock is synced.
|
||||
/// </summary>
|
||||
[JsonProperty("by_minute")]
|
||||
public double[] LastByMinute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unix timestamp marking the start of the current minute (in UTC).
|
||||
/// </summary>
|
||||
[JsonProperty("minute_ts")]
|
||||
public long TimeStamp { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO.Shelly1PM
|
||||
{
|
||||
/// <summary>
|
||||
/// Input info
|
||||
/// </summary>
|
||||
public class InputDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the Input component instance
|
||||
/// </summary>
|
||||
[JsonProperty("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Current State(only for type switch, button) State of the input (null if the input instance is stateless, i.e. for type button)
|
||||
/// </summary>
|
||||
[JsonProperty("state")]
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO.Shelly1PM
|
||||
{
|
||||
public class SwitchDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the Switch component instance
|
||||
/// </summary>
|
||||
[JsonProperty("id")]
|
||||
public int Id { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Source of the last command, for example: init, WS_in, http, ...
|
||||
/// </summary>
|
||||
[JsonProperty("source")]
|
||||
public string Source { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Output status: rue if the output channel is currently on, false otherwise
|
||||
/// </summary>
|
||||
[JsonProperty("output")]
|
||||
public bool Output { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Last measured instantaneous active power(in Watts) delivered to the attached load(shown if applicable)
|
||||
/// </summary>
|
||||
[JsonProperty("apower")]
|
||||
public double Power { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Last measured voltage in Volts (shown if applicable)
|
||||
/// </summary>
|
||||
[JsonProperty("voltage")]
|
||||
public double Voltage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Last measured current in Amperes (shown if applicable)
|
||||
/// </summary>
|
||||
[JsonProperty("current")]
|
||||
public double Current { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information about the active energy counter (shown if applicable)
|
||||
/// </summary>
|
||||
[JsonProperty("aenergy")]
|
||||
public EnergyDto? ActEnergy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information about the returned active energy counter * (shown if applicable)
|
||||
/// </summary>
|
||||
[JsonProperty("ret_aenergy")]
|
||||
public EnergyDto? RetEnergy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information about the temperature (shown if applicable)
|
||||
/// </summary>
|
||||
[JsonProperty("temperature")]
|
||||
public TemperatureDto? Temperature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Error conditions occurred. May contain overtemp, overpower, overvoltage, undervoltage, (shown if at least one error is present)
|
||||
/// </summary>
|
||||
[JsonProperty("errors")]
|
||||
public string[]? Errors { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using Shelly.DTO.Shelly1PM;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Extended information for the Shelly1PM
|
||||
/// https://shelly-api-docs.shelly.cloud/gen2/Devices/Gen3/Shelly1PMG3
|
||||
/// </summary>
|
||||
public class Shelly1PmStatusDto : ShellyGen2StatusDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Input channel
|
||||
/// </summary>
|
||||
[JsonProperty("input:0")]
|
||||
public InputDto? Input { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Switch 0 data
|
||||
/// </summary>
|
||||
[JsonProperty("switch:0")]
|
||||
public SwitchDto? Switch { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using Newtonsoft.Json;
|
||||
using Shelly.DTO.Shelly1PM;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Shelly Gen2 device status data
|
||||
/// https://shelly-api-docs.shelly.cloud/gen2/#status
|
||||
/// </summary>
|
||||
public class ShellyGen2StatusDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// WiFi data
|
||||
/// </summary>
|
||||
[JsonProperty("wifi")]
|
||||
public WifiDto? WiFiStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Shelly Cloud state
|
||||
/// </summary>
|
||||
[JsonProperty("cloud")]
|
||||
public CloudDto? ShellyCloud { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// MQTT queue state
|
||||
/// </summary>
|
||||
[JsonProperty("mqtt")]
|
||||
public BaseServiceDto? MQTT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sys Info data
|
||||
/// </summary>
|
||||
[JsonProperty("sys")]
|
||||
public SysDto? SysInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// WS state
|
||||
/// </summary>
|
||||
[JsonProperty("ws")]
|
||||
public BaseServiceDto? WebSocket { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// System Info
|
||||
/// </summary>
|
||||
public class SysDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Mac address of the device
|
||||
/// </summary>
|
||||
[JsonProperty("mac")]
|
||||
public string Mac { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// True if restart is required, false otherwise
|
||||
/// </summary>
|
||||
[JsonProperty("restart_required")]
|
||||
public bool RestartRequired { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Current time in the format HH:MM (24-hour time format in the current timezone with leading zero). null when time is not synced from NTP server.
|
||||
/// </summary>
|
||||
[JsonProperty("time")]
|
||||
public string Time { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Unix timestamp (in UTC), null when time is not synced from NTP server.
|
||||
/// </summary>
|
||||
[JsonProperty("unixtime")]
|
||||
public int UnixTime { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds since last reboot
|
||||
/// </summary>
|
||||
[JsonProperty("uptime")]
|
||||
public int Uptime { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Total size of the RAM in the system in Bytes
|
||||
/// </summary>
|
||||
[JsonProperty("ram_size")]
|
||||
public int RamSize { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Size of the free RAM in the system in Bytes
|
||||
/// </summary>
|
||||
[JsonProperty("ram_free")]
|
||||
public int RamFree { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Total size of the file system in Bytes
|
||||
/// </summary>
|
||||
[JsonProperty("fs_size")]
|
||||
public int FSSize { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Size of the free file system in Bytes
|
||||
/// </summary>
|
||||
[JsonProperty("fs_free")]
|
||||
public int FSFree { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration revision number
|
||||
/// </summary>
|
||||
[JsonProperty("cfg_rev")]
|
||||
public int CfgRev { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// KVS (Key-Value Store) revision number
|
||||
/// </summary>
|
||||
[JsonProperty("kvs_rev")]
|
||||
public int KvsRev { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Schedules revision number, present if schedules are enabled
|
||||
/// </summary>
|
||||
[JsonProperty("schedule_rev")]
|
||||
public int ScheduleRev { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Webhooks revision number, present if webhooks are enabled
|
||||
/// </summary>
|
||||
[JsonProperty("webhook_rev")]
|
||||
public int WebhookRev { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Webhooks revision number, present if webhooks are enabled
|
||||
/// </summary>
|
||||
[JsonProperty("available_updates")]
|
||||
public UpdateDto AvailUpdates { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Information about reset type and cause
|
||||
/// </summary>
|
||||
[JsonProperty("reset_reason")]
|
||||
public int ResetReason { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
public class TemperatureDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Temperature in Celsius (null if the temperature is out of the measurement range)
|
||||
/// </summary>
|
||||
[JsonProperty("tC")]
|
||||
public double? Celsius { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Temperature in Fahrenheit (null if the temperature is out of the measurement range)
|
||||
/// </summary>
|
||||
[JsonProperty("tF")]
|
||||
public double? Fahrenheit { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Info about sw update
|
||||
/// </summary>
|
||||
public class UpdateDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Shown only if beta update is available
|
||||
/// </summary>
|
||||
[JsonProperty("beta")]
|
||||
public VersDto Beta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Shown only if beta update is available
|
||||
/// </summary>
|
||||
[JsonProperty("stable")]
|
||||
public VersDto Stable { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
public class VersDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Version of the new firmware
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string Version { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// WiFi status info
|
||||
/// </summary>
|
||||
public class WifiDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Ip of the device in the network (null if disconnected)
|
||||
/// </summary>
|
||||
[JsonProperty("sta_ip")]
|
||||
public string StaIp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Status of the connection. Range of values: disconnected, connecting, connected, got ip
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
public string Status { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// SSID of the network (null in case of hidden network)
|
||||
/// </summary>
|
||||
[JsonProperty("ssid")]
|
||||
public string SSID { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Strength of the signal in dBms
|
||||
/// </summary>
|
||||
[JsonProperty("rssi")]
|
||||
public int RSSI { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Number of clients connected to the access point. Present only when AP is enabled and range extender functionality is present and enabled.
|
||||
/// </summary>
|
||||
[JsonProperty("ap_client_count")]
|
||||
public int NumClients { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Options
|
||||
{
|
||||
/// <summary>
|
||||
/// Common authentication options across all shelly devices
|
||||
/// </summary>
|
||||
public interface IShellyAuthOptions
|
||||
{
|
||||
string UserName { get; }
|
||||
string Password { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Options
|
||||
{
|
||||
/// <summary>
|
||||
/// Common options across all shelly devices
|
||||
/// </summary>
|
||||
public interface IShellyCommonOptions : IShellyAuthOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// URI for the Shelly device
|
||||
/// </summary>
|
||||
Uri ServerUri { get; }
|
||||
/// <summary>
|
||||
/// Default timeout for HTTP requests if a specific timeout is not supplied
|
||||
/// </summary>
|
||||
TimeSpan? DefaultTimeout { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Options
|
||||
{
|
||||
public class Shelly1Options : IShellyCommonOptions
|
||||
{
|
||||
public Uri ServerUri { get; set; }
|
||||
public TimeSpan? DefaultTimeout { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string Password { get; set; }
|
||||
|
||||
public Shelly1Options()
|
||||
{
|
||||
DefaultTimeout = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly.Options
|
||||
{
|
||||
public class Shelly1PmOptions : IShellyCommonOptions
|
||||
{
|
||||
public Uri ServerUri { get; set; }
|
||||
public TimeSpan? DefaultTimeout { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string Password { get; set; }
|
||||
|
||||
public Shelly1PmOptions()
|
||||
{
|
||||
DefaultTimeout = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
using Newtonsoft.Json;
|
||||
using Shelly;
|
||||
using Shelly.Clients;
|
||||
using Shelly.Options;
|
||||
using System.Diagnostics;
|
||||
|
||||
Console.WriteLine("Start shelly test!");
|
||||
|
||||
//// caffè
|
||||
//var shellyAddr = "10.74.81.72";
|
||||
//APC
|
||||
var shellyAddr = "10.74.81.71";
|
||||
|
||||
Shelly1PmOptions options = new Shelly1PmOptions()
|
||||
{
|
||||
DefaultTimeout = TimeSpan.FromSeconds(5),
|
||||
ServerUri = new Uri($"http://{shellyAddr}/rpc")
|
||||
};
|
||||
|
||||
var shelly = new Shelly1PmClient(new HttpClient(), options);
|
||||
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
var response = await shelly.GetStatus(CancellationToken.None);
|
||||
sw.Stop();
|
||||
try
|
||||
{
|
||||
Console.WriteLine($"Success: {response.IsSuccess}");
|
||||
if (response.Value != null)
|
||||
{
|
||||
//Console.WriteLine($"Switch | Power: {response.Value.Switch.Power} | Current: {response.Value.Switch.Current} | Voltage: {response.Value.Switch.Voltage}");
|
||||
//Console.WriteLine($"ActEnergy.Total: {response.Value.Switch.ActEnergy.Total}");
|
||||
//Console.WriteLine($"Input: {response.Value.Input.Id} | state {response.Value.Input.State}");
|
||||
//Console.WriteLine($"Cloud: {response.Value.ShellyCloud.Connected}");
|
||||
//Console.WriteLine();
|
||||
Console.WriteLine(JsonConvert.SerializeObject(response.Value, Formatting.Indented));
|
||||
Console.WriteLine($"Elapsed: {sw.Elapsed.TotalMilliseconds:N3}ms");
|
||||
Console.WriteLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Empty value!");
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
Thread.Sleep(TimeSpan.FromSeconds(1));
|
||||
sw.Restart();
|
||||
var respSwitch = await shelly.GetSwitchStatus(CancellationToken.None, 0);
|
||||
sw.Stop();
|
||||
Console.WriteLine($"Success: {respSwitch.IsSuccess}");
|
||||
Console.WriteLine(JsonConvert.SerializeObject(respSwitch.Value, Formatting.Indented));
|
||||
Console.WriteLine($"Elapsed: {sw.Elapsed.TotalMilliseconds:N3}ms");
|
||||
Console.WriteLine();
|
||||
Thread.Sleep(TimeSpan.FromSeconds(3));
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Flurl" Version="4.0.0" />
|
||||
<PackageReference Include="Flurl.Http" Version="4.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shelly
|
||||
{
|
||||
public class ShellyResult<T>
|
||||
{
|
||||
public T Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_successChecked)
|
||||
{
|
||||
throw new InvalidOperationException("Cannot access value of result without checking success first");
|
||||
}
|
||||
|
||||
return _value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the client request has completed successfully
|
||||
/// </summary>
|
||||
public bool IsSuccess
|
||||
{
|
||||
get
|
||||
{
|
||||
_successChecked = true;
|
||||
return _success;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the client request has failed
|
||||
/// </summary>
|
||||
public bool IsFailure => !IsSuccess;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the reason for failure is transient
|
||||
/// </summary>
|
||||
public bool IsTransient { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Any message that accompanies this result
|
||||
/// </summary>
|
||||
public string Message { get; }
|
||||
|
||||
private T _value;
|
||||
private bool _successChecked = false;
|
||||
private bool _success = false;
|
||||
|
||||
private ShellyResult(T value, bool success, bool isTransient, string message = null)
|
||||
{
|
||||
_value = value;
|
||||
_success = success;
|
||||
IsTransient = isTransient;
|
||||
Message = message;
|
||||
}
|
||||
|
||||
public static ShellyResult<T> Success(T value, string message = null)
|
||||
{
|
||||
return new ShellyResult<T>(value, true, false, message);
|
||||
}
|
||||
|
||||
public static ShellyResult<T> Failure(string message = null)
|
||||
{
|
||||
return new ShellyResult<T>(default, success: false, isTransient: false, message);
|
||||
}
|
||||
|
||||
public static ShellyResult<T> TransientFailure(string message = null)
|
||||
{
|
||||
return new ShellyResult<T>(default, success: false, isTransient: true, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35431.28
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleAppCS", "SampleAppCS\SampleAppCS.csproj", "{3D20D5E3-7DB0-495C-89E0-DF6968879D29}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Remote_DEBUG|Any CPU = Remote_DEBUG|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3D20D5E3-7DB0-495C-89E0-DF6968879D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3D20D5E3-7DB0-495C-89E0-DF6968879D29}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3D20D5E3-7DB0-495C-89E0-DF6968879D29}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3D20D5E3-7DB0-495C-89E0-DF6968879D29}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3D20D5E3-7DB0-495C-89E0-DF6968879D29}.Remote_DEBUG|Any CPU.ActiveCfg = Remote_DEBUG|Any CPU
|
||||
{3D20D5E3-7DB0-495C-89E0-DF6968879D29}.Remote_DEBUG|Any CPU.Build.0 = Remote_DEBUG|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CFD136ED-9DE7-4EFE-A308-6A558B222552}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
// ClassDefine.cs : 定義用ヘッダファイル
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 MITSUBISHI Electric Corporation All Rights Reserved
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SampleAppCS
|
||||
{
|
||||
static class ClassDefine
|
||||
{
|
||||
public const String APPLICATION_NAME = "FCSB1224W000 "; //アプリ名
|
||||
|
||||
public enum SYSTEMTYPE
|
||||
{
|
||||
EZNC_SYS_MELDAS700L = 5, //M700L
|
||||
EZNC_SYS_MELDAS700M = 6, //M700M
|
||||
EZNC_SYS_MELDASC70 = 7, //C70
|
||||
EZNC_SYS_MELDAS800L = 8, //M800L
|
||||
EZNC_SYS_MELDAS800M = 9, //M800M
|
||||
EZNC_SYS_CNCC80 = 10, //C80
|
||||
}
|
||||
|
||||
public const Int32 EZNC_SYS_MULTI = 0x00010000; //マルチスレッド指定
|
||||
|
||||
public const Int32 EZNC_PLCAXIS = 255; //PLC軸指定
|
||||
|
||||
public enum PROGRAMTYPE
|
||||
{
|
||||
EZNC_MAINPRG = 0, //メインプログラム
|
||||
EZNC_SUBPRG = 1, //サブプログラム
|
||||
}
|
||||
|
||||
public enum MSTBTYPE
|
||||
{
|
||||
EZNC_M = 0, //M指令
|
||||
EZNC_S = 1, //S指令
|
||||
EZNC_T = 2, //T指令
|
||||
EZNC_B = 3, //B指令
|
||||
}
|
||||
|
||||
public enum PRGNUMTYPE
|
||||
{
|
||||
EZNC_PRG_MAXNUM = 0, //登録可能な最大本数
|
||||
EZNC_PRG_CURNUM = 1, //現在登録されている本数
|
||||
EZNC_PRG_RESTNUM = 2, //登録可能な残本数
|
||||
EZNC_PRG_CHARNUM = 3, //登録されている文字数
|
||||
EZNC_PRG_RESTCHARNUM = 4, //登録可能な残文字数
|
||||
}
|
||||
|
||||
public enum DISKREADTYPE
|
||||
{
|
||||
EZNC_DISK_DIRTYPE = 0x10000, //ディレクトリ情報読み出し
|
||||
EZNC_DISK_COMMENT = 0x04, //コメント情報読み出し
|
||||
EZNC_DISK_DATE = 0x02, //日付情報読み出し
|
||||
EZNC_DISK_SIZE = 0x01, //サイズ情報読み出し
|
||||
}
|
||||
|
||||
public enum ALARMTYPE
|
||||
{
|
||||
M_ALM_ALL_ALARM = 0x000, //アラーム種類の区別なし
|
||||
M_ALM_NC_ALARM = 0x100, //NCアラーム
|
||||
M_ALM_STOP_CODE = 0x200, //ストップコード
|
||||
M_ALM_PLC_ALARM = 0x300, //PLCアラームメッセージ
|
||||
M_ALM_OPE_MSG = 0x400, //オペレータメッセージ
|
||||
M_ALM_WARNING = 0x500, //ワーニング
|
||||
}
|
||||
|
||||
public enum DEVICEDATATYPE
|
||||
{
|
||||
EZNC_PLC_BIT = 0x11, //ビット型
|
||||
EZNC_PLC_BYTE = 0x12, //バイト型
|
||||
EZNC_PLC_WORD = 0x14, //ワード型
|
||||
EZNC_PLC_DWORD = 0x18, //ダブルワード型
|
||||
}
|
||||
|
||||
public enum RESETTYPE
|
||||
{
|
||||
EZNC_RESET_NONE = 0, //NCシステムのリセットなし
|
||||
EZNC_RESET_SIMPLE = 1, //オープン中のNCシステムのリセット
|
||||
EZNC_RESET_ALL = 2, //全てのNCシステムのリセット
|
||||
}
|
||||
|
||||
public enum OPENFILETYPE
|
||||
{
|
||||
EZNC_FILE_READ = 1, //読み出しモード
|
||||
EZNC_FILE_WRITE = 2, //書き出しモード
|
||||
EZNC_FILE_OVERWRITE = 3, //強制上書きモード
|
||||
EZNC_FILE_OPEN = 1, //書き込みオープンモード
|
||||
EZNC_FILE_CREATE = 2, //書き込み新規作成モード
|
||||
}
|
||||
}
|
||||
}
|
||||
+742
@@ -0,0 +1,742 @@
|
||||
namespace SampleAppCS
|
||||
{
|
||||
partial class FormSampleApp
|
||||
{
|
||||
/// <summary>
|
||||
/// 必要なデザイナー変数です。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 使用中のリソースをすべてクリーンアップします。
|
||||
/// </summary>
|
||||
/// <param name="disposing">マネージド リソースを破棄する場合は true を指定し、その他の場合は false を指定します。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows フォーム デザイナーで生成されたコード
|
||||
|
||||
/// <summary>
|
||||
/// デザイナー サポートに必要なメソッドです。このメソッドの内容を
|
||||
/// コード エディターで変更しないでください。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxOpenStatus = new System.Windows.Forms.TextBox();
|
||||
this.textBoxConnectStatus = new System.Windows.Forms.TextBox();
|
||||
this.buttonExcute = new System.Windows.Forms.Button();
|
||||
this.buttonConnect = new System.Windows.Forms.Button();
|
||||
this.comboBoxSystemType = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.textBoxTimeOut = new System.Windows.Forms.TextBox();
|
||||
this.textBoxMachineNo = new System.Windows.Forms.TextBox();
|
||||
this.textBoxIPAddress = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBoxSystemVersion = new System.Windows.Forms.TextBox();
|
||||
this.radioButtonEnd = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonStart = new System.Windows.Forms.RadioButton();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxSequenceNo = new System.Windows.Forms.TextBox();
|
||||
this.textBoxPrgNo = new System.Windows.Forms.TextBox();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.listBoxCurrentProgram = new System.Windows.Forms.ListBox();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox8 = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxMachinePositionZ = new System.Windows.Forms.TextBox();
|
||||
this.textBoxMachinePositionY = new System.Windows.Forms.TextBox();
|
||||
this.textBoxMachinePositionX = new System.Windows.Forms.TextBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.textBoxWorkPositionZ = new System.Windows.Forms.TextBox();
|
||||
this.groupBox7 = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxWorkPositionY = new System.Windows.Forms.TextBox();
|
||||
this.textBoxWorkPositionX = new System.Windows.Forms.TextBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxCurrentPositionZ = new System.Windows.Forms.TextBox();
|
||||
this.textBoxCurrentPositionY = new System.Windows.Forms.TextBox();
|
||||
this.textBoxCurrentPositionX = new System.Windows.Forms.TextBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.groupBox9 = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxAlarmMessage = new System.Windows.Forms.TextBox();
|
||||
this.groupBoxErrorCode = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxErrorCode = new System.Windows.Forms.TextBox();
|
||||
this.timerHighCycle = new System.Windows.Forms.Timer(this.components);
|
||||
this.timerLowCycle = new System.Windows.Forms.Timer(this.components);
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.groupBox8.SuspendLayout();
|
||||
this.groupBox7.SuspendLayout();
|
||||
this.groupBox6.SuspendLayout();
|
||||
this.groupBox9.SuspendLayout();
|
||||
this.groupBoxErrorCode.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.groupBox2);
|
||||
this.groupBox1.Controls.Add(this.buttonExcute);
|
||||
this.groupBox1.Controls.Add(this.buttonConnect);
|
||||
this.groupBox1.Controls.Add(this.comboBoxSystemType);
|
||||
this.groupBox1.Controls.Add(this.label6);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Controls.Add(this.textBoxTimeOut);
|
||||
this.groupBox1.Controls.Add(this.textBoxMachineNo);
|
||||
this.groupBox1.Controls.Add(this.textBoxIPAddress);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.textBoxSystemVersion);
|
||||
this.groupBox1.Controls.Add(this.radioButtonEnd);
|
||||
this.groupBox1.Controls.Add(this.radioButtonStart);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(16, 11);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(442, 178);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "NCカード通信開始/終了";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.textBoxOpenStatus);
|
||||
this.groupBox2.Controls.Add(this.textBoxConnectStatus);
|
||||
this.groupBox2.Location = new System.Drawing.Point(329, 24);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(98, 85);
|
||||
this.groupBox2.TabIndex = 15;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "通信状態";
|
||||
//
|
||||
// textBoxOpenStatus
|
||||
//
|
||||
this.textBoxOpenStatus.BackColor = System.Drawing.Color.Yellow;
|
||||
this.textBoxOpenStatus.Location = new System.Drawing.Point(8, 50);
|
||||
this.textBoxOpenStatus.Name = "textBoxOpenStatus";
|
||||
this.textBoxOpenStatus.ReadOnly = true;
|
||||
this.textBoxOpenStatus.Size = new System.Drawing.Size(86, 19);
|
||||
this.textBoxOpenStatus.TabIndex = 1;
|
||||
this.textBoxOpenStatus.Text = "通信終了";
|
||||
this.textBoxOpenStatus.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// textBoxConnectStatus
|
||||
//
|
||||
this.textBoxConnectStatus.BackColor = System.Drawing.Color.Red;
|
||||
this.textBoxConnectStatus.Location = new System.Drawing.Point(8, 21);
|
||||
this.textBoxConnectStatus.Name = "textBoxConnectStatus";
|
||||
this.textBoxConnectStatus.ReadOnly = true;
|
||||
this.textBoxConnectStatus.Size = new System.Drawing.Size(86, 19);
|
||||
this.textBoxConnectStatus.TabIndex = 0;
|
||||
this.textBoxConnectStatus.Text = "切断";
|
||||
this.textBoxConnectStatus.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// buttonOpenClose
|
||||
//
|
||||
this.buttonExcute.Enabled = false;
|
||||
this.buttonExcute.Location = new System.Drawing.Point(352, 115);
|
||||
this.buttonExcute.Name = "buttonOpenClose";
|
||||
this.buttonExcute.Size = new System.Drawing.Size(57, 22);
|
||||
this.buttonExcute.TabIndex = 14;
|
||||
this.buttonExcute.Text = "実行";
|
||||
this.buttonExcute.UseVisualStyleBackColor = true;
|
||||
this.buttonExcute.Click += new System.EventHandler(this.ButtonExcute_Click);
|
||||
//
|
||||
// buttonConnect
|
||||
//
|
||||
this.buttonConnect.Location = new System.Drawing.Point(258, 25);
|
||||
this.buttonConnect.Name = "buttonConnect";
|
||||
this.buttonConnect.Size = new System.Drawing.Size(57, 23);
|
||||
this.buttonConnect.TabIndex = 13;
|
||||
this.buttonConnect.Text = "接続";
|
||||
this.buttonConnect.UseVisualStyleBackColor = true;
|
||||
this.buttonConnect.Click += new System.EventHandler(this.ButtonConnect_Click);
|
||||
//
|
||||
// comboBoxSystemType
|
||||
//
|
||||
this.comboBoxSystemType.FormattingEnabled = true;
|
||||
this.comboBoxSystemType.Location = new System.Drawing.Point(89, 58);
|
||||
this.comboBoxSystemType.Name = "comboBoxSystemType";
|
||||
this.comboBoxSystemType.Size = new System.Drawing.Size(152, 20);
|
||||
this.comboBoxSystemType.TabIndex = 12;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(270, 120);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(60, 12);
|
||||
this.label6.TabIndex = 11;
|
||||
this.label6.Text = "(×100ms)";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(101, 119);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(60, 12);
|
||||
this.label5.TabIndex = 10;
|
||||
this.label5.Text = "TimeOut値";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(101, 97);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(103, 12);
|
||||
this.label4.TabIndex = 9;
|
||||
this.label4.Text = "NC制御ユニット番号";
|
||||
//
|
||||
// textBoxTimeOut
|
||||
//
|
||||
this.textBoxTimeOut.Location = new System.Drawing.Point(210, 117);
|
||||
this.textBoxTimeOut.Name = "textBoxTimeOut";
|
||||
this.textBoxTimeOut.Size = new System.Drawing.Size(52, 19);
|
||||
this.textBoxTimeOut.TabIndex = 8;
|
||||
this.textBoxTimeOut.Text = "50";
|
||||
this.textBoxTimeOut.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// textBoxMachineNo
|
||||
//
|
||||
this.textBoxMachineNo.Location = new System.Drawing.Point(210, 92);
|
||||
this.textBoxMachineNo.Name = "textBoxMachineNo";
|
||||
this.textBoxMachineNo.Size = new System.Drawing.Size(52, 19);
|
||||
this.textBoxMachineNo.TabIndex = 7;
|
||||
this.textBoxMachineNo.Text = "1";
|
||||
this.textBoxMachineNo.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// textBoxIPAddress
|
||||
//
|
||||
this.textBoxIPAddress.Location = new System.Drawing.Point(89, 27);
|
||||
this.textBoxIPAddress.Name = "textBoxIPAddress";
|
||||
this.textBoxIPAddress.Size = new System.Drawing.Size(152, 19);
|
||||
this.textBoxIPAddress.TabIndex = 6;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(16, 149);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(97, 12);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "システム番号/名称";
|
||||
//
|
||||
// textBoxSystemVersion
|
||||
//
|
||||
this.textBoxSystemVersion.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxSystemVersion.Location = new System.Drawing.Point(135, 146);
|
||||
this.textBoxSystemVersion.Name = "textBoxSystemVersion";
|
||||
this.textBoxSystemVersion.ReadOnly = true;
|
||||
this.textBoxSystemVersion.Size = new System.Drawing.Size(292, 19);
|
||||
this.textBoxSystemVersion.TabIndex = 4;
|
||||
//
|
||||
// radioButtonEnd
|
||||
//
|
||||
this.radioButtonEnd.AutoSize = true;
|
||||
this.radioButtonEnd.Location = new System.Drawing.Point(17, 117);
|
||||
this.radioButtonEnd.Name = "radioButtonEnd";
|
||||
this.radioButtonEnd.Size = new System.Drawing.Size(71, 16);
|
||||
this.radioButtonEnd.TabIndex = 3;
|
||||
this.radioButtonEnd.Text = "通信終了";
|
||||
this.radioButtonEnd.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonStart
|
||||
//
|
||||
this.radioButtonStart.AutoSize = true;
|
||||
this.radioButtonStart.Checked = true;
|
||||
this.radioButtonStart.Location = new System.Drawing.Point(17, 95);
|
||||
this.radioButtonStart.Name = "radioButtonStart";
|
||||
this.radioButtonStart.Size = new System.Drawing.Size(71, 16);
|
||||
this.radioButtonStart.TabIndex = 2;
|
||||
this.radioButtonStart.TabStop = true;
|
||||
this.radioButtonStart.Text = "通信開始";
|
||||
this.radioButtonStart.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(16, 61);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(47, 12);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "NCタイプ";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(15, 30);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(51, 12);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "IPアドレス";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.textBoxSequenceNo);
|
||||
this.groupBox3.Controls.Add(this.textBoxPrgNo);
|
||||
this.groupBox3.Controls.Add(this.label17);
|
||||
this.groupBox3.Controls.Add(this.label16);
|
||||
this.groupBox3.Controls.Add(this.groupBox4);
|
||||
this.groupBox3.Location = new System.Drawing.Point(477, 17);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(316, 395);
|
||||
this.groupBox3.TabIndex = 1;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "プログラム";
|
||||
//
|
||||
// textBoxSequenceNo
|
||||
//
|
||||
this.textBoxSequenceNo.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxSequenceNo.Font = new System.Drawing.Font("MS UI Gothic", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.textBoxSequenceNo.Location = new System.Drawing.Point(115, 347);
|
||||
this.textBoxSequenceNo.Name = "textBoxSequenceNo";
|
||||
this.textBoxSequenceNo.ReadOnly = true;
|
||||
this.textBoxSequenceNo.Size = new System.Drawing.Size(188, 34);
|
||||
this.textBoxSequenceNo.TabIndex = 22;
|
||||
this.textBoxSequenceNo.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// textBoxPrgNo
|
||||
//
|
||||
this.textBoxPrgNo.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxPrgNo.Font = new System.Drawing.Font("MS UI Gothic", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.textBoxPrgNo.Location = new System.Drawing.Point(115, 303);
|
||||
this.textBoxPrgNo.Name = "textBoxPrgNo";
|
||||
this.textBoxPrgNo.ReadOnly = true;
|
||||
this.textBoxPrgNo.Size = new System.Drawing.Size(188, 34);
|
||||
this.textBoxPrgNo.TabIndex = 21;
|
||||
this.textBoxPrgNo.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Font = new System.Drawing.Font("MS UI Gothic", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.label17.Location = new System.Drawing.Point(16, 357);
|
||||
this.label17.Name = "label17";
|
||||
this.label17.Size = new System.Drawing.Size(95, 15);
|
||||
this.label17.TabIndex = 2;
|
||||
this.label17.Text = "シーケンス番号";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.Font = new System.Drawing.Font("MS UI Gothic", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.label16.Location = new System.Drawing.Point(16, 314);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(93, 15);
|
||||
this.label16.TabIndex = 1;
|
||||
this.label16.Text = "プログラム番号";
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.listBoxCurrentProgram);
|
||||
this.groupBox4.Location = new System.Drawing.Point(6, 21);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(304, 269);
|
||||
this.groupBox4.TabIndex = 0;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "実行プログラム表示";
|
||||
//
|
||||
// listBoxCurrentProgram
|
||||
//
|
||||
this.listBoxCurrentProgram.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.listBoxCurrentProgram.FormattingEnabled = true;
|
||||
this.listBoxCurrentProgram.ItemHeight = 12;
|
||||
this.listBoxCurrentProgram.Location = new System.Drawing.Point(8, 18);
|
||||
this.listBoxCurrentProgram.Name = "listBoxCurrentProgram";
|
||||
this.listBoxCurrentProgram.Size = new System.Drawing.Size(289, 244);
|
||||
this.listBoxCurrentProgram.TabIndex = 17;
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.groupBox8);
|
||||
this.groupBox5.Controls.Add(this.textBoxWorkPositionZ);
|
||||
this.groupBox5.Controls.Add(this.groupBox7);
|
||||
this.groupBox5.Controls.Add(this.groupBox6);
|
||||
this.groupBox5.Location = new System.Drawing.Point(16, 195);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(442, 217);
|
||||
this.groupBox5.TabIndex = 2;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "位置表示";
|
||||
//
|
||||
// groupBox8
|
||||
//
|
||||
this.groupBox8.Controls.Add(this.textBoxMachinePositionZ);
|
||||
this.groupBox8.Controls.Add(this.textBoxMachinePositionY);
|
||||
this.groupBox8.Controls.Add(this.textBoxMachinePositionX);
|
||||
this.groupBox8.Controls.Add(this.label11);
|
||||
this.groupBox8.Controls.Add(this.label12);
|
||||
this.groupBox8.Controls.Add(this.label13);
|
||||
this.groupBox8.Location = new System.Drawing.Point(268, 118);
|
||||
this.groupBox8.Name = "groupBox8";
|
||||
this.groupBox8.Size = new System.Drawing.Size(168, 94);
|
||||
this.groupBox8.TabIndex = 19;
|
||||
this.groupBox8.TabStop = false;
|
||||
this.groupBox8.Text = "機械位置";
|
||||
//
|
||||
// textBoxMachinePositionZ
|
||||
//
|
||||
this.textBoxMachinePositionZ.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxMachinePositionZ.Location = new System.Drawing.Point(27, 66);
|
||||
this.textBoxMachinePositionZ.Name = "textBoxMachinePositionZ";
|
||||
this.textBoxMachinePositionZ.ReadOnly = true;
|
||||
this.textBoxMachinePositionZ.Size = new System.Drawing.Size(130, 19);
|
||||
this.textBoxMachinePositionZ.TabIndex = 20;
|
||||
//
|
||||
// textBoxMachinePositionY
|
||||
//
|
||||
this.textBoxMachinePositionY.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxMachinePositionY.Location = new System.Drawing.Point(27, 41);
|
||||
this.textBoxMachinePositionY.Name = "textBoxMachinePositionY";
|
||||
this.textBoxMachinePositionY.ReadOnly = true;
|
||||
this.textBoxMachinePositionY.Size = new System.Drawing.Size(130, 19);
|
||||
this.textBoxMachinePositionY.TabIndex = 17;
|
||||
//
|
||||
// textBoxMachinePositionX
|
||||
//
|
||||
this.textBoxMachinePositionX.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxMachinePositionX.Location = new System.Drawing.Point(27, 17);
|
||||
this.textBoxMachinePositionX.Name = "textBoxMachinePositionX";
|
||||
this.textBoxMachinePositionX.ReadOnly = true;
|
||||
this.textBoxMachinePositionX.Size = new System.Drawing.Size(130, 19);
|
||||
this.textBoxMachinePositionX.TabIndex = 16;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(9, 69);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(12, 12);
|
||||
this.label11.TabIndex = 3;
|
||||
this.label11.Text = "Z";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(9, 44);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(12, 12);
|
||||
this.label12.TabIndex = 2;
|
||||
this.label12.Text = "Y";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(9, 20);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(12, 12);
|
||||
this.label13.TabIndex = 1;
|
||||
this.label13.Text = "X";
|
||||
//
|
||||
// textBoxWorkPositionZ
|
||||
//
|
||||
this.textBoxWorkPositionZ.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxWorkPositionZ.Location = new System.Drawing.Point(295, 83);
|
||||
this.textBoxWorkPositionZ.Name = "textBoxWorkPositionZ";
|
||||
this.textBoxWorkPositionZ.ReadOnly = true;
|
||||
this.textBoxWorkPositionZ.Size = new System.Drawing.Size(130, 19);
|
||||
this.textBoxWorkPositionZ.TabIndex = 18;
|
||||
//
|
||||
// groupBox7
|
||||
//
|
||||
this.groupBox7.Controls.Add(this.textBoxWorkPositionY);
|
||||
this.groupBox7.Controls.Add(this.textBoxWorkPositionX);
|
||||
this.groupBox7.Controls.Add(this.label10);
|
||||
this.groupBox7.Controls.Add(this.label9);
|
||||
this.groupBox7.Controls.Add(this.label8);
|
||||
this.groupBox7.Location = new System.Drawing.Point(268, 18);
|
||||
this.groupBox7.Name = "groupBox7";
|
||||
this.groupBox7.Size = new System.Drawing.Size(168, 94);
|
||||
this.groupBox7.TabIndex = 1;
|
||||
this.groupBox7.TabStop = false;
|
||||
this.groupBox7.Text = "ワーク座標位置";
|
||||
//
|
||||
// textBoxWorkPositionY
|
||||
//
|
||||
this.textBoxWorkPositionY.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxWorkPositionY.Location = new System.Drawing.Point(27, 41);
|
||||
this.textBoxWorkPositionY.Name = "textBoxWorkPositionY";
|
||||
this.textBoxWorkPositionY.ReadOnly = true;
|
||||
this.textBoxWorkPositionY.Size = new System.Drawing.Size(130, 19);
|
||||
this.textBoxWorkPositionY.TabIndex = 17;
|
||||
//
|
||||
// textBoxWorkPositionX
|
||||
//
|
||||
this.textBoxWorkPositionX.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxWorkPositionX.Location = new System.Drawing.Point(27, 17);
|
||||
this.textBoxWorkPositionX.Name = "textBoxWorkPositionX";
|
||||
this.textBoxWorkPositionX.ReadOnly = true;
|
||||
this.textBoxWorkPositionX.Size = new System.Drawing.Size(130, 19);
|
||||
this.textBoxWorkPositionX.TabIndex = 16;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(9, 69);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(12, 12);
|
||||
this.label10.TabIndex = 3;
|
||||
this.label10.Text = "Z";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(9, 44);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(12, 12);
|
||||
this.label9.TabIndex = 2;
|
||||
this.label9.Text = "Y";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(9, 20);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(12, 12);
|
||||
this.label8.TabIndex = 1;
|
||||
this.label8.Text = "X";
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.textBoxCurrentPositionZ);
|
||||
this.groupBox6.Controls.Add(this.textBoxCurrentPositionY);
|
||||
this.groupBox6.Controls.Add(this.textBoxCurrentPositionX);
|
||||
this.groupBox6.Controls.Add(this.label15);
|
||||
this.groupBox6.Controls.Add(this.label14);
|
||||
this.groupBox6.Controls.Add(this.label7);
|
||||
this.groupBox6.Location = new System.Drawing.Point(6, 18);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(254, 193);
|
||||
this.groupBox6.TabIndex = 0;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "現在座標位置";
|
||||
//
|
||||
// textBoxCurrentPositionZ
|
||||
//
|
||||
this.textBoxCurrentPositionZ.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxCurrentPositionZ.Font = new System.Drawing.Font("MS UI Gothic", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.textBoxCurrentPositionZ.Location = new System.Drawing.Point(58, 137);
|
||||
this.textBoxCurrentPositionZ.Name = "textBoxCurrentPositionZ";
|
||||
this.textBoxCurrentPositionZ.ReadOnly = true;
|
||||
this.textBoxCurrentPositionZ.Size = new System.Drawing.Size(177, 34);
|
||||
this.textBoxCurrentPositionZ.TabIndex = 20;
|
||||
//
|
||||
// textBoxCurrentPositionY
|
||||
//
|
||||
this.textBoxCurrentPositionY.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxCurrentPositionY.Font = new System.Drawing.Font("MS UI Gothic", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.textBoxCurrentPositionY.Location = new System.Drawing.Point(58, 82);
|
||||
this.textBoxCurrentPositionY.Name = "textBoxCurrentPositionY";
|
||||
this.textBoxCurrentPositionY.ReadOnly = true;
|
||||
this.textBoxCurrentPositionY.Size = new System.Drawing.Size(177, 34);
|
||||
this.textBoxCurrentPositionY.TabIndex = 19;
|
||||
//
|
||||
// textBoxCurrentPositionX
|
||||
//
|
||||
this.textBoxCurrentPositionX.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxCurrentPositionX.Font = new System.Drawing.Font("MS UI Gothic", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.textBoxCurrentPositionX.Location = new System.Drawing.Point(58, 30);
|
||||
this.textBoxCurrentPositionX.Name = "textBoxCurrentPositionX";
|
||||
this.textBoxCurrentPositionX.ReadOnly = true;
|
||||
this.textBoxCurrentPositionX.Size = new System.Drawing.Size(177, 34);
|
||||
this.textBoxCurrentPositionX.TabIndex = 18;
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Font = new System.Drawing.Font("MS UI Gothic", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.label15.Location = new System.Drawing.Point(16, 133);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(35, 35);
|
||||
this.label15.TabIndex = 2;
|
||||
this.label15.Text = "Z";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Font = new System.Drawing.Font("MS UI Gothic", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.label14.Location = new System.Drawing.Point(16, 82);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(36, 35);
|
||||
this.label14.TabIndex = 1;
|
||||
this.label14.Text = "Y";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("MS UI Gothic", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.label7.Location = new System.Drawing.Point(16, 29);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(36, 35);
|
||||
this.label7.TabIndex = 0;
|
||||
this.label7.Text = "X";
|
||||
//
|
||||
// groupBox9
|
||||
//
|
||||
this.groupBox9.Controls.Add(this.textBoxAlarmMessage);
|
||||
this.groupBox9.Location = new System.Drawing.Point(19, 422);
|
||||
this.groupBox9.Name = "groupBox9";
|
||||
this.groupBox9.Size = new System.Drawing.Size(384, 83);
|
||||
this.groupBox9.TabIndex = 3;
|
||||
this.groupBox9.TabStop = false;
|
||||
this.groupBox9.Text = "アラーム表示";
|
||||
//
|
||||
// textBoxAlarmMessage
|
||||
//
|
||||
this.textBoxAlarmMessage.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxAlarmMessage.Font = new System.Drawing.Font("MS UI Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.textBoxAlarmMessage.Location = new System.Drawing.Point(6, 18);
|
||||
this.textBoxAlarmMessage.Multiline = true;
|
||||
this.textBoxAlarmMessage.Name = "textBoxAlarmMessage";
|
||||
this.textBoxAlarmMessage.ReadOnly = true;
|
||||
this.textBoxAlarmMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.textBoxAlarmMessage.Size = new System.Drawing.Size(372, 55);
|
||||
this.textBoxAlarmMessage.TabIndex = 21;
|
||||
//
|
||||
// groupBoxErrorCode
|
||||
//
|
||||
this.groupBoxErrorCode.Controls.Add(this.textBoxErrorCode);
|
||||
this.groupBoxErrorCode.Location = new System.Drawing.Point(409, 422);
|
||||
this.groupBoxErrorCode.Name = "groupBoxErrorCode";
|
||||
this.groupBoxErrorCode.Size = new System.Drawing.Size(384, 83);
|
||||
this.groupBoxErrorCode.TabIndex = 22;
|
||||
this.groupBoxErrorCode.TabStop = false;
|
||||
this.groupBoxErrorCode.Text = "Error Code";
|
||||
//
|
||||
// textBoxErrorCode
|
||||
//
|
||||
this.textBoxErrorCode.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.textBoxErrorCode.Font = new System.Drawing.Font("MS UI Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
|
||||
this.textBoxErrorCode.Location = new System.Drawing.Point(6, 18);
|
||||
this.textBoxErrorCode.Multiline = true;
|
||||
this.textBoxErrorCode.Name = "textBoxErrorCode";
|
||||
this.textBoxErrorCode.ReadOnly = true;
|
||||
this.textBoxErrorCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.textBoxErrorCode.Size = new System.Drawing.Size(372, 55);
|
||||
this.textBoxErrorCode.TabIndex = 22;
|
||||
//
|
||||
// timerHighCycle
|
||||
//
|
||||
this.timerHighCycle.Tick += new System.EventHandler(this.TimerHighCycle_Tick);
|
||||
//
|
||||
// timerLowCycle
|
||||
//
|
||||
this.timerLowCycle.Interval = 1000;
|
||||
this.timerLowCycle.Tick += new System.EventHandler(this.TimerLowCycle_Tick);
|
||||
//
|
||||
// FormSampleApp
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(805, 520);
|
||||
this.Controls.Add(this.groupBoxErrorCode);
|
||||
this.Controls.Add(this.groupBox9);
|
||||
this.Controls.Add(this.groupBox5);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "FormSampleApp";
|
||||
this.Text = "Sample Application";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox5.ResumeLayout(false);
|
||||
this.groupBox5.PerformLayout();
|
||||
this.groupBox8.ResumeLayout(false);
|
||||
this.groupBox8.PerformLayout();
|
||||
this.groupBox7.ResumeLayout(false);
|
||||
this.groupBox7.PerformLayout();
|
||||
this.groupBox6.ResumeLayout(false);
|
||||
this.groupBox6.PerformLayout();
|
||||
this.groupBox9.ResumeLayout(false);
|
||||
this.groupBox9.PerformLayout();
|
||||
this.groupBoxErrorCode.ResumeLayout(false);
|
||||
this.groupBoxErrorCode.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox textBoxTimeOut;
|
||||
private System.Windows.Forms.TextBox textBoxMachineNo;
|
||||
private System.Windows.Forms.TextBox textBoxIPAddress;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox textBoxSystemVersion;
|
||||
private System.Windows.Forms.RadioButton radioButtonEnd;
|
||||
private System.Windows.Forms.RadioButton radioButtonStart;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox textBoxOpenStatus;
|
||||
private System.Windows.Forms.TextBox textBoxConnectStatus;
|
||||
private System.Windows.Forms.Button buttonExcute;
|
||||
private System.Windows.Forms.Button buttonConnect;
|
||||
private System.Windows.Forms.ComboBox comboBoxSystemType;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.GroupBox groupBox7;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.GroupBox groupBox8;
|
||||
private System.Windows.Forms.TextBox textBoxMachinePositionY;
|
||||
private System.Windows.Forms.TextBox textBoxMachinePositionX;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.TextBox textBoxWorkPositionZ;
|
||||
private System.Windows.Forms.TextBox textBoxWorkPositionY;
|
||||
private System.Windows.Forms.TextBox textBoxWorkPositionX;
|
||||
private System.Windows.Forms.TextBox textBoxSequenceNo;
|
||||
private System.Windows.Forms.TextBox textBoxPrgNo;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.TextBox textBoxMachinePositionZ;
|
||||
private System.Windows.Forms.TextBox textBoxCurrentPositionZ;
|
||||
private System.Windows.Forms.TextBox textBoxCurrentPositionY;
|
||||
private System.Windows.Forms.TextBox textBoxCurrentPositionX;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.GroupBox groupBox9;
|
||||
private System.Windows.Forms.TextBox textBoxAlarmMessage;
|
||||
private System.Windows.Forms.GroupBox groupBoxErrorCode;
|
||||
private System.Windows.Forms.TextBox textBoxErrorCode;
|
||||
private System.Windows.Forms.Timer timerHighCycle;
|
||||
private System.Windows.Forms.Timer timerLowCycle;
|
||||
private System.Windows.Forms.ListBox listBoxCurrentProgram;
|
||||
}
|
||||
}
|
||||
|
||||
+564
@@ -0,0 +1,564 @@
|
||||
// FormSampleApp.cs : アプリケーション用クラスの機能定義ファイル
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 MITSUBISHI Electric Corporation All Rights Reserved
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static SampleAppCS.ClassDefine;
|
||||
|
||||
namespace SampleAppCS
|
||||
{
|
||||
public partial class FormSampleApp : Form
|
||||
{
|
||||
private EZNCAUTLib.DispEZNcCommunication oEZNcAutCom = null;
|
||||
private Boolean bConnectStatus = false;
|
||||
private Boolean bCommunicateStatus = false;
|
||||
//Open3の第4引数は"EZNC_LOCALHOST"固定
|
||||
private String strHostName = "EZNC_LOCALHOST";
|
||||
|
||||
//コンストラクタ
|
||||
public FormSampleApp()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//アプリ名の登録
|
||||
this.Text = APPLICATION_NAME + this.Text;
|
||||
groupBoxErrorCode.Text = APPLICATION_NAME + groupBoxErrorCode.Text;
|
||||
|
||||
//NCタイプの登録(C70/C80除く)
|
||||
foreach (String stType in Enum.GetNames(typeof(SYSTEMTYPE)))
|
||||
{
|
||||
if ((stType != "EZNC_SYS_MELDASC70") && (stType != "EZNC_SYS_CNCC80"))
|
||||
{
|
||||
comboBoxSystemType.Items.Add(stType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ErrorCodeの出力
|
||||
private void CheckError(String strMethod, Int32 lResult)
|
||||
{
|
||||
if (lResult != 0)
|
||||
{
|
||||
Int32 lBase = 16;
|
||||
|
||||
textBoxErrorCode.Text = strMethod + " failed. " + "0x" +
|
||||
Convert.ToString(lResult, lBase) + Environment.NewLine + textBoxErrorCode.Text;
|
||||
}
|
||||
}
|
||||
|
||||
//「接続/切断」ボタン押下時の処理
|
||||
private void ButtonConnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
//M700/M800シリーズではポート番号に683という固定値を指定
|
||||
Int32 lPort = 683;
|
||||
Int32 lNCType;
|
||||
Int32 lResult;
|
||||
Boolean bResult;
|
||||
String strIPAddress;
|
||||
|
||||
//IPアドレスの取得
|
||||
if (textBoxIPAddress.Text == "")
|
||||
{
|
||||
MessageBox.Show("IPアドレスが不正です。");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
strIPAddress = textBoxIPAddress.Text;
|
||||
}
|
||||
|
||||
//NCタイプの取得
|
||||
bResult = Enum.TryParse<SYSTEMTYPE>(comboBoxSystemType.Text, out SYSTEMTYPE sysNCType);
|
||||
if (bResult == false)
|
||||
{
|
||||
MessageBox.Show("NCタイプが不正です。");
|
||||
return;
|
||||
}
|
||||
|
||||
if (oEZNcAutCom == null)
|
||||
{
|
||||
//オブジェクトの作成
|
||||
oEZNcAutCom = new EZNCAUTLib.DispEZNcCommunication();
|
||||
|
||||
//通信回線のオープン
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_CNCC80)
|
||||
{
|
||||
//下記の設定は一例のため、接続環境に合わせた設定が必要
|
||||
lResult = oEZNcAutCom.SetMelsecProtocol(0x00, 0xFF, 0x00, 0x00, 0x3E1, 0x1018,
|
||||
0x1002, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, strIPAddress, 0x04,
|
||||
Int32.Parse(textBoxTimeOut.Text), 0x00, 0x00, 0x00, 5006, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01);
|
||||
CheckError("SetMelsecProtocol", lResult);
|
||||
}
|
||||
else if (sysNCType == SYSTEMTYPE.EZNC_SYS_MELDASC70)
|
||||
{
|
||||
//下記の設定は一例のため、接続環境に合わせた設定が必要
|
||||
lResult = oEZNcAutCom.SetMelsecProtocol(0x01, 0x01, 0x00, 0x00, 0x3E1, 0x0901,
|
||||
0x1A, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, strIPAddress, 0x04,
|
||||
Int32.Parse(textBoxTimeOut.Text), 0x00, 0x01, 0x04, 5001, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01);
|
||||
CheckError("SetMelsecProtocol", lResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
//TCPIP通信設定
|
||||
lResult = oEZNcAutCom.SetTCPIPProtocol(strIPAddress, lPort);
|
||||
CheckError("SetTCPIPProtocol", lResult);
|
||||
}
|
||||
|
||||
if (oEZNcAutCom != null)
|
||||
{
|
||||
//マルチスレッドの有効化
|
||||
lNCType = (Int32)sysNCType | EZNC_SYS_MULTI;
|
||||
|
||||
//通信回線のオープン
|
||||
lResult = oEZNcAutCom.Open3(lNCType, Int32.Parse(textBoxMachineNo.Text),
|
||||
Int32.Parse(textBoxTimeOut.Text), strHostName);
|
||||
CheckError("Open", lResult);
|
||||
|
||||
if (lResult == 0)
|
||||
{
|
||||
//接続の設定
|
||||
bConnectStatus = true;
|
||||
|
||||
//通信回線のクローズ
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_CNCC80 ||
|
||||
sysNCType == SYSTEMTYPE.EZNC_SYS_MELDASC70)
|
||||
{
|
||||
lResult = oEZNcAutCom.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
lResult = oEZNcAutCom.Close2((Int32)RESETTYPE.EZNC_RESET_SIMPLE);
|
||||
}
|
||||
CheckError("Close", lResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
//オブジェクトの解放
|
||||
oEZNcAutCom = null;
|
||||
MessageBox.Show("ホスト名(IPアドレス)またはNCタイプが不正です。");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bCommunicateStatus == true)
|
||||
{
|
||||
//通信回線のクローズ
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_CNCC80 ||
|
||||
sysNCType == SYSTEMTYPE.EZNC_SYS_MELDASC70)
|
||||
{
|
||||
lResult = oEZNcAutCom.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
lResult = oEZNcAutCom.Close2((Int32)RESETTYPE.EZNC_RESET_SIMPLE);
|
||||
}
|
||||
CheckError("Close", lResult);
|
||||
|
||||
//通信終了の設定
|
||||
bCommunicateStatus = false;
|
||||
|
||||
//周期処理の終了
|
||||
timerHighCycle.Enabled = false;
|
||||
timerLowCycle.Enabled = false;
|
||||
}
|
||||
|
||||
//切断の設定
|
||||
bConnectStatus = false;
|
||||
|
||||
//オブジェクトの解放
|
||||
oEZNcAutCom = null;
|
||||
|
||||
//GUI状態の初期化
|
||||
ResetGUIStatus();
|
||||
}
|
||||
|
||||
//GUI状態の更新
|
||||
UpdateGUIStatus();
|
||||
}
|
||||
|
||||
//「実行」ボタン押下時の処理
|
||||
private void ButtonExcute_Click(object sender, EventArgs e)
|
||||
{
|
||||
Int32 lNCType;
|
||||
Int32 lAxisNo = 0;
|
||||
Int32 lIndex = 0;
|
||||
Int32 lResult;
|
||||
String strIPAddress;
|
||||
|
||||
//IPアドレスの取得
|
||||
if (textBoxIPAddress.Text == "")
|
||||
{
|
||||
MessageBox.Show("IPアドレスが不正です。");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
strIPAddress = textBoxIPAddress.Text;
|
||||
}
|
||||
|
||||
//NCタイプの取得
|
||||
Enum.TryParse<SYSTEMTYPE>(comboBoxSystemType.Text, out SYSTEMTYPE sysNCType);
|
||||
|
||||
if (radioButtonStart.Checked == true)
|
||||
{
|
||||
//マルチスレッドの有効化
|
||||
lNCType = (Int32)sysNCType | EZNC_SYS_MULTI;
|
||||
|
||||
//通信回線のオープン
|
||||
lResult = oEZNcAutCom.Open3(lNCType, Int32.Parse(textBoxMachineNo.Text),
|
||||
Int32.Parse(textBoxTimeOut.Text), strHostName);
|
||||
CheckError("Open", lResult);
|
||||
|
||||
if (lResult == 0)
|
||||
{
|
||||
//通信開始の設定
|
||||
bCommunicateStatus = true;
|
||||
|
||||
//周期処理の開始
|
||||
timerHighCycle.Enabled = true;
|
||||
timerLowCycle.Enabled = true;
|
||||
|
||||
//NCシステム番号の取得
|
||||
lResult = oEZNcAutCom.System_GetVersion(lAxisNo, lIndex, out String strNCVersion);
|
||||
CheckError("GetVersion", lResult);
|
||||
textBoxSystemVersion.Text = strNCVersion;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//通信回線のクローズ
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_CNCC80 ||
|
||||
sysNCType == SYSTEMTYPE.EZNC_SYS_MELDASC70)
|
||||
{
|
||||
lResult = oEZNcAutCom.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
lResult = oEZNcAutCom.Close2((Int32)RESETTYPE.EZNC_RESET_SIMPLE);
|
||||
}
|
||||
CheckError("Close", lResult);
|
||||
|
||||
if (lResult == 0)
|
||||
{
|
||||
//通信終了の設定
|
||||
bCommunicateStatus = false;
|
||||
|
||||
//周期処理の終了
|
||||
timerHighCycle.Enabled = false;
|
||||
timerLowCycle.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
//GUI状態の更新
|
||||
UpdateGUIStatus();
|
||||
}
|
||||
|
||||
//周期処理(0.1秒周期)
|
||||
private void TimerHighCycle_Tick(object sender, EventArgs e)
|
||||
{
|
||||
//位置情報の取得
|
||||
GetPosition();
|
||||
}
|
||||
|
||||
//周期処理(1秒周期)
|
||||
private void TimerLowCycle_Tick(object sender, EventArgs e)
|
||||
{
|
||||
//アラーム情報の取得
|
||||
GetAlarm();
|
||||
|
||||
//プログラム情報の取得
|
||||
GetProgramData();
|
||||
}
|
||||
|
||||
//位置情報の取得
|
||||
private void GetPosition()
|
||||
{
|
||||
Int32 lResult;
|
||||
Double dPosition;
|
||||
|
||||
//NCタイプの取得
|
||||
Enum.TryParse<SYSTEMTYPE>(comboBoxSystemType.Text, out SYSTEMTYPE sysNCType);
|
||||
|
||||
//現在座標位置の取得
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_CNCC80)
|
||||
{
|
||||
textBoxCurrentPositionX.Text = "Not supported";
|
||||
textBoxCurrentPositionY.Text = "Not supported";
|
||||
textBoxCurrentPositionZ.Text = "Not supported";
|
||||
}
|
||||
else
|
||||
{
|
||||
lResult = oEZNcAutCom.Position_GetCurrentPosition(1, out dPosition);
|
||||
CheckError("GetCurrentPosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxCurrentPositionX.Text = dPosition.ToString("F3");
|
||||
}
|
||||
|
||||
lResult = oEZNcAutCom.Position_GetCurrentPosition(2, out dPosition);
|
||||
CheckError("GetCurrentPosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxCurrentPositionY.Text = dPosition.ToString("F3");
|
||||
}
|
||||
|
||||
lResult = oEZNcAutCom.Position_GetCurrentPosition(3, out dPosition);
|
||||
CheckError("GetCurrentPosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxCurrentPositionZ.Text = dPosition.ToString("F3");
|
||||
}
|
||||
}
|
||||
|
||||
//ワーク座標位置の取得
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_CNCC80)
|
||||
{
|
||||
textBoxWorkPositionX.Text = "Not supported";
|
||||
textBoxWorkPositionY.Text = "Not supported";
|
||||
textBoxWorkPositionZ.Text = "Not supported";
|
||||
}
|
||||
else
|
||||
{
|
||||
lResult = oEZNcAutCom.Position_GetWorkPosition(1, out dPosition, 0);
|
||||
CheckError("GetWorkPosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxWorkPositionX.Text = dPosition.ToString("F3");
|
||||
}
|
||||
|
||||
lResult = oEZNcAutCom.Position_GetWorkPosition(2, out dPosition, 0);
|
||||
CheckError("GetWorkPosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxWorkPositionY.Text = dPosition.ToString("F3");
|
||||
}
|
||||
|
||||
lResult = oEZNcAutCom.Position_GetWorkPosition(3, out dPosition, 0);
|
||||
CheckError("GetWorkPosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxWorkPositionZ.Text = dPosition.ToString("F3");
|
||||
}
|
||||
}
|
||||
|
||||
//機械座標位置の取得
|
||||
lResult = oEZNcAutCom.Position_GetMachinePosition(1, out dPosition, 0);
|
||||
CheckError("GetMachinePosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxMachinePositionX.Text = dPosition.ToString("F3");
|
||||
}
|
||||
|
||||
lResult = oEZNcAutCom.Position_GetMachinePosition(2, out dPosition, 0);
|
||||
CheckError("GetMachinePosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxMachinePositionY.Text = dPosition.ToString("F3");
|
||||
}
|
||||
|
||||
lResult = oEZNcAutCom.Position_GetMachinePosition(3, out dPosition, 0);
|
||||
CheckError("GetMachinePosition", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxMachinePositionZ.Text = dPosition.ToString("F3");
|
||||
}
|
||||
}
|
||||
|
||||
//アラーム情報の取得
|
||||
private void GetAlarm()
|
||||
{
|
||||
Int32 lMessageNumber = 3;
|
||||
Int32 lResult;
|
||||
String strAlarmMsg;
|
||||
Array lSystem = Array.CreateInstance(typeof(Int32), lMessageNumber);
|
||||
Array lWarning = Array.CreateInstance(typeof(Int32), lMessageNumber);
|
||||
Array lAlarmType = Array.CreateInstance(typeof(Int32), lMessageNumber);
|
||||
|
||||
//アラーム表示のテキスト消去
|
||||
textBoxAlarmMessage.ResetText();
|
||||
|
||||
//NCタイプの取得
|
||||
Enum.TryParse<SYSTEMTYPE>(comboBoxSystemType.Text, out SYSTEMTYPE sysNCType);
|
||||
|
||||
//アラーム情報の取得
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_MELDASC70)
|
||||
{
|
||||
lResult = oEZNcAutCom.System_GetAlarm2(lMessageNumber,
|
||||
(Int32)ALARMTYPE.M_ALM_ALL_ALARM, out strAlarmMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
lResult = oEZNcAutCom.System_GetAlarm3(lMessageNumber, (Int32)ALARMTYPE.M_ALM_ALL_ALARM,
|
||||
ref lSystem, ref lWarning, ref lAlarmType, out strAlarmMsg);
|
||||
}
|
||||
CheckError("GetAlarm", lResult);
|
||||
|
||||
//アラーム情報の出力
|
||||
if ((lResult == 0) && (strAlarmMsg != ""))
|
||||
{
|
||||
//改行コードを区切りとして文字列を分割
|
||||
String[] strAlarmMsgArray = strAlarmMsg.Split(new[] { "\r\n" }, StringSplitOptions.None);
|
||||
|
||||
for (Int32 i = 0; i < strAlarmMsgArray.Length; i++)
|
||||
{
|
||||
//アラームメッセージの出力(NC警告メッセージの場合はWaringという文字列を付与)
|
||||
if (Int32.Parse(lWarning.GetValue(i).ToString()) != 0)
|
||||
{
|
||||
textBoxAlarmMessage.Text = textBoxAlarmMessage.Text + "(Warning)"
|
||||
+ strAlarmMsgArray[i] + Environment.NewLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
textBoxAlarmMessage.Text = textBoxAlarmMessage.Text
|
||||
+ strAlarmMsgArray[i] + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//プログラム情報の取得
|
||||
private void GetProgramData()
|
||||
{
|
||||
Int32 lBlockNumber = 10;
|
||||
Int32 lCountSize;
|
||||
Int32 lCountStart = 0;
|
||||
Int32 lResult;
|
||||
String strProgramDataSubstring;
|
||||
|
||||
//NCタイプの取得
|
||||
Enum.TryParse<SYSTEMTYPE>(comboBoxSystemType.Text, out SYSTEMTYPE sysNCType);
|
||||
|
||||
//実行プログラム表示のテキスト消去
|
||||
listBoxCurrentProgram.Items.Clear();
|
||||
|
||||
//サポート対象外の場合の処理
|
||||
if (sysNCType == SYSTEMTYPE.EZNC_SYS_CNCC80)
|
||||
{
|
||||
listBoxCurrentProgram.Items.Add("Not supported");
|
||||
textBoxPrgNo.Text = "Not supported";
|
||||
textBoxSequenceNo.Text = "Not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
//プログラムブロック読み出し
|
||||
lResult = oEZNcAutCom.Program_CurrentBlockRead(lBlockNumber,
|
||||
out String strProgramData, out Int32 lCurrentBlockNumber);
|
||||
CheckError("CurrentBlockRead", lResult);
|
||||
|
||||
//プログラム情報の出力
|
||||
if (lResult == 0)
|
||||
{
|
||||
//改行コードを区切りとして文字列をリストに追加
|
||||
lCountSize = strProgramData.IndexOf("\n");
|
||||
while (lCountSize > 0)
|
||||
{
|
||||
strProgramDataSubstring = strProgramData.Substring(lCountStart,
|
||||
lCountSize - lCountStart - 1);
|
||||
listBoxCurrentProgram.Items.Add(strProgramDataSubstring);
|
||||
|
||||
lCountStart = lCountSize + 1;
|
||||
lCountSize = strProgramData.IndexOf("\n", lCountStart);
|
||||
}
|
||||
|
||||
//強調行の指定
|
||||
if (lCurrentBlockNumber == 1)
|
||||
{
|
||||
//1ブロック目を強調
|
||||
listBoxCurrentProgram.SelectedIndex = 0;
|
||||
}
|
||||
else if (lCurrentBlockNumber == 2)
|
||||
{
|
||||
//2ブロック目を強調
|
||||
listBoxCurrentProgram.SelectedIndex = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//プログラム番号の取得
|
||||
lResult = oEZNcAutCom.Program_GetProgramNumber2((Int32)PROGRAMTYPE.EZNC_MAINPRG, out String strProgramNo);
|
||||
CheckError("GetProgramNumber", lResult);
|
||||
if(lResult == 0)
|
||||
{
|
||||
textBoxPrgNo.Text = strProgramNo;
|
||||
}
|
||||
|
||||
//シーケンス番号の取得
|
||||
lResult = oEZNcAutCom.Program_GetSequenceNumber((Int32)PROGRAMTYPE.EZNC_MAINPRG, out Int32 lSequenceNo);
|
||||
CheckError("GetSequenceNumber", lResult);
|
||||
if (lResult == 0)
|
||||
{
|
||||
textBoxSequenceNo.Text = lSequenceNo.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
//GUI状態の更新
|
||||
private void UpdateGUIStatus()
|
||||
{
|
||||
//接続中の場合
|
||||
if(bConnectStatus == true)
|
||||
{
|
||||
textBoxConnectStatus.Text = "接続";
|
||||
textBoxConnectStatus.BackColor = Color.LightBlue;
|
||||
buttonConnect.Text = "切断";
|
||||
textBoxIPAddress.Enabled = false;
|
||||
comboBoxSystemType.Enabled = false;
|
||||
buttonExcute.Enabled = true;
|
||||
|
||||
//通信開始中の場合
|
||||
if(bCommunicateStatus == true)
|
||||
{
|
||||
textBoxOpenStatus.Text = "通信開始";
|
||||
textBoxOpenStatus.BackColor = Color.LightBlue;
|
||||
}
|
||||
//通信終了中の場合
|
||||
else
|
||||
{
|
||||
textBoxOpenStatus.Text = "通信終了";
|
||||
textBoxOpenStatus.BackColor = Color.Yellow;
|
||||
}
|
||||
}
|
||||
//切断中の場合
|
||||
else
|
||||
{
|
||||
textBoxConnectStatus.Text = "切断";
|
||||
textBoxConnectStatus.BackColor = Color.Red;
|
||||
buttonConnect.Text = "接続";
|
||||
textBoxOpenStatus.Text = "通信終了";
|
||||
textBoxOpenStatus.BackColor = Color.Yellow;
|
||||
textBoxIPAddress.Enabled = true;
|
||||
comboBoxSystemType.Enabled = true;
|
||||
buttonExcute.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
//GUI状態の初期化
|
||||
private void ResetGUIStatus()
|
||||
{
|
||||
textBoxSystemVersion.ResetText();
|
||||
textBoxCurrentPositionX.ResetText();
|
||||
textBoxCurrentPositionY.ResetText();
|
||||
textBoxCurrentPositionZ.ResetText();
|
||||
textBoxWorkPositionX.ResetText();
|
||||
textBoxWorkPositionY.ResetText();
|
||||
textBoxWorkPositionZ.ResetText();
|
||||
textBoxMachinePositionX.ResetText();
|
||||
textBoxMachinePositionY.ResetText();
|
||||
textBoxMachinePositionZ.ResetText();
|
||||
listBoxCurrentProgram.Items.Clear();
|
||||
textBoxPrgNo.ResetText();
|
||||
textBoxSequenceNo.ResetText();
|
||||
textBoxAlarmMessage.ResetText();
|
||||
textBoxErrorCode.ResetText();
|
||||
}
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timerHighCycle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timerLowCycle.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>152, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// Program.cs : アプリケーションのメインエントリポイント
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 MITSUBISHI Electric Corporation All Rights Reserved
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SampleAppCS
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// アプリケーションのメイン エントリ ポイントです。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new FormSampleApp());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
|
||||
// アセンブリに関連付けられている情報を変更するには、
|
||||
// これらの属性値を変更してください。
|
||||
[assembly: AssemblyTitle("SampleAppCS")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SampleAppCS")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントから
|
||||
// 参照できなくなります。COM からこのアセンブリ内の型にアクセスする必要がある場合は、
|
||||
// その型の ComVisible 属性を true に設定してください。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります
|
||||
[assembly: Guid("3d20d5e3-7db0-495c-89e0-df6968879d29")]
|
||||
|
||||
// アセンブリのバージョン情報は次の 4 つの値で構成されています:
|
||||
//
|
||||
// メジャー バージョン
|
||||
// マイナー バージョン
|
||||
// ビルド番号
|
||||
// Revision
|
||||
//
|
||||
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
|
||||
// 既定値にすることができます:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// このコードはツールによって生成されました。
|
||||
// ランタイム バージョン:4.0.30319.42000
|
||||
//
|
||||
// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
|
||||
// コードが再生成されるときに損失したりします。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SampleAppCS.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。
|
||||
/// </summary>
|
||||
// このクラスは StronglyTypedResourceBuilder クラスが ResGen
|
||||
// または Visual Studio のようなツールを使用して自動生成されました。
|
||||
// メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に
|
||||
// ResGen を実行し直すか、または VS プロジェクトをビルドし直します。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SampleAppCS.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// すべてについて、現在のスレッドの CurrentUICulture プロパティをオーバーライドします
|
||||
/// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// このコードはツールによって生成されました。
|
||||
// ランタイム バージョン:4.0.30319.42000
|
||||
//
|
||||
// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
|
||||
// コードが再生成されるときに損失したりします。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SampleAppCS.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{3D20D5E3-7DB0-495C-89E0-DF6968879D29}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>SampleAppCS</RootNamespace>
|
||||
<AssemblyName>SampleAppCS</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Remote_DEBUG|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Remote_DEBUG\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassDefine.cs" />
|
||||
<Compile Include="FormSampleApp.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormSampleApp.Designer.cs">
|
||||
<DependentUpon>FormSampleApp.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="FormSampleApp.resx">
|
||||
<DependentUpon>FormSampleApp.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="postBuildTgt.bat" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="EZNCAUTLib">
|
||||
<Guid>{1B93D6AF-FD32-4281-83FE-533F666FAE6C}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>"$(ProjectDir)postBuildTgt.bat" "$(ConfigurationName)" "$(TargetDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,69 @@
|
||||
@echo off
|
||||
echo Effettua pulizia post build: configurazione %1. directory %2
|
||||
|
||||
RD /S /Q %2"\lib\da"
|
||||
RD /S /Q %2"\lib\de"
|
||||
RD /S /Q %2"\lib\es"
|
||||
RD /S /Q %2"\lib\fr"
|
||||
RD /S /Q %2"\lib\it"
|
||||
RD /S /Q %2"\lib\ja-JP"
|
||||
RD /S /Q %2"\lib\ko"
|
||||
RD /S /Q %2"\lib\nl"
|
||||
RD /S /Q %2"\lib\pl"
|
||||
RD /S /Q %2"\lib\pt"
|
||||
RD /S /Q %2"\lib\ru"
|
||||
RD /S /Q %2"\lib\sv"
|
||||
RD /S /Q %2"\lib\tr"
|
||||
RD /S /Q %2"\lib\zh"
|
||||
|
||||
MOVE /Y %2"da" %2"lib\"
|
||||
MOVE /Y %2"de" %2"lib\"
|
||||
MOVE /Y %2"es" %2"lib\"
|
||||
MOVE /Y %2"fr" %2"lib\"
|
||||
MOVE /Y %2"it" %2"lib\"
|
||||
MOVE /Y %2"ja-JP" %2"lib\"
|
||||
MOVE /Y %2"ko" %2"lib\"
|
||||
MOVE /Y %2"nl" %2"lib\"
|
||||
MOVE /Y %2"pl" %2"lib\"
|
||||
MOVE /Y %2"pt" %2"lib\"
|
||||
MOVE /Y %2"ru" %2"lib\"
|
||||
MOVE /Y %2"sv" %2"lib\"
|
||||
MOVE /Y %2"tr" %2"lib\"
|
||||
MOVE /Y %2"zh" %2"lib\"
|
||||
|
||||
|
||||
if %1 == "Release" goto Release
|
||||
if %1 == "Debug" goto Debug
|
||||
if %1 == "Remote_DEBUG" goto RemoteDebug
|
||||
|
||||
:Release
|
||||
REM INIZIO eliminando i files pdb
|
||||
del /S %2"*.pdb""
|
||||
del /S %2"*.xml""
|
||||
del /S %2"lib/*.pdb""
|
||||
echo Release: eliminato pdb + xml!!!
|
||||
goto END
|
||||
|
||||
:Debug
|
||||
echo Debug: nulla da eliminare
|
||||
|
||||
REM copia script verso server remoto
|
||||
REM ROBOCOPY . \\10.150.0.1\Steamware\IOB-WIN-NEXT-DEB /MIR
|
||||
|
||||
goto END
|
||||
|
||||
|
||||
:RemoteDebug
|
||||
REM copia script verso server remoto
|
||||
REM echo Debug remoto: effettuo robocopy sync (verificare remote per cliente)
|
||||
|
||||
REM IOB-WIN-SIM
|
||||
REM ROBOCOPY . \\IOB-WIN-SIMULA\Steamware\IOB-WIN-NEXT-DEB /MIR
|
||||
|
||||
REM IOBVPN4MACHINE
|
||||
ROBOCOPY . \\10.51.90.6\Steamware\SampleAppCS /MIR
|
||||
|
||||
goto END
|
||||
|
||||
:END
|
||||
echo Fatto!
|
||||
Reference in New Issue
Block a user