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; }
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(); }
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(); }
public OriginViewModel(Origin origin, OriginService originService, ObservableCollection<WorkspaceViewModel> parent):this(origin,originService) { parentWorkSpaces = parent; }
public List<Origin> GetAllOrigins() { var originService = new OriginService(_dataContext); return originService.GetOrigins(); }
public List<Origin> GetAllOrigins() { OriginService originService = new OriginService(this._dataContext); return originService.GetOrigins(); }
public AllOriginsViewModel(OriginService originService) { Setup(originService); }
public AllOriginsViewModel(OriginService originService, ObservableCollection<WorkspaceViewModel> parent) { parentWorkSpaces = parent; Setup(originService); }