public void AnalyzeRoute()
        {
            try
            {
                var orig = origProvider.Icao;
                var dest = destProvider.Icao;

                EnsureAirportExists(orig);
                EnsureAirportExists(dest);

                var input = view.Route.ToUpper();

                var result = RouteAnalyzerFacade.AnalyzeWithCommands(
                    input,
                    orig,
                    origProvider.Rwy,
                    dest,
                    destProvider.Rwy,
                    AppOptions.NavDataLocation,
                    airwayNetwork.AirportList,
                    airwayNetwork.WptList);

                Route = new RouteGroup(result, airwayNetwork.TracksInUse);
                view.ShowRouteTxt(Route, AppOptions);
                view.RouteIsValid = true;
            }
            catch (Exception ex)
            {
                view.ShowMessage(ex.Message, MessageLevel.Warning);
            }
        }
Пример #2
0
        public void AnalyzeRoute()
        {
            Debug.Assert(view.IsAirportToAirport());

            try
            {
                EnsureOrigAirportExists();
                EnsureDestAirportExists();

                var input         = view.Route.ToUpper();
                var airwayNetwork = model.FuelPlanningModel.AirwayNetwork;

                var result = RouteAnalyzerFacade.AnalyzeWithCommands(
                    input,
                    view.OrigIcao,
                    view.OrigRwy,
                    view.DestIcao,
                    view.DestRwy,
                    model.FuelPlanningModel.AppOption.Instance.NavDataLocation,
                    airwayNetwork.AirportList,
                    airwayNetwork.WptList);

                Route = ToRouteGroup(result);
                ShowRouteTxt();
                view.RouteIsValid = true;
            }
            catch (Exception ex)
            {
                view.ShowMessage(ex.Message, MessageLevel.Warning);
            }
        }
Пример #3
0
        private void AnalyzeRouteClick(object sender, EventArgs e)
        {
            try
            {
                var input = routeTxtGetter().ToUpper();

                var result = RouteAnalyzerFacade.AnalyzeWithCommands(
                    input,
                    origController.Icao,
                    origController.Rwy,
                    destController.Icao,
                    destController.Rwy,
                    AppSettings.NavDataLocation,
                    airwayNetwork.AirportList,
                    airwayNetwork.WptList);

                Route = new RouteGroup(result, airwayNetwork.TracksInUse);
                ShowRouteTxt();
            }
            catch (Exception ex)
            {
                parentForm.ShowWarning(ex.Message);
            }
        }