在COBOL中从C#转换两行 [英] Convert two lines off C# in COBOL

查看:130
本文介绍了在COBOL中从C#转换两行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:



我正在开发一个集成了来自控制器供应商的API的应用程序。

我已经能够除了一小部分我几乎做了所有的事情,为此我请求你的帮助。



我已经和API / DLL程序员交谈了,真正缺少的是设置事件,以便在程序发生时它确实如此。

编程的内容以及您需要转换的内容如下:



事件定义:

_NuxIO.ValueEnteredEvent + = new NuxIO.ValueEnteredEventHandler(OnValueEnteredEvent);



检测到事件时要执行的程序:

Private void OnValueEnteredEvent(object sender,ValueEnteredEventArgs e)

{

If(e.Type == 2)ListBox.Invoke((MethodInvoker))= > listBox.Items.Add(IP:+ e.IPAddress +RS232:+ e.Value)));

If(e.Type == 3)ListBox.Invoke((MethodInvoker) ))=> listBox.Items.Add(IP:+ e.IPAddress +I8 Activated)));

If(e.Type == 4)ListBox.Invoke((MethodInvoker))=> ; listBox.Items.Add(IP:+ e.IPAddress +I7 Activated)));

}



所以我我猜这不需要太多时间来完成这个过程。

我期待着你的帮助。



谢谢

Alberto Ferraz



我的尝试:



我'我尝试了几个选项,但我找不到合适的公式。

Hello:

I'm developing an application that integrates an API from a controller supplier.
I've been able to do almost everything except a small part and for that I ask for your help.

I have already talked to the API / DLL programmer and what is really missing is setting the event so that when a procedure occurs it does.
What is programmed and what you need to convert is the following:

EVENT DEFINITION:
_NuxIO.ValueEnteredEvent + = new NuxIO.ValueEnteredEventHandler (OnValueEnteredEvent);

PROCEDURE TO BE PERFORMED WHEN THE EVENT IS DETECTED:
Private void OnValueEnteredEvent (object sender, ValueEnteredEventArgs e)
{
If (e.Type == 2) ListBox.Invoke ((MethodInvoker)) => listBox.Items.Add ("IP:" + e.IPAddress + "RS232:" + e.Value)));
If (e.Type == 3) ListBox.Invoke ((MethodInvoker)) => listBox.Items.Add ("IP:" + e.IPAddress + "I8 Activated")));
If (e.Type == 4) ListBox.Invoke ((MethodInvoker)) => listBox.Items.Add ("IP:" + e.IPAddress + "I7 Activated")));
}

So I guess it does not take much time to complete the process.
I look forward to your help.

Thanks
Alberto Ferraz

What I have tried:

I've tried several options but I could not find the right formula.

推荐答案

Visual COBOL个人版| Micro Focus [ ^ ]



我以前在这家公司工作过。这是几年前所以很多已经改变,但他们制作了Visual COBOL,所以你可以在COBOL和C#/ VB之间翻转。



它编译成.Net IL,但是它可能对你有用。



你会发现问题是每个人都希望摆脱COBOL。与更现代的语言相比,它已经陈旧,没有集成,阅读可怕。



至少,MicroFocus的VC PE会让你使用C# COBOL代码
Visual COBOL Personal Edition | Micro Focus[^]

I used to work for this company. It was years ago so a lot has changed but they made Visual COBOL so you can flip between COBOL and C# / VB.

It compiles out to .Net IL, but it might be useful to you.

The problem you will find is that everyone wants to get away from COBOL. It's old, doesn't integrate, and reads horribly compared to more modern languages.

At the very least, the VC PE from MicroFocus would let you use C# with your COBOL code


这篇关于在COBOL中从C#转换两行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