protected override void InitializeMode()
        {
            var maDataSet = new ManagementAreaDataset();

            foreach (var agentToManagementArea in sheParameters.AgentToManagementAreaList)
            {
                foreach (var managementAreaName in agentToManagementArea.ManagementAreas)
                {
                    var managementArea = new ManagementArea(ushort.Parse(managementAreaName));
                    maDataSet.Add(managementArea);
                }
            }

            Landis.Library.HarvestManagement.SiteVars.GetExternalVars();

            foreach (ManagementArea mgmtArea in maDataSet)
            {
                mgmtArea.FinishInitialization();
            }

            foreach (var agentToManagementArea in sheParameters.AgentToManagementAreaList)
            {
                foreach (var managementAreaName in agentToManagementArea.ManagementAreas)
                {
                    Area area;
                    if (!Areas.TryGetValue(managementAreaName, out area))
                    {
                        area = new Area();
                        area.Initialize(maDataSet.First(ma => ma.MapCode.ToString() == managementAreaName));
                        Areas.Add(managementAreaName, area);
                    }
                    area.AssignedAgents.Add(agentToManagementArea.Agent);
                }
            }
        }
Ejemplo n.º 2
0
        public XlsArea AddArea()
        {
            var area = new XlsArea();

            Areas.Add(area);
            return(area);
        }
Ejemplo n.º 3
0
        private void SetAreas()
        {
            switch (CurrentRotation)
            {
            case Rotation.UpWind:
                Areas.Add(Field.D, GetArea());
                break;

            case Rotation.Crosswind:
                if (EdgeDistance < Length)
                {
                    SetWallAreasForLargeBuildingWidth();
                }
                else if (EdgeDistance >= 5 * Length)
                {
                    SetWallAreasForSmallBuildingWidth();
                }
                else
                {
                    SetWallAreasForMediumBuildingWidth();
                }
                break;

            case Rotation.DownWind:
                Areas.Add(Field.E, GetArea());
                break;

            default:
                break;
            }
        }
Ejemplo n.º 4
0
 public void AddArea(ModularityArea area)
 {
     if (Areas.Count(a => a.Options.Name == area.Options.Name) == 0)
     {
         Areas.Add(area);
     }
 }
Ejemplo n.º 5
0
        public void LoadCollections()
        {
            Areas.Clear();
            Operations.Clear();
            Personal.Clear();
            Shifts.Clear();

            foreach (var area in _collectionsRepository.LoadWorkAreas())
            {
                Areas.Add(area);
            }

            foreach (var operation in _collectionsRepository.LoadWorks())
            {
                Operations.Add(operation);
            }

            foreach (var employee in _collectionsRepository.LoadPersonal())
            {
                Personal.Add(employee);
            }

            foreach (var shift in _collectionsRepository.LoadShiftSet())
            {
                Shifts.Add(shift);
            }
        }
Ejemplo n.º 6
0
        static public void LoadZone_Area()
        {
            Log.Debug("WorldMgr", "Loading Zone_Area...");
            int PieceInformation = 0;

            _Zone_Area = new Dictionary <int, List <Zone_Area> >();
            IList <Zone_Area> Infos = Database.SelectAllObjects <Zone_Area>();

            foreach (Zone_Area Area in Infos)
            {
                List <Zone_Area> Areas;
                if (!_Zone_Area.TryGetValue(Area.ZoneId, out Areas))
                {
                    Areas = new List <Zone_Area>();
                    _Zone_Area.Add(Area.ZoneId, Areas);
                }

                Areas.Add(Area);

                //Area.PieceId = (byte)Areas.Count;

                if (Area.PieceId != 0)
                {
                    Area.Information = GetPieceInformation(Area.ZoneId, Area.PieceId);

                    if (Area.Information != null)
                    {
                        ++PieceInformation;
                    }
                }
            }

            Log.Success("LoadZone_Info", "Loaded " + Infos.Count + " Zone_Area && " + PieceInformation + " Piece Informations");
        }
