Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #8268 > unrolled thread

Translate code from C# to Vulcab

Started byGary <gkeefe109@gmail.com>
First post2015-07-10 06:52 -0700
Last post2015-07-23 19:21 -0700
Articles 7 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Translate code from C# to Vulcab Gary <gkeefe109@gmail.com> - 2015-07-10 06:52 -0700
    Re: Translate code from C# to Vulcab D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-07-13 12:53 +0200
    Re: Translate code from C# to Vulcab "Willie Moore" <williem@wmconsulting.com> - 2015-07-14 15:36 -0500
    Re: Translate code from C# to Vulcab "Willie Moore" <williem@wmconsulting.com> - 2015-07-15 11:35 -0500
      Re: Translate code from C# to Vulcab Gary <gkeefe109@gmail.com> - 2015-07-18 07:30 -0700
    Re: Translate code from C# to Vulcab "Willie Moore" <williem@wmconsulting.com> - 2015-07-22 08:22 -0500
      Re: Translate code from C# to Vulcab Gary <gkeefe109@gmail.com> - 2015-07-23 19:21 -0700

#8268 — Translate code from C# to Vulcab

FromGary <gkeefe109@gmail.com>
Date2015-07-10 06:52 -0700
SubjectTranslate code from C# to Vulcab
Message-ID<67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com>
I have some C# code I am having a difficult time translating to Vulcan.Net

// Inside a class (spManager - serial port manager)
public event EventHandler<SerialDataEventArgs> NewSerialDataRecieved;
        
// Inside an event handler:
NewSerialDataRecieved(this, new SerialDataEventArgs(data)) 


// An additional class
public class SerialDataEventArgs : EventArgs
{
    public SerialDataEventArgs(byte[] dataInByteArray)
    {
        Data = dataInByteArray;
    }    
}


// Instantiate spManager class
mySPManager = new SPManager();

mySPManager.NewSerialDataRecieved += new EventHandler<SerialDataEventArgs>(mySPManagerNewSerialDataRecieved);

// Process data received from the com port
PRIVATE METHOD mySerialPortDataReceived( sender AS System.Object, e AS SerialDataReceivedEventArgs ) AS System.Void

I am having a difficult time understanding and translating the <SerialDataEventArgs> when the event is defined and when the event handler is assigned.  Do I need to use a delegate?  

Any help would be greatly appreciated. 
Thanks

[toc] | [next] | [standalone]


#8275

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2015-07-13 12:53 +0200
Message-ID<tr57qa979l44erg00gr94kmiq6ggq3p3sk@4ax.com>
In reply to#8268
On Fri, 10 Jul 2015 06:52:04 -0700 (PDT), Gary <gkeefe109@gmail.com>
wrote:

Hello Gary,

>I have some C# code I am having a difficult time translating to Vulcan.Net


A good starting point for me is Reflector. I still have the (last)
free version 6 but the latest version costs 73 euro, see
http://www.red-gate.com/products/dotnet-development/reflector/, or you
could use a trial version.

Dick

[toc] | [prev] | [next] | [standalone]


#8276

From"Willie Moore" <williem@wmconsulting.com>
Date2015-07-14 15:36 -0500
Message-ID<mo3rs2$3qq$1@speranza.aioe.org>
In reply to#8268
Gary,

You will need a delegate. You also need it from c# but it creates it behind 
the scene. If you use reflector you will see the additional code. I will see 
if I can put together a small sample of setting up the event and calling it 
from Vulcan. It will give you a good idea of how to translate your code.

Regards,
Willie
Vulcan VIP
Grafx Development Team

"Gary"  wrote in message 
news:67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com...

I have some C# code I am having a difficult time translating to Vulcan.Net

// Inside a class (spManager - serial port manager)
public event EventHandler<SerialDataEventArgs> NewSerialDataRecieved;

// Inside an event handler:
NewSerialDataRecieved(this, new SerialDataEventArgs(data))


// An additional class
public class SerialDataEventArgs : EventArgs
{
    public SerialDataEventArgs(byte[] dataInByteArray)
    {
        Data = dataInByteArray;
    }
}


