示例#1
0
        } // PhoneTextBox_KeyPress

        private void editPersonToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (SearchListView.SelectedItems.Count == 0)
            {
                return;
            }

            int            index         = SearchListView.Items.IndexOf(SearchListView.SelectedItems[0]);
            Person         editingPerson = persons[index];
            EditPersonForm form          = new EditPersonForm(editingPerson, group, categories);

            form.Owner = this;
            form.ShowDialog();

            if (form.IsDataChanged)
            {
                ListViewUpdate();
                IsDataChanged = form.IsDataChanged;
            }
        } // editPersonToolStripMenuItem1_Click
示例#2
0
        void EditPerson()
        {
            if (MainListWindow.SelectedItems.Count == 0)
            {
                return;
            }

            int            index         = MainListWindow.Items.IndexOf(MainListWindow.SelectedItems[0]);
            Person         editingPerson = group.Persons[index];
            EditPersonForm form          = new EditPersonForm(editingPerson, group, categories);

            form.Owner = this;
            form.ShowDialog();

            if (form.IsDataChanged)
            {
                ListViewUpdate();
                IsDataChanged = form.IsDataChanged;
            }
        } // EditPerson