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); } } }
public XlsArea AddArea() { var area = new XlsArea(); Areas.Add(area); return(area); }
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; } }
public void AddArea(ModularityArea area) { if (Areas.Count(a => a.Options.Name == area.Options.Name) == 0) { Areas.Add(area); } }
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); } }
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"); }
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(); } }
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 }); } }
/// <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); }
public Area AddArea(string description) { var area = new Area(description, this); Areas.Add(area); return(area); }
public void AddArea(RepresentationAreaForUser area) { if (area != null) { Areas.Add(area); } }
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); }
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); }
public OcrArea AddArea(OcrArea area) { if (!Areas.Contains(area)) { Areas.Add(area); } return(area); }
/// <summary> /// Adds to diaphragm. /// </summary> /// <param name="area">The area.</param> public void AddToDiaphragm(Area area) { if (Areas.Contains(area)) { return; } Areas.Add(area); }
private void LoadExistingData() { Areas.Clear(); foreach (var loaded in _moduleDataService.LoadAll <AreaData>()) { AreaDataObservable area = _observableDataFactory.CreateAndMap <AreaDataObservable, AreaData>(loaded); Areas.Add(area); } }
/// <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); }
/// <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))); }
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); } } }
public WeatherLatestViewModel(IWeatherRepository weather, IAreaRepository areas) { _weather = weather; _areas = areas; foreach (var area in _areas.Getdata()) { Areas.Add(new AreaEntity(area.AreaID, area.AreaName)); } }
public override void Read() { uint areasCount = _worldPacket.ReadBits <uint>(4); Request.Read(_worldPacket); for (int i = 0; i < areasCount; ++i) { Areas.Add(_worldPacket.ReadInt32()); } }
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)); } }
/// <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)); } }
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(); }
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); }
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); }