コード例 #1
0
ファイル: MainWindow.cs プロジェクト: jonator/AddressBook
        private void contactListBox_DoubleClick(object sender, EventArgs e)
        {
            int index = contactListBox.SelectedIndex;

            if (virtualContactList.Count == 0 || index == -1)
            {
                return;
            }

            Contact toView = virtualContactList[index];//Contact toView = the item in the virtual list at index; virtualContactList[index] pulls out the contact info that is tied to the contactListBox because of the [ ]
            ContactViewer form = new ContactViewer(toView);

            form.ShowDialog();

            refreshListBox();//calls the refrestListBox method below upon a double click
        }
コード例 #2
0
        private void contactListBox_DoubleClick(object sender, EventArgs e)
        {
            int index = contactListBox.SelectedIndex;

            if (virtualContactList.Count == 0 || index == -1)
            {
                return;
            }

            Contact       toView = virtualContactList[index];//Contact toView = the item in the virtual list at index; virtualContactList[index] pulls out the contact info that is tied to the contactListBox because of the [ ]
            ContactViewer form   = new ContactViewer(toView);

            form.ShowDialog();

            refreshListBox();//calls the refrestListBox method below upon a double click
        }