Exemplo n.º 1
0
        public ClientForm(ServiceBehavior client)
        {
            if (client == null)
                throw new Exception("Parameter client is required.");

            this.client = client;
            client.Message += Client_Message;
            client.Close += Client_Close;

            InitializeComponent();
        }
Exemplo n.º 2
0
 private void ServiceBehavior_Open(ServiceBehavior client)
 {
     Invoke((MethodInvoker) delegate
     {
         ClientForm form = new ClientForm(client);
         int value       = Interlocked.Increment(ref counter);
         form.Text       = "Client " + value;
         form.Owner      = this;
         form.Show(this);
     });
 }
Exemplo n.º 3
0
        public ClientForm(ServiceBehavior client)
        {
            if (client == null)
            {
                throw new ArgumentNullException("Parameter client is required.");
            }
            this.client     = client;
            client.Message += Client_Message;
            client.Close   += Client_Close;

            InitializeComponent();
        }
Exemplo n.º 4
0
 private void ServiceBehavior_Open(ServiceBehavior client)
 {
     Invoke((MethodInvoker)delegate
     {
         ClientForm form = new ClientForm(client);
         Interlocked.Increment(ref counter);
         form.Text = "Client " + counter;
         form.Owner = this;
         form.Show(this);
     });
 }