Пример #1
0
 ///<summary>Set list of phones to display. Get/Set accessor won't work here because we require 2 seperate fields in order to update the control properly.</summary>
 public void SetPhoneList(List <PhoneEmpDefault> peds, List <Phone> phones)
 {
     //create a new list so our sorting doesn't affect this list elsewhere
     _listPhones   = new List <Phone>();
     _listMapAreas = MapAreas.Refresh();
     if (_listRooms == null)
     {
         UpdateComboRooms();                //Only call this once from here otherwise it gets called too often and causes strange flickering.
     }
     if (_mapAreaContainerNum < 1)
     {
         _listPhones.AddRange(phones);
     }
     else              //A specific room was selected so we only want to show those extensions.
                       //Find all the map areas that correspond to the selected map area container.
     {
         List <MapArea> listMapAreas = _listMapAreas.FindAll(x => x.MapAreaContainerNum == _mapAreaContainerNum);
         //Get all phones that correspond to the map areas found.
         _listPhones = phones.FindAll(x => listMapAreas.Exists(y => y.Extension == x.Extension));
     }
     //We always want to sort the list of phones so that they display in a predictable fashion.
     _listPhones.Sort(new Phones.PhoneComparer(Phones.PhoneComparer.SortBy.ext));
     _listPhoneEmpDefaults = peds;
     Invalidate();
 }
Пример #2
0
        private void FillMap()
        {
            mapAreaPanel.Clear(false);
            //fill the panel
            List <MapArea> clinicMapItems = MapAreas.Refresh();

            for (int i = 0; i < clinicMapItems.Count; i++)
            {
                if (clinicMapItems[i].MapAreaContainerNum != _mapCur.MapAreaContainerNum)
                {
                    continue;
                }
                if (clinicMapItems[i].ItemType == MapItemType.Room)
                {
                    mapAreaPanel.AddCubicle(clinicMapItems[i], false);
                }
                else if (clinicMapItems[i].ItemType == MapItemType.DisplayLabel)
                {
                    mapAreaPanel.AddDisplayLabel(clinicMapItems[i]);
                }
            }
            mapAreaPanel.ShowGrid        = _mapCur.ShowGrid;
            mapAreaPanel.ShowOutline     = _mapCur.ShowOutline;
            mapAreaPanel.FloorWidthFeet  = (int)_mapCur.FloorWidthFeet;
            mapAreaPanel.FloorHeightFeet = (int)_mapCur.FloorHeightFeet;
            mapAreaPanel.PixelsPerFoot   = (int)_mapCur.PixelsPerFoot;
            textDescription.Text         = _mapCur.Description;
        }
Пример #3
0
        ///<summary>Setup the map panel with the cubicles and labels before filling with real-time data. Call this on load or anytime the cubicle layout has changed.</summary>
        private void FillMapAreaPanel()
        {
            mapAreaPanelHQ.Controls.Clear();
            mapAreaPanelHQ.FloorHeightFeet = Math.Max(_mapCur.FloorHeightFeet, 55);       //Should at least fill the space set in the designer.
            mapAreaPanelHQ.FloorWidthFeet  = Math.Max(_mapCur.FloorWidthFeet, 89);        //Should at least fill the space set in the designer.
            //fill the panel
            List <MapArea> clinicMapItems = MapAreas.Refresh(_listMaps[comboRoom.SelectedIndex].MapAreaContainerNum);

            clinicMapItems = clinicMapItems.OrderByDescending(x => (int)(x.ItemType)).ToList();
            for (int i = 0; i < clinicMapItems.Count; i++)
            {
                if (clinicMapItems[i].MapAreaContainerNum != _listMaps[comboRoom.SelectedIndex].MapAreaContainerNum)
                {
                    continue;
                }
                if (clinicMapItems[i].ItemType == MapItemType.Room)
                {
                    mapAreaPanelHQ.AddCubicle(clinicMapItems[i]);
                }
                else if (clinicMapItems[i].ItemType == MapItemType.DisplayLabel)
                {
                    mapAreaPanelHQ.AddDisplayLabel(clinicMapItems[i]);
                }
            }
        }
