// GET public JsonResult AddCooper(Cooper cooper) { _db.Coopers.Add(cooper); var total = _db.SaveChanges(); ResponseTemplate response = new ResponseTemplate(); response.Data = total; return(Json(response)); }
internal override void ShowCard(string s,int x,int y) { PlayCard a = new PlayCard(); switch (s) { case "銅貨": a = new Cooper(ShowField, ShowHand, this); break; case "銀貨": a = new Silver(ShowField, ShowHand, this); break; case "金貨": a = new Gold(ShowField, ShowHand, this); break; case "屋敷": a = new Mansion(ShowField, ShowHand, this); break; case "公領": a = new Landtag(ShowField, ShowHand, this); break; case "属州": a = new Province(ShowField, ShowHand, this); break; case "地下貯蔵庫": a = new UndergroundRepository(ShowField, ShowHand, this); break; case "市場": a = new Market(this); break; case "民兵": a = new Militia(ShowField, ShowHand, this); break; case "鉱山": a = new Mine(ShowField, ShowHand, this); break; case "堀": a = new Moat(this); break; case "鍛冶屋": a = new Smithy(this); break; case "村": a = new Village(this); break; case "木こり": a = new Woodcutter(this); break; case "改築": a = new Remodel(this); break; case "工房": a = new Workshop(this); break; } a.Location = new System.Drawing.Point(x,y); a.Size = new System.Drawing.Size(70, 110); a.Name = s; a.SizeMode = PictureBoxSizeMode.StretchImage; a.Image = global::dominion.Properties.Resources.back; form1.Controls.Add(a); a.BringToFront(); ShowHand.Add(a); a.ChangePointPara(880 + 20 * ShowHand.Count, 10 + 120 * num); for (int i = 0; i < ShowHand.Count; i++) { ShowHand[i].Refresh(); } ShowDeck.Refresh(); }