public AreaSelectorViewModel(IEventAggregator eventAggregator, IObservableDataFactory observableDataFactory, IDataDomainService dataDomainService, IObjectMapper objectMapper, IModuleDataService moduleDataService) { _eventAggregator = eventAggregator; _observableDataFactory = observableDataFactory; _dataDomainService = dataDomainService; _objectMapper = objectMapper; _moduleDataService = moduleDataService; Areas = new ObservableCollectionEx <AreaDataObservable>(); CreateAreaCommand = new DelegateCommand(CreateArea); DeleteAreaCommand = new DelegateCommand(DeleteArea); OpenAreaPropertiesCommand = new DelegateCommand(OpenAreaProperties); OpenAreaCommand = new DelegateCommand(OpenArea); CreateAreaRequest = new InteractionRequest <INotification>(); OpenAreaPropertiesRequest = new InteractionRequest <INotification>(); ConfirmDeleteRequest = new InteractionRequest <IConfirmation>(); _eventAggregator.GetEvent <ModuleLoadedEvent>().Subscribe(ModuleLoaded); _eventAggregator.GetEvent <ModuleClosedEvent>().Subscribe(ModuleClosed); _eventAggregator.GetEvent <AreaCreatedEvent>().Subscribe(AreaCreated); }
public PlaceableEditorViewModel( IEventAggregator eventAggregator, IObservableDataFactory observableDataFactory, IModuleDataService moduleDataService) { _eventAggregator = eventAggregator; _observableDataFactory = observableDataFactory; _moduleDataService = moduleDataService; NewCommand = new DelegateCommand(New); DeleteCommand = new DelegateCommand(Delete); AddLocalStringCommand = new DelegateCommand(AddLocalString); AddLocalDoubleCommand = new DelegateCommand(AddLocalDouble); DeleteLocalStringCommand = new DelegateCommand <LocalStringDataObservable>(DeleteLocalString); DeleteLocalDoubleCommand = new DelegateCommand <LocalDoubleDataObservable>(DeleteLocalDouble); Placeables = new ObservableCollectionEx <PlaceableDataObservable>(); Scripts = new Dictionary <string, ScriptDataObservable>(); ConfirmDeleteRequest = new InteractionRequest <IConfirmation>(); Placeables.ItemPropertyChanged += PlaceablesOnItemPropertyChanged; _eventAggregator.GetEvent <ModuleLoadedEvent>().Subscribe(ModuleLoaded); _eventAggregator.GetEvent <DataEditorClosedEvent>().Subscribe(DataEditorClosed); _eventAggregator.GetEvent <ModuleClosedEvent>().Subscribe(ModuleClosed); }
public NewAreaViewModel( IEventAggregator eventAggregator, IObservableDataFactory observableDataFactory, IDataDomainService dataDomainService, IObjectMapper objectMapper, IModuleDataService moduleDataService) { _eventAggregator = eventAggregator; _observableDataFactory = observableDataFactory; _dataDomainService = dataDomainService; _objectMapper = objectMapper; _moduleDataService = moduleDataService; Tilesets = new ObservableCollectionEx <TilesetDataObservable>(); OpenInAreaViewer = true; Width = 8; Height = 8; CreateAreaCommand = new DelegateCommand(CreateArea, CanCreateArea); CancelCommand = new DelegateCommand(Cancel); PropertyChanged += OnPropertyChanged; _eventAggregator.GetEvent <DataEditorClosedEvent>().Subscribe(DataEditorClosed); _eventAggregator.GetEvent <ModuleOpenedEvent>().Subscribe(ModuleOpened); _eventAggregator.GetEvent <ModuleClosedEvent>().Subscribe(ModuleClosed); }
public TilesetEditorViewModel( IEventAggregator eventAggregator, IModuleResourceService resourceDomainService, IObservableDataFactory observableDataFactory, IModuleDataService moduleDataService) { _eventAggregator = eventAggregator; _resourceDomainService = resourceDomainService; _observableDataFactory = observableDataFactory; _moduleDataService = moduleDataService; NewCommand = new DelegateCommand(New); DeleteCommand = new DelegateCommand(Delete); Tilesets = new ObservableCollectionEx <TilesetDataObservable>(); TilesetImages = new ObservableCollectionEx <string>(); ActiveTilesetImage = new BitmapImage(); ConfirmDeleteRequest = new InteractionRequest <IConfirmation>(); Tilesets.ItemPropertyChanged += TilesetsOnItemPropertyChanged; _eventAggregator.GetEvent <ModuleLoadedEvent>().Subscribe(ModuleLoaded); _eventAggregator.GetEvent <DataEditorClosedEvent>().Subscribe(DataEditorClosed); _eventAggregator.GetEvent <ModuleClosedEvent>().Subscribe(ModuleClosed); }
public ScriptSelectorViewModel( IEventAggregator eventAggregator, IModuleDataService moduleDataService, IObservableDataFactory observableDataFactory, IDataDomainService dataDomainService, IObjectMapper objectMapper) { _eventAggregator = eventAggregator; _moduleDataService = moduleDataService; _observableDataFactory = observableDataFactory; _dataDomainService = dataDomainService; _objectMapper = objectMapper; CreateScriptCommand = new DelegateCommand(CreateScript); DeleteScriptCommand = new DelegateCommand(DeleteScript); EditScriptCommand = new DelegateCommand(EditScript); CreateScriptRequest = new InteractionRequest <INotification>(); EditScriptRequest = new InteractionRequest <INotification>(); ConfirmDeleteRequest = new InteractionRequest <IConfirmation>(); _eventAggregator.GetEvent <ModuleLoadedEvent>().Subscribe(ModuleLoaded); _eventAggregator.GetEvent <ModuleClosedEvent>().Subscribe(ModuleClosed); _eventAggregator.GetEvent <ScriptCreatedEvent>().Subscribe(ScriptCreated); Scripts = new ObservableCollectionEx <ScriptDataObservable>(); }
public AreaPropertiesViewModel( IEventAggregator eventAggregator, IObservableDataFactory observableDataFactory, IDataDomainService dataDomainService, IObjectMapper objectMapper, IModuleDataService moduleDataService) { _eventAggregator = eventAggregator; _observableDataFactory = observableDataFactory; _dataDomainService = dataDomainService; _objectMapper = objectMapper; _moduleDataService = moduleDataService; Tilesets = new ObservableCollectionEx <TilesetDataObservable>(); LocalVariables = new LocalVariableDataObservable(); SaveCommand = new DelegateCommand(Save); CancelCommand = new DelegateCommand(Cancel); AddLocalDoubleCommand = new DelegateCommand(AddLocalDouble); AddLocalStringCommand = new DelegateCommand(AddLocalString); DeleteLocalDoubleCommand = new DelegateCommand <LocalDoubleDataObservable>(DeleteLocalDouble); DeleteLocalStringCommand = new DelegateCommand <LocalStringDataObservable>(DeleteLocalString); _eventAggregator.GetEvent <AreaPropertiesOpenedEvent>().Subscribe(AreaPropertiesOpened); _eventAggregator.GetEvent <ModuleOpenedEvent>().Subscribe(ModuleOpened); _eventAggregator.GetEvent <DataEditorClosedEvent>().Subscribe(DataEditorClosed); }
public MainWindowViewModel(IModuleDataService moduleDataService) { this.moduleDataService = moduleDataService; LocatePDFCommand = new RelayCommand(LocatePDF, CanLocatePDF); ExtractDataCommand = new RelayCommand(ExtractData, CanExtractData); GenerateCSVCommand = new RelayCommand(GenerateCSV, CanGenerateCSV); }
/// <summary> /// Constructs a new area object. /// </summary> /// <param name="factory">The component factory used for creating components.</param> /// <param name="moduleDataService">The module data service used for loading data from the module.</param> /// <param name="resourceService">The resource service used for loading content files from resource packs.</param> public Area(IComponentFactory factory, IModuleDataService moduleDataService, IModuleResourceService resourceService) { _factory = factory; _moduleDataService = moduleDataService; _resourceService = resourceService; }
public ClassEditorViewModel( IEventAggregator eventAggregator, IObservableDataFactory observableDataFactory, IModuleDataService moduleDataService) { _eventAggregator = eventAggregator; _observableDataFactory = observableDataFactory; _moduleDataService = moduleDataService; NewCommand = new DelegateCommand(New); DeleteCommand = new DelegateCommand(Delete); Classes = new ObservableCollectionEx <ClassDataObservable>(); ConfirmDeleteRequest = new InteractionRequest <IConfirmation>(); Classes.ItemPropertyChanged += ClassesOnItemPropertyChanged; _eventAggregator.GetEvent <ModuleLoadedEvent>().Subscribe(ModuleLoaded); _eventAggregator.GetEvent <DataEditorClosedEvent>().Subscribe(DataEditorClosed); _eventAggregator.GetEvent <ModuleClosedEvent>().Subscribe(ModuleClosed); }
public ServerScreen(EntityWorld world, IEntityFactory entityFactory, IServerNetworkService networkService, IModuleService moduleService, IModuleDataService moduleDataService, IScriptService scriptService, IDataService dataService, IPathService pathService, ILogger logger, IServerSettingsService settingsService) { _world = world; _entityFactory = entityFactory; _networkService = networkService; _moduleService = moduleService; _moduleDataService = moduleDataService; _scriptService = scriptService; _dataService = dataService; _pathService = pathService; _logger = logger; _settingsService = settingsService; }
public AreaEditorScreen(IEventAggregator eventAggregator, IEntityFactory entityFactory, IObjectMapper objectMapper, IModuleDataService moduleDataService, IEngineService engineService, Camera2D camera) { _eventAggregator = eventAggregator; _entityFactory = entityFactory; _objectMapper = objectMapper; _camera = camera; _moduleDataService = moduleDataService; _engineService = engineService; _eventAggregator.GetEvent <AreaOpenedEvent>().Subscribe(AreaOpened); _eventAggregator.GetEvent <AreaClosedEvent>().Subscribe(AreaClosed); _eventAggregator.GetEvent <CameraMovedEvent>().Subscribe(CameraMoved); _eventAggregator.GetEvent <CameraZoomedEvent>().Subscribe(CameraZoomed); _eventAggregator.GetEvent <CameraResetEvent>().Subscribe(CameraReset); _eventAggregator.GetEvent <AreaPropertiesChangedEvent>().Subscribe(AreaPropertiesChanged); _eventAggregator.GetEvent <TileSelectedEvent>().Subscribe(TileSelected); }
public TileSelectorViewModel(IEventAggregator eventAggregator, IModuleDataService moduleDataService, IModuleResourceService resourceService, IEngineService engineService) { _eventAggregator = eventAggregator; _moduleDataService = moduleDataService; _resourceService = resourceService; _engineService = engineService; TileGridVisibility = Visibility.Hidden; SelectedTileBrush = Brushes.Yellow; SelectedTileHeight = _engineService.TileHeight; SelectedTileWidth = _engineService.TileWidth; SelectedTileVisibility = Visibility.Visible; SelectedTileX = 0; SelectedTileY = 0; CellSelectedCommand = new DelegateCommand <MouseButtonEventArgs>(CellSelected); _eventAggregator.GetEvent <AreaOpenedEvent>().Subscribe(AreaOpened); _eventAggregator.GetEvent <AreaClosedEvent>().Subscribe(AreaClosed); }