public CardListForm(List <Card> listToDisplay, String title, DeckInterface parent)
 {
     InitializeComponent();
     connection = listToDisplay;
     listBoxCards.DataSource = connection;
     this.Text = title;
     interfce  = parent;
     update();
 }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            String []   cards    = File.ReadAllLines(comboBox1.Text);
            List <Card> cardobjs = new List <Card>();

            foreach (String str in cards)
            {
                if (str == "//SB")
                {
                    break;
                }
                cardobjs.Add(new Card()
                {
                    Name = str
                });
            }
            DeckInterface fromopener = new DeckInterface(cardobjs);

            fromopener.Show();
        }