Holds data for client-connection based events.
Inheritance: System.EventArgs
Beispiel #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();
 }
Beispiel #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);
        }
Beispiel #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;
                    }
                });
        }
Beispiel #4
0
 protected virtual void OnConnected(ClientConnectionEventArgs e)
 {
     EventHandler<ClientConnectionEventArgs> handler = Connected;
     if (handler != null)
         handler (this, e);
 }
		protected override void OnConnected (ClientConnectionEventArgs e)
		{
			base.OnConnected (e);

			Persona.Status = Status.Online;
		}