// Instantiate spManager class
mySPManager = new SPManager();

mySPManager.NewSerialDataRecieved += new 
EventHandler<SerialDataEventArgs>(mySPManagerNewSerialDataRecieved);

// Process data received from the com port
PRIVATE METHOD mySerialPortDataReceived( sender AS System.Object, e AS 
SerialDataReceivedEventArgs ) AS System.Void

I am having a difficult time understanding and translating the 
<SerialDataEventArgs> when the event is defined and when the event handler 
is assigned.  Do I need to use a delegate?

Any help would be greatly appreciated.
Thanks 

[toc] | [prev] | [next] | [standalone]


#8277

From"Willie Moore" <williem@wmconsulting.com>
Date2015-07-15 11:35 -0500
Message-ID<mo624d$q2q$1@speranza.aioe.org>
In reply to#8268
Gary,

Do you ant the ampe to be in Visual Studo or VIDE?

Regards,
Willie
Vulcan VIP
Grafx Development Team

"Gary"  wrote in message 
news:67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com...

I have some C# code I am having a difficult time translating to Vulcan.Net

// Inside a class (spManager - serial port manager)
public event EventHandler<SerialDataEventArgs> NewSerialDataRecieved;

// Inside an event handler:
NewSerialDataRecieved(this, new SerialDataEventArgs(data))


// An additional class
public class SerialDataEventArgs : EventArgs
{
    public SerialDataEventArgs(byte[] dataInByteArray)
    {
        Data = dataInByteArray;
    }
}


// Instantiate spManager class
mySPManager = new SPManager();

mySPManager.NewSerialDataRecieved += new 
EventHandler<SerialDataEventArgs>(mySPManagerNewSerialDataRecieved);

// Process data received from the com port
PRIVATE METHOD mySerialPortDataReceived( sender AS System.Object, e AS 
SerialDataReceivedEventArgs ) AS System.Void

I am having a difficult time understanding and translating the 
<SerialDataEventArgs> when the event is defined and when the event handler 
is assigned.  Do I need to use a delegate?

Any help would be greatly appreciated.
Thanks 

[toc] | [prev] | [next] | [standalone]


#8285

FromGary <gkeefe109@gmail.com>
Date2015-07-18 07:30 -0700
Message-ID<4c19047c-e3c7-4edd-b2f9-aee8913d7d55@googlegroups.com>
In reply to#8277
On Wednesday, July 15, 2015 at 11:35:30 AM UTC-5, Willie Moore wrote:
> Gary,
> 
> Do you ant the ampe to be in Visual Studo or VIDE?
> 
> Regards,
> Willie
> Vulcan VIP
> Grafx Development Team
> 
> "Gary"  wrote in message 
> news:67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com...
> 
> I have some C# code I am having a difficult time translating to Vulcan.Net
> 
> // Inside a class (spManager - serial port manager)
> public event EventHandler<SerialDataEventArgs> NewSerialDataRecieved;
> 
> // Inside an event handler:
> NewSerialDataRecieved(this, new SerialDataEventArgs(data))
> 
> 
> // An additional class
> public class SerialDataEventArgs : EventArgs
> {
>     public SerialDataEventArgs(byte[] dataInByteArray)
>     {
>         Data = dataInByteArray;
>     }
> }
> 
> 
> // Instantiate spManager class
> mySPManager = new SPManager();
> 
> mySPManager.NewSerialDataRecieved += new 
> EventHandler<SerialDataEventArgs>(mySPManagerNewSerialDataRecieved);
> 
> // Process data received from the com port
> PRIVATE METHOD mySerialPortDataReceived( sender AS System.Object, e AS 
> SerialDataReceivedEventArgs ) AS System.Void
> 
> I am having a difficult time understanding and translating the 
> <SerialDataEventArgs> when the event is defined and when the event handler 
> is assigned.  Do I need to use a delegate?
> 
> Any help would be greatly appreciated.
> Thanks

Hi Willie,

I am using vs.

Thanks

[toc] | [prev] | [next] | [standalone]


