Ejemplo n.º 1
0
        void tilesetBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            TileSetWindow window = new TileSetWindow()
            {
                TileSet = Map.TileSet, IsMapTileSet = true
            };

            window.ShowDialog();
        }
Ejemplo n.º 2
0
        private void menuTileSetNew_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new TileSetWindow();
            dialog.Owner = this;

            if (dialog.ShowDialog() == true)
            {
                TileMap.TileSets.Add(dialog.TileSet);
                listTileSets.SelectedIndex = listTileSets.Items.Count - 1;
            }
        }
Ejemplo n.º 3
0
        private void menuTileSetEdit_Click(object sender, RoutedEventArgs e)
        {
            var index = listTileSets.SelectedIndex;

            if (index != -1)
            {
                var copy = TileMap.TileSets[index].Copy();
                var dialog = new TileSetWindow(copy);
                dialog.Owner = this;

                if (dialog.ShowDialog() == true)
                {
                    TileMap.TileSets[index] = dialog.TileSet;
                    listTileSets.SelectedIndex = index;
                }
            }
        }
 void tilesetBinding_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     TileSetWindow window = new TileSetWindow() { TileSet = Map.TileSet, IsMapTileSet = true };
     window.ShowDialog();
 }