From dbd0084d2b14e054d2ff430476300ddb00de8121 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:06:01 +0000 Subject: Utilisateur : Fcolin Date : 6/12/05 Heure : 16:58 Archivé dans $/CSharp/Ivy/IvyTest Commentaire: (vss 6) --- CSharp/Ivy/IvyProbe/IvyProbe.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'CSharp') 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+ ","; } -- cgit v1.1