private void btnAddDeck_Click(object sender, EventArgs e) { Deck deck = null; deck = new Deck(); deck.ID = Guid.NewGuid().ToString(); FormChanger.SetForm(new FormEditDeck(m_CardMaker, deck)); }
private void FormMain_Load(object sender, EventArgs e) { if (m_CardMaker.LoadData(Application.StartupPath + "\\CardMakerData.xml") == false) { MessageBox.Show(m_CardMaker.Error, "Fehler beim Laden", MessageBoxButtons.OK, MessageBoxIcon.Error); } FormChanger.SetParent(this); FormChanger.SetForm(new FormMenu(m_CardMaker)); }
private void btnEditDeck_Click(object sender, EventArgs e) { Deck selectedDeck = null; if (dgvDecks.SelectedRows.Count == 1) { selectedDeck = (Deck)dgvDecks.SelectedRows[0].Tag; FormChanger.SetForm(new FormEditDeck(m_CardMaker, selectedDeck)); } }
private void btnEditCard_Click(object sender, EventArgs e) { Card selectedCard = null; if (dgvCards.SelectedRows.Count == 1) { selectedCard = (Card)dgvCards.SelectedRows[0].Tag; FormChanger.SetForm(new FormEditCard(m_CardMaker, selectedCard)); } }
private void btnAddCard_Click(object sender, EventArgs e) { Card card = null; if (cmbGroup.Text.Length > 0) { card = new Card(); card.ID = Guid.NewGuid().ToString(); card.Group = cmbGroup.Text; FormChanger.SetForm(new FormEditCard(m_CardMaker, card)); } }
private void btnStartGame_Click(object sender, EventArgs e) { Deck selectedDeck = null; Game game = null; if (dgvDecks.SelectedRows.Count == 1) { selectedDeck = (Deck)dgvDecks.SelectedRows[0].Tag; game = new Game(m_CardMaker, selectedDeck); FormChanger.SetForm(new FormGame(m_CardMaker, game)); } }
private void btnApply_Click(object sender, EventArgs e) { m_Card.Name = edtName.Text; m_Card.Description = edtDescription.Text; if (m_CardMaker.Data.Cards.Contains(m_Card) == false) { m_CardMaker.Data.Cards.Add(m_Card); } if (m_CardMaker.SaveData() == false) { MessageBox.Show(m_CardMaker.Error, "Fehler beim Speichern", MessageBoxButtons.OK, MessageBoxIcon.Error); } FormChanger.SetForm(new FormCards(m_CardMaker, m_Card.Group)); }
private void btnApply_Click(object sender, EventArgs e) { m_Deck.Name = edtName.Text; m_Deck.Description = edtDescription.Text; m_Deck.CardIDs = m_lstCardIDsTemp; if (m_CardMaker.Data.Decks.Contains(m_Deck) == false) { m_CardMaker.Data.Decks.Add(m_Deck); } if (m_CardMaker.SaveData() == false) { MessageBox.Show(m_CardMaker.Error, "Fehler beim Speichern", MessageBoxButtons.OK, MessageBoxIcon.Error); } FormChanger.SetForm(new FormDecks(m_CardMaker)); }
private void btnCancel_Click(object sender, EventArgs e) { FormChanger.SetForm(new FormDecks(m_CardMaker)); }
private void btnCards_Click(object sender, EventArgs e) { FormChanger.SetForm(new FormCards(m_CardMaker, string.Empty)); }
private void btnGame_Click(object sender, EventArgs e) { FormChanger.SetForm(new FormSelectDeck(m_CardMaker)); }