Пример #1
0
        private void listBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((int)e.KeyChar == 13)
            {
                if (listBox.SelectedIndex != -1)
                {
                    String            word    = listBox.SelectedItem.ToString();
                    DictionaryArticle article = dictionary[word];

                    if (article.type == 'V')
                    {
                        FormForms form = new FormForms(article);
                        form.Show();
                    }
                }
            }
        }
Пример #2
0
        private void listBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (listBox.SelectedIndex != -1)
            {
                if (listBox.IndexFromPoint(e.Location) == listBox.SelectedIndex)
                {
                    String            word    = listBox.SelectedItem.ToString();
                    DictionaryArticle article = dictionary[word];

                    if (article.type == 'V')
                    {
                        FormForms form = new FormForms(article);
                        form.Show();
                    }
                }
            }
        }