private void RegenerateEntities() { string shapeString = ShapeTextBox.Text; string[] splitString = shapeString.Split(' '); // todo: Not recreate the tabs always, and only create new ones where necessary... int i = 0; foreach (string stringPart in splitString) { if (String.IsNullOrEmpty(stringPart)) { continue; } EntityEditorTab tab = new EntityEditorTab(EntityTabControl, this, new Entity() { IsOutputEntity = false, MatchThreshold = 1f, OutputEntityGUID = null, RawContents = stringPart, SourceString = stringPart.ToLower().Replace(" ", string.Empty).Replace("-", string.Empty), Type = EntityType.Match }, i); i++; ShapeTabs.Add(tab); } EntityCountLabel.Text = "Entities: " + ShapeTabs.Count; }
private void ReloadEntities() { for (int i = 0; i < Data.Entities.Length; i++) { EntityEditorTab tab = new EntityEditorTab(EntityTabControl, this, Data.Entities[i], i); ShapeTabs.Add(tab); } EntityCountLabel.Text = "Entities: " + ShapeTabs.Count; }