private string GetToggleType(Toggle tg) { string cardName = tg.gameObject.name; cardName = cardName.Substring(0, cardName.Length - 7); //print(cardName); foreach (Card card in Utilities.MarionetteCardList) { if (card.Name == cardName) { return(MyTool.GetEnumDescription(card.TypeName)); } } foreach (Card card in Utilities.DrawingCardList) { if (card.Name == cardName) { return(MyTool.GetEnumDescription(card.TypeName)); } } foreach (Card card in Utilities.GoodCardList) { if (card.Name == cardName) { return(MyTool.GetEnumDescription(card.TypeName)); } } return(""); }
public void PrintAll() { string infos = String.Format("{0} {1} {2} {3} {4}", ID, Name, Description, IsSelected, MyTool.GetEnumDescription(TypeName) ); Debug.Log(infos); }
public void PrintAll() { string info = String.Format("{0} {1} {2} {3}", MyTool.GetEnumDescription(AbstractName), MyTool.GetEnumDescription(Mode), MyTool.GetEnumDescription(Name), MyTool.GetEnumDescription(PresetCards) ); Debug.Log(info); }
public void PrintAll() { string[] infos = new string[4]; infos[0] = String.Format("游戏人数 {0}", MyTool.GetEnumDescription(PlayerNumber)); infos[1] = String.Format("游戏地图 {0}", MyTool.GetEnumDescription(MapType)); infos[2] = String.Format("本次目标 {0}", MyTool.GetEnumDescription(Target)); infos[3] = String.Format("初始资金 {0}", MyTool.GetEnumDescription(InitialFunds)); foreach (string info in infos) { Debug.Log(info); } for (int i = 0; i < pnoToInt[PlayerNumber]; i++) //foreach(PlayerConfiguration pc in PlayerList) { PlayerList[i].PrintAll(); } }
// GET: Admin/DonHang/Edit/5 public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var donHang = await _context.DonHangs.FindAsync(id); if (donHang == null) { return(NotFound()); } ViewData["MaKh"] = new SelectList(_context.KhachHangs, "MaKh", "HoTen", donHang.MaKh); //lấy chi tiết đơn hàng var ctdh = _context.ChiTietDonHangs .Where(p => p.MaDh == donHang.Id) .Include(p => p.HangHoa); ViewBag.ChiTietDh = ctdh; //gửi trạng thái //new SelectList(_context.Loais, "MaLoai", "TenLoai"); var statusList = new List <SelectListItem>(); foreach (TrangThaiDonHang tt in Enum.GetValues(typeof(TrangThaiDonHang))) { statusList.Add(new SelectListItem { //Text = Enum.GetName(typeof(TrangThaiDonHang), tt), Text = MyTool.GetEnumDescription(tt), Value = tt.GetHashCode().ToString() }); } ViewBag.StatusList = statusList; //check xem cho sửa hay không? ViewBag.Editable = donHang.TrangThaiDonHang != TrangThaiDonHang.DaThanhToan && donHang.TrangThaiDonHang != TrangThaiDonHang.HuyDonHang; return(View(donHang)); }
private void DisplayMessageWhenMouseEnter(Button btn, Card card, bool isBlank = false) { if (!isBlank) { btn.onClick.AddListener(() => { cardPreview.SetActive(true); Transform[] tfs = cardPreview.GetComponentsInRealChildren <Transform>(); tfs[0].gameObject.GetComponent <Image>().sprite = Resources.Load(Utilities.res_folder_path_cards + card.Name + "_n", typeof(Sprite)) as Sprite; tfs[1].gameObject.GetComponent <TextMeshProUGUI>().text = card.Name; tfs[3].gameObject.GetComponent <TextMeshProUGUI>().text = MyTool.GetEnumDescription(card.TypeName); tfs[4].gameObject.GetComponent <TextMeshProUGUI>().text = card.Description; }); } else { btn.onClick.AddListener(() => { cardPreview.SetActive(false); }); } }