C# Class TheAirline.Helpers.AirlineHelpers

Exibir arquivo Open project: TheAirlineProject/tap-desktop

Public Methods

Method Description
AcceptCodesharing ( Airline airline, Airline asker, CodeshareAgreement type ) : bool
AddAirlineInvoice ( Airline airline, System.DateTime date, Invoice type, double amount ) : void
AddAirlineShares ( Airline airline, int shares, double sharePrice ) : void
AddAirliner ( Airline airline, Airliner airliner, Airport airport, System.Boolean leased ) : FleetAirliner
AddSubsidiaryAirline ( Airline airline, SubsidiaryAirline sAirline, double money, Airport airportHomeBase ) : void
BuyAirliner ( Airline airline, Airliner airliner, Airport airport ) : FleetAirliner
BuyAirliner ( Airline airline, Airliner airliner, Airport airport, double discount ) : FleetAirliner
CanApplyForLoan ( Airline airline, Loan loan ) : bool
CanCreateHub ( Airline airline, Airport airport, HubType type ) : bool
CheckInsuranceSettlements ( Airline airline ) : void
CheckSpecialContract ( SpecialContract sc ) : bool
ClearAirlinesStatistics ( ) : void
ClearRoutesStatistics ( ) : void
CloseSubsidiaryAirline ( SubsidiaryAirline airline ) : void
CreateAirliner ( Airline airline, AirlinerType type ) : FleetAirliner
CreateStandardAirlineShares ( Airline airline ) : void
CreateStandardAirlineShares ( Airline airline, double sharePrice ) : void
CreateSubsidiaryAirline ( Airline airline, double money, string name, string iata, Airline mentality, AirlineFocus market, Route routefocus, Airport homebase ) : SubsidiaryAirline
GetAirlineManufactorerDiscountFactor ( Airline airline, int length, bool forReputation ) : double
GetAirportOutboundRoutes ( Airline airline, Airport airport ) : int
GetCodesharingPrice ( Airline airline1, Airline airline2 ) : double
GetCodesharingPrice ( CodeshareAgreement agreement ) : double
GetHomebases ( Airline airline ) : List
GetHomebases ( Airline airline, AirlinerType type ) : List
GetHomebases ( Airline airline, long minrunway ) : List
GetMaxLoanAmount ( Airline airline ) : double
GetMonthlyPayroll ( Airline airline ) : double
GetPilotSalary ( Airline airline, Pilot pilot ) : double
GetPricePerAirlineShare ( Airline airline ) : double
GetRouteFacilities ( Airline airline, RouteFacility type ) : List
GetTrainingDays ( Pilot pilot, string airlinerfamily ) : int
GetTrainingPrice ( Pilot pilot, string airlinerfamily ) : double
HasAirlineLicens ( Airline airline, Airport airport1, Airport airport2 ) : bool
HasTrainingFacility ( Airline airline, string airlinerfamily ) : bool
HireAirlinerPilots ( FleetAirliner airliner ) : void
IsRouteDestinationsOk ( Airline airline, Airport destination1, Airport destination2, Route routeType, Airport stopover1 = null, Airport stopover2 = null ) : bool
MakeSubsidiaryAirlineIndependent ( SubsidiaryAirline airline ) : void
OrderAirliners ( Airline airline, List orders, Airport airport, System.DateTime deliveryDate ) : void
OrderAirliners ( Airline airline, List orders, Airport airport, System.DateTime deliveryDate, double discount ) : void
ReallocateAirport ( Airport oldAirport, Airport newAirport, Airline airline ) : void
SendForTraining ( Airline airline, Pilot pilot, string airlinerfamily, int trainingdays, double price ) : void
SetAirlineShares ( Airline airline, Airline shareAirline, int shares ) : void
SwitchAirline ( Airline airlineFrom, Airline airlineTo ) : void
UpdateMaintList ( Airline airline ) : void
UpdateRatings ( Airline airline ) : void

Private Methods

Method Description
CheckRouteOk ( Airport airport1, Airport airport2, Route routeType ) : bool
GetRouteStatus ( Airport airport1, Airport airport2, Route routeType ) : RouteOkStatus

Method Details

AcceptCodesharing() public static method

public static AcceptCodesharing ( Airline airline, Airline asker, CodeshareAgreement type ) : bool
airline TheAirline.Models.Airlines.Airline
asker TheAirline.Models.Airlines.Airline
type TheAirline.Models.Airlines.CodeshareAgreement
return bool

AddAirlineInvoice() public static method

public static AddAirlineInvoice ( Airline airline, System.DateTime date, Invoice type, double amount ) : void
airline TheAirline.Models.Airlines.Airline
date System.DateTime
type TheAirline.Models.General.Finances.Invoice
amount double
return void

AddAirlineShares() public static method

public static AddAirlineShares ( Airline airline, int shares, double sharePrice ) : void
airline TheAirline.Models.Airlines.Airline
shares int
sharePrice double
return void

AddAirliner() public static method

