예제 #1
0
파일: Card.cs 프로젝트: LasmGratel/UnoSharp
        private static Image GetGoldenCard()
        {
            var path    = $"UnoSharp.Resources.Cards.GoldenCard.png";
            var content = EmbedResourceReader.GetStream(path);

            return(new Bitmap(content));
        }
예제 #2
0
        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));
        }
예제 #3
0
파일: Card.cs 프로젝트: LasmGratel/UnoSharp
        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));
        }