public void StartNewComponent() { SelectedComponent.ClearSelection(); SelectedComponent.ID = Guid.NewGuid().ToString(); SelectedComponent.Name = "NewComponent"; ComponentAbilitySDs.Clear(); }
private void Components_SelectionChangedEvent(int oldSelection, int newSelection) { if (newSelection == -1) //if newindex is not a valid selection { return; } SelectedComponent.SetDesignSD(Components.GetKey());// = mainTemplateVM; ComponentAbilitySDs.Clear(); var tmp = new List <ComponentAbilityTemplateVM>(); foreach (var item in Components.GetKey().ComponentAbilitySDs) { var vm = new ComponentAbilityTemplateVM(this, item, ComponentAbilitySDs, _staticData); tmp.Add(vm); } ComponentAbilitySDs.AddRange(tmp); }
public void AddNewAbility() { ComponentAbilitySDs.Add(new ComponentAbilityTemplateVM(this, ComponentAbilitySDs, _staticData)); }