#8294

From"Willie Moore" <williem@wmconsulting.com>
Date2015-07-22 08:22 -0500
Message-ID<moo5f1$7dv$1@speranza.aioe.org>
In reply to#8268
Gary,

Here are 2 simple samples. The first one has a business layer seperated into 
its own dll and shows how to call it from winforms and wpf. The second link 
is just a winforms sample that has everything in one file. I hope that these 
will be useful.

https://dl.dropboxusercontent.com/u/26130378/VulcanEvents.zip
https://dl.dropboxusercontent.com/u/26130378/VulcanProgressBarWithEvents.zip


Regards,
Willie
Vulcan VIP
Grafx Development Team

"Gary"  wrote in message 
news:67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com...

I have some C# code I am having a difficult time translating to Vulcan.Net

// Inside a class (spManager - serial port manager)
public event EventHandler<SerialDataEventArgs> NewSerialDataRecieved;

// Inside an event handler:
NewSerialDataRecieved(this, new SerialDataEventArgs(data))


// An additional class
public class SerialDataEventArgs : EventArgs
{
    public SerialDataEventArgs(byte[] dataInByteArray)
    {
        Data = dataInByteArray;
    }
}


// Instantiate spManager class
mySPManager = new SPManager();

mySPManager.NewSerialDataRecieved += new 
EventHandler<SerialDataEventArgs>(mySPManagerNewSerialDataRecieved);

// Process data received from the com port
PRIVATE METHOD mySerialPortDataReceived( sender AS System.Object, e AS 
SerialDataReceivedEventArgs ) AS System.Void

I am having a difficult time understanding and translating the 
<SerialDataEventArgs> when the event is defined and when the event handler 
is assigned.  Do I need to use a delegate?

Any help would be greatly appreciated.
Thanks 

[toc] | [prev] | [next] | [standalone]


#8300

FromGary <gkeefe109@gmail.com>
Date2015-07-23 19:21 -0700
Message-ID<88efc040-ef92-4742-87e3-aa52c9fea17e@googlegroups.com>
In reply to#8294
Thanks!
On Wednesday, July 22, 2015 at 8:22:45 AM UTC-5, Willie Moore wrote:
> Gary,
> 
> Here are 2 simple samples. The first one has a business layer seperated into 
> its own dll and shows how to call it from winforms and wpf. The second link 
> is just a winforms sample that has everything in one file. I hope that these 
> will be useful.
> 
> https://dl.dropboxusercontent.com/u/26130378/VulcanEvents.zip
> https://dl.dropboxusercontent.com/u/26130378/VulcanProgressBarWithEvents.zip
> 
> 
> Regards,
> Willie
> Vulcan VIP
> Grafx Development Team
> 
> "Gary"  wrote in message 
> news:67cffd0c-151a-457b-b01b-b1f5d7ceee66@googlegroups.com...
> 
> I have some C# code I am having a difficult time translating to Vulcan.Net
> 
> // Inside a class (spManager - serial port manager)
> public event EventHandler<SerialDataEventArgs> NewSerialDataRecieved;
> 
> // Inside an event handler:
> NewSerialDataRecieved(this, new SerialDataEventArgs(data))
> 
> 
> // An additional class
> public class SerialDataEventArgs : EventArgs
> {
>     public SerialDataEventArgs(byte[] dataInByteArray)
>     {
>         Data = dataInByteArray;
>     }
> }
> 
> 
> // Instantiate spManager class
> mySPManager = new SPManager();
> 
> mySPManager.NewSerialDataRecieved += new 
> EventHandler<SerialDataEventArgs>(mySPManagerNewSerialDataRecieved);
> 
> // Process data received from the com port
> PRIVATE METHOD mySerialPortDataReceived( sender AS System.Object, e AS 
> SerialDataReceivedEventArgs ) AS System.Void
> 
> I am having a difficult time understanding and translating the 
> <SerialDataEventArgs> when the event is defined and when the event handler 
> is assigned.  Do I need to use a delegate?
> 
> Any help would be greatly appreciated.
> Thanks

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web