Esempio n. 1
0
        private void AddNewQuestionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddNewQuestion form = new AddNewQuestion();

            form.ShowDialog();

            using (ForumContainer container = new ForumContainer())
            {
                toolStripQuestionListBox.Items.AddRange(
                    QuestIdentification.questIdentifications(container.QuestionSet
                                                             .Where(y => y.LanguageLanguageId == this.language.LanguageId))
                    .Select(x => x.text).ToArray());
            }
        }
Esempio n. 2
0
        public Question(LanguageSet language)
        {
            this.language = language;
            InitializeComponent();

            toolStripQuestionListBox.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            toolStripQuestionListBox.AutoCompleteSource = AutoCompleteSource.ListItems;


            using (ForumContainer container = new ForumContainer())
            {
                toolStripQuestionListBox.Items.AddRange(
                    QuestIdentification.questIdentifications(container.QuestionSet
                                                             .Where(y => y.LanguageLanguageId == this.language.LanguageId))
                    .Select(x => x.text).ToArray());
            }
        }