public void SetUp()
 {
     _eventBus = new EventBus();
     _addContextMenuItemFactory        = Substitute.For <IAddContextMenuItemFactory>();
     _createTextureAssetCommandFactory = Substitute.For <ICreateTextureAssetCommandFactory>();
     _createSpriteAssetCommandFactory  = Substitute.For <ICreateSpriteAssetCommandFactory>();
     _createSoundAssetCommandFactory   = Substitute.For <ICreateSoundAssetCommandFactory>();
 }
 public ProjectExplorerItemViewModelFactory(IEventBus eventBus, IAddContextMenuItemFactory addContextMenuItemFactory,
                                            ICreateTextureAssetCommandFactory createTextureAssetCommandFactory, ICreateSpriteAssetCommandFactory createSpriteAssetCommandFactory,
                                            ICreateSoundAssetCommandFactory createSoundAssetCommandFactory)
 {
     _eventBus = eventBus;
     _addContextMenuItemFactory        = addContextMenuItemFactory;
     _createTextureAssetCommandFactory = createTextureAssetCommandFactory;
     _createSpriteAssetCommandFactory  = createSpriteAssetCommandFactory;
     _createSoundAssetCommandFactory   = createSoundAssetCommandFactory;
 }
예제 #3
0
        public FileViewModel(IProjectFile file, IEventBus eventBus, ICreateTextureAssetCommandFactory createTextureAssetCommandFactory,
                             ICreateSpriteAssetCommandFactory createSpriteAssetCommandFactory, ICreateSoundAssetCommandFactory createSoundAssetCommandFactory) : base(file.Name)
        {
            _file     = file;
            _eventBus = eventBus;
            _createTextureAssetCommandFactory = createTextureAssetCommandFactory;
            _createSpriteAssetCommandFactory  = createSpriteAssetCommandFactory;
            _createSoundAssetCommandFactory   = createSoundAssetCommandFactory;

            DoubleClickCommand = RelayCommand.Create(OnDoubleClick);
            CreateContextMenuActions();
        }