当前位置: 首页>>代码示例>>C#>>正文


C# AirlinerModel.FleetAirliner类代码示例

本文整理汇总了C#中TheAirline.Model.AirlinerModel.FleetAirliner的典型用法代码示例。如果您正苦于以下问题:C# FleetAirliner类的具体用法?C# FleetAirliner怎么用?C# FleetAirliner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FleetAirliner类属于TheAirline.Model.AirlinerModel命名空间,在下文中一共展示了FleetAirliner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowPopUp

        public static object ShowPopUp(FleetAirliner airliner)
        {
            PopUpWindow window = new PopUpAutogenerateRoute(airliner);
            window.ShowDialog();

            return window.Selected;
        }
开发者ID:pedromorgan,项目名称:theairlineproject-cs,代码行数:7,代码来源:PopUpAutogenerateRoute.xaml.cs

示例2: ShowPopUp

        public static object ShowPopUp(FleetAirliner airliner)
        {
            PopUpWindow window = new PopUpHomeBase(airliner);
            window.ShowDialog();

            return window.Selected == null ? null : window.Selected;
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:7,代码来源:PopUpHomeBase.cs

示例3: PageAirlinerAdvancedRoute

        public PageAirlinerAdvancedRoute(FleetAirliner airliner, PopUpAirlinerAutoRoutes parent, OnRouteChanged routeChanged)
        {
            this.ParentPage = parent;
            this.Airliner = airliner;
            this.RouteChanged += routeChanged;

            InitializeComponent();

            StackPanel panelMain = new StackPanel();

            panelMain.Children.Add(createNewEntryPanel());

            WrapPanel panelFlightTime = new WrapPanel();

            txtStopovers = UICreator.CreateTextBlock("");
            txtStopovers.Visibility = System.Windows.Visibility.Collapsed;
            txtStopovers.Margin = new Thickness(0, 0, 10, 0);
            panelFlightTime.Children.Add(txtStopovers);

            txtFlightTime = UICreator.CreateTextBlock("Flight time:");
            panelFlightTime.Children.Add(txtFlightTime);

            panelMain.Children.Add(panelFlightTime);

            this.Content = panelMain;

            cbOrigin.SelectedIndex = 0;
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:28,代码来源:PageAirlinerAdvancedRoute.xaml.cs

示例4: PageFleetAirliner

        public PageFleetAirliner(FleetAirliner airliner)
        {
            this.Airliner = new FleetAirlinerMVVM(airliner);
            this.Loaded += PageFleetAirliner_Loaded;

            InitializeComponent();
        }
开发者ID:tehknox,项目名称:tap-desktop,代码行数:7,代码来源:PageFleetAirliner.xaml.cs

示例5: PageFleetRoute

        public PageFleetRoute(FleetAirliner airliner)
        {
            InitializeComponent();

            this.Airliner = airliner;

            InitializeComponent();

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

            TextBlock txtHeader = new TextBlock();
            txtHeader.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            txtHeader.SetResourceReference(TextBlock.BackgroundProperty, "HeaderBackgroundBrush2");
            txtHeader.FontWeight = FontWeights.Bold;
            txtHeader.Text = Translator.GetInstance().GetString("PageFleetRoute","1000");

            if (this.Airliner.HasRoute)
            {
               panelRoute.Children.Add(createRoutesInfo());
               panelRoute.Children.Add(createFlightInfo());

                if (this.Airliner.Airliner.Airline == GameObject.GetInstance().HumanAirline) panelRoute.Children.Add(createFlightButtons());
            }
            else panelRoute.Children.Add(txtHeader);

            this.Content = panelRoute;
        }
开发者ID:pedromorgan,项目名称:theairlineproject-cs,代码行数:28,代码来源:PageFleetRoute.xaml.cs

示例6: PageFleetMaintenance

        public PageFleetMaintenance(FleetAirliner airliner)
        {
            this.Airliner = airliner;
            InitializeComponent();

            setValues();
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:7,代码来源:PageFleetMaintenance.xaml.cs

示例7: PageFleetAirliner

        public PageFleetAirliner(FleetAirliner airliner)
        {
            InitializeComponent();

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

            this.Airliner = airliner;

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

            airlinerPanel.Children.Add(createQuickInfoPanel());
            airlinerPanel.Children.Add(createAirlinerTypePanel());
            if (this.Airliner.Purchased == FleetAirliner.PurchasedType.Leased && this.Airliner.Airliner.Airline.IsHuman)
                airlinerPanel.Children.Add(createLeasedAirlinerPanel());

            StandardContentPanel panelContent = new StandardContentPanel();

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

            StackPanel panelSideMenu = new PanelFleetAirliner(this.Airliner);

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

            FleetAirliner.AirlinerStatus status = this.Airliner.Status;

            base.setContent(panelContent);

            base.setHeaderContent(this.Title + " - " + this.Airliner.Name);

            showPage(this);
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:33,代码来源:PageFleetAirliner.xaml.cs

示例8: CheckForService

        //checks for an airliner should go to service
        private static void CheckForService(FleetAirliner airliner)
        {
            double serviceCheck = 500000000;
            double sinceLastService = airliner.Airliner.Flown - airliner.Airliner.LastServiceCheck;

            if (sinceLastService > serviceCheck)
                SimulateService(airliner);
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:9,代码来源:DayTurnHelpers.cs

示例9: PageFleetInsurance

        public PageFleetInsurance(FleetAirliner airliner)
        {
            this.DataContext = airliner;
            this.Airliner = airliner;

            InitializeComponent();

            this.DataContext = this.Airliner;
        }
开发者ID:pedromorgan,项目名称:theairlineproject-cs,代码行数:9,代码来源:PageFleetInsurance.xaml.cs

示例10: IsTimeTableValid

        //checks if a time table is valid
        public static Boolean IsTimeTableValid(RouteTimeTable timeTable, FleetAirliner airliner, List<RouteTimeTableEntry> entries, Boolean withSlots = true)
        {
            foreach (RouteTimeTableEntry e in timeTable.Entries)
            {

                if (!IsRouteEntryValid(e, airliner, entries, withSlots))
                    return false;
            }
            return true;
        }
开发者ID:tehknox,项目名称:tap-desktop,代码行数:11,代码来源:TimeTableHelpers.cs

示例11: PageRoutePlanner

        public PageRoutePlanner(FleetAirliner airliner)
        {
            this.ShowSeason = Weather.Season.All_Year;

            this.Airliner = airliner;
            this.Entries = new ObservableCollection<RouteTimeTableEntry>();
            this.Entries.CollectionChanged += Entries_CollectionChanged;

            this.ViewEntries = new ObservableCollection<RouteTimeTableEntry>();
            this.ViewEntries.CollectionChanged += ViewEntries_CollectionChanged;

            this.IsLongRoute = false;

            this.AllRoutes = new List<RoutePlannerItemMVVM>();
            this.Intervals = new ObservableCollection<int>() { 1, 2, 3, 4, 5, 6 };

            this.Routes = new ObservableCollection<Route>();

            Route.RouteType routeType = (Route.RouteType)Enum.Parse(typeof(Route.RouteType),this.Airliner.Airliner.Type.TypeAirliner.ToString(), true); ;

            foreach (Route route in this.Airliner.Airliner.Airline.Routes.Where(r => r.getDistance() <= this.Airliner.Airliner.Type.Range && r.Type == routeType))
                this.Routes.Add(route);

            this.AllRegions = new List<Region>();
            this.AllRegions.Add(Regions.GetRegion("100"));

            var routeRegions = this.Routes.Select(r => r.Destination1.Profile.Country.Region).ToList();
            routeRegions.AddRange(this.Routes.Select(r => r.Destination2.Profile.Country.Region));

            foreach (Region region in routeRegions.Distinct())
                this.AllRegions.Add(region);

            foreach (Route route in this.Airliner.Airliner.Airline.Routes.Where(r=>r.getDistance()<= this.Airliner.Airliner.Type.Range && r.Type == routeType))
                this.AllRoutes.Add(new RoutePlannerItemMVVM(route, this.Airliner.Airliner.Type));

            this.OutboundAirports = new List<Airport>();
            var routeAirports = this.Routes.Select(r => r.Destination1).ToList();
            routeAirports.AddRange(this.Routes.Select(r => r.Destination2));

            foreach (Airport airport in routeAirports.Distinct())
                this.OutboundAirports.Add(airport);

            this.StartTimes = new ObservableCollection<TimeSpan>();

            for (int i = 0; i < 20; i++)
                this.StartTimes.Add(new TimeSpan(6, i * 15, 0));

            this.StopoverMinutes = new List<int>() { 45, 60, 75, 90, 105, 120 };

            setCanTransferSchedule();

            this.Loaded += PageRoutePlanner_Loaded;

            InitializeComponent();
        }
开发者ID:tehknox,项目名称:tap-desktop,代码行数:55,代码来源:PageRoutePlanner.xaml.cs

示例12: PanelFleetAirliner

        public PanelFleetAirliner(FleetAirliner airliner)
        {
            this.Airliner = airliner;

            WrapPanel buttonsPanel = new WrapPanel();

            ucSelectButton sbFacilities = new ucSelectButton();
            sbFacilities.Content = Translator.GetInstance().GetString("PanelFleetAirliner","200");
            sbFacilities.IsSelected = this.Airliner.Airliner.Type.TypeAirliner == AirlinerType.TypeOfAirliner.Passenger;
            sbFacilities.Click += new System.Windows.RoutedEventHandler(sbFacilities_Click);
            sbFacilities.Visibility = this.Airliner.Airliner.Type.TypeAirliner == AirlinerType.TypeOfAirliner.Passenger ? System.Windows.Visibility.Visible : System.Windows.Visibility.Collapsed;
            buttonsPanel.Children.Add(sbFacilities);

            ucSelectButton sbRoute = new ucSelectButton();
            sbRoute.Content = Translator.GetInstance().GetString("PanelFleetAirliner","201");
            sbRoute.IsSelected = this.Airliner.Airliner.Type.TypeAirliner != AirlinerType.TypeOfAirliner.Passenger;
            sbRoute.Click += new System.Windows.RoutedEventHandler(sbRoute_Click);
            buttonsPanel.Children.Add(sbRoute);

            ucSelectButton sbTimeSlot = new ucSelectButton();
            sbTimeSlot.Content  = Translator.GetInstance().GetString("PanelFleetAirliner","202");
            sbTimeSlot.Visibility = System.Windows.Visibility.Collapsed;
            sbTimeSlot.Click += new System.Windows.RoutedEventHandler(sbTimeSlot_Click);
            buttonsPanel.Children.Add(sbTimeSlot);

            ucSelectButton sbStatistics = new ucSelectButton();
            sbStatistics.Content  = Translator.GetInstance().GetString("PanelFleetAirliner","203");
            sbStatistics.Click += new System.Windows.RoutedEventHandler(sbStatistics_Click);
            buttonsPanel.Children.Add(sbStatistics);

            ucSelectButton sbMaintenance = new ucSelectButton();
            sbMaintenance.Content = Translator.GetInstance().GetString("PanelFleetAirliner","205");
            sbMaintenance.Visibility = this.Airliner.Airliner.Airline.IsHuman ? Visibility.Visible : System.Windows.Visibility.Collapsed;
            sbMaintenance.Click +=sbMaintenance_Click;
            buttonsPanel.Children.Add(sbMaintenance);

            ucSelectButton sbInsurance = new ucSelectButton();
            sbInsurance.Content = Translator.GetInstance().GetString("PanelFleetAirliner", "204");
            sbInsurance.Visibility = this.Airliner.Airliner.Airline.IsHuman ? Visibility.Visible : Visibility.Collapsed;
            sbInsurance.Click+=sbInsurance_Click;
            buttonsPanel.Children.Add(sbInsurance);

             this.Children.Add(buttonsPanel);

            frameContent = new Frame();
            frameContent.NavigationUIVisibility = NavigationUIVisibility.Hidden;

            if (this.Airliner.Airliner.Type.TypeAirliner == AirlinerType.TypeOfAirliner.Passenger)
                frameContent.Navigate(new PageFleetFacilities(this.Airliner));
            else
                frameContent.Navigate(new PageFleetRoute(this.Airliner));

            this.Children.Add(frameContent);
        }
开发者ID:pedromorgan,项目名称:theairlineproject-cs,代码行数:54,代码来源:PanelFleetAirliner.cs

示例13: AddAirliner

        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;
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:12,代码来源:AirlineHelpers.cs

示例14: GetAirlinerAgeDelay

        //returns the delay time because of the age of an airliner
        public static int GetAirlinerAgeDelay(FleetAirliner airliner)
        {
            int age = airliner.Airliner.Age;

            int tAge = 100 - (age * 3);

            Boolean delayed = rnd.Next(100) > tAge;

            if (delayed)
                return rnd.Next(0, age) * 5;
            else
                return 0;
        }
开发者ID:rhgtvcx,项目名称:tap-desktop,代码行数:14,代码来源:FleetAirlinerHelpers.cs

示例15: CreateAirliner

        //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;

        }
开发者ID:tehknox,项目名称:tap-desktop,代码行数:17,代码来源:AirlineHelpers.cs


注:本文中的TheAirline.Model.AirlinerModel.FleetAirliner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。