public HospitalMapPage()
 {
     InitializeComponent();
     CanvasService.AddObjectToCanvas(mapObjectController.GetOutterMapObjects(), canvas);
     canvasHospitalMap = canvas;
     SetComponentsVisibility();
 }
        private void SelectMapObject(object sender, MouseButtonEventArgs e)
        {
            MapObject chosenMapObject = CanvasService.CheckWhichObjectIsClicked(e, floor.GetAllFloorMapObjects(), this.canvas);

            if (chosenMapObject != null)
            {
                OpenAdditionalInformationDialog(chosenMapObject);
            }
        }
Ejemplo n.º 3
0
        public static CanvasService GetCanvas()
        {
            UnityContainer unityContainer = new UnityContainer();

            unityContainer.RegisterType <ICanvasService, CanvasService>();
            CanvasService canvasService = unityContainer.Resolve <CanvasService>();

            return(canvasService);
            //throw new NotImplementedException();
        }
        private void ShowBuilding(object sender, MouseButtonEventArgs e)
        {
            MapObject chosenBuilding = CanvasService.CheckWhichObjectIsClicked(e, mapObjectController.GetAllMapObjects(), canvas);

            if (chosenBuilding != null && chosenBuilding.MapObjectType == MapObjectType.Building)
            {
                canvas.Children.Clear();
                HospitalMainWindow window = HospitalMainWindow.GetInstance();
                window.ChangePage(new BuildingPage(chosenBuilding.Id));
            }
        }
        public BuildingPage(int id, int selectedFloor = 0)
        {
            InitializeComponent();
            this.id            = id;
            this.selectedFloor = selectedFloor;
            List <MapObject> mapObjectsInBuilding = new MapObjectController().GetAllBuildingMapObjects(id);

            InsertMapObjectsToFloor(mapObjectsInBuilding);
            SetFloorComboBox(mapObjectsInBuilding);
            SetFloorLegend();
            CanvasService.AddObjectToCanvas(floor.GetAllFloorMapObjects(), canvas);
        }
Ejemplo n.º 6
0
        /// <summary>
        ///     The method for initialize needed modules.
        /// </summary>
        /// <param name="app"> IApplicationBuilder </param>
        public static void InitModules(IApplicationBuilder app)
        {
            initStore = new InitStore("Canvas");
            store     = initStore.GetStore();

            userRepository           = new UserRepository(store);
            canvasRepository         = new CanvasRepository(store);
            canvasTemplateRepository = new CanvasTemplateRepository(store);
            authRepository           = new AuthRepository(store);

            userService           = new UserService(userRepository);
            canvasService         = new CanvasService(canvasTemplateRepository, store);
            authService           = new AuthService(store);
            canvasTemplateService = new CanvasTemplateService(store);

            pdfCreater = new PdfCreater();
        }
Ejemplo n.º 7
0
        public static DropObject Create(DropItem dropItem, Transform sourceTransform = null)
        {
            GameObject prefab = CasualEngine.Get <RavenhillEngine>()
                                .GetService <IResourceService>()
                                .Cast <RavenhillResourceService>()
                                .GetCachedPrefab("drop_object");
            GameObject    instance      = GameObject.Instantiate <GameObject>(prefab);
            CanvasService canvasService = CasualEngine.Get <RavenhillEngine>()
                                          .GetService <ICanvasSerive>()
                                          .Cast <CanvasService>();

            canvasService.AddToFirstGroup(instance.transform);
            DropObject dropObject = instance.GetComponent <DropObject>();

            dropObject.Setup(dropItem, sourceTransform);
            return(dropObject);
        }