Exemplo n.º 1
0
        private void buttonNewList_Click(object sender, EventArgs e)
        {
            FormNewList newList = new FormNewList(this);

            if (newList.ShowDialog() == DialogResult.OK)
            {
                Close();
            }
        }
Exemplo n.º 2
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormNewList newList = new FormNewList(this);

            if (newList.ShowDialog() == DialogResult.OK)
            {
                LoadNewList(newList);

                practiceToolStripMenuItem.Enabled = true;
                EditButtonsSwitch();

                labelCurrentWordList.Text = $"Current list: {newList.SelectedList}";
            }
        }
Exemplo n.º 3
0
        public void LoadNewList(FormNewList newList)
        {
            dataGridViewEdit.Columns.Clear();
            dataGridViewEdit.Rows.Clear();

            string selection = newList.SelectedList;

            foreach (string language in WinFormsHelper.Languages(selection))
            {
                dataGridViewEdit.Columns.Add(language, language.ToUpper());
            }

            foreach (string[] words in WinFormsHelper.AllWords(selection))
            {
                dataGridViewEdit.Rows.Add(words);
            }

            practiceToolStripMenuItem.Enabled = true;
            EditButtonsSwitch();

            labelCurrentWordList.Text = $"Current list: {newList.SelectedList}";

            CurrentList = newList.SelectedList;
        }