public ProjectViewModel(
            IAssetService assetService,
            IDialogService dialogService,
            IMonoGameService monoGameService,
            IProjectService projectService,
            ISceneService sceneService,
            Serializer serializer,
            IUndoService undoService)
        {
            this.AssetService     = assetService;
            this._dialogService   = dialogService;
            this._monoGameService = monoGameService;
            this.ProjectService   = projectService;
            this._sceneService    = sceneService;
            this._serializer      = serializer;
            this._undoService     = undoService;

            this.AddAssetCommand     = new RelayCommand(this.AddAsset);
            this._deleteAssetCommand = new RelayCommand(async() => await this.DeleteAsset(), () => this.AssetService.SelectedAsset?.Parent != null);
            this.OpenSceneCommand    = new RelayCommand <Asset>(this.OpenScene, asset => asset.Type == AssetType.Scene);

            this.AssetService.PropertyChanged   += this.AssetService_PropertyChanged;
            this.ProjectService.PropertyChanged += this.ProjectService_PropertyChanged;

            if (this.ProjectService.CurrentProject != null)
            {
                this.ProjectService.CurrentProject.PropertyChanged += this.CurrentProject_PropertyChanged;
            }
        }
Exemple #2
0
        public override bool Open(object id)
        {
            m_SceneService = VEFModule.UnityContainer.Resolve(typeof(ISceneService), "") as ISceneService;

            int sceneID = VEF_Helper.StringToContentIDData(ContentID).IntValue;

            //  this.Location = ItemFolder + "\\" + sceneID + ".xml";

            //read sceneData from DAL -- Read data from XML not from database -> database data not human readable
            //9_01_2015      m_FBData = ObjectSerialize.Deserialize<FB_Scene>(this.Location.ToString()); // XML Serialize
            if (FBObject == null)
            {
                Create();
            }
            else
            {
                RaisePropertyChanged("FB_SceneData");
            }

            RaisePropertyChanged("SceneItems");

            m_SceneService.SelectedScene = this;

            //only able to save data into database not load
            return(true);
        }
 public ExportController(ISceneService sceneService, ICourseService courseService, IVRObjectService VRObjectService, IVRBackgroundService VRBackgroundService)
 {
     _sceneService        = sceneService;
     _courseService       = courseService;
     _VRObjectService     = VRObjectService;
     _VRBackgroundService = VRBackgroundService;
 }
Exemple #4
0
        public override bool Create()
        {
            m_SceneService = VEFModule.UnityContainer.Resolve(typeof(ISceneService), "") as ISceneService;

            RaisePropertyChanged("FB_SceneData");

            return(true);
        }
    public void ReplaceSceneService(ISceneService newInstance)
    {
        var index     = GameComponentsLookup.SceneService;
        var component = (SceneServiceComponent)CreateComponent(index, typeof(SceneServiceComponent));

        component.instance = newInstance;
        ReplaceComponent(index, component);
    }
Exemple #6
0
 public StartupViewModel(IBusyService busyService, IProjectService projectService, ISceneService sceneService)
 {
     this._busyService       = busyService;
     this.ProjectService     = projectService;
     this._sceneService      = sceneService;
     this.NewProjectCommand  = new RelayCommand(async() => await this.NewProject(), () => !this._busyService.IsBusy);
     this.OpenProjectCommand = new RelayCommand(async() => await this.OpenProject(), () => !this._busyService.IsBusy);
 }
 private void Construct(ISceneService sceneService, IPlayerBehaviour playerBehaviour,
                        ButtonUIInput buttonUIInput, IPauseMenuService pauseMenuService, ITimer timer, IStatisticService statisticService)
 {
     this.sceneService     = sceneService;
     this.playerBehaviour  = playerBehaviour;
     this.buttonUIInput    = buttonUIInput;
     this.pauseMenuService = pauseMenuService;
     this.timer            = timer;
     this.statisticService = statisticService;
 }
        public SceneGraphToolView()
        {
            InitializeComponent();


            mPropertiesService = VEFModule.UnityContainer.Resolve(typeof(IPropertiesService), "") as IPropertiesService;

            mSceneService = VEFModule.UnityContainer.Resolve(typeof(ISceneService), "") as ISceneService;
            //mSceneService.TreeList = _treeList;
        }
 public HomeController(ISceneService sceneService, SignInManager <ApplicationUser> signInManager, UserManager <ApplicationUser> userManager, ILogger <LoginModel> logger, ICourseService courseService, IUserService userService, IVRBackgroundService VRBackgroundService, ICourseUserRelationService courseUserRelationService)
 {
     _logger                    = logger;
     _signInManager             = signInManager;
     _userManager               = userManager;
     _courseService             = courseService;
     _userService               = userService;
     _VRBackgroundService       = VRBackgroundService;
     _courseUserRelationService = courseUserRelationService;
     _sceneService              = sceneService;
 }
