Holds data for client-connection based events.
Inheritance: System.EventArgs
Exemplo n.º 1
0
 private async void Client_Connected(object sender, ClientConnectionEventArgs e)
 {
     Debug.WriteLine(String.Format("Client: Connected to {0}:{1}!", e.Connection.RemoteTarget.Hostname, e.Connection.RemoteTarget.Port));
     await Client.SendScreenFrameRequestAsync();
 }
Exemplo n.º 2
0
        private void OnConnectionConnected(object sender, ClientConnectionEventArgs e)
        {
            OnPropertyChanged (new PropertyChangedEventArgs ("IsConnected"));

            this.running = true;

            SpinWait wait = new SpinWait();
            while (this.messageRunnerTask != null)
                wait.SpinOnce();

            this.messageRunnerTask = Task.Factory.StartNew (MessageRunner, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);

            OnConnected (e);
        }
Exemplo n.º 3
0
        protected override void OnConnected(ClientConnectionEventArgs e)
        {
            base.OnConnected (e);

            Connection.SendFor<ConnectResultMessage> (new ConnectMessage { Password = password })
                .ContinueWith (ct =>
                {
                    OnMachineScreensChanged (null, EventArgs.Empty);
                    switch (ct.Result.Result)
                    {
                        case ConnectResult.FailedPassword:
                            DisconnectWithReason (FailedPasswordReason);
                            break;

                        case ConnectResult.FailedUnknown:
                            Disconnect (now: true);
                            break;

                        case ConnectResult.Success:
                            SetActive (true);
                            break;
                    }
                });
        }
Exemplo n.º 4
0
 protected virtual void OnConnected(ClientConnectionEventArgs e)
 {
     EventHandler<ClientConnectionEventArgs> handler = Connected;
     if (handler != null)
         handler (this, e);
 }
Exemplo n.º 5
0
		protected override void OnConnected (ClientConnectionEventArgs e)
		{
			base.OnConnected (e);

			Persona.Status = Status.Online;
		}