public MainWindowModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; ApplicationMenuCommands.OpenCommand = new DelegateCommand(Open); ApplicationMenuCommands.SaveCommand = new DelegateCommand(Save); }
public LeftPupilViewModel(IEventAggregator events):base(events) { _right = false; this._defaultY = 40; this._defaultX = -50; this.SetToDefaults(); }
public GetReservationsForUser( IConnectionProvider connectionProvider, IEventAggregator eventAggregator) { _connectionProvider = connectionProvider; _eventAggregator = eventAggregator; }
public Shell(IUnityContainer container, IEventAggregator evtAggregator) { InitializeComponent(); container.RegisterInstance<Panel>("MainRegion", m_MainRegionPanel); container.RegisterInstance<Panel>("SecondRegion", m_SecondRegionPanel); evtAggregator.GetEvent<ProductSavedEvent>().Subscribe(OnProductSaved,ThreadOption.SubscriberAffinityThread); }
public EntityListPageViewModel(IEntityRepository entityRepository, INavigationService navService, IEventAggregator eventAggregator) { _entityRepository = entityRepository; _navService = navService; _eventAggregator = eventAggregator; NavCommand = new DelegateCommand<Entity>(OnNavCommand); EntityDetailNavCommand = new DelegateCommand(() => _navService.Navigate("EntityDetail", 0)); }
public ArticleViewModel(INewsFeedService newsFeedService, IRegionManager regionManager, IEventAggregator eventAggregator) { if (newsFeedService == null) { throw new ArgumentNullException("newsFeedService"); } if (regionManager == null) { throw new ArgumentNullException("regionManager"); } if (eventAggregator == null) { throw new ArgumentNullException("eventAggregator"); } this.newsFeedService = newsFeedService; this.regionManager = regionManager; this.showArticleListCommand = new DelegateCommand(this.ShowArticleList); this.showNewsReaderViewCommand = new DelegateCommand(this.ShowNewsReaderView); eventAggregator.GetEvent<TickerSymbolSelectedEvent>().Subscribe(OnTickerSymbolSelected, ThreadOption.UIThread); }
public GeoRegionMaintenanceViewModel(IModuleController moduleController, IDataRepository repository, IEventAggregator eventAggregator) { _moduleController = moduleController; _repository = repository; _eventAggregator = eventAggregator; ShowView = _moduleController.ShowViewCommand; NavigationDetails = _moduleController.NavigationDetails; ChangeMetaPanel = new DelegateCommand<bool?>(ChangeMetaViewPanel); ChangeGeoPanel = new DelegateCommand<bool?>(ChangeGeoViewPanel); DeleteMetaRegionCommand = new DelegateCommand(DeleteMetaRegion); EditMetaRegionCommand = new DelegateCommand(EditMetaRegion); AddNewMetaRegionCommand = new DelegateCommand(AddNewMetaRegion); DeleteMetaRegionMappingCommand = new DelegateCommand(DeleteMetaRegionMapping); AddMetaRegionMappingCommand = new DelegateCommand(AddMetaRegionMapping); DeleteGeoRegionCommand = new DelegateCommand(DeleteGeoRegion); EditGeoRegionCommand = new DelegateCommand(EditGeoRegion); CreateNewGeoRegionCommand = new DelegateCommand(CreateNewGeoRegion); _metaRegions = new ObservableCollection<t033_meta_region>(); _metaRegionMappings = new ObservableCollection<t031_geo_code>(); _geoRegions = new ObservableCollection<GeoRegionViewModel>(); _moduleController.SwitchPanel(MaintenanceRegionNames.MetaRegionRegion, MaintenanceViewNames.MetaRegionView); _moduleController.SwitchPanel(MaintenanceRegionNames.GeoRegionRegion, MaintenanceViewNames.GeoRegionView); _moduleController.SwitchPanel(MaintenanceRegionNames.MetaRegionMappingRegion, MaintenanceViewNames.MetaRegionMappingView); _eventAggregator.GetEvent<RefreshRegionsEvent>().Subscribe(InitializeData); }
public EditViewModel(ILibraryService libraryService, IEventAggregator eventAggregator) { this._eventAggregator = eventAggregator; var orderedEnumerable = libraryService.GetObjectsFromFile().Videos.OrderBy(v=>v.Category).ToList(); this.Videos = new ObservableCollection<Video>(orderedEnumerable); this.SelectedVideo = this.Videos.FirstOrDefault(); }
public DebugWindowViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; DebugStrings = new ObservableCollection<string>(); _eventAggregator.GetEvent<SetDebugMessageEvent>().Subscribe(SetMessage); SendCloseMessageCommand = new DelegateCommand(SendCloseMessage); ExportListCommand = new DelegateCommand(ExportList); }
public TrendLinePresentationModel(ITrendLineView view, IMarketHistoryService marketHistoryService, IEventAggregator eventAggregator) { this.View = view; this.View.Model = this; this._marketHistoryService = marketHistoryService; eventAggregator.GetEvent<TickerSymbolSelectedEvent>().Subscribe(this.TickerSymbolChanged); }
public EditCollectionTemplateViewModel(IServer server, IEventAggregator events, IDocumentTemplateProvider templateProvider) { this.server = server; this.events = events; this.templateProvider = templateProvider; }
public GettingStartedViewModel(IEventAggregator eventAggregator, INavigate navigator ) { this.eventAggregator = eventAggregator; this.navigator = navigator; ReturnToLoginScreenCommand = new DelegateCommand<object>(ReturnToLoginScreen, CanReturnToLoginScreen); }
public ModuleInit(IRegionManager regionManager, IUnityContainer container, IEventAggregator eventAggregator, IModuleManager moduleManager) { this.regionManager = regionManager; this.container = container; this.eventAggregator = eventAggregator; this.moduleManager = moduleManager; }
/// <summary> /// See 8.2.4 Tokenization /// </summary> /// <param name="source">The source code manager.</param> /// <param name="events">The event aggregator to use.</param> public HtmlTokenizer(TextSource source, IEventAggregator events) : base(source, events) { _state = HtmlParseMode.PCData; _acceptsCharacterData = false; _lastStartTag = String.Empty; }
public PivotRunTimeCalculatorViewModel(INavigationService navigationService, IEventAggregator eventAggregator, string title) : base(navigationService, eventAggregator, title) { _navigationService = navigationService; _eventAggregator = eventAggregator; initializePivotRunTimeCalculatorViewModel(); }
public QueryResultsViewModel(string caption, IQueryResultsView view, IEventAggregator aggregator, ITimeLineService service, IAsyncManager asyncManager, ContextMenuRoot menu) { this._aggregator = aggregator; _service = service; this._asyncManager = asyncManager; Caption = caption; View = view; View.DataContext = this; this.Tweets = new ObservableCollection<TweetViewModel>(); this._aggregator.GetEvent<RefreshEvent>().Subscribe(Refresh//, ,ThreadOption.UIThread, true, _ => !this.Editing ); GlobalCommands.UpCommand.RegisterCommand(new DelegateCommand<object>(MoveUp)); GlobalCommands.DownCommand.RegisterCommand(new DelegateCommand<object>(MoveDown)); _contextMenu = menu; _editCommand = new DelegateCommand<object>(EditSelectedTweet, o => this.SelectedTweet != null); _cancelEditCommand = new DelegateCommand<object>(CancelEdit, o => this.SelectedTweet != null && this.SelectedTweet.Editable); }
public PasswordGeneratorViewModel(IPasswordGenerator passwordGenerator, IEventAggregator events) { this.events = events; this.passwordGenerator = passwordGenerator; this.DisplayName = "Generator"; this.Length = 6; }
public CustomerNewViewModel(IEventAggregator eventAggregator, ICustomerService customerService) { CustomerService = customerService; EventAggregator = eventAggregator; DisplayName = "New Customer"; }
public DocumentSearchViewModel(IBus bus, IEventAggregator eventAggregator) { if (bus == null) throw new ArgumentNullException("bus"); if (eventAggregator == null) throw new ArgumentNullException("eventAggregator"); _Bus = bus; _EventAggregator = eventAggregator; }
public WCFClient(IEventAggregator eventBus) { _eventBus = eventBus; _pipeFactory = new ChannelFactory<IUpdaterWCF>(new NetNamedPipeBinding(), new EndpointAddress( "net.pipe://localhost/UpdaterWCF_Pipe")); _pipeProxy = _pipeFactory.CreateChannel(); }
public LoginViewModel(IEventAggregator messageBus) { _messageBus = messageBus; LoginCommand = new DelegateCommand<object>(Login); _serviceFacade = ((ServiceLocator)App.Current.Resources["ServiceLocator"]).ServiceFacade; _serviceFacade.LoginCompletedEvent += new EventHandler<HsrOrderApp.UI.Silverlight.AuthenticationService.LoginCompletedEventArgs>(LoginViewModel_LoginCompletedEvent); }
public DownloadService(IProvideDownloadClient downloadClientProvider, IEventAggregator eventAggregator, Logger logger) { _downloadClientProvider = downloadClientProvider; _eventAggregator = eventAggregator; _logger = logger; }
public SalesModule(IEventAggregator eventAggregator, INavigationService navigationService, IUnityContainer container, IRegionManager regionManager) { _container = container; _regionManager = regionManager; _navigationService = navigationService; _eventAggregator = eventAggregator; }
public MenuRegionController(IUnityContainer container, [Dependency(ShellRegionNames.MenuRegion)] IRegion menuRegion) { _container = container; _eventAggregator = _container.Resolve<IEventAggregator>(); _menuRegion = menuRegion; }
public MainMenuViewModel() { Groups = new BindableCollection<MenuGroup>(); if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled) { _running = IoC.Get<RunExperimentViewModel>(); _runThresholdTest = IoC.Get<RunThresholdTestViewModel>(); _permutations = IoC.Get<PermutationViewModel>(); _nbsmConfig = IoC.Get<NBSmConfigViewModel>(); _eventAggregator = IoC.Get<IEventAggregator>(); _navService = IoC.Get<INavigationService>(); _regionService = IoC.Get<IRegionService>(); _subjectService = IoC.Get<ISubjectDataService>(); _subjectFilterService = IoC.Get<ISubjectFilterService>(); _computeService = IoC.Get<IComputeService>(); var regionsVM = IoC.Get<RegionsViewModel>(); Groups.Add(new MenuGroup { Title = "Source", Items = { regionsVM, IoC.Get<SubjectsViewModel>(), IoC.Get<GroupsViewModel>() } }); Groups.Add(new MenuGroup { Title = "Config", Items = { _permutations, _nbsmConfig } }); Groups.Add(new MenuGroup { Title = "Compute", Items = { _runThresholdTest, _running } }); Groups.Add(new MenuGroup { Title = "Global", Items = { IoC.Get<GlobalStrengthViewModel>() } }); Groups.Add(new MenuGroup { Title = "Component", Items = { IoC.Get<IntermodalViewModel>(), IoC.Get<IntraSummaryViewModel>()/*, new MenuItem { Title = "Associations" },*/ } }); Groups.Add(new MenuGroup { Title = "Nodal", Items = { IoC.Get<NodalStrengthDataTypeViewModel>() } }); Groups.Add(new MenuGroup { Title = "Edge", Items = { IoC.Get<EdgeSignificanceViewModel>() } }); } }
public UpdaterModuleBootstraper(IUpdater updater, RegionManager regionManager,IEventAggregator eventAggregator) { // use injected services from Nomad, instead of using IServiceLocator mechanism _updater = updater; _regionManager = regionManager; _eventAggregator = eventAggregator; }
public BadgerControlStatusView() { InitializeComponent(); joystickQueryThread = null; CompositionTarget.Rendering += OnRender; _eventAggregator = ApplicationService.Instance.EventAggregator; _eventAggregator.GetEvent<DeliverJoystickEvent>().Subscribe((joystick) => { // send a confirmation back when we receive a joystick joystickQueryThread = joystick; _eventAggregator.GetEvent<ConfirmJoystickEvent>().Publish(JOYSTICK_ID); }); _eventAggregator.GetEvent<ConnectionDetailsEvent>().Subscribe((connection) => { UpdateConnection(connection); }); // create a ConnectionDetails to keep around. its fields will be used to help organize which // components have which connection statuses ConnectionDetails connectionDetails = new ConnectionDetails(); connectionDetails.ai = ConnectionOption.DISCONNECTED; connectionDetails.remote = ConnectionOption.DISCONNECTED; connectionDetails.direct = ConnectionOption.DISCONNECTED; UpdateConnection(connectionDetails); }
public ViewModelBase(IPersonService personService, IDispatcher dispatcher, IEventAggregator aggregator, IDialogService dialogService) { if (personService == null) { throw new ArgumentNullException("personService"); } if (dispatcher == null) { throw new ArgumentNullException("dispatcher"); } if (aggregator == null) { throw new ArgumentNullException("aggregator"); } if (dialogService == null) { throw new ArgumentNullException("dialogService"); } this.personService = personService; this.dispatcher = dispatcher; this.aggregator = aggregator; this.dialogService = dialogService; isBusy = false; }
public WatchListViewModel(IWatchListService watchListService, IMarketFeedService marketFeedService, IRegionManager regionManager, IEventAggregator eventAggregator) { if (watchListService == null) { throw new ArgumentNullException("watchListService"); } if (eventAggregator == null) { throw new ArgumentNullException("eventAggregator"); } this.HeaderInfo = Resources.WatchListTitle; this.WatchListItems = new ObservableCollection<WatchItem>(); this.marketFeedService = marketFeedService; this.regionManager = regionManager; this.watchList = watchListService.RetrieveWatchList(); this.watchList.CollectionChanged += delegate { this.PopulateWatchItemsList(this.watchList); }; this.PopulateWatchItemsList(this.watchList); this.eventAggregator = eventAggregator; this.eventAggregator.GetEvent<MarketPricesUpdatedEvent>().Subscribe(this.MarketPricesUpdated, ThreadOption.UIThread); this.removeWatchCommand = new DelegateCommand<string>(this.RemoveWatch); this.watchListItems.CollectionChanged += this.WatchListItems_CollectionChanged; }
public GroupWidget() { this.InitializeComponent(); _eventAggregator = App.Current.Container.Resolve<IEventAggregator>(); this.Tapped += OnTapped; this.DataContextChanged += OnDataContextChanged; }
public MainWindowViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; }
public EventSubscriptionManager(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator ?? throw new ArgumentNullException("eventAggregator"); }
public ServerTimesViewModel(IEventAggregator eventAggregator, IGlobalOptions globalOptions, ServerTimingDetailsViewModel serverTimingDetails) : base(eventAggregator, globalOptions) { _storageEngineEvents = new BindableCollection <TraceStorageEngineEvent>(); ServerTimingDetails = serverTimingDetails; //ServerTimingDetails.PropertyChanged += ServerTimingDetails_PropertyChanged; }
protected ModelNode(IEventAggregator eventAggregator, Guid id) { this.EventAggregator = eventAggregator.ArgumentNotNull(nameof(eventAggregator)); this.Id = id; }
public MenuView(IEventAggregator eventAggregator) : base(eventAggregator, LoadAnimation.SlideAndFadeInFromBottom, UnloadAnimation.SlideAndFadeOutToRight) { InitializeComponent(); }
public RunStatusContainerViewModel([Inject] RunStatusCollectionViewModel status, [Inject] IEventAggregator @event) { _status = status; _status.Parent = this; ActivateItem(_status); @event.Subscribe(this, "STATUS"); }
public EditViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; _eventAggregator.Subscribe(this); }
public TemplateCacheRefresher(AppCaches appCaches, IIdKeyMap idKeyMap, IContentTypeCommonRepository contentTypeCommonRepository, IEventAggregator eventAggregator, ICacheRefresherNotificationFactory factory) : base(appCaches, eventAggregator, factory) { _idKeyMap = idKeyMap; _contentTypeCommonRepository = contentTypeCommonRepository; }
public SerialDataSendViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; _eventAggregator.Subscribe(this); LineEnd = LENONE; }
public CollectionGenresViewModel(IUnityContainer container) : base(container) { // Dependency injection this.collectionService = container.Resolve <ICollectionService>(); this.dialogService = container.Resolve <IDialogService>(); this.indexingService = container.Resolve <IIndexingService>(); this.metadataService = container.Resolve <IMetadataService>(); this.playbackService = container.Resolve <IPlaybackService>(); this.playlistService = container.Resolve <IPlaylistService>(); this.searchService = container.Resolve <ISearchService>(); this.eventAggregator = container.Resolve <IEventAggregator>(); this.genreRepository = container.Resolve <IGenreRepository>(); // Commands this.ToggleGenreOrderCommand = new DelegateCommand(async() => await this.ToggleGenreOrderAsync()); this.ToggleTrackOrderCommand = new DelegateCommand(async() => await this.ToggleTrackOrderAsync()); this.ToggleAlbumOrderCommand = new DelegateCommand(async() => await this.ToggleAlbumOrderAsync()); this.RemoveSelectedTracksCommand = new DelegateCommand(async() => await this.RemoveTracksFromCollectionAsync(this.SelectedTracks), () => !this.IsIndexing); this.RemoveSelectedTracksFromDiskCommand = new DelegateCommand(async() => await this.RemoveTracksFromDiskAsync(this.SelectedTracks), () => !this.IsIndexing); this.AddGenresToPlaylistCommand = new DelegateCommand <string>(async(playlistName) => await this.AddGenresToPlaylistAsync(this.SelectedGenres, playlistName)); this.SelectedGenresCommand = new DelegateCommand <object>(async(parameter) => await this.SelectedGenresHandlerAsync(parameter)); this.ShowGenresZoomCommand = new DelegateCommand(async() => await this.ShowSemanticZoomAsync()); this.SemanticJumpCommand = new DelegateCommand(() => this.IsGenresZoomVisible = false); this.AddGenresToNowPlayingCommand = new DelegateCommand(async() => await this.AddGenresToNowPlayingAsync(this.SelectedGenres)); this.ShuffleSelectedGenresCommand = new DelegateCommand(async() => await this.playbackService.EnqueueAsync(this.SelectedGenres, true, false)); // Events this.metadataService.MetadataChanged += MetadataChangedHandlerAsync; this.indexingService.RefreshArtwork += async(_, __) => await this.collectionService.RefreshArtworkAsync(this.Albums); this.eventAggregator.GetEvent <SettingEnableRatingChanged>().Subscribe(async(enableRating) => { this.EnableRating = enableRating; this.SetTrackOrder("GenresTrackOrder"); await this.GetTracksAsync(null, this.SelectedGenres, this.SelectedAlbums, this.TrackOrder); }); this.eventAggregator.GetEvent <SettingEnableLoveChanged>().Subscribe(async(enableLove) => { this.EnableLove = enableLove; this.SetTrackOrder("GenresTrackOrder"); await this.GetTracksAsync(null, this.SelectedGenres, this.SelectedAlbums, this.TrackOrder); }); // Set the initial GenreOrder this.SetGenreOrder("GenresGenreOrder"); // Set the initial AlbumOrder this.AlbumOrder = (AlbumOrder)SettingsClient.Get <int>("Ordering", "GenresAlbumOrder"); // Set the initial TrackOrder this.SetTrackOrder("GenresTrackOrder"); // Subscribe to Events and Commands on creation this.Subscribe(); // Set width of the panels this.LeftPaneWidthPercent = SettingsClient.Get <int>("ColumnWidths", "GenresLeftPaneWidthPercent"); this.RightPaneWidthPercent = SettingsClient.Get <int>("ColumnWidths", "GenresRightPaneWidthPercent"); // Cover size this.SetCoversizeAsync((CoverSizeType)SettingsClient.Get <int>("CoverSizes", "GenresCoverSize")); }
public ResultView() { InitializeComponent(); Events = IoC.Get <IEventAggregator>(); Events.Subscribe(this); }
/// <summary> /// Construct a view model object for the main window. /// </summary> /// <param name="eventAggregator"> /// Reference to a Unity event aggregator object. /// </param> /// <param name="container"> /// Reference to a Unity container object. /// </param> public MainWindowViewModel(IEventAggregator eventAggregator, IUnityContainer container) : base(eventAggregator, container) { dataStore = container.Resolve <IDataStore>(); DocumentURL = Properties.Settings.Default.LastUsedURL; }
public BusyStatusViewModel(IEventAggregator events) { events.Subscribe(this); }
public CompleteViewModel(IUnityContainer container, IEventAggregator eventAggregator) : base(container, eventAggregator) { CompleteWizardCommand = new DelegateCommand <object>(OnCompleteWizardCommand); }
public SkeletonGameManagerViewModelBase(IEventAggregator eventAggregator, ILoggerFacade loggerFacade) { _eventAggregator = eventAggregator; _logger = loggerFacade; }
public ReportDeliveryQueue(/*IDepartmentsService departmentsService, IScheduledTasksService scheduledTasksService, IUsersService usersService, */ IEventAggregator eventAggregator) { //_departmentsService = departmentsService; //_scheduledTasksService = scheduledTasksService; //_usersService = usersService; _eventAggregator = eventAggregator; _queue = new Queue <ReportDeliveryQueueItem>(); _cleared = false; }
private void Awake() { _enemyData = Instantiate(_enemyData); _eventAggregator = ServiceLocator.EventAggregator; _eventAggregator.Subscribe(this); }
public CardReadHandler(IEventAggregator eventAggregator) { EventAggregator = eventAggregator; }
public StoragePointViewModelTest() { _eventAggregator = new EventAggregator(); }
public BuzzWheelerModule(IEventAggregator eventAggregator) { m_EventAggregator = eventAggregator; }
public MonitoringEditAttachment(IWindowManagerEx windowManager, IEventAggregator eventAggregator, MonitoringInstanceInstaller installer) { this.windowManager = windowManager; this.installer = installer; this.eventAggregator = eventAggregator; }
public ServiceControlInstaller(ProcessRunner processRunner, ReleaseManager releaseManager, IEventAggregator eventAggregator) { this.processRunner = processRunner; this.releaseManager = releaseManager; this.eventAggregator = eventAggregator; }
public HistoryRepository(IDatabase database, IEventAggregator eventAggregator) : base(database, eventAggregator) { _database = database; }
public LoginViewModel(IAPIHelper apiHelper, IEventAggregator events) { _apiHelper = apiHelper; _events = events; }
public MainToolBarViewModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; }
public OutputViewModel(IActiveViewManager activeViewManager, IEventAggregator eventAggregator) : base(activeViewManager) { eventAggregator.GetEvent <OutputDockItemSelectedEvent>().Subscribe(OutputDockItemSelected, ThreadOption.UIThread); }
protected BaseConductor(IEventAggregator eventPublisher) { VerifyArgument.IsNotNull("eventPublisher", eventPublisher); _eventPublisher = eventPublisher; _eventPublisher.Subscribe(this); }
public MainPageViewModel(IEventAggregator eventAggregator, IOpenWeatherMgr weatherMgr) { _weatherMgr = weatherMgr; eventAggregator.GetEvent <WeatherEvent>().Subscribe(OnWeatherChangedEvent); }
public ParserService(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; }
public TLMultipleViewModelBase(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator) : base(protoService, cacheService, settingsService, aggregator) { ChildViewModels = new List <TLViewModelBase>(); }