コード例 #1
0
 //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);
     }
 }
コード例 #2
0
        public PageFinances(Airline airline)
        {
            //binds and initializes page
            InitializeComponent();
            this.Language = XmlLanguage.GetLanguage(new CultureInfo(AppSettings.GetInstance().getLanguage().CultureInfo, true).IetfLanguageTag);
            SetLocalDefaults(airline);

            // binds top level budgets and buttons
            Button btnApply = (Button)this.FindName("buttonApply");
            Button btnReset = (Button)this.FindName("buttonReset");
            Button btn1Year = (Button)this.FindName("_1year");
            Button btn5Year = (Button)this.FindName("_5year");
            Button btn10Year = (Button)this.FindName("_10year");

            Viewbox panelContent = (Viewbox)this.FindName("panelViewbox");
            setMaximums(airline);
            BudgetHelpers.SetDefaults(airline);
            SetLocalDefaults(airline);
            SetOverviewPanel(airline, 1);

            //event handlers
            btnApply.Click += new RoutedEventHandler(btnApply_Click);
            btnReset.Click += new RoutedEventHandler(btnReset_Click);
            btn1Year.Click += new RoutedEventHandler(btn1Year_Click);
            btn5Year.Click += new RoutedEventHandler(btn5Year_Click);
            btn10Year.Click += new RoutedEventHandler(btn10Year_Click);

            this.RemoveLogicalChild(panelContent);

            base.setContent(panelContent);

            showPage(this);
        }
コード例 #3
0
 public AirlineAirportFacility(Airline airline, Airport airport, AirportFacility facility, DateTime date)
 {
     this.Airline = airline;
     this.Facility = facility;
     this.FinishedDate = date;
     this.Airport = airport;
 }
コード例 #4
0
        public static object ShowPopUp(Airline airline)
        {
            PopUpWindow window = new PopUpCodeshareAgreement(airline);
            window.ShowDialog();

            return window.Selected;
        }
コード例 #5
0
        public static object ShowPopUp(Airline airline,Airport airport)
        {
            PopUpWindow window = new PopUpAddCooperation(airline,airport);
            window.ShowDialog();

            return window.Selected;
        }
コード例 #6
0
 public AirlineStartData(Airline airline)
 {
     this.Airline = airline;
     this.Routes = new List<StartDataRoute>();
     this.Airliners = new List<StartDataAirliners>();
     this.OriginRoutes = new List<StartDataRoutes>();
 }
コード例 #7
0
        public PageAirlinePilots(Airline airline)
        {
            this.Airline = airline;

            InitializeComponent();

            StackPanel panelPilots = new StackPanel();
            panelPilots.Margin = new Thickness(0, 10, 50, 0);

            TextBlock txtHeader = new TextBlock();
            txtHeader.Uid = "1001";
            txtHeader.Margin = new Thickness(0, 0, 0, 0);
            txtHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            txtHeader.SetResourceReference(TextBlock.BackgroundProperty, "HeaderBackgroundBrush2");
            txtHeader.FontWeight = FontWeights.Bold;
            txtHeader.Text = Translator.GetInstance().GetString("PageAirlinePilots", txtHeader.Uid);
            panelPilots.Children.Add(txtHeader);

            ContentControl ccHeader = new ContentControl();
            ccHeader.ContentTemplate = this.Resources["PilotsHeader"] as DataTemplate;
            ccHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            panelPilots.Children.Add(ccHeader);

            lbPilots = new ListBox();
            lbPilots.ItemContainerStyleSelector = new ListBoxItemStyleSelector();
            lbPilots.SetResourceReference(ListBox.ItemTemplateProperty, "QuickInfoItem");
            lbPilots.ItemTemplate = this.Resources["PilotItem"] as DataTemplate;
            lbPilots.MaxHeight = GraphicsHelpers.GetContentHeight() / 2;
            panelPilots.Children.Add(lbPilots);

            this.Content = panelPilots;

            showPilots();
        }
コード例 #8
0
        //adds the value for a statistics type to an airline for a year
        public void addStatisticsValue(int year, Airline airline, StatisticsType type, int value)
        {
            AirportStatisticsValue item = this.Stats.Find(s => s.Year == year && s.Airline == airline && s.Stat.Shortname == type.Shortname);

            if (item == null)
                this.Stats.Add(new AirportStatisticsValue(airline, year, type, value));
            else
                item.Value += value;
        }
