Esempio n. 1
0
        public NotamSummaryViewModel(NotamService notamService, IntlNotamService intlnotamService, AerodomService aerodomService, NotamCodeService notamcodeService, ObservableCollection<WorkspaceViewModel> parent)
            : this(notamService, aerodomService, notamcodeService)
        {
            parentWorkSpaces = parent;
            _intlNotamService = intlnotamService;

        }
Esempio n. 2
0
        public IntlNotamsSearchViewModel(IntlNotamService notamService,NotamService notamServiceLocal, AerodomService aerodomService, NotamCodeService notamcodeService, ObservableCollection<WorkspaceViewModel> parent)
            : this(notamService, aerodomService, notamcodeService)
        {
            parentWorkSpaces = parent;
            _notamServiceLocal = notamServiceLocal;

        }
Esempio n. 3
0
        public AerodomViewModel(Aerodom aerodom, AerodomService aerodomService)
        {
            if (aerodom == null)
                throw new ArgumentNullException("aerodom");

            if (aerodomService == null)
                throw new ArgumentNullException("aerodomService");

            _aerodom = aerodom;
            _aerodomService = aerodomService;
        }
Esempio n. 4
0
        private void Setup(AerodomService aerodomService)
        {
            if (aerodomService == null)
                throw new ArgumentNullException("aerodomService");

            base.DisplayName = Entity.AllAerodomsViewModel_DisplayName;

            _aerodomService = aerodomService;

            // Subscribe for notifications of when a new customer is saved.
            _aerodomService.AerodomAdded += this.OnAerodomAddedToRepository;

            // Populate the AllCustomers collection with CustomerViewModels.
            this.CreateAllAerodoms();
        }
Esempio n. 5
0
        public IntlNotamsSearchViewModel(IntlNotamService notamService, AerodomService aerodomService, NotamCodeService notamcodeService)
        {
            if (notamService == null)
                throw new ArgumentNullException("notamService");

            if (aerodomService == null)
                throw new ArgumentNullException("aerodomService");

            _notamService = notamService;
            _aerodomService = aerodomService;
            _notamcodeService = notamcodeService;

            this.validators = this.GetType()
              .GetProperties()
              .Where(p => this.GetValidations(p).Length != 0)
              .ToDictionary(p => p.Name, p => this.GetValidations(p));

            this.propertyGetters = this.GetType()
                .GetProperties()
                .Where(p => this.GetValidations(p).Length != 0)
                .ToDictionary(p => p.Name, p => this.GetValueGetter(p));
        }
Esempio n. 6
0
        public MainWindowViewModel(NotamDataContext  dataContext )
        {
            base.DisplayName = Entity.MainWindowViewModel_DisplayName;

            _originService = new OriginService(dataContext);
            _firService = new FIRService(dataContext);
            _notamService = new NotamService(dataContext);
            _aerodomService = new AerodomService(dataContext);
            _notamCodeService = new NotamCodeService(dataContext);
            _snowtamService = new SnowtamService(dataContext);
            _authService = new AuthenticationService(dataContext);
            _aftnService = new AftnService(dataContext);
            _intlNotamService = new IntlNotamService(dataContext);
            var workspace = new NotamSearchViewModel(_notamService, Workspaces);
            this.Workspaces.Add(workspace);
            this.SetActiveWorkspace(workspace);
            System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0,1,0);
            dispatcherTimer.Start();


        }
Esempio n. 7
0
 public List<Aerodom> GetAllAerodoms()
 {
     var aeroService = new AerodomService(_dataContext);
     List<Aerodom> aeroList = aeroService.GetAerodoms();
     return aeroList;
 }
Esempio n. 8
0
 public Aerodom GetAeroItem(string strAero)
 {
     var aeroService = new AerodomService(_dataContext);
     return aeroService.FindAeroByName(strAero);
 }
Esempio n. 9
0
 public List<Aerodom> GetAllAerodomsForFIR(FIR fir)
 {
     var aeroService = new AerodomService(_dataContext);
     List<Aerodom> aeroList = aeroService.GetAerodoms();
     return aeroList.Where(x => x.FIR == fir).OrderBy(x => x.Code).ToList();
 }
Esempio n. 10
0
 public AerodomViewModel(Aerodom aerodom, AerodomService aerodomService, ObservableCollection<WorkspaceViewModel> parent)
     : this(aerodom, aerodomService)
 {
     parentWorkSpaces = parent;
 }
Esempio n. 11
0
 public AllAerodomsViewModel(AerodomService aerodomService)
 {
     Setup(aerodomService);
 }
Esempio n. 12
0
   public AllAerodomsViewModel(AerodomService aerodomService, ObservableCollection<WorkspaceViewModel> parent)
 {
       parentWorkSpaces = parent;
       Setup(aerodomService);
 }
Esempio n. 13
0
 public List<Aerodom> GetAllAerodomsForFIRStr(string sfir)
 {
     var aeroService = new AerodomService(_dataContext);
     List<Aerodom> aeroList = aeroService.GetAerodoms();
     var firService = new FIRService(_dataContext);
     FIR fir = firService.GetFIRs().Where(x => x.Code.Equals(sfir)).FirstOrDefault();
     return aeroList.Where(x => x.FIR == fir).OrderBy(x => x.Code).ToList();
 }