Пример #4
0
        ///<summary>Setup the map panel with the cubicles and labels before filling with real-time data. Call this on load or anytime the cubicle layout has changed.</summary>
        private void FillMapAreaPanel()
        {
            mapAreaPanelHQ.Controls.Clear();
            //fill the panel
            List <MapArea> clinicMapItems = MapAreas.Refresh();

            for (int i = 0; i < clinicMapItems.Count; i++)
            {
                if (clinicMapItems[i].ItemType == MapItemType.Room)
                {
                    mapAreaPanelHQ.AddCubicle(clinicMapItems[i]);
                }
                else if (clinicMapItems[i].ItemType == MapItemType.DisplayLabel)
                {
                    mapAreaPanelHQ.AddDisplayLabel(clinicMapItems[i]);
                }
            }
        }
Пример #5
0
        private void mapAreaPanel_MapAreaChanged(object sender, EventArgs e)
        {
            mapAreaPanel.Clear(false);
            //All prefs are hard-coded for now. We will likely create a parent table which will hold these values in the event that we release this feature to customers.

            /*
             * //Load clinic panel values from database.
             * bool showGrid=false;
             * if(bool.TryParse(PrefC.GetRaw("clinicMapPanelHQ.ShowGrid"),out showGrid)) {
             *      checkShowGrid.Checked=showGrid;
             * }
             * bool showOutline=false;
             * if(bool.TryParse(PrefC.GetRaw("clinicMapPanelHQ.ShowOutline"),out showOutline)) {
             *      checkShowOutline.Checked=showOutline;
             * }
             * int floorWidthFeet=0;
             * if(int.TryParse(PrefC.GetRaw("clinicMapPanelHQ.FloorWidthFeet"),out floorWidthFeet)) {
             *      numFloorWidthFeet.Value=floorWidthFeet;
             * }
             * int floorHeightFeet=0;
             * if(int.TryParse(PrefC.GetRaw("clinicMapPanelHQ.FloorHeightFeet"),out floorHeightFeet)) {
             *      numFloorHeightFeet.Value=floorHeightFeet;
             * }
             * int pixelsPerFoot=0;
             * if(int.TryParse(PrefC.GetRaw("clinicMapPanelHQ.PixelsPerFoot"),out pixelsPerFoot)) {
             *      numPixelsPerFoot.Value=pixelsPerFoot;
             * }
             */
            //fill the panel
            List <MapArea> clinicMapItems = MapAreas.Refresh();

            for (int i = 0; i < clinicMapItems.Count; i++)
            {
                if (clinicMapItems[i].ItemType == MapItemType.Room)
                {
                    mapAreaPanel.AddCubicle(clinicMapItems[i]);
                }
                else if (clinicMapItems[i].ItemType == MapItemType.DisplayLabel)
                {
                    mapAreaPanel.AddDisplayLabel(clinicMapItems[i]);
                }
            }
        }
Пример #6
0
        ///<summary>Setup the map panel with the cubicles and labels before filling with real-time data. Call this on load or anytime the cubicle layout has changed.</summary>
        private void FillMapAreaPanel()
        {
            mapAreaPanelHQ.Controls.Clear();
            mapAreaPanelHQ.FloorHeightFeet = _mapCur.FloorHeightFeet;
            mapAreaPanelHQ.FloorWidthFeet  = _mapCur.FloorWidthFeet;
            //fill the panel
            List <MapArea> clinicMapItems = MapAreas.Refresh();

            for (int i = 0; i < clinicMapItems.Count; i++)
            {
                if (clinicMapItems[i].MapAreaContainerNum != _listMaps[comboRoom.SelectedIndex].MapAreaContainerNum)
                {
                    continue;
                }
                if (clinicMapItems[i].ItemType == MapItemType.Room)
                {
                    mapAreaPanelHQ.AddCubicle(clinicMapItems[i]);
                }
                else if (clinicMapItems[i].ItemType == MapItemType.DisplayLabel)
                {
                    mapAreaPanelHQ.AddDisplayLabel(clinicMapItems[i]);
                }
            }
        }