コード例 #9
0
 //returns the value for a statistics type for an airline for a year
 public double getStatisticsValue(int year, Airline airline, StatisticsType type)
 {
     if (this.Stats.ContainsKey(year))
     {
         AirportStatisticsValue value = this.Stats[year].Find(asv => asv.Airline == airline && asv.Stat == type);
         if (value != null) return value.Value;
     }
     return 0;
 }
コード例 #10
0
        public Terminal(Airport airport, Airline airline,string name, int gates, DateTime deliveryDate)
        {
            this.Airport = airport;
            this.Airline = airline;
            this.Name = name;
            this.DeliveryDate = new DateTime(deliveryDate.Year, deliveryDate.Month, deliveryDate.Day);

            this.Gates = new Gates(gates, this.DeliveryDate);
        }
コード例 #11
0
        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
0
ファイル: EventsHelpers.cs プロジェクト: tehknox/tap-desktop
        //generates x number of events for each event type for the current year. Should be called only from OnNewYear
        public static void GenerateEvents(Airline airline)
        {
            Random rnd = new Random();
            Dictionary<RandomEvent.EventType, double> eventOccurences = new Dictionary<TheAirline.Model.GeneralModel.RandomEvent.EventType, double>();
            int eFreq = 0;
            double secEvents;
            double safEvents;
            double polEvents;
            double maintEvents;
            double custEvents;
            double empEvents;

            //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 = (int)rnd.Next(1, 6);
            }
            else if (totalRating < 200)
            {
                eFreq = (int)rnd.Next(4, 10);
            }
            else if (totalRating < 100)
            {
                eFreq = (int)rnd.Next(8, 16);
            }
            else eFreq = (int)rnd.Next(0, 4);

            //gets the event proportions and multiplies them by total # events to get events per type
            List<double> probs = GetEventProportions(airline);
            custEvents = (int)eFreq * probs[0];
            empEvents = (int)eFreq * probs[1];
            secEvents = (int)eFreq * probs[2];
            safEvents = (int)eFreq * probs[3];
            maintEvents = (int)eFreq * probs[4];
            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);
                }
            }
            */
        }
コード例 #13
0
 //adds happiness to an airline
 public static void AddPassengerHappiness(Airline airline)
 {
     lock (HappinessPercent)
     {
         if (HappinessPercent.ContainsKey(airline))
             HappinessPercent[airline] += 1;
         else
             HappinessPercent.Add(airline, 1);
     }
 }
コード例 #14
0
 //sets the value for a statistics type for an airline for a year
 public void setStatisticsValue(int year, Airline airline, StatisticsType type, int value)
 {
     if (!(this.Stats.ContainsKey(year)))
         this.Stats.Add(year, new List<AirportStatisticsValue>());
     AirportStatisticsValue statValue = this.Stats[year].Find(asv => asv.Airline == airline && asv.Stat == type);
     if (statValue != null)
         statValue.Value = value;
     else
         this.Stats[year].Add(new AirportStatisticsValue(airline, type, value));
 }
コード例 #15
0
        public static long GetAvgSubValue(Airline airline)
        {
            if (airline.Subsidiaries.Count() == 0)
            { return 0; }

            else
            {
                return GetTotalSubValues(GameObject.GetInstance().HumanAirline) / GameObject.GetInstance().HumanAirline.Subsidiaries.Count();
            }
        }
コード例 #16
0
        public PageAirlineInsurances(Airline airline)
        {
            this.Airline = airline;

            InitializeComponent();

            this.DataContext = this.Airline;

            clearValues();
        }
コード例 #17
0
ファイル: AirlineHelpers.cs プロジェクト: tehknox/tap-desktop
 //adds an invoice to an airline
 public static void AddAirlineInvoice(Airline airline, DateTime date, Invoice.InvoiceType type, double amount)
 {
     if (airline.IsHuman && GameObject.GetInstance().HumanAirline == airline)
     {
         GameObject.GetInstance().addHumanMoney(amount);
         GameObject.GetInstance().HumanAirline.addInvoice(new Invoice(date, type, amount), false);
     }
     else
         airline.addInvoice(new Invoice(date, type, amount));
 }
