コード例 #1
0
        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;
            }
        }
コード例 #2
0
ファイル: SceneDataModel.cs プロジェクト: blockspacer/FrankE
        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);
        }
コード例 #3
0
 public ExportController(ISceneService sceneService, ICourseService courseService, IVRObjectService VRObjectService, IVRBackgroundService VRBackgroundService)
 {
     _sceneService        = sceneService;
     _courseService       = courseService;
     _VRObjectService     = VRObjectService;
     _VRBackgroundService = VRBackgroundService;
 }
コード例 #4
0
ファイル: SceneDataModel.cs プロジェクト: blockspacer/FrankE
        public override bool Create()
        {
            m_SceneService = VEFModule.UnityContainer.Resolve(typeof(ISceneService), "") as ISceneService;

            RaisePropertyChanged("FB_SceneData");

            return(true);
        }
コード例 #5
0
    public void ReplaceSceneService(ISceneService newInstance)
    {
        var index     = GameComponentsLookup.SceneService;
        var component = (SceneServiceComponent)CreateComponent(index, typeof(SceneServiceComponent));

        component.instance = newInstance;
        ReplaceComponent(index, component);
    }
コード例 #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);
 }
コード例 #7
0
 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;
 }
コード例 #8
0
        public SceneGraphToolView()
        {
            InitializeComponent();


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

            mSceneService = VEFModule.UnityContainer.Resolve(typeof(ISceneService), "") as ISceneService;
            //mSceneService.TreeList = _treeList;
        }
コード例 #9
0
 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;
 }
コード例 #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();
 }
コード例 #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);
        }
コード例 #12
0
    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);
    }
コード例 #13
0
ファイル: BaseScene.cs プロジェクト: Crwth/UltimaXNA
        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>();
        }
コード例 #14
0
    public void ReplaceSceneService(ISceneService newInstance)
    {
        var entity = sceneServiceEntity;

        if (entity == null)
        {
            entity = SetSceneService(newInstance);
        }
        else
        {
            entity.ReplaceSceneService(newInstance);
        }
    }
コード例 #15
0
ファイル: ProjectService.cs プロジェクト: punker76/Macabre2D
 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;
 }
コード例 #16
0
 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;
 }
コード例 #17
0
        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);
        }
コード例 #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);
        }
コード例 #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;
 }
コード例 #20
0
        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;
        }
コード例 #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;
        }
コード例 #22
0
 private void Construct(ISceneService sceneService, IUserManager userManager)
 {
     m_SceneService = sceneService;
     m_UserManager  = userManager;
 }
コード例 #23
0
 public SceneEditorController(ISceneService sceneService, IVRObjectService VRObjectService, IVRBackgroundService VRBackgroundService)
 {
     _sceneService        = sceneService;
     _VRObjectService     = VRObjectService;
     _VRBackgroundService = VRBackgroundService;
 }
コード例 #24
0
 public RectangleColliderEditor()
 {
     this._sceneService = ViewContainer.Resolve <ISceneService>();
     this._undoService  = ViewContainer.Resolve <IUndoService>();
     this.InitializeComponent();
 }
コード例 #25
0
 public RegisterUiServiceSystem(Contexts contexts, ISceneService sceneService)
 {
     _context      = contexts.game;
     _sceneService = sceneService;
 }
コード例 #26
0
 public DefaultController(ISceneService sceneService, ILocationService locationService, IProjectService projectService)
 {
     _sceneService    = sceneService;
     _locationService = locationService;
     _projectService  = projectService;
 }
コード例 #27
0
 public ProjectController(IProjectService projectService, ILocationService locationService, ISceneService sceneService)
 {
     this._projectService  = projectService;
     this._locationService = locationService;
     this._sceneService    = sceneService;
 }
コード例 #28
0
 public MoveObjectHandler(ISceneService sceneService)
 {
     _sceneService = sceneService;
 }
コード例 #29
0
 public BoxesGamePlayAppState()
 {
     m_SceneService = App.Services.Get <ISceneService>();
 }
コード例 #30
0
ファイル: SettingsManager.cs プロジェクト: punker76/Macabre2D
 public SettingsManager(IMonoGameService monoGameService, IProjectService projectService, ISceneService sceneService)
 {
     this._monoGameService = monoGameService;
     this._projectService  = projectService;
     this._sceneService    = sceneService;
 }
コード例 #31
0
 private void Construct(ISceneService sceneService)
 {
     this.sceneService = sceneService;
 }
コード例 #32
0
 public CourseService(ICourseRepository courseRepository, ISceneService sceneService, IVRBackgroundService backgroundService)
 {
     _courseRepository  = courseRepository;
     _sceneService      = sceneService;
     _backgroundService = backgroundService;
 }