public void Interiors_AreEqual() { // Arrange var interior1 = new Interior(); var interior2 = new Interior(); // Act var areEqual = interior1 == interior2; // Assert areEqual.Should().BeTrue(); }
public InteriorDTO ConvertToInteriorDTO(Interior interior) { return(new InteriorDTO { Id = interior.Id, Name = interior.Name, Colour = interior.Colour, Material = interior.Material, Price = interior.Price, Producer = interior.Producer }); }
public Interior doGetInteriorInfo(string interiorCode) { IDictionary <string, string> interiorDic = ProductCache.GetInteriorDic(); Interior interior = null; if (interiorDic.ContainsKey(interiorCode)) { interior = new Interior(); interior.InteriorCode = interiorCode; interior.InteriorName = interiorDic[interiorCode]; } return(interior); }
public InteriorDTO ConvertTOInteriorDTO(Interior interior) { InteriorDTO interiorDTO = new InteriorDTO() { Id = interior.Id, Name = interior.Name, Colour = interior.Colour, Material = interior.Material, Price = interior.Price, Producer = interior.Producer }; return(interiorDTO); }
public void UnplaceFromArray(Interior interior) // 배열에서 인테리어 빼기 { for (int x = (int)(interior.transform.position.x - interior.placeRangeX); x <= interior.transform.position.x + interior.placeRangeX; x++) // 가구가 차지하는 X범위 만큼 { for (int y = (int)(interior.transform.position.y - interior.placeRangeY); y <= interior.transform.position.y + interior.placeRangeY; y++) // 가구가 차지하는 Y범위 만큼 { for (int z = (int)(interior.transform.position.z - interior.placeRangeZ); z <= interior.transform.position.z + interior.placeRangeZ; z++) // 가구가 차지하는 Z범위 만큼 { interiorArray[x, y, z] = null; // 배열에서 해당 인테리어를 빼기 } } } placedInteriors.Remove(interior); // 설치된 인테리어 리스트에서 해당 인테리어 빼기 }
public Carro(string path,Interior interior) { car=load3ds(path); car.ComputeNormals(); colores=new color_typeF[]{new color_typeF(0.5f,1.0f,0f),new color_typeF(1f,1f,0.4f),new color_typeF(1f,0.5f,1f),new color_typeF(0.5f,0.5f,1f),new color_typeF(0.7f,0f,0f)}; InitMyMaterial(); inter=interior; actList=new ArrayList(); // this.actList.Add("capo"); // this.actList.Add("maletero"); this.Recompile(); }
public void PlaceAtArray(Interior interior) // 배열에 인테리어 넣기 { for (int x = (int)(interior.transform.position.x - interior.placeRangeX); x <= interior.transform.position.x + interior.placeRangeX; x++) // 가구가 차지하는 X범위 만큼 { for (int y = (int)(interior.transform.position.y - interior.placeRangeY); y <= interior.transform.position.y + interior.placeRangeY; y++) // 가구가 차지하는 Y범위 만큼 { for (int z = (int)(interior.transform.position.z - interior.placeRangeZ); z <= interior.transform.position.z + interior.placeRangeZ; z++) // 가구가 차지하는 Z범위 만큼 { interiorArray[x, y, z] = interior; // 배열에 해당 인테리어를 넣기 } } } placedInteriors.Add(interior); // 설치된 인테리어 리스트에 해당 인테리어 넣기 }
public static bool IsHitableBlockHitted(Rect hitboxBounds, string interiorID = null) { ThreadingUtils.assertMainThread(); if (interiorID == Interior.Outside) { // Check if blocks are of type blocking Point topLeft = GeometryUtils.GetChunkPosition(hitboxBounds.Left, hitboxBounds.Top, WorldGrid.BlockSize.X, WorldGrid.BlockSize.Y); Point bottomRight = GeometryUtils.GetChunkPosition(hitboxBounds.Right, hitboxBounds.Bottom, WorldGrid.BlockSize.X, WorldGrid.BlockSize.Y); for (int blockX = topLeft.X; blockX <= bottomRight.X; blockX++) { for (int blockY = topLeft.Y; blockY <= bottomRight.Y; blockY++) { Point chunkPos = GeometryUtils.GetChunkPosition(blockX, blockY, WorldGrid.WorldChunkBlockSize.X, WorldGrid.WorldChunkBlockSize.Y); WorldGridChunk worldGridChunk = SimulationGame.World.GetFromChunkPoint(chunkPos.X, chunkPos.Y); int blockType = worldGridChunk.GetBlockType(blockX, blockY); if (IsBlockHitable(blockType)) { return(true); } } } } else { Interior interior = SimulationGame.World.InteriorManager.Get(interiorID); // Check if blocks are of type blocking Point topLeft = GeometryUtils.GetChunkPosition(hitboxBounds.Left, hitboxBounds.Top, WorldGrid.BlockSize.X, WorldGrid.BlockSize.Y); Point bottomRight = GeometryUtils.GetChunkPosition(hitboxBounds.Right, hitboxBounds.Bottom, WorldGrid.BlockSize.X, WorldGrid.BlockSize.Y); for (int blockX = topLeft.X; blockX <= bottomRight.X; blockX++) { for (int blockY = topLeft.Y; blockY <= bottomRight.Y; blockY++) { int blockType = interior.GetBlockType(blockX, blockY); if (IsBlockHitable(blockType)) { return(true); } } } } return(false); }
// GET: Interior/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Interior interior = db.Interior.Find(id); if (interior == null) { return(HttpNotFound()); } return(View(interior)); }
public Interior ConvertTOInterior(InteriorUI interiorUI) { Interior interior = new Interior() { Id = interiorUI.Id, Name = interiorUI.Name, Colour = interiorUI.Colour, Material = interiorUI.Material, Price = interiorUI.Price, Producer = interiorUI.Producer }; return(interior); }
public void ExportCSX(Interior interior, TextWriter w) { this.interior = interior; var docnodes = WriteCSXHeaderAndFooter(); for (int i = 0; i < interior.convexHulls.Count; i++) { ConvexHull hull = interior.convexHulls[i]; WriteBrush(docnodes.brushes, hull); } docnodes.document.Save(w); }
public static string GetSurroundingTileDescription(TileGroup surroundingTile) { Phrase.orientations = surroundingTile.orientations; // same tile if (Tile.GetCurrent.tileItem.SameTypeAs(surroundingTile.tile.tileItem)) { if (Tile.GetCurrent.tileItem.stackable) { // tu es dans une forêt, la forêt continue return(Phrase.GetPhrase("surroundingTile_continue", surroundingTile.tile.tileItem)); } else { // tu es près d'une maison, tu vois une maison que tu connais pas return(Phrase.GetPhrase("surroundingTile_discover", surroundingTile.tile.tileItem)); } } // new tile if (Interior.InsideInterior()) { // tu es dans la cuisine, et tu vois LE couloir ( dans un intérieur, les articles définis ont plus de sens ) if (surroundingTile.tile.tileItem.stackable) { // tu es dans une forêt, la forêt continue return(Phrase.GetPhrase("surroundingTile_continue", surroundingTile.tile.tileItem)); } else { // tu es près d'une maison, tu vois une maison que tu connais pas return(Phrase.GetPhrase("surroundingTile_visited", surroundingTile.tile.tileItem)); } } else { // ici if (surroundingTile.tile.visited) { // tu vois es près d'une maison return(Phrase.GetPhrase("surroundingTile_visited", surroundingTile.tile.tileItem)); } else { return(Phrase.GetPhrase("surroundingTile_discover", surroundingTile.tile.tileItem)); } } }
public Carro(string path, Interior interior) { car = load3ds(path); car.ComputeNormals(); colores = new color_typeF[] { new color_typeF(0.5f, 1.0f, 0f), new color_typeF(1f, 1f, 0.4f), new color_typeF(1f, 0.5f, 1f), new color_typeF(0.5f, 0.5f, 1f), new color_typeF(0.7f, 0f, 0f) }; InitMyMaterial(); inter = interior; actList = new ArrayList(); // this.actList.Add("capo"); // this.actList.Add("maletero"); this.Recompile(); }
public override void FromXmlNode(XmlNode node) { this.ID = XmlHelper.GetAttributeText(node, "ID"); this.Name = XmlHelper.GetAttributeText(node, "Name"); XmlNode alignmentNode = node.SelectSingleNode("ss:Alignment", Namespaces.GetNamespaceManager()); if (alignmentNode != null) { Alignment.FromXmlNode(alignmentNode); } XmlNode bordersNode = node.SelectSingleNode("ss:Borders", Namespaces.GetNamespaceManager()); if (bordersNode != null) { Borders.FromXmlNode(bordersNode); } XmlNode fontNode = node.SelectSingleNode("ss:Font", Namespaces.GetNamespaceManager()); if (fontNode != null) { Font.FromXmlNode(fontNode); } XmlNode interiorNode = node.SelectSingleNode("ss:Interior", Namespaces.GetNamespaceManager()); if (interiorNode != null) { Interior.FromXmlNode(interiorNode); } XmlNode numberFormatNode = node.SelectSingleNode("ss:NumberFormat", Namespaces.GetNamespaceManager()); if (numberFormatNode != null) { NumberFormat.FromXmlNode(numberFormatNode); } XmlNode protectionNode = node.SelectSingleNode("ss:Protection", Namespaces.GetNamespaceManager()); if (protectionNode != null) { Protection.FromXmlNode(protectionNode); } }
public void PickObject() // 오브젝트 잡기 { PickedObject = InteriorArrayManager.instance.interiorArray[(int)Cursor.transform.position.x, (int)Cursor.transform.position.y, (int)Cursor.transform.position.z]; // 커서 위치의 오브젝트 선택 InteriorArrayManager.instance.UnplaceFromArray(PickedObject); // 배열에서 해당 오브젝트 빼기 Cursor.transform.position = PickedObject.transform.position; // 커서를 오브젝트 중앙으로 이동 Cursor.transform.localScale = new Vector3(PickedObject.sizeX + 0.01f, PickedObject.sizeY + 0.01f, PickedObject.sizeZ + 0.01f); // 커서 크기를 오브젝트 크기에 맞게 설정 if (PickedObject.GetComponentInChildren <Collider>()) { foreach (Collider i in PickedObject.GetComponentsInChildren <Collider>()) { i.enabled = false; // Collider 비활성화 } } }
private void interact(Collider2D other) { //use tag instead of check for null, get rid of getcomponent call, make tags for all these switch (other.gameObject.name) { case "PlayerExit": player.gameState.NodeTransition(player.nodeID); //call before changing player's current nodeId return; case "BuildingEntrance": Building building = other.transform.parent.GetComponent <Building>(); World.activeBuilding.SetActive(true); World.nodes[player.nodeID].SetActive(false); player.gameState.GetHero().gameObject.SetActive(false); building.Load(player); return; case "BuildingExit": Interior interior = other.transform.parent.GetComponent <Interior>(); interior.building.Store(player); World.nodes[player.nodeID].SetActive(true); World.activeBuilding.SetActive(false); player.gameState.GetHero().gameObject.SetActive(true); return; default: break; } Container container = other.gameObject.GetComponent <Container>(); if (container != null) { if (!container.isEmpty) { container.Search(); } else { Debug.Log("Container is empty!"); } } else { Debug.Log(other.gameObject.name + " is not a container"); } }
public ActionResult Transcripts(List <InteriorModel> interiorlist) { Interior It = new Interior(); int i = 0; foreach (var item in interiorlist) { It.Id = i; It.unit = item.unit; It.telephon = item.telephon; It.fax = item.fax; It.address = item.address; It.website = item.website; using (var context = new InteriorEntitiee()) { int count = context.Interiors.Where(x => x.unit == item.unit).Count(); if (count > 0) { Interior obj = context.Interiors.Single(x => x.unit == It.unit); context.Entry(obj).State = EntityState.Deleted; context.SaveChanges(); } context.Interiors.Add(It); try { context.SaveChanges(); } catch (DbEntityValidationException ex) { //丟出ex內容 var validationErrors = ex.EntityValidationErrors.SelectMany(x => x.ValidationErrors).Select(x => x.ErrorMessage); var errMsgs = string.Join("; ", validationErrors); var msg = errMsgs.ToString(); } } i++; } return(View(interiorlist)); }
public static bool IsBlockHitable(int blockX, int blockY, string interiorID) { if (interiorID == Interior.Outside) { Point chunkPos = GeometryUtils.GetChunkPosition(blockX, blockY, WorldGrid.WorldChunkBlockSize.X, WorldGrid.WorldChunkBlockSize.Y); WorldGridChunk worldGridChunk = SimulationGame.World.GetFromChunkPoint(chunkPos.X, chunkPos.Y); int blockType = worldGridChunk.GetBlockType(blockX, blockY); return(IsBlockHitable(blockType)); } else { Interior interior = SimulationGame.World.InteriorManager.Get(interiorID); int blockType = interior.GetBlockType(blockX, blockY); return(IsBlockHitable(blockType)); } }
public IActionResult Post([FromBody] Interior entity) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (entity.DefinitionID == 0) { ModelState.AddModelError <Interior>(e => e.Definition, "Could not determine type of interior, please specify the type."); return(BadRequest(ModelState)); } entity.ID = 0; _context.Add(entity); _context.SaveChanges(); return(Created(entity)); }
public static void EraseInterior(Interior interior) { var chunkPathPersistent = Path.Combine(Util.Util.GetInteriorSavePath(), persistentIdentifier + interior.ID); var chunkPath = Path.Combine(Util.Util.GetInteriorSavePath(), interior.ID); fileLocks.Enter(chunkPath); try { var savePath = interior.IsPersistent ? chunkPathPersistent : chunkPath; File.Delete(savePath); } finally { fileLocks.Exit(chunkPath); } }
/// <summary> /// Laduje drzwi interiorów z bazy danych do pamięci. /// </summary> public static void LoadInteriorsDoors() { double startTime = Global.GetTimestampMs(); using (Database.Database db = new Database.Database()) { List <InteriorDoor> doors = db.InteriorDoors.ToList(); foreach (InteriorDoor entry in doors) { Interior interiorData = GetInteriorData(entry.ParentId); if (interiorData == null) { db.InteriorDoors.Remove(entry); continue; } entry.MarkerOut = NAPI.Marker.CreateMarker(20, new Vector3(entry.OutX, entry.OutY, entry.OutZ + 1), new Vector3(), new Vector3(), 0.5f, new Color(255, 255, 255, 255), true, (uint)entry.OutDim); entry.MarkerOut.Transparency = 255; if ((int)Math.Floor(entry.InX) != 0) { entry.MarkerIn = NAPI.Marker.CreateMarker(20, new Vector3(entry.InX, entry.InY, entry.InZ + 1), new Vector3(), new Vector3(), 0.5f, new Color(255, 255, 255, 255), true, (uint)entry.InDim); entry.MarkerIn.Transparency = 255; } if (entry.Blip > 0) { entry.BlipHandle = NAPI.Blip.CreateBlip(entry.Blip, new Vector3(entry.OutX, entry.OutY, entry.OutZ), 1.0f, 3, entry.Name, 255, 999999.0f, true, 0, (uint)entry.OutDim); } InteriorDoorsList.Add(entry.Id, entry); } Log.ConsoleLog("INTERIORS-DOORS", $"Załadowano drzwi interiorów ({InteriorDoorsList.Count}) | " + $"{Global.GetTimestampMs() - startTime}ms"); } }
void SetBuilding() { foreach (Building building in ownBuildings) { DataManager.Instance.CurrentPlayerData.buildings.Find(a => a.id == building.id).setup = false; BackendManager.Instance.UpdateTownConstructed(BackendManager.Instance.GetInDate("town"), building.id, building.setup); } foreach (Interior interior in ownInteriors) { DataManager.Instance.CurrentPlayerData.interiors.Find(a => a.id == interior.id).setup = false; BackendManager.Instance.UpdateTownConstructed(BackendManager.Instance.GetInDate("town"), interior.id, interior.setup); } foreach (GameObject obj in setupBuildings) { if (obj.name.StartsWith("1")) { Building building = DataManager.Instance.CurrentPlayerData.buildings.Find(a => a.id == int.Parse(obj.name.Substring(0, obj.name.Length - 7))); building.flip = obj.GetComponent <SpriteRenderer>().flipX; building.position = obj.transform.position.x; building.setup = true; BackendManager.Instance.UpdateTownFlipped(BackendManager.Instance.GetInDate("town"), building.id, building.flip); BackendManager.Instance.UpdateTownPosition(BackendManager.Instance.GetInDate("town"), building.id, building.position); BackendManager.Instance.UpdateTownConstructed(BackendManager.Instance.GetInDate("town"), building.id, building.setup); } else if (obj.name.StartsWith("2")) { Interior interior = DataManager.Instance.CurrentPlayerData.interiors.Find(a => a.id == int.Parse(obj.name.Substring(0, obj.name.Length - 7))); interior.flip = obj.GetComponent <SpriteRenderer>().flipX; interior.position = obj.transform.position.x; interior.setup = true; BackendManager.Instance.UpdateTownFlipped(BackendManager.Instance.GetInDate("town"), interior.id, interior.flip); BackendManager.Instance.UpdateTownPosition(BackendManager.Instance.GetInDate("town"), interior.id, interior.position); BackendManager.Instance.UpdateTownConstructed(BackendManager.Instance.GetInDate("town"), interior.id, interior.setup); } } DataManager.Instance.CurrentPlayerData.setupBuildilngs = setupBuildings; GameManager.Instance.SetFloor(); }
void SetBuilding() { foreach (Building building in ownBuildings) { DataManager.Instance.CurrentPlayerData.buildings.Find(a => a.id == building.id).setup = false; WebSocketManager.Instance.SendUpdateBuilding("", DataManager.Instance.CurrentPlayerData.player_id, building.id.ToString(), building.buildingName, building.buildingLevel, building.position, building.setup, building.flip, building.upgrading, building.UpgradeEndTime); } foreach (Interior interior in ownInteriors) { DataManager.Instance.CurrentPlayerData.interiors.Find(a => a.id == interior.id).setup = false; WebSocketManager.Instance.SendUpdateInterior("", DataManager.Instance.CurrentPlayerData.player_id, interior.id.ToString(), interior.interiorName, interior.position, interior.setup, interior.flip); } foreach (GameObject obj in setupBuildings) { if (obj.name.StartsWith("1")) { Building building = DataManager.Instance.CurrentPlayerData.buildings.Find(a => a.id == int.Parse(obj.name.Substring(0, obj.name.Length - 7))); building.flip = obj.GetComponent <SpriteRenderer>().flipX; building.position = obj.transform.position.x; building.setup = true; WebSocketManager.Instance.SendUpdateBuilding("", DataManager.Instance.CurrentPlayerData.player_id, building.id.ToString(), building.buildingName, building.buildingLevel, building.position, building.setup, building.flip, building.upgrading, building.UpgradeEndTime); } else if (obj.name.StartsWith("2")) { Interior interior = DataManager.Instance.CurrentPlayerData.interiors.Find(a => a.id == int.Parse(obj.name.Substring(0, obj.name.Length - 7))); interior.flip = obj.GetComponent <SpriteRenderer>().flipX; interior.position = obj.transform.position.x; interior.setup = true; WebSocketManager.Instance.SendUpdateInterior("", DataManager.Instance.CurrentPlayerData.player_id, interior.id.ToString(), interior.interiorName, interior.position, interior.setup, interior.flip); } } DataManager.Instance.CurrentPlayerData.setupBuildilngs = setupBuildings; GameManager.Instance.SetFloor(); }
/// <summary> /// Zwraca listę drzwi przypisanych do danego interioru. Jeśli nie znalazło żadnych drzwi zwraca false /// </summary> /// <param name="interiorData"></param> /// <returns></returns> public static IEnumerable <InteriorDoor> GetInteriorDoors(Interior interiorData) { if (interiorData == null) { return(null); } List <InteriorDoor> output = new List <InteriorDoor>(); foreach (KeyValuePair <int, InteriorDoor> entry in InteriorDoorsList) { if (entry.Value.ParentId == interiorData.Id) { output.Add(entry.Value); } } return(output.Count == 0 ? null : output); }
public void RemoveObject() // 오브젝트 삭제 { PickedObject = InteriorArrayManager.instance.interiorArray[(int)Cursor.transform.position.x, (int)Cursor.transform.position.y, (int)Cursor.transform.position.z]; // 커서 위치의 오브젝트 선택 for (int x = (int)(PickedObject.transform.position.x - PickedObject.placeRangeX); x <= PickedObject.transform.position.x + PickedObject.placeRangeX; x++) // 가구가 차지하는 X범위 만큼 { for (int y = (int)(PickedObject.transform.position.y - PickedObject.placeRangeY); y <= PickedObject.transform.position.y + PickedObject.placeRangeY; y++) // 가구가 차지하는 Y범위 만큼 { for (int z = (int)(PickedObject.transform.position.z - PickedObject.placeRangeZ); z <= PickedObject.transform.position.z + PickedObject.placeRangeZ; z++) // 가구가 차지하는 Z범위 만큼 { InteriorArrayManager.instance.interiorArray[x, y, z] = null; // 3차원 배열에서 커서 위치의 오브젝트를 제거 } } } InteriorArrayManager.instance.UnplaceFromArray(PickedObject); // 배열에 해당 오브젝트 넣기 // 3차원 배열에서 커서 위치의 오브젝트를 제거 PickedObject.gameObject.SetActive(false); // 선택한 오브젝트 삭제 PickedObject = null; // 선택된 오브젝트 없음 }
public void InteriorSet() { if (!this.masterMake) { this.backNo = this.save.ValList[13]; this.back = BackgroundBase.BackMake(this.backNo); for (int index = 0; index < this.Events.Count; ++index) { if (this.Events[index].ID.Contains("InteriorItem")) { this.masterList.Add(this.Events[index]); } } this.masterMake = true; } this.Events.RemoveAll(i => i.ID.Contains("InteriorItem")); foreach (Interior interior in this.save.interiors) { Interior i = interior; if (i.set) { MapEventBase mapEventBase1 = this.masterList.Find(iv => iv.ID.Contains($"InteriorItem{i.number + 1}")); MapEventBase mapEventBase2 = new MapEventBase(this.sound, this.parent, new Point(i.posiX, i.posiY), 0, MapCharacterBase.ANGLE.DOWN, this, mapEventBase1.ID, this.save, ""); List <EventPage> eventPageList = new List <EventPage>(); foreach (EventPage eventPage1 in mapEventBase1.eventPages) { EventPage eventPage2 = eventPage1.Clone(mapEventBase2); if (i.rebirth) { eventPage2.Rebirth(); } eventPageList.Add(eventPage2); } EventPage[] array = eventPageList.ToArray(); mapEventBase2.eventPages = array; foreach (EventPage eventPage in mapEventBase2.eventPages) { eventPage.ParentSet(mapEventBase2); } this.Events.Add(mapEventBase2); } } }
void GoOut() { if (Interior.GetCurrent != null) { if (Player.Instance.coords == Coords.Zero) { Interior.Get(coords).ExitByDoor(); } else { Move(Player.Orientation.Back); //DisplayFeedback.Instance.Display("Vous n'êtes pas près de l'entrée"); } } else { Move(Player.Orientation.Back); } }
public TeePee(TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics) : base(team, content, graphics) { string objKey = "teePee"; //MapModelMovementVectorValues(); Texture2D texture = content.Load <Texture2D>("TeePee"); Texture2D textureBB = null; if (Gusto.GameOptions.ShowBoundingBox) { textureBB = new Texture2D(graphics, texture.Width, texture.Height); } Asset asset = new Asset(texture, textureBB, 4, 1, 0.5f, objKey, region); // inventory List <Sprite> interiorObjs = null; if (team != TeamType.Player) { List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(objKey, 5); interiorObjs = ItemUtility.CreateInteriorItems(itemDrops, team, region, location, content, graphics); } structureInterior = new Interior("teePee", this, content, graphics); // set the random drops as interior objects if (interiorObjs != null) { foreach (var obj in interiorObjs) { structureInterior.interiorObjects.Add(obj); // need to do this for containers so they drop items within ship if (obj is IContainer) { Container c = (Container)obj; c.inInteriorId = structureInterior.interiorId; } } } SetSpriteAsset(asset, location); }
public static void prettifyExcel(Worksheet worksheet, IExcelUtil excelUtilObj) { var range = worksheet.UsedRange; long lastColumn = excelUtilObj.getColumnCount(row: 1, ws: worksheet); #region gottaBuildThatWall range.Borders[XlBordersIndex.xlEdgeLeft].LineStyle = XlLineStyle.xlContinuous; range.Borders[XlBordersIndex.xlEdgeLeft].Weight = XlBorderWeight.xlThin; range.Borders[XlBordersIndex.xlEdgeRight].LineStyle = XlLineStyle.xlContinuous; range.Borders[XlBordersIndex.xlEdgeRight].Weight = XlBorderWeight.xlThin; range.Borders[XlBordersIndex.xlEdgeBottom].LineStyle = XlLineStyle.xlContinuous; range.Borders[XlBordersIndex.xlEdgeBottom].Weight = XlBorderWeight.xlThin; range.Borders[XlBordersIndex.xlEdgeTop].LineStyle = XlLineStyle.xlContinuous; range.Borders[XlBordersIndex.xlEdgeTop].Weight = XlBorderWeight.xlThin; range.Borders[XlBordersIndex.xlInsideVertical].LineStyle = XlLineStyle.xlContinuous; range.Borders[XlBordersIndex.xlInsideVertical].Weight = XlBorderWeight.xlThin; range.Borders[XlBordersIndex.xlInsideHorizontal].LineStyle = XlLineStyle.xlContinuous; range.Borders[XlBordersIndex.xlInsideHorizontal].Weight = XlBorderWeight.xlThin; #endregion //this is full of workarounds due to excel interop bugs like object not set Range firstRow = worksheet.Range[worksheet.Cells[1, 1], worksheet.Cells[1, lastColumn]]; if (firstRow is null) { firstRow = worksheet.Range[worksheet.Cells[1, 1], worksheet.Cells[1, lastColumn]]; } Interior firstRowInterior = firstRow.Interior; object firstRowColorIndex = firstRowInterior.ColorIndex; firstRowColorIndex = 34; range.Columns.AutoFit(); }
protected override void Seed(Dealer context) // створення дефолтних класів з просеченими полями { User user = new User() { Login = "******", Password = "******", Ballance = 100000 }; context.Users.Add(user); Engine engine = new Engine { Cylinders = 6, HP = 218, Liters = 3, Name = "M57TU", Price = 2000, Producer = "BMW", Torque = 500, Type = "Diesel" }; context.BaseClasses.Add(engine); Gearbox gearbox = new Gearbox { Name = "6HP26", Price = 1000, Producer = "ZF", Quantity = 6, Type = "Automatic" }; context.BaseClasses.Add(gearbox); Interior interior = new Interior { Colour = "Black", Material = "Leather", Price = 1500, Producer = "BMW", Name = "" }; context.BaseClasses.Add(interior); Exterior exterior = new Exterior { Colour = "Black", Name = "", Price = 1000, Producer = "BMW", TypeOfPaint = "Glossy" }; context.BaseClasses.Add(exterior); Car car = new Car { Engine = engine, Exterior = exterior, Interior = interior, Name = "BMW X5", Price = 5000, Gearbox = gearbox, Status = "Not sold" }; context.Cars.Add(car); context.SaveChanges(); }
public void Enter() { TileSet.map.playerCoords = Player.Instance.coords; GetCurrent = this; if (tileSet == null) { Genererate(); } TileSet.SetCurrent(tileSet); MapTexture.Instance.UpdateInteriorMap(); Player.Instance.coords = tileSet.Center; Player.Instance.Move(Direction.None); //DisplayDescription.Instance.UpdateDescription(); TimeManager.GetInstance().ChangeMovesPerHour(4); }
public void BuildInterior() { var interior = new Interior(); AddHousePart(interior); }
public static void FormatBackground(Interior interior, Color color) { interior.Pattern = Constants.xlSolid; interior.PatternColorIndex = Constants.xlAutomatic; interior.Color = XlColor(color); interior.TintAndShade = 0; interior.PatternTintAndShade = 0; }