diff options
author | fcolin | 2007-02-01 10:06:01 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 10:06:01 +0000 |
commit | dbd0084d2b14e054d2ff430476300ddb00de8121 (patch) | |
tree | e56d14ad517ecc3ffa4223b99dda89459159cd19 /CSharp/Ivy/IvyProbe/IvyProbe.cs | |
parent | 736a29430c5566e4e6dd786aee62540c13e6583d (diff) | |
download | ivy-csharp-dbd0084d2b14e054d2ff430476300ddb00de8121.zip ivy-csharp-dbd0084d2b14e054d2ff430476300ddb00de8121.tar.gz ivy-csharp-dbd0084d2b14e054d2ff430476300ddb00de8121.tar.bz2 ivy-csharp-dbd0084d2b14e054d2ff430476300ddb00de8121.tar.xz |
Utilisateur : Fcolin Date : 6/12/05 Heure : 16:58 Archivé dans $/CSharp/Ivy/IvyTest Commentaire: (vss 6)
Diffstat (limited to 'CSharp/Ivy/IvyProbe/IvyProbe.cs')
-rw-r--r-- | CSharp/Ivy/IvyProbe/IvyProbe.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/CSharp/Ivy/IvyProbe/IvyProbe.cs b/CSharp/Ivy/IvyProbe/IvyProbe.cs index f98ece6..674b8af 100644 --- a/CSharp/Ivy/IvyProbe/IvyProbe.cs +++ b/CSharp/Ivy/IvyProbe/IvyProbe.cs @@ -3,6 +3,10 @@ namespace IvyTest using System;
using System.Windows.Forms;
using IvyBus;
+ using System.IO;
+ using System.Runtime.Serialization;
+ using System.Runtime.Serialization.Formatters.Binary;
+
class IvyTest : System.Windows.Forms.Form
{
@@ -24,6 +28,13 @@ namespace IvyTest private System.Windows.Forms.Button btUnbind;
public IvyTest()
{
+ //TEST of formatter
+ FileStream fs = new FileStream("DataFile.dat", FileMode.Create);
+ IvyTCPMessage msg = new IvyTCPMessage(IvyTCPMessage.MessageType.Msg, 2, null);
+ IvyTCPFormatter formatter = new IvyTCPFormatter();
+ formatter.Serialize(fs, msg );
+ fs.Close();
+
//
// Requis pour la prise en charge du Concepteur Windows Forms
//
@@ -207,7 +218,7 @@ namespace IvyTest // return true terminate the application
return false;
}
- private void directMessage(IvyClient client, int id, byte[] arg)
+ private void directMessage(IvyClient client, int id, IvyArgument arg)
{
append(client.ApplicationName + " direct Message " + id + arg);
}
@@ -233,7 +244,7 @@ namespace IvyTest private void receive(IvyClient client, IvyArgument args)
{
string receive_str = "client " + client.ApplicationName + " envoie: [";
- for (int i = 0; i < args.Length; i++)
+ for (int i = 0; i < args.Count; i++)
{
receive_str += args[i].Value+ ",";
}
|