コード例 #18
0
ファイル: AirlineHelpers.cs プロジェクト: tehknox/tap-desktop
        public static FleetAirliner BuyAirliner(Airline airline, Airliner airliner, Airport airport, double discount)
        {
            FleetAirliner fAirliner = AddAirliner(airline, airliner, airport,false);

            double price = airliner.getPrice() * ((100 - discount) / 100);

            AddAirlineInvoice(airline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Purchases, -price);

            return fAirliner;

        }
コード例 #19
0
ファイル: AirlineHelpers.cs プロジェクト: rhgtvcx/tap-desktop
        public static FleetAirliner AddAirliner(Airline airline, Airliner airliner, Airport airport)
        {

            if (Countries.GetCountryFromTailNumber(airliner.TailNumber).Name != airline.Profile.Country.Name)
                airliner.TailNumber = airline.Profile.Country.TailNumbers.getNextTailNumber();

            FleetAirliner fAirliner = new FleetAirliner(FleetAirliner.PurchasedType.Bought, GameObject.GetInstance().GameTime, airline, airliner, airport);

            airline.addAirliner(fAirliner);

            return fAirliner;
        }
コード例 #20
0
 public AirportContract(Airline airline, Airport airport, DateTime date, int numberOfGates, int length, double yearlyPayment,Boolean payFull = false, Boolean isExclusiveDeal = false, Terminal terminal = null)
 {
     this.PayFull = payFull;
     this.Airline = airline;
     this.Airport = airport;
     this.ContractDate = date;
     this.Length = length;
     this.YearlyPayment = yearlyPayment;
     this.NumberOfGates = numberOfGates;
     this.IsExclusiveDeal = isExclusiveDeal;
     this.Terminal = terminal;
     this.ExpireDate = this.ContractDate.AddYears(this.Length);
 }
コード例 #21
0
        public PageAirlineSubsidiaries(Airline airline, StandardPage parent)
        {
            this.PageParent = parent;
            this.Airline = airline;

            InitializeComponent();

            StackPanel panelSubsidiaries = new StackPanel();
            panelSubsidiaries.Margin = new Thickness(0, 10, 50, 0);

            TextBlock txtSubsidiariesHeader = new TextBlock();
            txtSubsidiariesHeader.Uid = "1001";
            txtSubsidiariesHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            txtSubsidiariesHeader.SetResourceReference(TextBlock.BackgroundProperty, "HeaderBackgroundBrush2");
            txtSubsidiariesHeader.FontWeight = FontWeights.Bold;
            txtSubsidiariesHeader.Text = Translator.GetInstance().GetString("PageAirlineSubsidiaries", txtSubsidiariesHeader.Uid);

            panelSubsidiaries.Children.Add(txtSubsidiariesHeader);

            lbSubsidiaryAirline = new ListBox();
            lbSubsidiaryAirline.ItemTemplate = this.Resources["SubsidiaryItem"] as DataTemplate;
            lbSubsidiaryAirline.ItemContainerStyleSelector = new ListBoxItemStyleSelector();
            lbSubsidiaryAirline.MaxHeight = GraphicsHelpers.GetContentHeight() - 100;

            showSubsidiaries();

            panelSubsidiaries.Children.Add(lbSubsidiaryAirline);

            WrapPanel panelButtons = new WrapPanel();
            panelButtons.Visibility = this.Airline.IsHuman && !(this.Airline is SubsidiaryAirline) && this.Airline.Money>100000 ? Visibility.Visible : Visibility.Collapsed;
            panelButtons.Margin = new Thickness(0,5,0,0);

            panelSubsidiaries.Children.Add(panelButtons);

            Button btnCreate = new Button();
            btnCreate.Uid = "200";
            btnCreate.SetResourceReference(Button.StyleProperty, "RoundedButton");
            btnCreate.Height = Double.NaN;
            btnCreate.Width = Double.NaN;
            btnCreate.Content = Translator.GetInstance().GetString("PageAirlineSubsidiaries",btnCreate.Uid);
            btnCreate.Click+=new RoutedEventHandler(btnCreate_Click);
            btnCreate.SetResourceReference(Button.BackgroundProperty, "ButtonBrush");

            panelButtons.Children.Add(btnCreate);

            if (this.Airline.IsHuman)
                panelSubsidiaries.Children.Add(createTransferFundsPanel());

            this.Content = panelSubsidiaries;
        }
