AssalamuAalikum...
mujhe zel k C# "console" program ko "windows form" me tabdil krna hai,
program ka task same ek hi ho'
srif iska GUI change h,
console app k Console.WriteLine(""); k text ko windows form me kahin b display kr den,
chahe label
ya
list box me
ya
messg box me..

to program ye hai:
using System;
using Eneter.Messaging.EndPoints.TypedMessages;
using Eneter.Messaging.MessagingSystems.MessagingSystemB ase;
using Eneter.Messaging.MessagingSystems.TcpMessagingSyst em;

namespace ServiceExample
{
public class MyRequest
{
public string Text { get; set; }
}
public class MyResponse
{
public int Length { get; set; }
}

class Program
{
private static IDuplexTypedMessageReceiver<MyResponse, MyRequest> myReceiver;

static void Main(string[] args)
{
IDuplexTypedMessagesFactory aReceiverFactory = new DuplexTypedMessagesFactory();
myReceiver = aReceiverFactory.CreateDuplexTypedMessageReceiver< MyResponse, MyRequest>();

myReceiver.MessageReceived += OnMessageReceived;
IMessagingSystemFactory aMessaging = new TcpMessagingSystemFactory();
IDuplexInputChannel anInputChannel =
aMessaging.CreateDuplexInputChannel("tcp://127.0.0.1:8060/");
myReceiver.AttachDuplexInputChannel(anInputChannel );

Console.WriteLine("The service is running. To stop press enter.");
Console.ReadLine();
myReceiver.DetachDuplexInputChannel();
}
private static void OnMessageReceived(object sender,
TypedRequestReceivedEventArgs<MyRequest> e)
{
Console.WriteLine("Received: " + e.RequestMessage.Text);
MyResponse aResponse = new MyResponse();
aResponse.Length = e.RequestMessage.Text.Length;
myReceiver.SendResponseMessage(e.ResponseReceiverI d, aResponse);
}
}
}