public static AddAirliner ( Airline airline, Airliner airliner, Airport airport, System.Boolean leased ) : FleetAirliner
airline TheAirline.Models.Airlines.Airline
airliner TheAirline.Models.Airliners.Airliner
airport TheAirline.Models.Airports.Airport
leased System.Boolean
return TheAirline.Models.Airliners.FleetAirliner

AddSubsidiaryAirline() public static method

public static AddSubsidiaryAirline ( Airline airline, SubsidiaryAirline sAirline, double money, Airport airportHomeBase ) : void
airline TheAirline.Models.Airlines.Airline
sAirline TheAirline.Models.Airlines.Subsidiary.SubsidiaryAirline
money double
airportHomeBase TheAirline.Models.Airports.Airport
return void

BuyAirliner() public static method

public static BuyAirliner ( Airline airline, Airliner airliner, Airport airport ) : FleetAirliner
airline TheAirline.Models.Airlines.Airline
airliner TheAirline.Models.Airliners.Airliner
airport TheAirline.Models.Airports.Airport
return TheAirline.Models.Airliners.FleetAirliner

BuyAirliner() public static method

public static BuyAirliner ( Airline airline, Airliner airliner, Airport airport, double discount ) : FleetAirliner
airline TheAirline.Models.Airlines.Airline
airliner TheAirline.Models.Airliners.Airliner
airport TheAirline.Models.Airports.Airport
discount double
return TheAirline.Models.Airliners.FleetAirliner

CanApplyForLoan() public static method

public static CanApplyForLoan ( Airline airline, Loan loan ) : bool
airline TheAirline.Models.Airlines.Airline
loan TheAirline.Models.General.Loan
return bool

CanCreateHub() public static method

public static CanCreateHub ( Airline airline, Airport airport, HubType type ) : bool
airline TheAirline.Models.Airlines.Airline
airport TheAirline.Models.Airports.Airport
type TheAirline.Models.Airports.HubType
return bool

CheckInsuranceSettlements() public static method

public static CheckInsuranceSettlements ( Airline airline ) : void
airline TheAirline.Models.Airlines.Airline
return void

CheckSpecialContract() public static method

public static CheckSpecialContract ( SpecialContract sc ) : bool
sc TheAirline.Models.General.SpecialContract
return bool

ClearAirlinesStatistics() public static method

public static ClearAirlinesStatistics ( ) : void
return void

ClearRoutesStatistics() public static method

public static ClearRoutesStatistics ( ) : void
return void

CloseSubsidiaryAirline() public static method

public static CloseSubsidiaryAirline ( SubsidiaryAirline airline ) : void
airline TheAirline.Models.Airlines.Subsidiary.SubsidiaryAirline
return void

CreateAirliner() public static method

public static CreateAirliner ( Airline airline, AirlinerType type ) : FleetAirliner
airline TheAirline.Models.Airlines.Airline
type TheAirline.Models.Airliners.AirlinerType
return TheAirline.Models.Airliners.FleetAirliner

CreateStandardAirlineShares() public static method

public static CreateStandardAirlineShares ( Airline airline ) : void
airline TheAirline.Models.Airlines.Airline
return void

CreateStandardAirlineShares() public static method

public static CreateStandardAirlineShares ( Airline airline, double sharePrice ) : void
airline TheAirline.Models.Airlines.Airline
sharePrice double
return void

CreateSubsidiaryAirline() public static method

public static CreateSubsidiaryAirline ( Airline airline, double money, string name, string iata, Airline mentality, AirlineFocus market, Route routefocus, Airport homebase ) : SubsidiaryAirline
airline TheAirline.Models.Airlines.Airline
money double
name string
iata string
mentality TheAirline.Models.Airlines.Airline
market AirlineFocus
routefocus TheAirline.Models.Routes.Route
homebase TheAirline.Models.Airports.Airport
return TheAirline.Models.Airlines.Subsidiary.SubsidiaryAirline

GetAirlineManufactorerDiscountFactor() public static method

public static GetAirlineManufactorerDiscountFactor ( Airline airline, int length, bool forReputation ) : double
airline TheAirline.Models.Airlines.Airline
length int
forReputation bool
return double

GetAirportOutboundRoutes() public static method

public static GetAirportOutboundRoutes ( Airline airline, Airport airport ) : int
airline TheAirline.Models.Airlines.Airline
airport TheAirline.Models.Airports.Airport
return int

GetCodesharingPrice() public static method

public static GetCodesharingPrice ( Airline airline1, Airline airline2 ) : double
airline1 TheAirline.Models.Airlines.Airline
airline2 TheAirline.Models.Airlines.Airline
return double

GetCodesharingPrice() public static method

public static GetCodesharingPrice ( CodeshareAgreement agreement ) : double
agreement TheAirline.Models.Airlines.CodeshareAgreement
return double

GetHomebases() public static method

public static GetHomebases ( Airline airline ) : List
airline TheAirline.Models.Airlines.Airline
return List

GetHomebases() public static method

public static GetHomebases ( Airline airline, AirlinerType type ) : List
airline TheAirline.Models.Airlines.Airline
type TheAirline.Models.Airliners.AirlinerType
return List

