private void LoadSelectedList()
        {
            FormLoadList loadList = new FormLoadList();

            if (loadList.ShowDialog() == DialogResult.OK)
            {
                dataGridViewEdit.Columns.Clear();
                dataGridViewEdit.Rows.Clear();

                string selection = loadList.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);
                }

                EditButtonsSwitch();
                buttonAddWord.Enabled = true;

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

                CurrentList = loadList.SelectedList;
            }
        }
示例#2
0
        public FormNewList(FormLoadList parent)
        {
            parentLoadList = parent;

            InitializeComponent();
        }