コード例 #22
0
        public PageAirlineFleet(Airline airline)
        {
            InitializeComponent();

            this.Airline = airline;

            foreach (FleetAirliner fa in this.Airline.DeliveredFleet)
                _FleetDelivered.Add(fa);

            StackPanel panelFleet = new StackPanel();

            WrapPanel panelMenuButtons = new WrapPanel();
            panelFleet.Children.Add(panelMenuButtons);

            ucSelectButton sbOverview = new ucSelectButton();
            sbOverview.Uid = "1001";
            sbOverview.Content = Translator.GetInstance().GetString("PageAirlineFleet", sbOverview.Uid);
            sbOverview.Click += new RoutedEventHandler(sbOverview_Click);
            sbOverview.IsSelected = true;
            panelMenuButtons.Children.Add(sbOverview);

            ucSelectButton sbDetailed = new ucSelectButton();
            sbDetailed.Uid = "1002";
            sbDetailed.Content = Translator.GetInstance().GetString("PageAirlineFleet", sbDetailed.Uid);
            sbDetailed.Click += new RoutedEventHandler(sbDetailed_Click);
            panelMenuButtons.Children.Add(sbDetailed);

            ucSelectButton sbOrdered = new ucSelectButton();
            sbOrdered.Uid = "1009";
            sbOrdered.Content = Translator.GetInstance().GetString("PageAirlineFleet", sbOrdered.Uid);
            sbOrdered.Click += new RoutedEventHandler(sbOrdered_Click);
            panelMenuButtons.Children.Add(sbOrdered);

            panelOverview = createOverviewPanel();

            panelDetailed = createDetailedPanel();
            panelDetailed.Visibility = System.Windows.Visibility.Collapsed;
            panelDetailed.ToolTip = UICreator.CreateToolTip("View detailed information for this aircraft");

            panelOrdered = createOrderedPanel();
            panelOrdered.Visibility = System.Windows.Visibility.Collapsed;
            panelOrdered.ToolTip = UICreator.CreateToolTip("View ordered airliners");

            panelFleet.Children.Add(panelOverview);
            panelFleet.Children.Add(panelDetailed);
            panelFleet.Children.Add(panelOrdered);

            this.Content = panelFleet;
        }
コード例 #23
0
        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();
        }
コード例 #24
0
ファイル: AirlineHelpers.cs プロジェクト: tehknox/tap-desktop
        //creates an airliner for an airline
        public static FleetAirliner CreateAirliner(Airline airline, AirlinerType type)
        {
            Guid id = Guid.NewGuid();

            Airliner airliner = new Airliner(id.ToString(), type, airline.Profile.Country.TailNumbers.getNextTailNumber(), GameObject.GetInstance().GameTime);
            Airliners.AddAirliner(airliner);

            FleetAirliner fAirliner = new FleetAirliner(FleetAirliner.PurchasedType.Bought, GameObject.GetInstance().GameTime, airline, airliner, airline.Airports[0]);

            airliner.clearAirlinerClasses();

            AirlinerHelpers.CreateAirlinerClasses(airliner);

            return fAirliner;

        }
コード例 #25
0
 public Scenario(string name,string description, Airline airline, Airport homebase, int startyear, int endyear, long startcash,DifficultyLevel difficulty)
 {
     this.Name = name;
     this.Airline = airline;
     this.Homebase = homebase;
     this.StartYear = startyear;
     this.StartCash = startcash;
     this.Description = description;
     this.Difficulty = difficulty;
     this.EndYear = endyear;
     this.OpponentAirlines = new List<ScenarioAirline>();
     this.Destinations = new List<Airport>();
     this.Fleet = new Dictionary<AirlinerType, int>();
     this.Routes = new List<ScenarioAirlineRoute>();
     this.Failures = new List<ScenarioFailure>();
     this.PassengerDemands = new List<ScenarioPassengerDemand>();
 }
