Exemplo n.º 1
0
        public OriginViewModel(Origin origin, OriginService originService)
        {
            if (origin == null)
                throw new ArgumentNullException("origin");

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

            _origin = origin;
            _originService = originService;
           // _customerType = Strings.CustomerViewModel_CustomerTypeOption_NotSpecified;
        }
Exemplo n.º 2
0
        private void Setup(OriginService originService)
        {
            if (originService == null)
                throw new ArgumentNullException("originService");

            base.DisplayName = Entity.AllOriginsViewModel_DisplayName;

            _originService = originService;

            // Subscribe for notifications of when a new customer is saved.
            _originService.OriginAdded += this.OnOriginAddedToRepository;

            // Populate the AllCustomers collection with CustomerViewModels.
            this.CreateAllOrigins();
        }
Exemplo n.º 3
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();


        }
Exemplo n.º 4
0
  public OriginViewModel(Origin origin, OriginService originService, ObservableCollection<WorkspaceViewModel> parent):this(origin,originService)
 {
     parentWorkSpaces = parent;
 }
Exemplo n.º 5
0
 public List<Origin> GetAllOrigins()
 {
     var originService = new OriginService(_dataContext);
     return originService.GetOrigins();
 }
Exemplo n.º 6
0
 public List<Origin> GetAllOrigins()
 {
     OriginService originService = new OriginService(this._dataContext);
     return originService.GetOrigins();
 }
Exemplo n.º 7
0
 public AllOriginsViewModel(OriginService originService)
 {
     Setup(originService); 
 }
Exemplo n.º 8
0
   public AllOriginsViewModel(OriginService originService, ObservableCollection<WorkspaceViewModel> parent)
 {
       parentWorkSpaces = parent;
       Setup(originService);
 }