Exemple #10
0
 public MonoGameService(EditorGame editorGame, IProjectService projectService, ISceneService sceneService)
 {
     this._editorGame   = editorGame;
     this._sceneService = sceneService;
     this._sceneService.PropertyChanged += this.SceneService_PropertyChanged;
     this._editorGame.CurrentScene       = this._sceneService.CurrentScene?.Scene;
     this._projectService = projectService;
     this._projectService.PropertyChanged += this.ProjectService_PropertyChanged;
     this._editorGame.Settings             = this._projectService.CurrentProject?.GameSettings;
     this.SetContentPath();
 }
Exemple #11
0
        private void Construct(ISceneService sceneService, WorkflowEditorSceneManager editorSceneManager,
                               StepItem.Factory stepItemFactory, WorkflowData.Factory workflowDataFactory,
                               FileSelectorFacade fileSelectorFacade, NewFileDialogFacade newFileDialogFacade)
        {
            m_SceneService        = sceneService;
            m_EditorSceneManager  = editorSceneManager;
            m_FileSelectorFacade  = fileSelectorFacade;
            m_NewFileDialogFacade = newFileDialogFacade;

            m_EditorSceneManager.stepsChanged.AddListener(OnStepsChanged);
            m_EditorSceneManager.activeStepChanged.AddListener(OnActiveStepChanged);
        }
    public GameEntity SetSceneService(ISceneService newInstance)
    {
        if (hasSceneService)
        {
            throw new Entitas.EntitasException("Could not set SceneService!\n" + this + " already has an entity with SceneServiceComponent!",
                                               "You should check if the context already has a sceneServiceEntity before setting it or use context.ReplaceSceneService().");
        }
        var entity = CreateEntity();

        entity.AddSceneService(newInstance);
        return(entity);
    }
Exemple #13
0
        public BaseScene(Game game, bool needsUIService)
        {
            _game = game;
            _clearColor = Color.Black;
            _content = new ContentManager(_game.Services);
            _content.RootDirectory = "Content";
            _sceneState = SceneState.TransitioningOn;

            _sceneService = game.Services.GetService<ISceneService>(true);
            _inputService = game.Services.GetService<IInputState>(true);
            _worldService = game.Services.GetService<IIsometricRenderer>(true);
            _uiService = game.Services.GetService<IUIManager>();
        }
    public void ReplaceSceneService(ISceneService newInstance)
    {
        var entity = sceneServiceEntity;

        if (entity == null)
        {
            entity = SetSceneService(newInstance);
        }
        else
        {
            entity.ReplaceSceneService(newInstance);
        }
    }
