예제 #1
0
        private void Button_Add_Click(object sender, RoutedEventArgs e)
        {
            WindowTableTileEdit dialog = new WindowTableTileEdit(App.WindowMain);

            dialog.ShowDialog();
            if (dialog.Saved)
            {
                App.TableTileManager.Add(dialog.TableTile);
                UpdateListView(dialog.TableTile);
            }
        }
예제 #2
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);
            }
        }