本文整理汇总了C#中TheAirline.Models.Airlines.Airline类的典型用法代码示例。如果您正苦于以下问题:C# Airline类的具体用法?C# Airline怎么用?C# Airline使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Airline类属于TheAirline.Models.Airlines命名空间,在下文中一共展示了Airline类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowPopUp
public static object ShowPopUp(Airline airline)
{
PopUpWindow window = new PopUpCodeshareAgreement(airline);
window.ShowDialog();
return window.Selected;
}
示例2: Scenario
public Scenario(
string name,
string description,
Airline airline,
Airport homebase,
int startyear,
int endyear,
long startcash,
DifficultyLevel difficulty)
{
Name = name;
Airline = airline;
Homebase = homebase;
StartYear = startyear;
StartCash = startcash;
Description = description;
Difficulty = difficulty;
EndYear = endyear;
OpponentAirlines = new List<ScenarioAirline>();
Destinations = new List<Airport>();
Fleet = new Dictionary<AirlinerType, int>();
Routes = new List<ScenarioAirlineRoute>();
Failures = new List<ScenarioFailure>();
PassengerDemands = new List<ScenarioPassengerDemand>();
}
示例3: AirlineStartData
public AirlineStartData(Airline airline)
{
Airline = airline;
Routes = new List<StartDataRoute>();
Airliners = new List<StartDataAirliners>();
OriginRoutes = new List<StartDataRoutes>();
}
示例4: PopUpCreateSubsidiary
public PopUpCreateSubsidiary(Airline airline)
{
this.Airline = airline;
this.DataContext = this.Airline;
this.MaxSubsidiaryMoney = this.Airline.Money / 2;
this.IATAOk = false;
this.Colors = new List<PropertyInfo>();
foreach (PropertyInfo c in typeof(Colors).GetProperties())
{
this.Colors.Add(c);
}
this.AllAirports = new ObservableCollection<Airport>();
/*
foreach (
Airport airport in
this.Airline.Airports.FindAll(
a => a.Terminals.getFreeSlotsPercent(this.Airline,this.Airline.AirlineRouteFocus == Route.RouteType.Passenger ? Terminal.TerminalType.Passenger : Terminal.TerminalType.Cargo) > 50))
{
this.AllAirports.Add(airport);
}*/
this.Loaded += PopUpCreateSubsidiary_Loaded;
InitializeComponent();
}
示例5: ChangePaxDemand
//changes the demand for all airports belonging to an airline with a factor
public static void ChangePaxDemand(Airline airline, double factor)
{
foreach (Airport a in airline.Airports)
{
ChangePaxDemand(a, factor);
}
}
示例6: ShowPopUp
public static object ShowPopUp(Airline airline,Airport airport)
{
PopUpWindow window = new PopUpAddCooperation(airline,airport);
window.ShowDialog();
return window.Selected;
}
示例7: AirportContract
public AirportContract(
Airline airline,
Airport airport,
ContractType type,
Terminal.TerminalType terminaltype,
DateTime date,
int numberOfGates,
int length,
double yearlyPayment,
bool autorenew,
bool payFull = false,
bool isExclusiveDeal = false,
Terminal terminal = null)
{
Type = type;
PayFull = payFull;
Airline = airline;
Airport = airport;
ContractDate = date;
Length = length;
YearlyPayment = yearlyPayment;
NumberOfGates = numberOfGates;
IsExclusiveDeal = isExclusiveDeal;
Terminal = terminal;
ExpireDate = ContractDate.AddYears(Length);
AutoRenew = autorenew;
TerminalType = terminaltype;
}
示例8: AirlineAirportFacility
public AirlineAirportFacility(Airline airline, Airport airport, AirportFacility facility, DateTime date)
{
Airline = airline;
Facility = facility;
FinishedDate = date;
Airport = airport;
}
示例9: FleetAirliner
public FleetAirliner(
PurchasedType purchased,
DateTime purchasedDate,
Airline airline,
Airliner airliner,
Airport homebase)
{
Airliner = airliner;
Purchased = purchased;
PurchasedDate = purchasedDate;
Airliner.Airline = airline;
Homebase = homebase;
Name = airliner.TailNumber;
Statistics = new AirlinerStatistics(this);
LastCMaintenance = Airliner.BuiltDate;
LastAMaintenance = Airliner.BuiltDate;
LastBMaintenance = Airliner.BuiltDate;
LastDMaintenance = Airliner.BuiltDate;
Status = AirlinerStatus.Stopped;
MaintRoutes = new List<Route>();
CurrentPosition = Homebase;
//new GeoCoordinate(this.Homebase.Profile.Coordinates.Latitude,this.Homebase.Profile.Coordinates.Longitude);
Routes = new List<Route>();
Pilots = new List<Pilot>();
InsurancePolicies = new List<AirlinerInsurance>();
MaintenanceHistory = new Dictionary<Invoice, string>();
Data = new OperatingData();
if (Purchased == PurchasedType.Bought || Purchased == PurchasedType.BoughtDownPayment)
Airliner.Owner = Airliner.Airline;
}
示例10: SpecialContract
public SpecialContract(SpecialContractType type, DateTime date, Airline airline)
{
Airline = airline;
Type = type;
Date = date;
IsOk = true;
Routes = new List<Route>();
}
示例11: PopUpCodeshareAgreement
public PopUpCodeshareAgreement(Airline airline)
{
this.Airline = airline;
this.DataContext = this.Airline;
this.Price = AirlineHelpers.GetCodesharingPrice(this.Airline,GameObject.GetInstance().HumanAirline);
this.TicketSalePercent = CodeshareAgreement.TicketSalePercent;
InitializeComponent();
}
示例12: Gates
public Gates(int numberOfGates, DateTime deliveryDate, Airline airline)
{
_terminalGates = new List<Gate>();
for (int i = 0; i < numberOfGates; i++)
{
var gate = new Gate(deliveryDate) {Airline = airline};
_terminalGates.Add(gate);
}
}
示例13: GetAvgSubValue
public static long GetAvgSubValue(Airline airline)
{
if (!airline.Subsidiaries.Any())
{
return 0;
}
return GetTotalSubValues(GameObject.GetInstance().HumanAirline)
/GameObject.GetInstance().HumanAirline.Subsidiaries.Count();
}
示例14: Terminal
public Terminal(Airport airport, Airline airline, string name, int gates, DateTime deliveryDate, TerminalType type)
{
Airport = airport;
Airline = airline;
Name = name;
DeliveryDate = new DateTime(deliveryDate.Year, deliveryDate.Month, deliveryDate.Day);
Type = type;
Gates = new Gates(gates, DeliveryDate, airline);
}
示例15: GenerateEvents
public static void GenerateEvents(Airline airline)
{
var rnd = new Random();
var eventOccurences = new Dictionary<RandomEvent.EventType, double>();
int eFreq;
//sets an overall event frequency based on an airlines total overall rating
int totalRating = airline.Ratings.CustomerHappinessRating + airline.Ratings.EmployeeHappinessRating
+ airline.Ratings.SafetyRating + airline.Ratings.SecurityRating;
if (totalRating < 300)
{
eFreq = rnd.Next(1, 6);
}
else if (totalRating < 200)
{
eFreq = rnd.Next(4, 10);
}
else if (totalRating < 100)
{
eFreq = rnd.Next(8, 16);
}
else
{
eFreq = rnd.Next(0, 4);
}
//gets the event proportions and multiplies them by total # events to get events per type
List<double> probs = GetEventProportions(airline);
double custEvents = eFreq*probs[0];
double empEvents = eFreq*probs[1];
double secEvents = eFreq*probs[2];
double safEvents = eFreq*probs[3];
double maintEvents = eFreq*probs[4];
double polEvents = eFreq - custEvents - empEvents - secEvents - maintEvents;
eventOccurences.Add(RandomEvent.EventType.Customer, custEvents);
eventOccurences.Add(RandomEvent.EventType.Employee, empEvents);
eventOccurences.Add(RandomEvent.EventType.Maintenance, maintEvents);
eventOccurences.Add(RandomEvent.EventType.Safety, safEvents);
eventOccurences.Add(RandomEvent.EventType.Security, secEvents);
eventOccurences.Add(RandomEvent.EventType.Political, polEvents);
/*
//generates the given number of events for each type
foreach (KeyValuePair<RandomEvent.EventType, double> v in eventOccurences)
{
int k = (int)v.Value;
List<RandomEvent> list = RandomEvents.GetEvents(v.Key, k, airline);
foreach (RandomEvent e in list)
{
airline.EventLog.Add(e);
}
}
*/
}