Exemple #15
0
 public ProjectService(
     Serializer serializer,
     IAssemblyService assemblyService,
     IDialogService dialogService,
     ILoggingService loggingService,
     ISceneService sceneService)
 {
     this._serializer      = serializer;
     this._assemblyService = assemblyService;
     this._dialogService   = dialogService;
     this._loggingService  = loggingService;
     this._sceneService    = sceneService;
 }
 public ValueEditorService(
     IAssemblyService assemblyService,
     IDialogService dialogService,
     IProjectService projectService,
     ISceneService sceneService,
     IUndoService undoService)
 {
     this._assemblyService = assemblyService;
     this._dialogService   = dialogService;
     this._projectService  = projectService;
     this._sceneService    = sceneService;
     this._undoService     = undoService;
 }
        public ContentViewModel NewContent(object parameter)
        {
            var vm    = VEFModule.UnityContainer.Resolve(typeof(SceneViewModel), "") as SceneViewModel;
            var model = VEFModule.UnityContainer.Resolve(typeof(SceneDataModel), "") as SceneDataModel;
            var view  = VEFModule.UnityContainer.Resolve(typeof(SceneView), "") as SceneView;

            //Model details
            _loggerService.Log("Creating a new simple file using SceneHandler", LogCategory.Info, LogPriority.Low);

            //Clear the undo stack
            //   model.Document.UndoStack.ClearAll();

            //Set the model and view
            vm.SetModel(model);
            vm.SetView(view);
            vm.Title = "Scene New";
            (vm.View as UserControl).DataContext = model;
            vm.SetHandler(this);
            model.SetDirty(true);

            model.SetLocation("SceneID:##:");

            IProjectTreeService pfExplorerService = VEFModule.UnityContainer.Resolve(typeof(IProjectTreeService), "") as IProjectTreeService;
            ISceneService       sceneService      = VEFModule.UnityContainer.Resolve(typeof(ISceneService), "") as ISceneService;

            PItem parent = null;

            if (pfExplorerService.SelectedItem != null)
            {
                parent = pfExplorerService.SelectedItem;
            }

            SceneDataModel newScene = new SceneDataModel()
            {
                Name = "Scene NEW", ContentID = "SceneID:##:"
            };

            newScene.Parent = parent;

            if (pfExplorerService.SelectedItem != null)
            {
                pfExplorerService.SelectedItem.Items.Add(newScene);
            }

            sceneService.Scenes.Add(newScene);
            //  sceneService.SelectedScene = newScene;
            newScene.Open(-1);


            return(vm);
        }
Exemple #18
0
        void Initialize(
            [Inject] ISceneService sceneService
            )
        {
            _sceneService = sceneService;

            this.OnEvent <LoadSceneCommand>().Subscribe(e => LoadSceneCommandHandler(e)).AddTo(this);
            this.OnEvent <UnloadSceneCommand>().Subscribe(e => UnloadSceneCommandHandler(e)).AddTo(this);
            this.OnEvent <SetActiveSceneCommand>().Subscribe(e => SetActiveSceneCommandHandler(e)).AddTo(this);
            this.OnEvent <GetActiveSceneIDCommand>().Subscribe(e => GetActiveSceneIDCommandHandler(e)).AddTo(this);
            this.OnEvent <ActivateSceneCommand>().Subscribe(e => ActivateSceneCommandHandler(e)).AddTo(this);
            this.OnEvent <DeactivateSceneCommand>().Subscribe(e => DeactivateSceneCommandHandler(e)).AddTo(this);
            this.OnEvent <GetSceneRootObjectsCommand>().Subscribe(e => GetSceneRootObjectsCommandHandler(e)).AddTo(this);
        }
Exemple #19
0
 public Services(ILogService log, IViewService view, IMouseInputService mouseInput, ILoadConfigService loadConfig, ISceneService scene, ICoroutineService coroutine, IKeyInputService keyInput, ITimeService time, IPhysicsService physics, INetworkService network, ILocalStorageService localStorage, IFileService file, ISettingService setting)
 {
     Log          = log;
     View         = view;
     MouseInput   = mouseInput;
     LoadConfig   = loadConfig;
     Scene        = scene;
     Coroutine    = coroutine;
     KeyInput     = keyInput;
     Time         = time;
     Physics      = physics;
     Network      = network;
     LocalStorage = localStorage;
     File         = file;
     Setting      = setting;
 }
        public DemoController(IAuthenticationService authenticationService, IAccountUserService customerService, ISceneService sceneService, ILocationService locationService,
                              IAccountUserRegistrationService customerRegistrationService,
                              IEncryptionService encryptionService,
                              IWebHelper webHelper,
                              IWorkContext workContext,
                              AccountUserSettings customerSettings, CommonSettings commonSettings, SecuritySettings securitySettings, ISettingService settingService
                              )
        {
            _authenticationService          = authenticationService;
            _accountUserService             = customerService;
            _accountUserRegistrationService = customerRegistrationService;
            _encryptionService = encryptionService;

            _webHelper           = webHelper;
            _workContext         = workContext;
            _accountUserSettings = customerSettings;

            _commonSettings   = commonSettings;
            _securitySettings = securitySettings;
            _settingService   = settingService;
            _sceneService     = sceneService;
            _locationService  = locationService;
        }
