C# Class Server.ServerSideMenu

Mostrar archivo Open project: pmyoung/Advanced-Game-Project Class Usage Examples

Public Properties

Property Type Description
confirm ServerSideConfirm
health int
playerNum int
pointsToWin int

Public Methods

Method Description
ServerSideMenu ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
IHealth_TextChanged ( object sender, EventArgs e ) : void

IHealth_TextChanged. This method is called when the user enters a number for health. It checks to make sure that a number is entered, and throws an exception if an incorrect format is entered. It sets the health value.

IPlayerNumbers_SelectedIndexChanged ( object sender, EventArgs e ) : void

IPlayerNumbers_SelectedIndexChanged. This method is called when the user selects an item from the dropdown list. It sets the playerNum.

IPoints_TextChanged ( object sender, EventArgs e ) : void

IPoints_TextChanged. This method is called when the user enters a number for the points. It checks to make sure that the value entered is in the correct format and throws an error if not. It modifies the pointsToWin.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

Start_Click ( object sender, EventArgs e ) : void

Start_Click. This method is called when the user clicks on the "Start" Button. It creates a new serverConfirm form and closes this form iff the user selected yes from the confirm form.

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

ServerSideMenu() public method

public ServerSideMenu ( ) : System
return System

Property Details

confirm public_oe property

The constructor takes in no variables and initializes all the components ServerSideConfirm. The confirm form Int. The number of players. If an incorrect value is entered the default is two Int. The amount of health the players have. If an incorrect value is entered the default is 30 Int. The number of points a player needs to win. If an incorrect value is entered the default is 100
public ServerSideConfirm,Server confirm
return ServerSideConfirm

health public_oe property

public int health
return int

playerNum public_oe property

public int playerNum
return int

pointsToWin public_oe property

public int pointsToWin
return int