public static Bitmap ToImage(this Card card) { var path = $"UnoSharp.Resources.Cards.{card.Color}.{card.Value}.png"; var content = EmbedResourceReader.GetStream(path); return(new Bitmap(content)); }
private static Image GetGoldenCard() { var path = $"UnoSharp.Resources.Cards.GoldenCard.png"; var content = EmbedResourceReader.GetStream(path); return(new Bitmap(content)); }
public Dictionary <string, List <string> > GetCommands() { if (Commands == null) { var messagesJson = EmbedResourceReader.Read("UnoSharp.Resources.messages.json"); // 默认信息JSON Commands = messagesJson.JsonDeserialize <Dictionary <string, List <string> > >(); } return(Commands); }
public virtual Bitmap ToImage() { var path = $"UnoSharp.Resources.Cards.{this.Color}.{this.Value}.png"; var content = EmbedResourceReader.GetStream(path); if (content == null) { return((Bitmap)Card.GoldenCardImage); } return(new Bitmap(content)); }