示例#1
0
        //Method to add columns to the grid. - DONE!
        private void AddColumns()
        {
            WordList editList = WordList.LoadList(FormWordList.NameOfList);

            foreach (var item in editList.Languages)
            {
                dataGridView_EditListGrid.Columns.Add(item, FormWordList.Capitilize(item.ToString()));
            }
        }
示例#2
0
        public FormAddWord()
        {
            InitializeComponent();
            WordList editList = WordList.LoadList(FormWordList.NameOfList);

            foreach (var item in editList.Languages)
            {
                dataGridView_AddWords.Columns.Add(item, FormWordList.Capitilize(item.ToString()));
            }
            dataGridView_AddWords.Rows.Add();
        }
        private void GetPracticeWord()
        {
            WordList practiceList   = WordList.LoadList(FormWordList.NameOfList);
            Word     wordtoPractice = practiceList.GetWordToPractice();

            string fromLanguage = practiceList.Languages[wordtoPractice.FromLanguage];

            _wordToPractice = wordtoPractice.Translations[wordtoPractice.FromLanguage];
            string toLanguage = practiceList.Languages[wordtoPractice.ToLanguage];
            string wordID     = wordtoPractice.Translations[wordtoPractice.ToLanguage];

            label_FromLanguage.Text = FormWordList.Capitilize(fromLanguage);
            label_WordID.Text       = $"'{wordID}'";
            label_ToLanguage.Text   = FormWordList.Capitilize(toLanguage);
        }