コード例 #26
0
        public AirlinesMVVM(Airline airline)
        {
            this.Airline = airline;
            this.Profit = this.Airline.getProfit();
            this.AvgFleetAge = this.Airline.getAverageFleetAge();

            StatisticsType passengersType = StatisticsTypes.GetStatisticsType("Passengers");
            StatisticsType passengersAvgType = StatisticsTypes.GetStatisticsType("Passengers%");
            StatisticsType arrivalsType = StatisticsTypes.GetStatisticsType("Arrivals");
            StatisticsType cargoType = StatisticsTypes.GetStatisticsType("Cargo");
            StatisticsType cargoAvgType = StatisticsTypes.GetStatisticsType("Cargo%");

            this.Passengers = this.Airline.Statistics.getStatisticsValue(GameObject.GetInstance().GameTime.Year, passengersType);
            this.PassengersPerFlight = this.Airline.Statistics.getStatisticsValue(GameObject.GetInstance().GameTime.Year, passengersAvgType);
            this.Flights = this.Airline.Statistics.getStatisticsValue(GameObject.GetInstance().GameTime.Year, arrivalsType);
            this.Cargo = this.Airline.Statistics.getStatisticsValue(GameObject.GetInstance().GameTime.Year, cargoType);
            this.CargoPerFlight = this.Airline.Statistics.getStatisticsValue(GameObject.GetInstance().GameTime.Year, cargoAvgType);
        }
コード例 #27
0
ファイル: AirlineHelpers.cs プロジェクト: rhgtvcx/tap-desktop
        //orders a number of airliners for an airline
        public static void OrderAirliners(Airline airline, List<AirlinerOrder> orders, Airport airport, DateTime deliveryDate, double discount)
        {
            Guid id = Guid.NewGuid();

            foreach (AirlinerOrder order in orders)
            {
                for (int i = 0; i < order.Amount; i++)
                {
                    Airliner airliner = new Airliner(id.ToString(), order.Type, airline.Profile.Country.TailNumbers.getNextTailNumber(), deliveryDate);
                    Airliners.AddAirliner(airliner);

                    FleetAirliner.PurchasedType pType = FleetAirliner.PurchasedType.Bought;
                    airline.addAirliner(pType, airliner, airport);

                    airliner.clearAirlinerClasses();

                    foreach (AirlinerClass aClass in order.Classes)
                    {
                        AirlinerClass tClass = new AirlinerClass(aClass.Type, aClass.SeatingCapacity);
                        tClass.RegularSeatingCapacity = aClass.RegularSeatingCapacity;

                        foreach (AirlinerFacility facility in aClass.getFacilities())
                            tClass.setFacility(airline, facility);

                        airliner.addAirlinerClass(tClass);
                    }


                }



            }

            int totalAmount = orders.Sum(o => o.Amount);
            double price = orders.Sum(o => o.Type.Price * o.Amount);

            double totalPrice = price * ((1 - GeneralHelpers.GetAirlinerOrderDiscount(totalAmount))) * ((100 - discount) / 100);

            AirlineHelpers.AddAirlineInvoice(airline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Purchases, -totalPrice);
        }
コード例 #28
0
ファイル: DayTurnHelpers.cs プロジェクト: rhgtvcx/tap-desktop
        //simulates all flight for an airline for the current day
        public static void SimulateAirlineFlights(Airline airline)
        {
            Stopwatch sw = new Stopwatch();
            sw.Start();
            //foreach (FleetAirliner airliner in airline.Fleet.FindAll(f => f.Status != FleetAirliner.AirlinerStatus.Stopped))
            Parallel.ForEach(airline.Fleet.FindAll(f => f.Status != FleetAirliner.AirlinerStatus.Stopped), airliner =>
            {

                if (airliner.CurrentFlight != null)
                {

                    //Boolean stopoverRoute = airliner.CurrentFlight.Entry.MainEntry != null;

                    SimulateLanding(airliner);
                }

                var dayEntries = airliner.Routes.SelectMany(r => r.TimeTable.getEntries(GameObject.GetInstance().GameTime.DayOfWeek)).Where(e => e.Airliner == airliner).OrderBy(e => e.Time);

                if (GameObject.GetInstance().GameTime > airliner.GroundedToDate)
                {

                    foreach (RouteTimeTableEntry entry in dayEntries)
                    {

                        if (entry.TimeTable.Route.HasStopovers)
                            SimulateStopoverFlight(entry);
                        else
                            SimulateFlight(entry);

                    }
                    CheckForService(airliner);

                }

            });

            sw.Stop();
        }
