/// <summary> /// Deletes a hairStyle by ID /// </summary> /// <param name="id">ID of the hairStyle to be deleted</param> /// <exception cref="ResourceNotFoundException"> /// Thrown if the hair style with the corresponding <seealso cref="id"/> is not found /// </exception> /// <returns>HairStyle deleted</returns> public async Task <HairStyles> Delete(ulong id) { HairStyles hairStyle = null; if (_context != null) { hairStyle = await _context.HairStyles.FindAsync(id); if (hairStyle != null) { _context.HairStyles.Remove(hairStyle); await _context.SaveChangesAsync(); } else { throw new ResourceNotFoundException("HairStyle not found"); } } else { hairStyle = HairStyles.Where(u => u.Id == id).FirstOrDefault(); if (hairStyle != null) { HairStyles.Remove(hairStyle); } else { throw new ResourceNotFoundException("HairStyle not found"); } } return(hairStyle); }
public async Task <IActionResult> PutHairStyles(ulong id, [FromBody] HairStyles hairStyles) { if (!_authorizationService.ValidateJWTToken(Request)) { return(Unauthorized(new { errors = new { Token = new string[] { "Invalid token" } }, status = 401 })); } if (id != hairStyles.Id) { return(BadRequest(new { errors = new { Id = new string[] { "ID sent does not match the one in the endpoint" } }, status = 400 })); } HairStyles hs = await _context.HairStyles.FindAsync(id); try { if (hs != null) { hs.HairStyleName = hairStyles.HairStyleName; _context.Entry(hs).State = EntityState.Modified; await _context.SaveChangesAsync(); return(Ok()); } return(NotFound()); } catch (DbUpdateConcurrencyException) { return(StatusCode(500)); } }
public async Task Edit_ReturnsTrue() { // Arrange _hairStylesContext = _db.SeedHairStylesContext(); ulong id = 2; List <HairStyles> currentHairStyles = _db.HairStyles; HairStyles current = currentHairStyles.FirstOrDefault(c => c.Id == id); HairStyles updated = current.ShallowCopy(); updated.HairStyleName = "mohawk"; HairStyles updatedHairStyle = new HairStyles { Id = id, HairStyleName = updated.HairStyleName }; bool expected = true; // Act bool actual = await _hairStylesContext.Edit(id, updatedHairStyle); HairStyles u = _db.HairStyles.FirstOrDefault(c => c.Id == id); _db.HairStyles = new List <HairStyles>(currentHairStyles); // Assert Assert.Equal(expected, actual); Assert.Equal(updatedHairStyle.HairStyleName, u.HairStyleName); }
public async Task <IActionResult> PutHairStyles(ulong id, [FromBody] HairStyles hairStyles) { if (!_authorizationService.ValidateJWTCookie(Request)) { return(Unauthorized(new { errors = new { Token = new string[] { "Invalid token" } }, status = 401 })); } if (id != hairStyles.Id) { return(BadRequest(new { errors = new { Id = new string[] { "ID sent does not match the one in the endpoint" } }, status = 400 })); } _context.Entry(hairStyles).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HairStylesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <HairStyles> > PostHairStyles([FromBody] HairStyles hairStyles) { if (!_authorizationService.ValidateJWTToken(Request)) { return(Unauthorized(new { errors = new { Token = new string[] { "Invalid token" } }, status = 401 })); } _context.HairStyles.Add(hairStyles); await _context.SaveChangesAsync(); return(CreatedAtAction("GetHairStyles", new { id = hairStyles.Id }, hairStyles)); }
public async Task Read_ReturnsHairStyleById() { // Arrange _hairStylesContext = _db.SeedHairStylesContext(); ulong id = 1; HairStyles expected = _db.HairStyles.FirstOrDefault(c => c.Id == id); // Act HairStyles actual = await _hairStylesContext.ReadById(id); // Assert Assert.Equal(expected, actual); }
/// <summary> /// Adds a new hair style /// <para> /// NOTE: Currently this method is not restricted to unique hair styles, so the operation always succeeds /// </para> /// </summary> /// <param name="hairStyle">hair style to be added</param> /// <returns>hair style added</returns> public Task <HairStyles> Add(HairStyles hairStyle) { HairStyles hairStyleAdded = null; if (_context != null) { _context.HairStyles.Add(hairStyle); hairStyleAdded = hairStyle; } else { HairStyles.Add(hairStyle); hairStyleAdded = hairStyle; } return(Task.FromResult(hairStyleAdded)); }
/// <summary> /// Updates an existing hairStyle /// </summary> /// <param name="id">ID of the hairStyle to be updated</param> /// <param name="updatedHairStyle">Updated hairStyle object</param> /// <exception cref="ResourceNotFoundException"> /// Thrown if <seealso cref="updatedHairStyle"/> does not exist /// </exception> /// <exception cref="DbUpdateConcurrencyException"> /// </exception> /// <returns>Result of the operation</returns> public async Task <bool> Edit(ulong id, HairStyles updatedHairStyle) { bool hairStyleUpdated = false; if (_context != null) { HairStyles currentHairStyle = await _context.HairStyles.FindAsync(id); try { if (currentHairStyle != null) { currentHairStyle.HairStyleName = updatedHairStyle.HairStyleName; _context.Entry(currentHairStyle).State = EntityState.Modified; await _context.SaveChangesAsync(); hairStyleUpdated = true; } throw new ResourceNotFoundException("HairStyle not found"); } catch (DbUpdateConcurrencyException ex) { throw ex; } } else { HairStyles currentHairStyle = HairStyles.FirstOrDefault(hl => hl.Id == id); if (currentHairStyle != null) { int currentHairStyleIndex = HairStyles.FindIndex(c => c.Id == id); HairStyles[currentHairStyleIndex] = updatedHairStyle; hairStyleUpdated = true; } else { throw new ResourceNotFoundException("HairStyle not found"); } } return(hairStyleUpdated); }
public async Task Delete_ReturnsHairStyleDeleted() { // Arrange _hairStylesContext = _db.SeedHairStylesContext(); ulong id = 2; List <HairStyles> currentHairStyles = _db.HairStyles; int currentHairStylesCount = _db.HairStyles.Count; HairStyles expected = _db.HairStyles.FirstOrDefault(u => u.Id == id); // Act HairStyles actual = await _hairStylesContext.Delete(id); int updatedHairStylesCount = _db.HairStyles.Count; _db.HairStyles = new List <HairStyles>(currentHairStyles); // Assert Assert.Equal(expected.Id, actual.Id); Assert.Equal(currentHairStylesCount - 1, updatedHairStylesCount); }
public async Task Add_ReturnsHairStyleAdded() { // Arrange _hairStylesContext = _db.SeedHairStylesContext(); int currentHairStylesCount = _db.HairStyles.Count; List <HairStyles> currentHairStyles = _db.HairStyles; HairStyles expected = new HairStyles { Id = 3, HairStyleName = "wavy" }; // Act HairStyles actual = await _hairStylesContext.Add(expected); int updatedHairStylesCount = _db.HairStyles.Count; _db.HairStyles = new List <HairStyles>(currentHairStyles); // Assert Assert.Equal(expected.Id, actual.Id); Assert.Equal(currentHairStylesCount + 1, updatedHairStylesCount); }
public override void Draw(SpriteBatchUI spriteBatch, Vector2Int position, double frameMS) { var slotsToDraw = { EquipSlots.Body, EquipSlots.Footwear, EquipSlots.Legging, EquipSlots.Shirt, EquipSlots.Hair, EquipSlots.FacialHair }; for (var i = 0; i < slotsToDraw.Length; i++) { var bodyID = 0; var hue = hueSlot(slotsToDraw[i]); var hueGreyPixelsOnly = true; switch (slotsToDraw[i]) { case EquipSlots.Body: if (_isElf) { bodyID = _isFemale ? 1893 : 1894; } else { bodyID = _isFemale ? 1888 : 1889; } break; case EquipSlots.Footwear: bodyID = _isFemale ? 1891 : 1890; hue = 900; break; case EquipSlots.Legging: bodyID = _isFemale ? 1892 : 1848; hue = 348; break; case EquipSlots.Shirt: bodyID = _isFemale ? 1812 : 1849; hue = 792; break; case EquipSlots.Hair: if (equipmentSlot(EquipSlots.Hair) != 0) { bodyID = _isFemale ? HairStyles.FemaleGumpIDForCharacterCreationFromItemID(equipmentSlot(EquipSlots.Hair)) : HairStyles.MaleGumpIDForCharacterCreationFromItemID(equipmentSlot(EquipSlots.Hair)); hueGreyPixelsOnly = false; } break; case EquipSlots.FacialHair: if (equipmentSlot(EquipSlots.FacialHair) != 0) { bodyID = _isFemale ? 0 : HairStyles.FacialHairGumpIDForCharacterCreationFromItemID(equipmentSlot(EquipSlots.FacialHair)); hueGreyPixelsOnly = false; } break; } if (bodyID != 0) { // this is silly, we should be keeping a local copy of the body texture. var provider = Service.Get <IResourceProvider>(); spriteBatch.Draw2D(provider.GetUITexture(bodyID), new Vector3(position.x, position.y, 0), Utility.GetHueVector(hue, hueGreyPixelsOnly, false, false)); } } }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { EquipSlots[] slotsToDraw = new EquipSlots[6] { EquipSlots.Body, EquipSlots.Footwear, EquipSlots.Legging, EquipSlots.Shirt, EquipSlots.Hair, EquipSlots.FacialHair }; for (int i = 0; i < slotsToDraw.Length; i++) { int bodyID = 0; int hue = hueSlot(slotsToDraw[i]); bool hueGreyPixelsOnly = true; switch (slotsToDraw[i]) { case EquipSlots.Body: if (m_isElf) { bodyID = (m_isFemale ? 1893 : 1894); } else { bodyID = (m_isFemale ? 1888 : 1889); } break; case EquipSlots.Footwear: bodyID = (m_isFemale ? 1891 : 1890); hue = 900; break; case EquipSlots.Legging: bodyID = (m_isFemale ? 1892 : 1848); hue = 348; break; case EquipSlots.Shirt: bodyID = (m_isFemale ? 1812 : 1849); hue = 792; break; case EquipSlots.Hair: if (equipmentSlot(EquipSlots.Hair) != 0) { bodyID = m_isFemale ? HairStyles.FemaleGumpIDForCharacterCreationFromItemID(equipmentSlot(EquipSlots.Hair)) : HairStyles.MaleGumpIDForCharacterCreationFromItemID(equipmentSlot(EquipSlots.Hair)); hueGreyPixelsOnly = false; } break; case EquipSlots.FacialHair: if (equipmentSlot(EquipSlots.FacialHair) != 0) { bodyID = m_isFemale ? 0 : HairStyles.FacialHairGumpIDForCharacterCreationFromItemID(equipmentSlot(EquipSlots.FacialHair)); hueGreyPixelsOnly = false; } break; } if (bodyID != 0) { // this is silly, we should be keeping a local copy of the body texture. IResourceProvider provider = ServiceRegistry.GetService <IResourceProvider>(); spriteBatch.Draw2D(provider.GetUITexture(bodyID), new Vector3(position.X, position.Y, 0), Utility.GetHueVector(hue, hueGreyPixelsOnly, false)); } } }
public void wear() { base.transform.localScale = new Vector3(1f, 1f, (float)((!this.arm ? 1 : -1))); Texture2D texture2D = new Texture2D(64, 64, TextureFormat.RGBA32, false); Texture2D texture2D1 = null; Texture2D texture2D2 = null; Texture2D texture2D3 = null; if (this.face != -1) { texture2D1 = (Texture2D)Resources.Load(string.Concat("Textures/Faces/", this.face)); } if (this.shirt != -1) { texture2D2 = (Texture2D)Resources.Load(string.Concat("Textures/Shirts/", this.shirt)); } if (this.pants != -1) { texture2D3 = (Texture2D)Resources.Load(string.Concat("Textures/Pants/", this.pants)); } for (int i = 0; i < 64; i++) { for (int j = 0; j < 64; j++) { if (texture2D1 != null && i >= 32 && j >= 16 && i < 48 && j < 32 && texture2D1.GetPixel(i - 32, j - 16) != Color.white) { texture2D.SetPixel(i, j, texture2D1.GetPixel(i - 32, j - 16)); } else if (texture2D2 != null && texture2D2.GetPixel(i, j) != Color.white) { texture2D.SetPixel(i, j, texture2D2.GetPixel(i, j)); } else if (!(texture2D3 != null) || !(texture2D3.GetPixel(i, j) != Color.white)) { texture2D.SetPixel(i, j, SkinColor.getColor(this.skinColor)); } else { texture2D.SetPixel(i, j, texture2D3.GetPixel(i, j)); } } } texture2D.filterMode = FilterMode.Point; texture2D.name = "texture"; texture2D.Apply(); base.transform.FindChild("model").renderer.material.SetTexture("_MainTex", texture2D); if (this.modelHat != null) { UnityEngine.Object.Destroy(this.modelHat); } if (this.modelHair != null) { UnityEngine.Object.Destroy(this.modelHair); } if (this.modelBackpack != null) { UnityEngine.Object.Destroy(this.modelBackpack); } if (this.modelVest != null) { UnityEngine.Object.Destroy(this.modelVest); } if (this.modelItem != null) { UnityEngine.Object.Destroy(this.modelItem); } if (this.hat != -1) { this.modelHat = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Charmodels/", this.hat))); this.modelHat.name = "modelHat"; this.modelHat.transform.parent = base.transform.FindChild("skeleton").FindChild("spine").FindChild("neck"); this.modelHat.transform.localPosition = Vector3.zero; this.modelHat.transform.localRotation = Quaternion.identity; this.modelHat.transform.localScale = new Vector3(1f, 1f, 1f); } if (this.hair != -1 && (this.hat == -1 || !ArmorStats.getCover(this.hat) || HairStyles.getBeard(this.hair) && !ArmorStats.getMask(this.hat))) { this.modelHair = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Charmodels/", this.hair))); this.modelHair.name = "modelHair"; this.modelHair.transform.parent = base.transform.FindChild("skeleton").FindChild("spine").FindChild("neck"); this.modelHair.transform.localPosition = Vector3.zero; this.modelHair.transform.localRotation = Quaternion.identity; texture2D = new Texture2D(4, 4, TextureFormat.RGBA32, false); for (int k = 0; k < 4; k++) { for (int l = 0; l < 4; l++) { texture2D.SetPixel(k, l, HairColor.getColor(this.hairColor)); } } texture2D.filterMode = FilterMode.Point; texture2D.name = "texture"; texture2D.Apply(); this.modelHair.transform.FindChild("model").renderer.material.SetTexture("_MainTex", texture2D); this.modelHair.transform.localScale = new Vector3(1f, 1f, 1f); } if (this.backpack != -1) { this.modelBackpack = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Charmodels/", this.backpack))); this.modelBackpack.name = "modelBackpack"; this.modelBackpack.transform.parent = base.transform.FindChild("skeleton").FindChild("spine"); this.modelBackpack.transform.localPosition = Vector3.zero; this.modelBackpack.transform.localRotation = Quaternion.identity; this.modelBackpack.transform.localScale = new Vector3(1f, 1f, 1f); } if (this.vest != -1) { this.modelVest = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Charmodels/", this.vest))); this.modelVest.name = "modelVest"; this.modelVest.transform.parent = base.transform.FindChild("skeleton").FindChild("spine"); this.modelVest.transform.localPosition = Vector3.zero; this.modelVest.transform.localRotation = Quaternion.identity; this.modelVest.transform.localScale = new Vector3(1f, 1f, 1f); } if (this.item != -1) { this.modelItem = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Viewmodels/", this.item))); this.modelItem.name = "modelItem"; if (this.item == 7004 || this.item == 7014) { this.modelItem.transform.parent = base.transform.FindChild("skeleton").FindChild("spine").FindChild("leftShoulder").FindChild("leftArmUpper").FindChild("leftArmLower").FindChild("leftHand"); this.modelItem.transform.localRotation = Quaternion.Euler(90f, 0f, 0f); } else { this.modelItem.transform.parent = base.transform.FindChild("skeleton").FindChild("spine").FindChild("rightShoulder").FindChild("rightArmUpper").FindChild("rightArmLower").FindChild("rightHand"); this.modelItem.transform.localRotation = Quaternion.Euler(-90f, 0f, 0f); } this.modelItem.transform.localPosition = Vector3.zero; UnityEngine.Object.Destroy(this.modelItem.GetComponent <Useable>()); this.modelItem.tag = "Enemy"; this.modelItem.layer = 9; this.modelItem.transform.FindChild("model").gameObject.tag = "Enemy"; this.modelItem.transform.FindChild("model").gameObject.layer = 9; this.modelItem.transform.FindChild("model").renderer.castShadows = true; this.modelItem.transform.FindChild("model").renderer.receiveShadows = true; this.modelItem.transform.localScale = new Vector3(1f, 1f, 1f); if (ItemType.getType(this.item) == 7 && this.state != string.Empty) { string[] strArrays = Packer.unpack(this.state, '\u005F'); int num = int.Parse(strArrays[1]); int num1 = int.Parse(strArrays[2]); int num2 = int.Parse(strArrays[3]); int num3 = int.Parse(strArrays[4]); bool flag = strArrays[6] == "y"; Transform transforms = this.modelItem.transform.FindChild("model").transform.FindChild("magazine"); if (num != -1) { GameObject vector3 = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Viewmodels/", num))); vector3.name = "model"; vector3.transform.parent = transforms; vector3.transform.localPosition = Vector3.zero; vector3.transform.localRotation = Quaternion.identity; vector3.tag = "Enemy"; vector3.layer = 9; vector3.transform.FindChild("model").tag = "Enemy"; vector3.transform.FindChild("model").gameObject.layer = 9; vector3.transform.FindChild("model").renderer.castShadows = true; vector3.transform.FindChild("model").renderer.receiveShadows = true; vector3.transform.localScale = new Vector3(1f, 1f, 1f); } Transform transforms1 = this.modelItem.transform.FindChild("model").transform.FindChild("tactical"); if (num1 != -1) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Viewmodels/", num1))); gameObject.name = "model"; gameObject.transform.parent = transforms1; gameObject.transform.localPosition = Vector3.zero; gameObject.transform.localRotation = Quaternion.identity; gameObject.tag = "Enemy"; gameObject.layer = 9; gameObject.transform.FindChild("model").tag = "Enemy"; gameObject.transform.FindChild("model").gameObject.layer = 9; gameObject.transform.FindChild("model").renderer.castShadows = true; gameObject.transform.FindChild("model").renderer.receiveShadows = true; gameObject.transform.localScale = new Vector3(1f, 1f, 1f); if (num1 == 11002) { gameObject.transform.FindChild("model").FindChild("light").light.enabled = flag; } else if (num1 == 11003) { gameObject.transform.FindChild("model").FindChild("light_0").light.enabled = flag; gameObject.transform.FindChild("model").FindChild("light_1").light.enabled = flag; } } Transform transforms2 = this.modelItem.transform.FindChild("model").transform.FindChild("barrel"); if (num2 != -1) { GameObject vector31 = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Viewmodels/", num2))); vector31.name = "model"; vector31.transform.parent = transforms2; vector31.transform.localPosition = Vector3.zero; vector31.transform.localRotation = Quaternion.identity; vector31.tag = "Enemy"; vector31.layer = 9; vector31.transform.FindChild("model").tag = "Enemy"; vector31.transform.FindChild("model").gameObject.layer = 9; vector31.transform.FindChild("model").renderer.castShadows = true; vector31.transform.FindChild("model").renderer.receiveShadows = true; vector31.transform.localScale = new Vector3(1f, 1f, 1f); } Transform transforms3 = this.modelItem.transform.FindChild("model").transform.FindChild("sight"); if (num3 != -1) { GameObject gameObject1 = (GameObject)UnityEngine.Object.Instantiate(Resources.Load(string.Concat("Prefabs/Viewmodels/", num3))); gameObject1.name = "model"; gameObject1.transform.parent = transforms3; gameObject1.transform.localPosition = Vector3.zero; gameObject1.transform.localRotation = Quaternion.identity; gameObject1.tag = "Enemy"; gameObject1.layer = 9; gameObject1.transform.FindChild("model").tag = "Enemy"; gameObject1.transform.FindChild("model").gameObject.layer = 9; gameObject1.transform.FindChild("model").renderer.castShadows = true; gameObject1.transform.FindChild("model").renderer.receiveShadows = true; UnityEngine.Object.Destroy(gameObject1.transform.FindChild("model").FindChild("aim").gameObject); gameObject1.transform.localScale = new Vector3(1f, 1f, 1f); } } else if ((this.item == 8001 || this.item == 8008) && this.state == "b") { this.modelItem.transform.FindChild("model").FindChild("light_0").light.enabled = true; this.modelItem.transform.FindChild("model").FindChild("light_1").light.enabled = true; } } }
void startDictionary() { //0-999 short hairstyles HairStyles style0 = new HairStyles("no haircut"); hairStyleList.Add(0, style0); HairStyles style100 = new HairStyles("shaven"); hairStyleList.Add(100, style100); HairStyles style101 = new HairStyles("Sassy short"); hairStyleList.Add(101, style101); HairStyles style102 = new HairStyles("Bob haircut"); hairStyleList.Add(102, style102); HairStyles style103 = new HairStyles("Pixie haircut"); hairStyleList.Add(103, style103); HairStyles style104 = new HairStyles("short mowhawk"); hairStyleList.Add(104, style104); HairStyles style105 = new HairStyles("comb over"); hairStyleList.Add(105, style105); HairStyles style106 = new HairStyles("curly bob haircut"); hairStyleList.Add(106, style106); HairStyles style107 = new HairStyles("Ivy League haircut"); hairStyleList.Add(107, style107); HairStyles style108 = new HairStyles("pompadour"); hairStyleList.Add(108, style108); HairStyles style109 = new HairStyles("short braids"); hairStyleList.Add(109, style109); HairStyles style110 = new HairStyles("haircut1"); hairStyleList.Add(110, style110); //1000 - 1999 HairStyles style1000 = new HairStyles("twist-in bun"); hairStyleList.Add(1000, style1000); HairStyles style1001 = new HairStyles("elegant bun"); hairStyleList.Add(1001, style1001); HairStyles style1002 = new HairStyles("mohawk"); hairStyleList.Add(1002, style1002); HairStyles style1003 = new HairStyles("braids"); hairStyleList.Add(1003, style1003); HairStyles style1004 = new HairStyles("dreadlocks"); hairStyleList.Add(1004, style1004); HairStyles style1005 = new HairStyles("braided ponytail"); hairStyleList.Add(1005, style1005); HairStyles style1006 = new HairStyles("curly style"); hairStyleList.Add(1006, style1006); HairStyles style1007 = new HairStyles("haircut1"); hairStyleList.Add(1007, style1007); HairStyles style1008 = new HairStyles("haircut1"); hairStyleList.Add(1008, style1008); HairStyles style1009 = new HairStyles("haircut1"); hairStyleList.Add(1009, style1009); HairStyles style1010 = new HairStyles("haircut1"); hairStyleList.Add(1010, style1010); //2000+ HairStyles style2000 = new HairStyles("long ponytails"); hairStyleList.Add(2000, style2000); HairStyles style2001 = new HairStyles("beehive hairstyle"); hairStyleList.Add(2001, style2001); HairStyles style2002 = new HairStyles("long mohawk"); hairStyleList.Add(2002, style2002); HairStyles style2003 = new HairStyles("long brides"); hairStyleList.Add(2003, style2003); HairStyles style2004 = new HairStyles("long dreadlocks"); hairStyleList.Add(2004, style2004); HairStyles style2005 = new HairStyles("long braided ponytails"); hairStyleList.Add(2005, style2005); HairStyles style2006 = new HairStyles("long curls"); hairStyleList.Add(2006, style2006); HairStyles style2007 = new HairStyles("haircut1"); hairStyleList.Add(2007, style2007); HairStyles style2008 = new HairStyles("haircut1"); hairStyleList.Add(2008, style2008); HairStyles style2009 = new HairStyles("haircut1"); hairStyleList.Add(2009, style2009); HairStyles style2010 = new HairStyles("haircut1"); hairStyleList.Add(2010, style2010); }