C# Class _05_Webphone_Silverligth_ChatExample.MainPage

Inheritance: System.Windows.Controls.UserControl
Afficher le fichier Open project: thesameqad/pitchingtube

Méthodes publiques

Свойство Type Description
connectedUsers ObservableCollection

Méthodes publiques

Méthode Description
AudioRequestReceived ( string owner, bool isEnable ) : void

Receive the audio request from other client.

AudioResponseReceived ( string owner, bool response ) : void

Receives responese for a sent audio request.

CameraRequestReceived ( string owner, bool isEnable ) : void

Receive the camera request from other connected client.

CameraResponseReceived ( string owner, bool response ) : void

Receives responese for a sent camera request.

ConnectedClientsReceived ( string connectedUsers ) : void

Receives the connected client list from server.

CreateAndSetupStreamReceiver ( string playerName, MediaType mediaType ) : void

Initializes the MediaStreamReceiver for receive media data.

MainPage ( ) : System
MainPage_Loaded ( object sender, RoutedEventArgs e ) : void

It initializes the connection window and open it.

ReceiveMessage ( string owner, string message ) : void

Receive messages from server.

conWindow_ConnectedSuccessfully ( object sender, GenericEventArgs e ) : void

It initializes set GUI component values and creates new instance of MediaStreamSender for send media data through server in further action.

streamReceiver_StreamStateChanged ( object sender, GenericEventArgs e ) : void

Indicates statechanges of streamReceiver object.

streamSender_StreamStateChanged ( object sender, GenericEventArgs e ) : void

Indicates statechanges of streamSender object.

winMedia_ResponseSelected ( object sender, RequestResponseEventArgs e ) : void

Sends the selected response to the request owner who sent the media request and initializes the MediaStreamSender object to send audi/video data.

Private Methods

Méthode Description
DestroyStreamReceiver ( ) : void

Reset streamReceiver object.

InitializeComponent ( ) : void
btnAudio_Click ( object sender, RoutedEventArgs e ) : void

Sends an audio conversation request to the selected client.

btnCameraTest_Click ( object sender, RoutedEventArgs e ) : void
btnCamera_Click ( object sender, RoutedEventArgs e ) : void

Send a video conversation request to the selected client.

btnSend_Click ( object sender, RoutedEventArgs e ) : void

Send text message to the selected client.

txtMsgInput_KeyUp ( object sender, System.Windows.Input.KeyEventArgs e ) : void

Method Details

AudioRequestReceived() public méthode

Receive the audio request from other client.
public AudioRequestReceived ( string owner, bool isEnable ) : void
owner string The request owner who sent request.
isEnable bool If true audio request received otherwise the audio conversation hang up by other party.
Résultat void

AudioResponseReceived() public méthode

Receives responese for a sent audio request.
public AudioResponseReceived ( string owner, bool response ) : void
owner string The responding party nickname.
response bool If true, camera request is accepted otherwise don't accepted.
Résultat void

CameraRequestReceived() public méthode

Receive the camera request from other connected client.
public CameraRequestReceived ( string owner, bool isEnable ) : void
owner string The request owner who sent request.
isEnable bool If true video request received otherwise the video conversation hang up by other party.
Résultat void

CameraResponseReceived() public méthode

Receives responese for a sent camera request.
public CameraResponseReceived ( string owner, bool response ) : void
owner string The responding party nickname.
response bool If true, camera request is accepted otherwise don't accepted.
Résultat void

ConnectedClientsReceived() public méthode

Receives the connected client list from server.
public ConnectedClientsReceived ( string connectedUsers ) : void
connectedUsers string String array with connected client' nickname.
Résultat void

CreateAndSetupStreamReceiver() public méthode

Initializes the MediaStreamReceiver for receive media data.
public CreateAndSetupStreamReceiver ( string playerName, MediaType mediaType ) : void
playerName string
mediaType MediaType
Résultat void

MainPage() public méthode

public MainPage ( ) : System
Résultat System

MainPage_Loaded() public méthode

It initializes the connection window and open it.
public MainPage_Loaded ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Résultat void

ReceiveMessage() public méthode

Receive messages from server.
public ReceiveMessage ( string owner, string message ) : void
owner string The client who sent the message.
message string Message data
Résultat void

conWindow_ConnectedSuccessfully() public méthode

It initializes set GUI component values and creates new instance of MediaStreamSender for send media data through server in further action.
public conWindow_ConnectedSuccessfully ( object sender, GenericEventArgs e ) : void
sender object
e GenericEventArgs
Résultat void

streamReceiver_StreamStateChanged() public méthode

Indicates statechanges of streamReceiver object.
public streamReceiver_StreamStateChanged ( object sender, GenericEventArgs e ) : void
sender object
e GenericEventArgs
Résultat void

streamSender_StreamStateChanged() public méthode

Indicates statechanges of streamSender object.
public streamSender_StreamStateChanged ( object sender, GenericEventArgs e ) : void
sender object
e GenericEventArgs
Résultat void

winMedia_ResponseSelected() public méthode

Sends the selected response to the request owner who sent the media request and initializes the MediaStreamSender object to send audi/video data.
public winMedia_ResponseSelected ( object sender, RequestResponseEventArgs e ) : void
sender object
e RequestResponseEventArgs
Résultat void

Property Details

connectedUsers public_oe property

public ObservableCollection connectedUsers
Résultat ObservableCollection