diff options
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+ ",";
}
|