rendered paste body public void commandAction(Command c, Displayable s) {
if(c == BackConnectionCommand) {
SoapObject.shutdown();
Services.setCommandListener(this);
}
/***************************************************/
/*Initial Screen*/
/***************************************************/
// 1. Choose Service Menu
// Going Out
if(c == OnExitCommand) {
notifyDestroyed();
}
// 1.1 Connect to FlightRoute
else if(c == OnNextCommand && Services.getSelectedIndex()==0) {
WaittingForm();
typess=5;
t = new Thread(this);
t.start();
}
// 1.2 Connect to CountryInfo
else if(c == OnNextCommand && Services.getSelectedIndex()==1) {
WaittingForm();
typess=3;
t = new Thread(this);
t.start();
}
// 1.3 Connect to AirLineInfo
else if(c == OnNextCommand && Services.getSelectedIndex()==2) {
WaittingForm();
typess=1;
t = new Thread(this);
t.start();
}
/***************************************************/
/*Airline*/
/***************************************************/
// 1.3 AirLine Menu
// Going Back to ServicesOn Menu
if(c == BackAirCommand) {
display.setCurrent(Services);
Services.setCommandListener(this);
}
// 1.3.1 AirLine Information
else if(c == NextAirCommand) {
WaittingForm();
typess=2;
t = new Thread(this);
t.start();
}
/***************************************************/
/*Country*/
/***************************************************/
// 1.2 Country Menu
// Going Back to ServicesOn Menu
if(c == BackCountryCommand) {
display.setCurrent(Services);
Services.setCommandListener(this);
}
// 1.2.1 Country Information
else if(c == NextCountryCommand) {
WaittingForm();
typess=4;
t = new Thread(this);
t.start();
}
/***************************************************/
/*FlightRoute*/
/***************************************************/
// 1.1 FlightRoute Menu
// Going Back to ServicesOn Menu
if(c == BackFlightCommand) {
display.setCurrent(Services);
Services.setCommandListener(this);
}
// 1.1.1 Route Considering Time
else if(c == NextFlightCommand && constraint.getSelection().equals("Time")) {
WaittingForm();
typess=6;
t = new Thread(this);
t.start();
}
// 1.1.2 Route Considering Price
else if(c == NextFlightCommand && constraint.getSelection().equals("Price")) {
WaittingForm();
typess=7;
t = new Thread(this);
t.start();
}
// 1.1.3 Route Considering Number of Flights
else if(c == NextFlightCommand && constraint.getSelection().equals("Number of Flights")) {
WaittingForm();
typess=8;
t = new Thread(this);
t.start();
}
/***************************************************/
}