private void button1_Click(object sender, EventArgs e) { if (setList.SelectedItems.Count == 0) { return; } if (setList.SelectedItems.Count > 1) { return; } var item = setList.SelectedItems[0]; TrinityEdit.CurTiles = item.Tag as TrinityEngine.Map.TileSet.TileSet; if (JustSelect) { return; } var tse = new Controls.Editors.Tileset.TilesetEditor(); var set = item.Tag as TrinityEngine.Map.TileSet.TileSet; tse.TilesetName = set.Name; tse.Set = set; tse.Text = "Editing Set:" + set.Name; tse.Show(); tse.RebuildMap(); //foreach(var set in Sets) //{ //} }
private void button1_Click(object sender, EventArgs e) { var tse = new Controls.Editors.Tileset.TilesetEditor(); tse.TilesetName = TilesetText.Text; var new_Set = new TrinityEngine.Map.TileSet.TileSet(TilesetText.Text); //new_Set.Name = TilesetText.Text; TrinityEdit.Sets.Add(new_Set); TrinityEdit.CurTiles = new_Set; tse.Set = new_Set; tse.Text = "Editing:" + new_Set.Name; tse.Show(); Close(); }