Exemple #21
0
        public MainWindowViewModel(
            IBusyService busyService,
            IDialogService dialogService,
            IProjectService projectService,
            ISceneService sceneService,
            IUndoService undoService)
        {
            this.BusyService    = busyService;
            this._dialogService = dialogService;
            this.ProjectService = projectService;
            this.SceneService   = sceneService;
            this._undoService   = undoService;

            this.RefreshAssembliesCommand       = new RelayCommand(this.RefreshAssemblies);
            this.CreateProjectCommand           = new RelayCommand(async() => await this.CreateProject());
            this.OpenProjectCommand             = new RelayCommand(async() => await this.OpenProject());
            this.OpenProjectInCodeEditorCommand = new RelayCommand(this.ProjectService.OpenProjectInCodeEditor);
            this.OpenProjectInFileExplorer      = new RelayCommand(this.ProjectService.NavigateToProjectLocation);
            this.RefreshAssetsCommand           = new RelayCommand(async() => await this.RefreshAssets());
            this.SaveProjectCommand             = new RelayCommand(async() => await this.SaveProject(), () => this.ProjectService.HasChanges);
            this._undoCommand = new RelayCommand(() => this._undoService.Undo(), () => this._undoService.CanUndo);
            this._redoCommand = new RelayCommand(() => this._undoService.Redo(), () => this._undoService.CanRedo);
            this._undoService.PropertyChanged += this.UndoService_PropertyChanged;
        }
 private void Construct(ISceneService sceneService, IUserManager userManager)
 {
     m_SceneService = sceneService;
     m_UserManager  = userManager;
 }
 public SceneEditorController(ISceneService sceneService, IVRObjectService VRObjectService, IVRBackgroundService VRBackgroundService)
 {
     _sceneService        = sceneService;
     _VRObjectService     = VRObjectService;
     _VRBackgroundService = VRBackgroundService;
 }
 public RectangleColliderEditor()
 {
     this._sceneService = ViewContainer.Resolve <ISceneService>();
     this._undoService  = ViewContainer.Resolve <IUndoService>();
     this.InitializeComponent();
 }
Exemple #25
0
 public RegisterUiServiceSystem(Contexts contexts, ISceneService sceneService)
 {
     _context      = contexts.game;
     _sceneService = sceneService;
 }
Exemple #26
0
 public DefaultController(ISceneService sceneService, ILocationService locationService, IProjectService projectService)
 {
     _sceneService    = sceneService;
     _locationService = locationService;
     _projectService  = projectService;
 }
 public ProjectController(IProjectService projectService, ILocationService locationService, ISceneService sceneService)
 {
     this._projectService  = projectService;
     this._locationService = locationService;
     this._sceneService    = sceneService;
 }
 public MoveObjectHandler(ISceneService sceneService)
 {
     _sceneService = sceneService;
 }
Exemple #29
0
 public BoxesGamePlayAppState()
 {
     m_SceneService = App.Services.Get <ISceneService>();
 }
Exemple #30
0
 public SettingsManager(IMonoGameService monoGameService, IProjectService projectService, ISceneService sceneService)
 {
     this._monoGameService = monoGameService;
     this._projectService  = projectService;
     this._sceneService    = sceneService;
 }
Exemple #31
0
 private void Construct(ISceneService sceneService)
 {
     this.sceneService = sceneService;
 }
Exemple #32
0
 public CourseService(ICourseRepository courseRepository, ISceneService sceneService, IVRBackgroundService backgroundService)
 {
     _courseRepository  = courseRepository;
     _sceneService      = sceneService;
     _backgroundService = backgroundService;
 }