GetHomebases() public static method

public static GetHomebases ( Airline airline, long minrunway ) : List
airline TheAirline.Models.Airlines.Airline
minrunway long
return List

GetMaxLoanAmount() public static method

public static GetMaxLoanAmount ( Airline airline ) : double
airline TheAirline.Models.Airlines.Airline
return double

GetMonthlyPayroll() public static method

public static GetMonthlyPayroll ( Airline airline ) : double
airline TheAirline.Models.Airlines.Airline
return double

GetPilotSalary() public static method

public static GetPilotSalary ( Airline airline, Pilot pilot ) : double
airline TheAirline.Models.Airlines.Airline
pilot TheAirline.Models.Pilots.Pilot
return double

GetPricePerAirlineShare() public static method

public static GetPricePerAirlineShare ( Airline airline ) : double
airline TheAirline.Models.Airlines.Airline
return double

GetRouteFacilities() public static method

public static GetRouteFacilities ( Airline airline, RouteFacility type ) : List
airline TheAirline.Models.Airlines.Airline
type TheAirline.Models.Routes.RouteFacility
return List

GetTrainingDays() public static method

public static GetTrainingDays ( Pilot pilot, string airlinerfamily ) : int
pilot TheAirline.Models.Pilots.Pilot
airlinerfamily string
return int

GetTrainingPrice() public static method

public static GetTrainingPrice ( Pilot pilot, string airlinerfamily ) : double
pilot TheAirline.Models.Pilots.Pilot
airlinerfamily string
return double

HasAirlineLicens() public static method

public static HasAirlineLicens ( Airline airline, Airport airport1, Airport airport2 ) : bool
airline TheAirline.Models.Airlines.Airline
airport1 TheAirline.Models.Airports.Airport
airport2 TheAirline.Models.Airports.Airport
return bool

HasTrainingFacility() public static method

public static HasTrainingFacility ( Airline airline, string airlinerfamily ) : bool
airline TheAirline.Models.Airlines.Airline
airlinerfamily string
return bool

HireAirlinerPilots() public static method

public static HireAirlinerPilots ( FleetAirliner airliner ) : void
airliner TheAirline.Models.Airliners.FleetAirliner
return void

IsRouteDestinationsOk() public static method

public static IsRouteDestinationsOk ( Airline airline, Airport destination1, Airport destination2, Route routeType, Airport stopover1 = null, Airport stopover2 = null ) : bool
airline TheAirline.Models.Airlines.Airline
destination1 TheAirline.Models.Airports.Airport
destination2 TheAirline.Models.Airports.Airport
routeType TheAirline.Models.Routes.Route
stopover1 TheAirline.Models.Airports.Airport
stopover2 TheAirline.Models.Airports.Airport
return bool

MakeSubsidiaryAirlineIndependent() public static method

public static MakeSubsidiaryAirlineIndependent ( SubsidiaryAirline airline ) : void
airline TheAirline.Models.Airlines.Subsidiary.SubsidiaryAirline
return void

OrderAirliners() public static method

public static OrderAirliners ( Airline airline, List orders, Airport airport, System.DateTime deliveryDate ) : void
airline TheAirline.Models.Airlines.Airline
orders List
airport TheAirline.Models.Airports.Airport
deliveryDate System.DateTime
return void

OrderAirliners() public static method

public static OrderAirliners ( Airline airline, List orders, Airport airport, System.DateTime deliveryDate, double discount ) : void
airline TheAirline.Models.Airlines.Airline
orders List
airport TheAirline.Models.Airports.Airport
deliveryDate System.DateTime
discount double
return void

ReallocateAirport() public static method

public static ReallocateAirport ( Airport oldAirport, Airport newAirport, Airline airline ) : void
oldAirport TheAirline.Models.Airports.Airport
newAirport TheAirline.Models.Airports.Airport
airline TheAirline.Models.Airlines.Airline
return void

SendForTraining() public static method

public static SendForTraining ( Airline airline, Pilot pilot, string airlinerfamily, int trainingdays, double price ) : void
airline TheAirline.Models.Airlines.Airline
pilot TheAirline.Models.Pilots.Pilot
airlinerfamily string
trainingdays int
price double
return void

SetAirlineShares() public static method

public static SetAirlineShares ( Airline airline, Airline shareAirline, int shares ) : void
airline TheAirline.Models.Airlines.Airline
shareAirline TheAirline.Models.Airlines.Airline
shares int
return void

SwitchAirline() public static method

public static SwitchAirline ( Airline airlineFrom, Airline airlineTo ) : void
airlineFrom TheAirline.Models.Airlines.Airline
airlineTo TheAirline.Models.Airlines.Airline
return void

UpdateMaintList() public static method

public static UpdateMaintList ( Airline airline ) : void
airline TheAirline.Models.Airlines.Airline
return void

UpdateRatings() public static method

public static UpdateRatings ( Airline airline ) : void
airline TheAirline.Models.Airlines.Airline
return void