Riorg codice + aggiunta sample ufficiale Mitsubishi
This commit is contained in:
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"dotnet.defaultSolution": "RestApp.sln"
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestApp", "RestApp\RestApp.csproj", "{E3094EFE-15CB-40A4-8163-194AE19A7969}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E3094EFE-15CB-40A4-8163-194AE19A7969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E3094EFE-15CB-40A4-8163-194AE19A7969}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E3094EFE-15CB-40A4-8163-194AE19A7969}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E3094EFE-15CB-40A4-8163-194AE19A7969}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,99 +0,0 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
using System.Diagnostics;
|
||||
using System.Dynamic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine(sep);
|
||||
Console.WriteLine("Rest Client test application");
|
||||
Console.WriteLine(sep);
|
||||
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Call connection");
|
||||
// setup oggetti
|
||||
int tOut = 60;
|
||||
string apiUrl = "http://192.168.80.61:8733/DRIVER_MES/rest/";
|
||||
rCall = new RestCaller(apiUrl, tOut);
|
||||
|
||||
// chiamate!
|
||||
CallAndLog("checkconnection");
|
||||
string token = CallAndLog("gettoken/mecmaticames/mecmatica@mes").Replace("\"", "");
|
||||
string gLamp = CallAndLog($"getsingleladderio/{token}/Y/8E");
|
||||
string yLamp = CallAndLog($"getsingleladderio/{token}/Y/21");
|
||||
string rLamp = CallAndLog($"getsingleladderio/{token}/Y/22");
|
||||
string qtyTot = CallAndLog($"gettotalquantity/{token}");
|
||||
string qtyReq = CallAndLog($"getneededquantity/{token}");
|
||||
string qtyWrk = CallAndLog($"getworkedquantity/{token}");
|
||||
string cTime = CallAndLog($"getcycletime/{token}");
|
||||
string pName = CallAndLog($"getmainprogram/{token}");
|
||||
|
||||
string cAlarm = CallAndLog($"getalarm/{token}");
|
||||
var sAlarm = JsonConvert.DeserializeObject<WarnInfo>(cAlarm);
|
||||
cAlarm = JsonConvert.SerializeObject(sAlarm, Formatting.Indented);
|
||||
|
||||
string allAlarm = CallAndLog($"getallalarmlog/{token}");
|
||||
var alarmList = JsonConvert.DeserializeObject<List<AlarmInfo>>(allAlarm);
|
||||
allAlarm = JsonConvert.SerializeObject(alarmList, Formatting.Indented);
|
||||
|
||||
string err = CallAndLog($"getsingleladderio/ABC/Y/22");
|
||||
// ora scrivo i files dei test x debug successivo
|
||||
var appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
|
||||
var fPath = Directory.GetParent(appPath).FullName;
|
||||
string basePath = Path.Combine(fPath, "Test");
|
||||
if (!Directory.Exists(basePath))
|
||||
{
|
||||
Directory.CreateDirectory(basePath);
|
||||
}
|
||||
File.WriteAllText(Path.Combine(basePath, "token.txt"), token);
|
||||
File.WriteAllText(Path.Combine(basePath, "gLamp.txt"), gLamp);
|
||||
File.WriteAllText(Path.Combine(basePath, "yLamp.txt"), yLamp);
|
||||
File.WriteAllText(Path.Combine(basePath, "rLamp.txt"), rLamp);
|
||||
File.WriteAllText(Path.Combine(basePath, "qtyTot.txt"), qtyTot);
|
||||
File.WriteAllText(Path.Combine(basePath, "qtyReq.txt"), qtyReq);
|
||||
File.WriteAllText(Path.Combine(basePath, "qtyWrk.txt"), qtyWrk);
|
||||
File.WriteAllText(Path.Combine(basePath, "cTime.txt"), cTime);
|
||||
File.WriteAllText(Path.Combine(basePath, "pName.txt"), pName);
|
||||
File.WriteAllText(Path.Combine(basePath, "cAlarm.txt"), cAlarm);
|
||||
File.WriteAllText(Path.Combine(basePath, "allAlarm.txt"), allAlarm);
|
||||
}
|
||||
|
||||
private static RestCaller rCall { get; set; } = new RestCaller("http://localhost", 60);
|
||||
private static string sep = "------------------------";
|
||||
private static Stopwatch sw = new Stopwatch();
|
||||
|
||||
private static string CallAndLog(string fullUri)
|
||||
{
|
||||
sw.Restart();
|
||||
Console.WriteLine(sep);
|
||||
Console.WriteLine($"Calling: {fullUri}");
|
||||
// chiamo
|
||||
string answ = rCall.ExecuteCallGet(fullUri);
|
||||
sw.Stop();
|
||||
// loggo
|
||||
Console.WriteLine(answ);
|
||||
Console.WriteLine($"Elapsed: {sw.ElapsedMilliseconds}");
|
||||
Console.WriteLine(sep);
|
||||
Console.WriteLine();
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
internal class AlarmInfo
|
||||
{
|
||||
public int id { get; set; } = 0;
|
||||
public string? ErrorMessage { get; set; } = null;
|
||||
public DateTime date { get; set; } = DateTime.Today.AddYears(-10);
|
||||
public string message { get; set; } = "";
|
||||
public string type { get; set; } = "";
|
||||
}
|
||||
internal class WarnInfo
|
||||
{
|
||||
public bool IsAlarm { get; set; } = false;
|
||||
public bool IsCaution { get; set; } = false;
|
||||
public string? ErrorMessage { get; set; } = null;
|
||||
public string message { get; set; } = "";
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="RestSharp" Version="112.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,62 +0,0 @@
|
||||
|
||||
using RestSharp;
|
||||
|
||||
public class RestCaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe gestione chiamate REST
|
||||
/// </summary>
|
||||
/// <param name="ApiUrl"></param>
|
||||
/// <param name="TimeOutSec"></param>
|
||||
public RestCaller(string ApiUrl, int TimeOutSec)
|
||||
{
|
||||
tOut = TimeOutSec;
|
||||
apiUrl = ApiUrl;
|
||||
|
||||
restOptStd = new RestClientOptions
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(tOut),
|
||||
BaseUrl = new Uri(apiUrl)
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esecuzione chiamata Rest tipo GET
|
||||
/// </summary>
|
||||
/// <param name="resource"></param>
|
||||
/// <returns></returns>
|
||||
public string ExecuteCallGet(string resource)
|
||||
{
|
||||
string answ = "";
|
||||
if (!string.IsNullOrEmpty(resource))
|
||||
{
|
||||
// client chiamate rest
|
||||
using (var client = new RestClient(restOptStd))
|
||||
{
|
||||
var currReq = new RestRequest(resource, Method.Get);
|
||||
// currReq.AddHeader("Content-type", "application/xml");
|
||||
currReq.AddHeader("Content-type", "application/json");
|
||||
// effettuo vera chiamata
|
||||
var currResp = client.Get(currReq);
|
||||
if (currResp.StatusCode == System.Net.HttpStatusCode.OK && currResp.Content != null)
|
||||
{
|
||||
answ = $"{currResp.Content}";
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected string apiUrl = "";
|
||||
protected int tOut = 60;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Conf client RestSharp standard:
|
||||
/// - timeout 1 min
|
||||
/// </summary>
|
||||
private RestClientOptions restOptStd = new RestClientOptions { Timeout = TimeSpan.FromSeconds(60) };
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"ErrorMessage":null,"IsAlarm":false,"IsCaution":true,"message":"CAUTION ON MACHINE"}
|
||||
@@ -1 +0,0 @@
|
||||
56
|
||||
@@ -1 +0,0 @@
|
||||
{"Address":"8E","Description":"","ErrorMessage":null,"IOType":"Y","VarValue":"0"}
|
||||
@@ -1 +0,0 @@
|
||||
500
|
||||
@@ -1 +0,0 @@
|
||||
500
|
||||
@@ -1 +0,0 @@
|
||||
0
|
||||
@@ -1 +0,0 @@
|
||||
{"Address":"22","Description":"","ErrorMessage":null,"IOType":"Y","VarValue":"0"}
|
||||
@@ -1 +0,0 @@
|
||||
6d65636d61746963616d6573c2a76d65636d6174696361406d6573c2a731
|
||||
@@ -1 +0,0 @@
|
||||
{"Address":"21","Description":"","ErrorMessage":null,"IOType":"Y","VarValue":"0"}
|
||||
@@ -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
|
||||
@@ -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>
|
||||
@@ -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, //書き込み新規作成モード
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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")]
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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