Exemplo n.º 1
0
 public GroundFloor2()
 {
     InitializeComponent();
     CreateDynamicCanvas();
     GroundFloor2Repository.GetInstance();
     InformationEditRepository.GetInstance();
     StorageRepository.GetInstance();
     RoomWorkTimeRepository.GetInstance();
 }
Exemplo n.º 2
0
 public DinamiclyDrawingService()
 {
     Rectangle    = new ObservableCollection <Rectangles>();
     Rectangle    = DinamiclyDrawingRepository.GetInstance().GetAllRectangles();
     GroundFloor1 = new ObservableCollection <Rectangles>();
     GroundFloor1 = GroundFloor1Repository.GetInstance().GetAllRectangles();
     GroundFloor2 = new ObservableCollection <Rectangles>();
     GroundFloor2 = GroundFloor2Repository.GetInstance().GetAllRectangles();
     FirstFloor   = new ObservableCollection <Rectangles>();
     FirstFloor   = FirstFloorRepository.GetInstance().GetAllRectangles();
 }
Exemplo n.º 3
0
        public GroundFloor2(string Id)
        {
            InitializeComponent();
            CreateDynamicCanvas();
            GroundFloor2Repository.GetInstance();
            DoctorsRoomRepository.GetInstance();
            DrawSelectedRectangle(Id);
            InformationEditRepository.GetInstance();
            StorageRepository.GetInstance();
            RoomWorkTimeRepository.GetInstance();


            SearchedPatientsRooms = new ObservableCollection <PatientsRoomVieW>();
            SearchedDoctorsRooms  = new ObservableCollection <DoctorRoomView>();
            SearchedAnotherRooms  = new ObservableCollection <RoomWorkTime>();
        }
Exemplo n.º 4
0
        private void DrawSelectedRectangle(string Id)
        {
            SearchedRectangle = GroundFloor2Repository.GetInstance().GetById(Id);

            Rectangle rect = new Rectangle()
            {
                Fill            = Brushes.Transparent,
                Height          = SearchedRectangle.Height,
                Width           = SearchedRectangle.Width,
                Name            = SearchedRectangle.Id,
                Stroke          = Brushes.Red,
                StrokeThickness = 5
            };

            Canvas.SetLeft(rect, SearchedRectangle.Left);
            Canvas.SetTop(rect, SearchedRectangle.Top);
            canvas.Children.Add(rect);
        }
Exemplo n.º 5
0
        private void CreateDynamicCanvas()
        {
            Rectangle = new ObservableCollection <Rectangles>();
            Rectangle = GroundFloor2Repository.GetInstance().GetAllRectangles();

            storage = StorageRepository.GetInstance().GetAllStorage();

            DrOfficeInfo = new ObservableCollection <DoctorRoomView>(DoctorRoomConverter.ConvertRoomToDoctorRoomView(
                                                                         Backend.App.Instance().RoomService.GetAllEntitiesByType(1).ToList()));

            WorkTime = new ObservableCollection <RoomWorkTime>(WorkTimeRoomConverter.ConvertRoomToRoomWorkTime(
                                                                   Backend.App.Instance().RoomService.GetAllEntitiesByType(4).ToList()));

            foreach (Rectangles r in Rectangle)
            {
                Rectangle rect = new Rectangle()
                {
                    Fill   = r.Paint,
                    Height = r.Height,
                    Width  = r.Width,
                    Name   = r.Id
                };

                TextBlock txtb = new TextBlock()
                {
                    Width      = r.WidthText,
                    Height     = r.HeightText,
                    Text       = r.Text,
                    Background = r.Background
                };
                canvas.Children.Add(txtb);
                foreach (DoctorRoomView room in DrOfficeInfo)
                {
                    if (r.Id.Equals(room.IdOfRoom))
                    {
                        rect.MouseDown += RoomInformation;
                    }
                }

                foreach (StorageModel s in storage)
                {
                    if (r.Id.Equals(s.IdS))
                    {
                        rect.MouseDown += StorageInfo;
                        break;
                    }
                }

                foreach (RoomWorkTime s in WorkTime)
                {
                    if (r.Id.Equals(s.IdOfRoom))
                    {
                        rect.MouseDown += WorkTimeInfo;
                    }
                }

                Canvas.SetLeft(txtb, r.LeftText);
                Canvas.SetTop(txtb, r.TopText);
                Canvas.SetLeft(rect, r.Left);
                Canvas.SetTop(rect, r.Top);
                canvas.Children.Add(rect);
            }
        }