public new HashSet <string> GetSelectedFieldsList() { var hs = base.GetSelectedFieldsList(); if (Smokes.Count > 0 && Smokes.Any(p => p > 0)) { hs.Add("Smokes"); } if (Alcohol.Count > 0 && Alcohol.Any(p => p > 0)) { hs.Add("Alcohol"); } if (Religion.Count > 0 && Religion.Any(p => p > 0)) { hs.Add("Religion"); } if (DickSize.Count > 0 && DickSize.Any(p => p > 0)) { hs.Add("DickSize"); } if (DickThickness.Count > 0 && DickThickness.Any(p => p > 0)) { hs.Add("DickThickness"); } if (BreastSize.Count > 0 && BreastSize.Any(p => p > 0)) { hs.Add("BreastSize"); } return(hs); }
public IDrink CreatedDrink(string drinkType, string drinkName, int drinkServingSize, string drinkBrand) { IDrink drinkToCreate = null; switch (drinkType.ToLower()) { case "alcohol": drinkToCreate = new Alcohol(drinkName, drinkServingSize, drinkBrand); break; case "fuzzydrink": drinkToCreate = new FuzzyDrink(drinkName, drinkServingSize, drinkBrand); break; case "juice": drinkToCreate = new Juice(drinkName, drinkServingSize, drinkBrand); break; case "water": drinkToCreate = new Water(drinkName, drinkServingSize, drinkBrand); break; } return(drinkToCreate); }
public string AddDrink(string type, string name, int servingSize, string brand) { IDrink drink = null; string output = string.Empty; if (type == "Alcohol") { drink = new Alcohol(name, servingSize, brand); drinks.Add(drink); output = $"Added {name} ({brand}) to the drink pool"; } else if (type == "FuzzyDrink") { drink = new FuzzyDrink(name, servingSize, brand); drinks.Add(drink); output = $"Added {name} ({brand}) to the drink pool"; } else if (type == "Juice") { drink = new Juice(name, servingSize, brand); drinks.Add(drink); output = $"Added {name} ({brand}) to the drink pool"; } else if (type == "Water") { drink = new Water(name, servingSize, brand); drinks.Add(drink); output = $"Added {name} ({brand}) to the drink pool"; } return(output); }
public static IDrink CreateDrink(string type, string name, int servingSize, string brand) { IDrink drink; switch (type) { case "Alcohol": drink = new Alcohol(name, servingSize, brand); break; case "Juice": drink = new Juice(name, servingSize, brand); break; case "FuzzyDrink": drink = new FuzzyDrink(name, servingSize, brand); break; case "Water": drink = new Water(name, servingSize, brand); break; default: drink = null; break; } return(drink); }
//--------------------------------------------------------------------------------------------------------------------------------------------------- //Showing product information. private void ListForChoosingAlcohols_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e) { //Creating a new layout for showing information about product. AlertDialog.Builder Object = new AlertDialog.Builder(this); LayoutInflater inflater = LayoutInflater.From(this); LinearLayout layout = new LinearLayout(this); View alcohol_Info = inflater.Inflate(Resource.Layout.alcohol_Info, layout); Object.SetView(alcohol_Info); //Elements from the layout. TextView NameText = alcohol_Info.FindViewById <TextView>(Resource.Id.NameText); TextView PercentageText = alcohol_Info.FindViewById <TextView>(Resource.Id.PercentageText); TextView CcalsText = alcohol_Info.FindViewById <TextView>(Resource.Id.CcalsText); //Temporary product for getting information about choosed product. Alcohol TempAlcohol = DatabaseAlcohol.GetAlcohol(ListForAlcohols.ElementAt(e.Position)); //Showing information. NameText.Text = TempAlcohol.Name; PercentageText.Text = TempAlcohol.PercentageOfAlchol.ToString(); CcalsText.Text = TempAlcohol.CCal.ToString(); //Action on positive button. Object.SetPositiveButton(Resource.String.OK, new EventHandler <DialogClickEventArgs>(delegate(object Sender, DialogClickEventArgs e1) {})); //Showing the form. Object.Show(); }
// GET: Alcohol/Edit/5 public ActionResult Edit(int?id) { if (id == null) { TempData["mensaje"] = "Especifique la condición."; return(RedirectToAction("Index")); } Alcohol alcohol = db.Alcohol.Find(id); if (alcohol != null) { if (alcohol.activo == 1) { alcohol.estado_String = "Activo"; } else { alcohol.estado_String = "Inactivo"; } } if (alcohol == null) { TempData["mensaje"] = "La condición no éxiste."; return(RedirectToAction("Index")); } ViewBag.ID_EXPEDIENTE = new SelectList(db.Expediente, "id", "ID_PACIENTE", alcohol.ID_EXPEDIENTE); return(View(alcohol)); }
// Start is called before the first frame update void Start() { Player = Instantiate(prefabPlayer, pointSpawn.position, Quaternion.identity); alcohol = Player.GetComponent <Alcohol>(); characterController2D = Player.GetComponent <CharacterController2D>(); cameraManager = Camera.GetComponent <CameraManager>(); }
public string AddDrink(string type, string name, int servingSize, string brand) { IDrink drink = null; if (type == "Alcohol") { drink = new Alcohol(name, servingSize, brand); } else if (type == "FuzzyDrink") { drink = new FuzzyDrink(name, servingSize, brand); } else if (type == "Juice") { drink = new Juice(name, servingSize, brand); } else if (type == "Water") { drink = new Water(name, servingSize, brand); } if (drink != null) { this.drinks.Add(drink); } return($"Added {drink.Name} ({drink.Brand}) to the drink pool"); }
public string AddDrink(string type, string name, int servingSize, string brand) { IDrink drink = null; switch (type.ToLower()) { case "fuzzydrink": drink = new FuzzyDrink(name, servingSize, brand); break; case "juice": drink = new Juice(name, servingSize, brand); break; case "water": drink = new Water(name, servingSize, brand); break; case "alcohol": drink = new Alcohol(name, servingSize, brand); break; default: throw new ArgumentException($"Invalid drink type {type}!"); } this.drinks.Add(drink); return($"Added {drink.Name} ({drink.Brand}) to the drink pool"); }
public decimal CalculateTax(Alcohol alcohol) { var alcoholTax = alcohol.Price * 1.3m; var calcoholTotalPriceWithDiscount = CalculateTotalPrice(alcoholTax, alcohol); return(calcoholTotalPriceWithDiscount); }
public UserSettings setAlcohol(Alcohol alcohol) { switch (alcohol) { case Alcohol.NEGATIVE: { #if UNITY_ANDROID && !UNITY_EDITOR || UNITY_IPHONE && !UNITY_EDITOR getInstance().setAlcohol(1); #endif return(this); } case Alcohol.NEUTRAL: { #if UNITY_ANDROID && !UNITY_EDITOR || UNITY_IPHONE && !UNITY_EDITOR getInstance().setAlcohol(2); #endif return(this); } case Alcohol.POSITIVE: { #if UNITY_ANDROID && !UNITY_EDITOR || UNITY_IPHONE && !UNITY_EDITOR getInstance().setAlcohol(3); #endif return(this); } } return(null); }
public string AddDrink(string type, string name, int servingSize, string brand) { IDrink drink = null; switch (type) { case "Alcohol": drink = new Alcohol(name, servingSize, brand); break; case "FuzzyDrink": drink = new FuzzyDrink(name, servingSize, brand); break; case "Juice": drink = new Juice(name, servingSize, brand); break; case "Water": drink = new Water(name, servingSize, brand); break; } this.drinks.Add(drink); return($"Added {name} ({brand}) to the drink pool"); }
/// <inheritdoc /> public Consumable Convert(ItemDTO value, object state) { var entity = new Alcohol(); this.Merge(entity, value, state); return(entity); }
void OnTriggerStay2D(Collider2D other) { if (other.tag.Contains("Pickable") && !m_currentlyCollidingWith) { //Debug.Log("collided with " + other.tag + " " + other.gameObject.name); Debug.Log("TES"); m_currentlyCollidingWith = other; GameObject go = other.gameObject; Glass g = go.GetComponent <Glass>(); if (g) { g.setSelected(true); } Alcohol a = go.GetComponent <Alcohol>(); if (a) { a.setSelected(true); } Fruit f = go.GetComponent <Fruit>(); if (f) { f.setSelected(true); } } else if (other.tag.Contains("Client") && !m_client) { m_client = other.gameObject; } }
public IDrink CreateDrink(string type, string name, int servingSize, string brand) { IDrink drink; if (type == "FuzzyDrink") { drink = new FuzzyDrink(name, servingSize, brand); } else if (type == "Juice") { drink = new Juice(name, servingSize, brand); } else if (type == "Water") { drink = new Water(name, servingSize, brand); } else if (type == "Alcohol") { drink = new Alcohol(name, servingSize, brand); } else { throw new InvalidOperationException("Wrong type of drink!"); } return(drink); }
// GET: Alcohol/Details/5 public ActionResult Details(int?id) { if (id == null) { TempData["mensaje"] = "Especifique la condición."; return(RedirectToAction("Index")); } Alcohol alcohol = db.Alcohol.Find(id); if (alcohol != null) { if (alcohol.activo == 1) { alcohol.estado_String = "Activo"; } else { alcohol.estado_String = "Inactivo"; } } if (alcohol == null) { TempData["mensaje"] = "La condición no éxiste."; return(RedirectToAction("Index")); } return(View(alcohol)); }
// Use this for initialization void Start() { //Prostitute(Sprite sprite, string name, int preference, highlighted) Prostitute Bertha = new Prostitute(Berthas, 1, false); Prostitute Amalia = new Prostitute(Amalias, 2, false); Prostitute Eleanor = new Prostitute(Eleanors, 3, false); Prostitute Fannie = new Prostitute(Fannies, 4, false); Prostitute Mollie = new Prostitute(Mollies, 5, false); Prostitute Pearl = new Prostitute(Pearls, 6, false); Prostitute Ai = new Prostitute(Ais, 7, false); Prostitutes = new Prostitute[8]; Prostitutes[1] = Bertha; Prostitutes[2] = Amalia; Prostitutes[3] = Eleanor; Prostitutes[4] = Fannie; Prostitutes[5] = Mollie; Prostitutes[6] = Pearl; Prostitutes[7] = Ai; Prostitutes[1].killed = true; Prostitutes[2].killed = true; Prostitutes[3].killed = true; Prostitutes[4].killed = true; Prostitutes[5].killed = true; Prostitutes[6].killed = true; //Alcohol(Sprite sprite, string name, int preference, served, highlighted) Alcohol Bottle = new Alcohol(Bottles, 1, false, false); Alcohol Shot = new Alcohol(Shots, 2, false, false); Alcohol Glass = new Alcohol(Glasss, 3, false, false); Alcohol BottleFat = new Alcohol(BottleFats, 4, false, false); Alcohols = new Alcohol[5]; Alcohols[1] = Bottle; Alcohols[2] = Shot; Alcohols[3] = Glass; Alcohols[4] = BottleFat; //public Food(GameObject Prefab_, int preference, bool served_, bool highlighted_) Food Steak = new Food(Steaks, 1, false, false); Food BB = new Food(BBs, 2, false, false); Food BG = new Food(BGs, 3, false, false); Food Chicken = new Food(Chickens, 4, false, false); Foods = new Food[5]; Foods[1] = Steak; Foods[2] = BB; Foods[3] = BG; Foods[4] = Chicken; DontDestroyOnLoad(this.gameObject); Killed(); }
private void AddAlcoholIfMathced(Alcohol alcohol) { double percentege = totalAlcoholVolume - CalculateSingleAlchol(alcohol); if (percentege > 0) { totalAlcoholVolume = percentege; matchedAlcohol.Add(alcohol); } }
public void Calculate() { List <Alcohol> alcohols = Logistics.GetAlcoholsList(); Alcohol alcoholWithMinPercentage = GetAlcoholFromListWithMinPercentage(alcohols); while (totalAlcoholVolume > CalculateSingleAlchol(alcoholWithMinPercentage)) { AddMatchedAlcohols(alcohols); } matchedAlcohol = matchedAlcohol.OrderBy(a => a.AlcoholPercent).ToList(); }
public override void Interact() { if (PlayerScan.instance.progressStatus == ProgressStatus.E_GetCashNCard) //카드를 가진상태면 { PlayerScan.instance.progressStatus = ProgressStatus.E_GetAlcholBottle; //술을 가진 상태로 변경 Alcohol alcohol = ObjectManager.GetObject <Alcohol>(); alcohol.gameObject.SetActive(true); Inventory.instance.GetItemInSlot(alcohol.gameObject); //술을 가져오고 StartCoroutine(GetItemPanel.instance.IShowText(alcohol.itemName)); //술을 얻었다 표시! } }
public ActionResult Add(Alcohol alc) { if (db.Alcohols.Contains(alc)) { return(BadRequest()); } alc.CreationDate = DateTime.Now; db.Alcohols.Add(alc); db.SaveChanges(); return(RedirectToAction("Index")); }
//Add public void Add(AlcoholDTO alcoholDTO) { var alcohol = new Alcohol { ABV = alcoholDTO.ABV, Brand = alcoholDTO.Brand, Style = alcoholDTO.Style, Type = alcoholDTO.Type }; _repo.Add(alcohol); }
private MatchedAlcohol MapAlcoholWithMathcedAlcohol(Alcohol alcohol) { return(new MatchedAlcohol { Id = alcohol.Id, NameAlcohol = alcohol.NameAlcohol, AlcoholPercent = alcohol.AlcoholPercent, Volume = alcohol.Volume, Discription = alcohol.Discription, PathImage = alcohol.PathImage }); }
public ActionResult Post(AlcoholModel model) { try { Alcohol result = _repository.Add(model); return(Ok()); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, "Failed database")); } }
public ActionResult Edit(Alcohol alcohol) { try { db.Entry(alcohol).State = EntityState.Modified; db.SaveChanges(); TempData["mensaje"] = "Atualizado con éxito."; return(RedirectToAction("Index")); } catch { ViewBag.ID_EXPEDIENTE = new SelectList(db.Expediente, "id", "ID_PACIENTE", alcohol.ID_EXPEDIENTE); return(View(alcohol)); } }
public void GiveDrink(Alcohol drink) { if (drink.forpreference == currentcustomer.Drinkpreference) { Destroy(drink.drinkmade); drink.served = false; Debug.Log("drinkgone"); Invoke("OrderFood", 5f); COS.Stop(); } else { Debug.Log("delse"); } }
public void ParseAlcoholString(string input) { switch (input) { case "No_Alcohol_Served": this.Alcohol = Model.Alcohol.No_Alcohol_Served; break; case "Wine_Beer": this.Alcohol = Model.Alcohol.Wine_Beer; break; case "Full_Bar": this.Alcohol = Model.Alcohol.Full_Bar; break; } }
public ActionResult DeleteConfirmed(int id) { Alcohol alcohol = db.Alcohol.Find(id); if (alcohol.activo == 0) { alcohol.activo = 1; } else { alcohol.activo = 0; } db.SaveChanges(); TempData["mensaje"] = "Estado actualizado."; return(RedirectToAction("Index")); }
public ActionResult Create(Alcohol alcohol) { try { alcohol.activo = 1; db.Alcohol.Add(alcohol); db.SaveChanges(); TempData["mensaje"] = "Guardado con éxito."; return(RedirectToAction("Index")); } catch { ViewBag.ID_EXPEDIENTE = new SelectList(db.Expediente, "id", "ID_PACIENTE", alcohol.ID_EXPEDIENTE); return(View(alcohol)); } }
public Alcohol Add(AlcoholModel model) { Alcohol alcohol = new Alcohol { Name = model.Model_Name, Alcohol_type = model.Model_Alcohol_type, Alcohol_degree = model.Model_Alcohol_degree, Pulled_from = model.Model_Pulled_from, Year_of_alcohol = model.Model_Year_of_alcohol, Made_In = model.Model_Made_In }; _context.Add(alcohol); _context.SaveChanges(); return(alcohol); }
public override void OnEnter(int playerID) { Globals.gameHandler.GetPlayerFromID(playerID).AddDebt(Balance.PartyCost); do { Card c; if (Globals.r.Next(2) == 0) { c = new Drugs(Vector2.Zero, true, playerID); } else { c = new Alcohol(Vector2.Zero, true, playerID); } Globals.cardSelected = c; Globals.gameHandler.gameBoard.PlayCardOnField(playerID, playerID == 0 ? Globals.gameHandler.gameBoard.playingField1 : Globals.gameHandler.gameBoard.playingField2); Globals.cardSelected = null; } while (Globals.r.NextDouble() < Balance.PartyChance); }
public UserSettings setAlcohol(Alcohol alcohol) { switch(alcohol) { case Alcohol.NEGATIVE: { #if UNITY_ANDROID && !UNITY_EDITOR || UNITY_IPHONE && !UNITY_EDITOR getInstance().setAlcohol(1); #endif return this; } case Alcohol.NEUTRAL: { #if UNITY_ANDROID && !UNITY_EDITOR || UNITY_IPHONE && !UNITY_EDITOR getInstance().setAlcohol(2); #endif return this; } case Alcohol.POSITIVE: { #if UNITY_ANDROID && !UNITY_EDITOR || UNITY_IPHONE && !UNITY_EDITOR getInstance().setAlcohol(3); #endif return this; } } return null; }