Thursday, August 6, 2009

Rpc client

//Rpc client//
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using dll1;
namespace rpcclients
{
public partial class Form1 : Form
{
Class1 c = (Class1)Activator.GetObject(typeof(Class1), "http://localhost:5000/test");
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
DriveInfo[] dr = c.get();
foreach (DriveInfo d in dr)
{
listBox1.Items.Add(d);
}

}
private void button2_Click(object sender, EventArgs e)
{
c.str(textBox1.Text);
}
}
}

No comments:

Post a Comment