Inheritance: System.Windows.Controls.ListViewItem
Esempio n. 1
0
        private void Button_Edit_Click(object sender, RoutedEventArgs e)
        {
            ListViewItemTableTile selectedItem = ListView_TableTiles.SelectedItem as ListViewItemTableTile;

            if (selectedItem != null)
            {
                App.TableTileManager.Remove(selectedItem.TableTile);
                WindowTableTileEdit dialog = new WindowTableTileEdit(App.WindowMain, selectedItem.TableTile);
                dialog.ShowDialog();
                App.TableTileManager.Add(dialog.TableTile);
                UpdateListView(dialog.TableTile);
            }
        }
Esempio n. 2
0
        private void Button_Delete_Click(object sender, RoutedEventArgs e)
        {
            ListViewItemTableTile selectedItem = ListView_TableTiles.SelectedItem as ListViewItemTableTile;

            if (selectedItem != null)
            {
                WindowMessageResult result = WindowMessage.ShowDialog(string.Format("Do you want to delete '{0}'?", selectedItem.TableTile.Name), "Delete", WindowMessageButtons.YesNoCancel, WindowMessageImage.Question, App.WindowMain);
                if (result == WindowMessageResult.Yes)
                {
                    App.TableTileManager.Remove(selectedItem.TableTile);
                    UpdateListView();
                }
            }
        }