本文整理汇总了C#中TheAirline.Models.Airlines.Airline类的典型用法代码示例。如果您正苦于以下问题:C# Airline类的具体用法?C# Airline怎么用?C# Airline使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Airline类属于TheAirline.Models.Airlines命名空间,在下文中一共展示了Airline类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ShowPopUp
public static object ShowPopUp(Airline airline)
{
PopUpWindow window = new PopUpCodeshareAgreement(airline);
window.ShowDialog();
return window.Selected;
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:7,代码来源:PopUpCodeshareAgreement.xaml.cs
示例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>();
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:25,代码来源:Scenario.cs
示例3: AirlineStartData
public AirlineStartData(Airline airline)
{
Airline = airline;
Routes = new List<StartDataRoute>();
Airliners = new List<StartDataAirliners>();
OriginRoutes = new List<StartDataRoutes>();
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:7,代码来源:AirlineStartData.cs
示例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();
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:31,代码来源:PopUpCreateSubsidiary.xaml.cs
示例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);
}
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:8,代码来源:PassengerHelpers.cs
示例6: ShowPopUp
public static object ShowPopUp(Airline airline,Airport airport)
{
PopUpWindow window = new PopUpAddCooperation(airline,airport);
window.ShowDialog();
return window.Selected;
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:7,代码来源:PopUpAddCooperation.xaml.cs
示例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;
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:28,代码来源:AirportContract.cs
示例8: AirlineAirportFacility
public AirlineAirportFacility(Airline airline, Airport airport, AirportFacility facility, DateTime date)
{
Airline = airline;
Facility = facility;
FinishedDate = date;
Airport = airport;
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:7,代码来源:AirlineAirportFacility.cs
示例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;
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:34,代码来源:FleetAirliner.cs
示例10: SpecialContract
public SpecialContract(SpecialContractType type, DateTime date, Airline airline)
{
Airline = airline;
Type = type;
Date = date;
IsOk = true;
Routes = new List<Route>();
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:8,代码来源:SpecialContract.cs
示例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();
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:9,代码来源:PopUpCodeshareAgreement.xaml.cs
示例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);
}
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:10,代码来源:Gate.cs
示例13: GetAvgSubValue
public static long GetAvgSubValue(Airline airline)
{
if (!airline.Subsidiaries.Any())
{
return 0;
}
return GetTotalSubValues(GameObject.GetInstance().HumanAirline)
/GameObject.GetInstance().HumanAirline.Subsidiaries.Count();
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:10,代码来源:BudgetHelpers.cs
示例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);
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:10,代码来源:Terminal.cs
示例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);
}
}
*/
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:54,代码来源:EventsHelpers.cs
示例16: GetStatisticsValue
//returns the value for a statistics type for an airline for a year
public double GetStatisticsValue(int year, Airline airline, StatisticsType type)
{
AirportStatisticsValue item =
Stats.Find(s => s.Year == year && s.Airline == airline && s.Stat.Shortname == type.Shortname);
if (item == null)
{
return 0;
}
return item.Value;
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:12,代码来源:AirportStatistics.cs
示例17: AddPassengerHappiness
public static void AddPassengerHappiness(Airline airline)
{
/*
lock (HappinessPercent)
{
if (HappinessPercent.ContainsKey(airline))
HappinessPercent[airline] += 1;
else
HappinessPercent.Add(airline, 1);
}
* */
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:12,代码来源:PassengerHelpers.cs
示例18: AddStatisticsValue
public void AddStatisticsValue(int year, Airline airline, StatisticsType type, int value)
{
AirportStatisticsValue item =
Stats.Find(s => s.Year == year && s.Airline == airline && s.Stat.Shortname == type.Shortname);
if (item == null)
{
Stats.Add(new AirportStatisticsValue(airline, year, type, value));
}
else
{
item.Value += value;
}
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:14,代码来源:AirportStatistics.cs
示例19: PopUpAddCooperation
public PopUpAddCooperation(Airline airline, Airport airport)
{
this.Types = new List<CooperationType>();
this.Airline = airline;
this.Airport = airport;
foreach (CooperationType type in CooperationTypes.GetCooperationTypes())
{
if (!this.Airport.Cooperations.Exists(c => c.Airline == airline && c.Type == type) && type.AirportSizeRequired<=this.Airport.Profile.Size)
this.Types.Add(type);
}
InitializeComponent();
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:15,代码来源:PopUpAddCooperation.xaml.cs
示例20: GetEmployeeHappiness
//returns all airline luxury levels
//calculates employee happiness as a function of wages, discounts, and free pilots (relative to workload)
public static double GetEmployeeHappiness(Airline airline)
{
Dictionary<Airline, double> wages = StatisticsHelpers.GetEmployeeWages();
Dictionary<Airline, double> discounts = StatisticsHelpers.GetEmployeeDiscounts();
Dictionary<Airline, double> unassignedPilots = StatisticsHelpers.GetUnassignedPilots();
IDictionary<Airline, double> scaleWages = StatisticsHelpers.GetRatingScale(wages);
IDictionary<Airline, double> scaleDiscounts = StatisticsHelpers.GetRatingScale(discounts);
IDictionary<Airline, double> scaleUPilots = StatisticsHelpers.GetRatingScale(unassignedPilots);
double airlineWages = scaleWages[airline];
double airlineDiscounts = scaleDiscounts[airline];
double airlineUnassignedPilots = scaleUPilots[airline];
return (airlineWages*0.7) + (airlineUnassignedPilots*0.2) + (airlineDiscounts*0.1);
}
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:17,代码来源:Ratings.cs
注:本文中的TheAirline.Models.Airlines.Airline类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论