コード例 #29
0
ファイル: FleetAirliner.cs プロジェクト: rhgtvcx/tap-desktop
        public FleetAirliner(PurchasedType purchased, DateTime purchasedDate, Airline airline, Airliner airliner, Airport homebase)
        {
            this.Airliner = airliner;
            this.Purchased = purchased;
            this.PurchasedDate = purchasedDate;
            this.Airliner.Airline = airline;
            this.Homebase = homebase;
            this.Name = airliner.TailNumber;
            this.Statistics = new AirlinerStatistics(this);
            this.LastCMaintenance = this.Airliner.BuiltDate;
            this.LastAMaintenance = this.Airliner.BuiltDate;
            this.LastBMaintenance = this.Airliner.BuiltDate;
            this.LastDMaintenance = this.Airliner.BuiltDate;
            this.Status = AirlinerStatus.Stopped;
            this.MaintRoutes = new List<RouteModel.Route>();

            this.CurrentPosition = this.Homebase;//new GeoCoordinate(this.Homebase.Profile.Coordinates.Latitude,this.Homebase.Profile.Coordinates.Longitude);

            this.Routes = new List<Route>();
            this.Pilots = new List<Pilot>();
            this.InsurancePolicies = new List<AirlinerInsurance>();
            this.MaintenanceHistory = new Dictionary<Invoice, string>();
        }
コード例 #30
0
        public PageAirline(Airline airline)
        {
            InitializeComponent();

            this.Uid = "1000";
            this.Title = Translator.GetInstance().GetString("PageAirline", this.Uid);

            this.Airline = airline;

            StackPanel airportPanel = new StackPanel();
            airportPanel.Margin = new Thickness(10, 0, 10, 0);

            airportPanel.Children.Add(createQuickInfoPanel());

            if (this.Airline.Contract != null)
                airportPanel.Children.Add(createManufacturerContractPanel());

            if (this.Airline.IsHuman)
                airportPanel.Children.Add(createHumanControllingPanel());

            if (GameObject.GetInstance().HumanAirline == GameObject.GetInstance().MainAirline && !this.Airline.IsHuman && !this.Airline.IsSubsidiary)
                airportPanel.Children.Add(createPurchaseAirlinePanel());

            StandardContentPanel panelContent = new StandardContentPanel();

            panelContent.setContentPage(airportPanel, StandardContentPanel.ContentLocation.Left);

            StackPanel panelSideMenu = new PanelAirline(this.Airline, this);

            panelContent.setContentPage(panelSideMenu, StandardContentPanel.ContentLocation.Right);

            base.setContent(panelContent);

            base.setHeaderContent(string.Format("{0} - {1}", this.Title, this.Airline.Profile.Name));

            showPage(this);
        }
コード例 #31
0
ファイル: Airline.cs プロジェクト: travelmate37/tap-desktop
 //removes an airline from the list
 public static void RemoveAirline(Airline airline)
 {
     airlines.Remove(airline);
 }
コード例 #32
0
 public CodeshareAgreement(Airline airline1, Airline airline2, CodeshareType type)
 {
     this.Airline1 = airline1;
     this.Airline2 = airline2;
     this.Type     = type;
 }
コード例 #33
0
ファイル: Airline.cs プロジェクト: travelmate37/tap-desktop
 //adds an airline to the collection
 public static void AddAirline(Airline airline)
 {
     airlines.Add(airline);
 }
コード例 #34
0
 public AllianceMember(Airline airline, DateTime joinedDate)
 {
     this.Airline    = airline;
     this.JoinedDate = joinedDate;
     this.ExitedDate = new DateTime(2199, 1, 1);
 }
コード例 #35
0
 public AirlineShare(Airline airline, double price)
 {
     this.Price   = price;
     this.Airline = airline;
 }
コード例 #36
0
ファイル: Airline.cs プロジェクト: travelmate37/tap-desktop
 //returns if the list of airlines contains an airline
 public static Boolean ContainsAirline(Airline airline)
 {
     return(airlines.Contains(airline));
 }
コード例 #37
0
 //returns the start data for an airline
 public static AirlineStartData GetAirlineStartData(Airline airline)
 {
     return(startData.Find(s => s.Airline == airline));
 }