Ejemplo n.º 7
0
        internal void OnAreasLoaded(int messageId, List <ClientArea> areas)
        {
            List <ClientSegment> segments = new List <ClientSegment>(areas.Count * 512);

            foreach (ClientArea area in areas)
            {
                List <ClientSegment> areaSegments = area.GetSegments();
                segments.AddRange(areaSegments);
                Areas.Add(area.Key, area);
                foreach (ClientSegment segment in areaSegments)
                {
                    Segments.Add(segment.Key, segment);
                }
            }

            LoadRequest request = new LoadRequest()
            {
                Entity    = _Player,
                MessageId = messageId
            };

            OnAreasLoaded(request, areas, segments);

            if (_Player.CurrentSegment == null)
            {
                // prepare the player
                _Player.HandleMovement();
            }
        }
Ejemplo n.º 8
0
 private void SetRoofAreas()
 {
     Areas.Add(Field.F, EdgeDistance / 4 * EdgeDistance / 10);
     Areas.Add(Field.G, (Width - 2 * EdgeDistance / 4) * EdgeDistance / 10);
     Areas.Add(Field.H, (EdgeDistance / 2 - EdgeDistance / 10) * Width);
     Areas.Add(Field.I, (Length - EdgeDistance / 2) * Width);
 }
 public ListItemDadosClienteArea(ListagemDadosAreaCliente dados) : this()
 {
     Clientes.Add(new SelectListItem {
         Value = "null", Text = "Selecione o cliente", Selected = true
     });
     Profissionais.Add(new SelectListItem {
         Value = "null", Text = "Selecione um Profissional", Selected = true
     });
     Areas.Add(new SelectListItem {
         Value = "null", Text = "Selecione uma Área", Selected = true
     });
     for (int i = 0; i < dados.Clientes.Count; i++)
     {
         Clientes.Add(new SelectListItem {
             Value = dados.Clientes[i].Id.ToString(), Text = dados.Clientes[i].Nome
         });
     }
     for (int i = 0; i < dados.Profissionais.Count; i++)
     {
         Profissionais.Add(new SelectListItem {
             Value = dados.Profissionais[i].Id.ToString(), Text = dados.Profissionais[i].Nome
         });
     }
     for (int i = 0; i < dados.Areas.Count; i++)
     {
         Areas.Add(new SelectListItem {
             Value = dados.Areas[i].Id.ToString(), Text = dados.Areas[i].Nome
         });
     }
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Add an area to the country.
        /// </summary>
        /// <param name="newArea">The area to be added.</param>
        /// <param name="addUndefined">True if an undefined entry is to be added to the start of the list; false otherwise.</param>
        public void AddArea(Area newArea, bool addUndefined)
        {
            if (addUndefined && Areas.Count == 0)
            {
                Area undefinedArea = new Area("-- Undefined --", 0);
                undefinedArea.AddRegion(new Region("-- Undefined --", 0));
                Areas.Add(undefinedArea);
            }

            foreach (Area oldArea in Areas)
            {
                if (oldArea.Name == newArea.Name)
                {
                    return;
                }

                if (oldArea.Name.CompareTo(newArea.Name) > 0)
                {
                    areas.Insert(areas.IndexOf(oldArea), newArea);
                    return;
                }
            }

            areas.Add(newArea);
        }
Ejemplo n.º 11
0
        public Area AddArea(string description)
        {
            var area = new Area(description, this);

            Areas.Add(area);
            return(area);
        }
Ejemplo n.º 12
0
 public void AddArea(RepresentationAreaForUser area)
 {
     if (area != null)
     {
         Areas.Add(area);
     }
 }
Ejemplo n.º 13
0
        public XlsGrid AddGrid(DataSet dataSet)
        {
            var grid = new XlsGrid(dataSet);

            Areas.Add(grid);
            grid.ShowAllBorders(true);
            return(grid);
        }
        /// <summary>
        /// Add an instanced area object to the area object list.
        /// </summary>
        /// <param name="AreaObjectId">Supplies the area object id.</param>
        /// <returns>The C# area object.</returns>
        public AreaObject AddInstancedArea(uint AreaObjectId)
        {
            AreaObject Area = new AreaObject(AreaObjectId, ObjectManager);

            Areas.Add(Area);

            return(Area);
        }
Ejemplo n.º 15
0
 public TiresSheet() : base("Tires") // this is how you explicitly call the parent constructor
 {
     // register areas : is this useful ??
     Areas.Add(LeftFront);
     Areas.Add(LeftRear);
     Areas.Add(RightFront);
     Areas.Add(RightRear);
 }
Ejemplo n.º 16
0
 public OcrArea AddArea(OcrArea area)
 {
     if (!Areas.Contains(area))
     {
         Areas.Add(area);
     }
     return(area);
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Adds to diaphragm.
 /// </summary>
 /// <param name="area">The area.</param>
 public void AddToDiaphragm(Area area)
 {
     if (Areas.Contains(area))
     {
         return;
     }
     Areas.Add(area);
 }
Ejemplo n.º 18
0
 private void LoadExistingData()
 {
     Areas.Clear();
     foreach (var loaded in _moduleDataService.LoadAll <AreaData>())
     {
         AreaDataObservable area = _observableDataFactory.CreateAndMap <AreaDataObservable, AreaData>(loaded);
         Areas.Add(area);
     }
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Adds to diaphragm.
 /// </summary>
 /// <param name="area">The area.</param>
 public void AddToDiaphragm(Area area)
 {
     if (Areas.Contains(area))
     {
         return;
     }
     _apiAreaObject?.SetDiaphragm(area.Name, Name);
     Areas.Add(area);
 }
Ejemplo n.º 20
0
        /// <summary>
        /// Add new regions
        /// </summary>
        /// <param name="polygon"></param>
        public void Add(Polygon polygon)
        {
            var eventArea = new EventArea();

            eventArea.Polygons.Add(polygon);
            Areas.Add(eventArea);

            Added?.Invoke(this, new AddedArgs(eventArea, typeof(Light)));
        }
Ejemplo n.º 21
0
        private void surface_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                IsCreating = false;
                IsMoving   = false;

                if (!CurrentArea.IsEmpty)
                {
                    if (!IsCurrentAreaValid)
                    {
                        RemoveCurrentArea();
                        CheckHover();
                    }
                    else if (surface.Config.QuickCrop)
                    {
                        surface.UpdateRegionPath();
                        surface.Close(SurfaceResult.Region);
                    }
                    else
                    {
                        SelectArea();
                    }
                }

                if (!CurrentHoverArea.IsEmpty)
                {
                    Areas.Add(CurrentHoverArea);
                    SelectedAreaIndex = Areas.Count - 1;

                    if (surface.Config.QuickCrop)
                    {
                        surface.UpdateRegionPath();
                        surface.Close(SurfaceResult.Region);
                    }
                    else
                    {
                        SelectArea();
                    }
                }
            }
            else if (e.Button == MouseButtons.Right)
            {
                int areaIndex = AreaIntersect();

                if (areaIndex > -1)
                {
                    Areas.RemoveAt(areaIndex);
                    DeselectArea();
                }
                else
                {
                    surface.Close(SurfaceResult.Close);
                }
            }
        }
Ejemplo n.º 22
0
        public WeatherLatestViewModel(IWeatherRepository weather, IAreaRepository areas)
        {
            _weather = weather;
            _areas   = areas;

            foreach (var area in _areas.Getdata())
            {
                Areas.Add(new AreaEntity(area.AreaID, area.AreaName));
            }
        }
Ejemplo n.º 23
0
        public override void Read()
        {
            uint areasCount = _worldPacket.ReadBits <uint>(4);

            Request.Read(_worldPacket);

            for (int i = 0; i < areasCount; ++i)
            {
                Areas.Add(_worldPacket.ReadInt32());
            }
        }
Ejemplo n.º 24
0
        public WeatherLatestViewModel(IWeatherRepository weather,
                                      IAreasRepository areas)
        {
            _weather = weather;                    //weatherを _weatherに代入
            _areas   = areas;                      //areasを _areasに代入

            foreach (var area in _areas.GetData()) //foreachループ
            {
                Areas.Add(new AreaEntity(area.AreaId, area.AreaName));
            }
        }
        public WeatherLatestViewModel(IWeatherRepository weather,
                                      IAreasRepository areas)  //テストコード用 モックを指定する
        {
            _weather = weather;
            _areas   = areas;

            foreach (var area in areas.GetData())
            {
                Areas.Add(new AreaEntity(area.AreaId, area.AreaName));
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// コンストラクター(引数あり)
        /// 呼び出し時に引数で指定し呼ばれる
        /// 評価と本番の切替ができる
        /// </summary>
        /// <param name="weather"></param>
        public WeathrLatestViewModel(IWeatherRepository weather, IAreasRepository areas)
        {
            // 引数ありも引数なしも、どちらからも呼ばれる
            _weather = weather;
            _areas   = areas;

            foreach (var area in _areas.GetData())
            {
                Areas.Add(new AreaEntity(area.AreaId, area.AreaName));
            }
        }
Ejemplo n.º 27
0
        private void __Initialize()
        {
            foreach (var area in m_Areas)
            {
                var VM = new AreaViewModel(area, m_Settings);
                VM.PropertyChanged += AreaVM_PropertyChanged;
                Areas.Add(VM);
            }

            ArePathsExpanded = !m_Settings.Paths.Any();
        }
Ejemplo n.º 28
0
        public static void AddZoneArea(Zone_Area Area)
        {
            List <Zone_Area> Areas;

            if (!_Zone_Area.TryGetValue(Area.ZoneId, out Areas))
            {
                Areas = new List <Zone_Area>();
                _Zone_Area.Add(Area.ZoneId, Areas);
            }

            Areas.Add(Area);
        }
Ejemplo n.º 29
0
        private void PopulateData()
        {
            Organization objorg = new Organization()
            {
                Name = "artexacta"
            };

            Area area = new Area()
            {
                Name = "marketing"
            };

            objorg.Areas.Add(area.ObjectId, area);
            area.Owner = objorg;
            Areas.Add(area.ObjectId, area);

            area = new Area()
            {
                Name = "development"
            };
            objorg.Areas.Add(area.ObjectId, area);
            area.Owner = objorg;
            Areas.Add(area.ObjectId, area);


            ////Kpi kpi = new Kpi()
            ////{
            ////    Name = "KPI Test Data",
            ////    Progress = 32
            ////};
            ////kpi.Owner = objOrg;
            ////Kpis.Add(kpi.ObjectId, kpi);
            ////objOrg.Kpis.Add(kpi.ObjectId, kpi);
            Project project = new Project()
            {
                Name = "Project 1"
            };

            project.Owner = objorg;
            Projects.Add(project.ObjectId, project);
            objorg.Projects.Add(project.ObjectId, project);

            Activity activity = new Activity()
            {
                Name = "Activity 1"
            };

            activity.Owner = objorg;
            Activities.Add(activity.ObjectId, activity);
            objorg.Activities.Add(activity.ObjectId, activity);

            Organizations.Add(objorg.ObjectId, objorg);
        }
        public WeatherLatestViewModel(IWeatherRepository weather,
                                      IAreasRepositoy areas)
        {
            _weather        = weather;
            _areasRepositoy = areas;

            foreach (var area in _areasRepositoy.GetData())
            {
                Areas.Add(new AreaEntity(area.AreaId, area.AreaName));
            }

            LatestButton = new DelegateCommand(LatestButtonExecute);
        }