C# Class _05_Webphone_Silverligth_ChatExample.MainPage

Inheritance: System.Windows.Controls.UserControl
Mostra file Open project: thesameqad/pitchingtube

Public Properties

Property Type Description
connectedUsers ObservableCollection

Public Methods

Method 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

Method 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 method

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.
return void

AudioResponseReceived() public method

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.
return void

CameraRequestReceived() public method

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.
return void

CameraResponseReceived() public method

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.
return void

ConnectedClientsReceived() public method

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

CreateAndSetupStreamReceiver() public method

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

MainPage() public method

public MainPage ( ) : System
return System

MainPage_Loaded() public method

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

ReceiveMessage() public method

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

conWindow_ConnectedSuccessfully() public method

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
return void

streamReceiver_StreamStateChanged() public method

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

streamSender_StreamStateChanged() public method

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

winMedia_ResponseSelected() public method

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
return void

Property Details

connectedUsers public_oe property

public ObservableCollection connectedUsers
return ObservableCollection