Exemple #1
0
        private void AddFriend_MenuClick(object sender, RoutedEventArgs e)
        {
            AddEditDialog dialog = new AddEditDialog(this);

            if (dialog.ShowDialog() == true)
            {
                lvFriends.Items.Refresh();
            }
        }
        private void LvFriends_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Friend friend = lvFriends.SelectedItem as Friend;

            if (friend == null)
            {
                return;
            }
            AddEditDialog dialog = new AddEditDialog(this, friend);

            if (dialog.ShowDialog() == true)
            { // only refresh if data changed
                lvFriends.Items.Refresh();
            }
        }
Exemple #3
0
        private void lvFriends_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Friend f = lvFriends.SelectedItem as Friend;

            if (f == null)
            {
                return;
            }

            AddEditDialog dialog = new AddEditDialog(this, f);

            if (dialog.ShowDialog() == true)
            {
                lvFriends.Items.Refresh();
            }
        }