本文整理汇总了C#中TheAirline.Model.AirportModel.Airport类的典型用法代码示例。如果您正苦于以下问题:C# Airport类的具体用法?C# Airport怎么用?C# Airport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Airport类属于TheAirline.Model.AirportModel命名空间,在下文中一共展示了Airport类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PageAirportDistances
public PageAirportDistances(Airport airport)
{
this.Airport = airport;
InitializeComponent();
StackPanel panelAirports = new StackPanel();
panelAirports.Margin = new Thickness(0, 10, 50, 0);
ContentControl lblHeader = new ContentControl();
lblHeader.ContentTemplate = this.Resources["AirportsHeader"] as DataTemplate;
panelAirports.Children.Add(lblHeader);
ListBox lbAirport = new ListBox();
lbAirport.ItemContainerStyleSelector = new ListBoxItemStyleSelector();
lbAirport.ItemTemplate = this.Resources["AirportItem"] as DataTemplate;
lbAirport.MaxHeight = GraphicsHelpers.GetContentHeight() - 100;
var airports = GameObject.GetInstance().HumanAirline.Airports.FindAll(a=>a!=this.Airport).OrderBy(a=>MathHelpers.GetDistance(a,this.Airport));
foreach (Airport destAirport in airports )
lbAirport.Items.Add(new KeyValuePair<Airport,Airport>(this.Airport,destAirport));
panelAirports.Children.Add(lbAirport);
this.Content = panelAirports;
}
示例2: AirlineAirportFacility
public AirlineAirportFacility(Airline airline, Airport airport, AirportFacility facility, DateTime date)
{
this.Airline = airline;
this.Facility = facility;
this.FinishedDate = date;
this.Airport = airport;
}
示例3: ScenarioPassengerDemand
public ScenarioPassengerDemand(double factor, DateTime enddate, Country country, Airport airport)
{
this.Country = country;
this.Factor = factor;
this.EndDate = enddate;
this.Airport = airport;
}
示例4: AirportStatics
public AirportStatics(Airport airport)
{
this.AirportDistances = new Dictionary<Airport, double>();
this.PassengerDemand = new List<DestinationDemand>();
this.CargoDemand = new List<DestinationDemand>();
this.Airport = airport;
}
示例5: PageAirport
public PageAirport(Airport airport)
{
InitializeComponent();
this.Uid = "1000";
this.Title = Translator.GetInstance().GetString("PageAirport", this.Uid);
this.Airport = airport;
StackPanel airportPanel = new StackPanel();
airportPanel.Margin = new Thickness(10, 0, 10, 0);
airportPanel.Children.Add(createQuickInfoPanel());
airportPanel.Children.Add(createPassengersPanel());
//airportPanel.Children.Add(createFlightsPanel());
//airportPanel.Children.Add(createArrivalsPanel());
//airportPanel.Children.Add(createDeparturesPanel());
StandardContentPanel panelContent = new StandardContentPanel();
panelContent.setContentPage(airportPanel, StandardContentPanel.ContentLocation.Left);
StackPanel panelSideMenu = new PanelAirport(this.Airport);
panelContent.setContentPage(panelSideMenu, StandardContentPanel.ContentLocation.Right);
base.setContent(panelContent);
base.setHeaderContent(this.Title + " - " + this.Airport.Profile.Name);
showPage(this);
}
示例6: ScenarioAirlineRoute
public ScenarioAirlineRoute(Airport destination1, Airport destination2, AirlinerType airlinertype, int quantity)
{
this.Destination1 = destination1;
this.Destination2 = destination2;
this.AirlinerType = airlinertype;
this.Quantity = quantity;
}
示例7: ShowPopUp
public static object ShowPopUp(Airline airline,Airport airport)
{
PopUpWindow window = new PopUpAddCooperation(airline,airport);
window.ShowDialog();
return window.Selected;
}
示例8: PopUpTerminal
//for creating a new terminal
public PopUpTerminal(Airport airport)
{
this.Airport = airport;
InitializeComponent();
this.Uid = "1000";
this.Title = Translator.GetInstance().GetString("PopUpTerminal", this.Uid);
this.Width = 400;
this.Height = 200;
this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
StackPanel mainPanel = new StackPanel();
mainPanel.Margin = new Thickness(10, 10, 10, 10);
ListBox lbTerminal = new ListBox();
lbTerminal.ItemContainerStyleSelector = new ListBoxItemStyleSelector();
lbTerminal.SetResourceReference(ListBox.ItemTemplateProperty, "QuickInfoItem");
mainPanel.Children.Add(lbTerminal);
// chs 28-01-12: added for name of terminal
txtName = new TextBox();
txtName.Background = Brushes.Transparent;
txtName.BorderBrush = Brushes.Black;
txtName.IsEnabled = this.Terminal == null;
txtName.Width = 100;
txtName.Text = this.Terminal == null ? "Terminal" : this.Terminal.Name;
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal","1007"),txtName));
// chs 11-09-11: added numericupdown for selecting number of gates
nudGates = new ucNumericUpDown();
nudGates.Height = 30;
nudGates.MaxValue = 50;
nudGates.ValueChanged+=new RoutedPropertyChangedEventHandler<decimal>(nudGates_ValueChanged);
nudGates.MinValue = 1;
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal", "1001"), nudGates));
/*
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal", "1002"), UICreator.CreateTextBlock(string.Format("{0:C}",this.Airport.getTerminalPrice()))));
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal", "1003"), UICreator.CreateTextBlock(string.Format("{0:C}",this.Airport.getTerminalGatePrice()))));
*/
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal", "1002"), UICreator.CreateTextBlock(new ValueCurrencyConverter().Convert(this.Airport.getTerminalPrice()).ToString())));
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal", "1003"), UICreator.CreateTextBlock(new ValueCurrencyConverter().Convert(this.Airport.getTerminalGatePrice()).ToString())));
txtDaysToCreate = UICreator.CreateTextBlock("0 days");
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal", "1004"), txtDaysToCreate));
txtTotalPrice = UICreator.CreateTextBlock(new ValueCurrencyConverter().Convert(0).ToString());//UICreator.CreateTextBlock(string.Format("{0:C}", 0));
lbTerminal.Items.Add(new QuickInfoValue(Translator.GetInstance().GetString("PopUpTerminal", "1005"), txtTotalPrice));
mainPanel.Children.Add(createButtonsPanel());
nudGates.Value = 1;
this.Content = mainPanel;
}
示例9: calculateDistance
/// <summary>
/// Calculates the distance from
/// the start airport to all other airports
/// </summary>
/// <param name="start">Startknoten</param>
public void calculateDistance(Airport start)
{
this.Dist[start.Profile.IATACode] = 0;
while (Basis.Count > 0)
{
Airport u = getNodeWithSmallestDistance();
if (u == null)
{
this.Basis.Clear();
}
else
{
foreach (Airport v in getNeighbors(u))
{
double alt = Dist[u.Profile.IATACode] +
getDistanceBetween(u, v);
if (alt < Dist[v.Profile.IATACode])
{
this.Dist[v.Profile.IATACode] = alt;
this.Previous[v.Profile.IATACode] = u;
}
}
this.Basis.Remove(u);
}
}
}
示例10: CombiRoute
//adds a route airliner class to the route
public CombiRoute(string id, Airport destination1, Airport destination2, DateTime startDate, double farePrice, double pricePerUnit)
: base(id, destination1, destination2, startDate,farePrice)
{
this.Type = RouteType.Mixed;
this.PricePerUnit = pricePerUnit;
}
示例11: ShowPopUp
public static object ShowPopUp(Airport airport)
{
PopUpWindow window = new PopUpAirportContract(airport);
window.ShowDialog();
return window.Selected;
}
示例12: addDistance
//adds a distance to the airport
public void addDistance(Airport airport, double distance)
{
lock (this.AirportDistances)
{
if (!this.AirportDistances.ContainsKey(airport))
this.AirportDistances.Add(airport, distance);
}
}
示例13: Alliance
public Alliance(DateTime formationDate, string name, Airport headquarter)
{
this.FormationDate = formationDate;
this.Name = name;
this.Members = new List<AllianceMember>();
this.PendingMembers = new List<PendingAllianceMember>();
this.Headquarter = headquarter;
}
示例14: AirportMVVM
public AirportMVVM(Airport airport)
{
this.Airport = airport;
this.IsHuman = GameObject.GetInstance().HumanAirline.Airports.Contains(this.Airport);
this.NumberOfFreeGates = this.Airport.Terminals.NumberOfFreeGates;
this.NumberOfAirlines = this.Airport.AirlineContracts.Select(c => c.Airline).Distinct().Count();
this.NumberOfRoutes = AirportHelpers.GetAirportRoutes(this.Airport).Count;
}
示例15: PopUpAirportContract
public PopUpAirportContract(Airport airport)
{
this.Airport = airport;
this.DataContext = this.Airport;
InitializeComponent();
}