Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Drawing;
- using System.Windows.Forms;
- namespace MemoryGame
- {
- internal class MemoryCard : Label
- {
- public Guid Id;
- public Image Tyl;
- public Image Obrazek;
- public MemoryCard(Guid Id, string tylSciezka, string obrazekSciezka)
- {
- this.Id = Id;
- this.Tyl = Image.FromFile(tylSciezka);
- this.Obrazek = Image.FromFile(obrazekSciezka);
- BackgroundImageLayout = ImageLayout.Stretch;
- }
- public void Zakryj()
- {
- BackgroundImage = Tyl;
- Enabled = true;
- }
- public void Odkryj()
- {
- BackgroundImage = Obrazek;
- Enabled = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement